Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS compliance #816

Open
kqyang opened this issue Aug 7, 2020 · 8 comments
Open

HLS compliance #816

kqyang opened this issue Aug 7, 2020 · 8 comments
Assignees
Labels
component: HLS The issue involves HLS output flag: spec compliance An issue with compliance to DASH, HLS, or other specs type: bug Something isn't working correctly
Milestone

Comments

@kqyang
Copy link
Contributor

kqyang commented Aug 7, 2020

This bug tracks HLS compliance failures.

Here is one of the failures:

Shaka Packager generates FRAME-RATE tag for EXT-I-FRAME-STREAM-INF which violates the spec:

HLS Spec 4.3.4.3:

#EXT-X-I-FRAME-STREAM-INF:

All attributes defined for the EXT-X-STREAM-INF tag (Section 4.3.4.2)
are also defined for the EXT-X-I-FRAME-STREAM-INF tag, except for the
FRAME-RATE, AUDIO, SUBTITLES, and CLOSED-CAPTIONS attributes.

@kqyang kqyang added type: bug Something isn't working correctly component: HLS The issue involves HLS output flag: spec compliance An issue with compliance to DASH, HLS, or other specs labels Aug 7, 2020
@kqyang kqyang added this to the v2.5 milestone Aug 7, 2020
kqyang pushed a commit that referenced this issue Aug 7, 2020
@koln67
Copy link
Contributor

koln67 commented Aug 21, 2020

The first issue is fixed, #EXT-X-I-FRAME-STREAM-INF no longer generates a FRAME-RATE attribute

Another "Must fix" error:

Each EXT-X-STREAM-INF tag MUST have a FRAME-RATE attribute: Master Playlist

This was caused because the frame rate was 0, due to a bug in the generation of ts segments. Fixed in #823.

@koln67
Copy link
Contributor

koln67 commented Aug 21, 2020

Additional errors generated from HEVC input files (some of these errors may be from the mediastreamvalidator tool)

Checked against HLS Authoring Specification for Apple Devices
General Requirements
Must Fix Issues
1. The server MUST deliver playlists using gzip content-encoding
All Variants
All Renditions
All I-Frame Variants
Master Playlist
2. Playlist codec type doesn't match content codec type
All Variants
All I-Frame Variants

Should Fix Issues
3. Captions SHOULD be provided with your streams to make content accessible to the deaf or hard of hearing.
Master Playlist
4. For backward compatibility some video content SHOULD be encoded with AVC/H.264
Master Playlist
5. Key frames (IDRs) SHOULD be present every two seconds
All Variants
6. The default video variant(s) SHOULD be the 2000 kb/s variant.
Variant #1
7. You SHOULD have one frame per second "dense" I-frame renditions.
All I-Frame Variants
8. You SHOULD support stream failover
All Variants
All I-Frame Variants
9. Media segments SHOULD be delivered over TLS
All Variants
All Renditions
All I-Frame Variants
10. Content protection SHOULD follow the FairPlay Streaming (FPS) specification
All Variants
All Renditions
All I-Frame Variants
11. Target durations SHOULD be 6 seconds.
All Variants
All Renditions
12. (Segment) You SHOULD use the recommended MIME types.
All Renditions, Received: video/mp4, Expected audio/mp4
13. Audio loudness information SHOULD be provided
All Renditions

Additional requirements for iOS
Must Fix Issues
14. Master playlists that are delivered over cellular networks MUST contain a variant whose peak BANDWIDTH is less than or equal to 192kb/s.
Master Playlist

Should Fix Issues
15. For WiFi delivery, the default video variant(s) SHOULD be the 2000 kb/s variant.
Variant #1 

kqyang pushed a commit that referenced this issue Aug 21, 2020
It fixes the FRAME-RATE missing issue in #816.
@koln67
Copy link
Contributor

koln67 commented Aug 21, 2020

Errors generated from h264 input. Some may overlap with errors generated from HEVC input.

From this list, it appears that "16. All video variants and renditions MUST have segment boundaries at the same points in time
Variant #1, Start time 0.0 does not match -0.083" is an error with the MediaStreamValidator tool (on OSX)

Checked against HLS Authoring Specification for Apple Devices
General requirements
Must Fix Issues
1. The server MUST deliver playlists using gzip content-encoding
All Variants
All Renditions
All I-Frame Variants
Master Playlist

Should Fix Issues
2. Captions SHOULD be provided with your streams to make content accessible to the deaf or hard of hearing.
Master Playlist
3. For H.264 you SHOULD use High Profile in preference to Main or Baseline Profile
Variant #2
Variant #3
I-Frame #7
I-Frame #8
4. Key frames (IDRs) SHOULD be present every two seconds
All Variants
5. The default video variant(s) SHOULD be the 2000 kb/s variant.
Variant #1
6. You SHOULD have one frame per second "dense" I-frame renditions.
All I-Frame Variants
7. You SHOULD support stream failover
All Variants
All I-Frame Variants
8. Media segments SHOULD be delivered over TLS
All Variants
All Renditions
All I-Frame Variants
9. Content protection SHOULD follow the FairPlay Streaming (FPS) specification
All Variants
All Renditions
All I-Frame Variants
10. Target durations SHOULD be 6 seconds.
All Variants
All Renditions
11. All video variants and renditions SHOULD have segment boundaries at the same points in time
Variant #1, Start time 0.0 does not match -0.083
12. (Segment) You SHOULD use the recommended MIME types.
All Renditions, Received: video/mp4, Expected audio/mp4
13. Audio loudness information SHOULD be provided
All Renditions

Additional requirements for iOS
Must Fix Issues
14. Master playlists that are delivered over cellular networks MUST contain a variant whose peak BANDWIDTH is less than or equal to 192kb/s.
Master Playlist

Should Fix Issues
15. For WiFi delivery, the default video variant(s) SHOULD be the 2000 kb/s variant.
Variant #1

Additional requirements for AirPlay 2
Must Fix Issues
16. All video variants and renditions MUST have segment boundaries at the same points in time
Variant #1, Start time 0.0 does not match -0.083

@koln67
Copy link
Contributor

koln67 commented Sep 9, 2020

As a note, most of these issues appear to be in one of two categories, neither of which can be fixed through shaka packager.

  1. Issues with delivery, such as issues relating to the server, network, Wifi, or other methods of delivery. These are separate from the packager.
  2. Content issues, where the input content does not satisfy the spec. These issues also cannot be fixed through shaka packager.

@kqyang
Copy link
Contributor Author

kqyang commented Sep 9, 2020

@koln67 Thanks for the analysis. The only exception I notice is "13. Audio loudness information SHOULD be provided". Can you look into what it is about?

@koln67
Copy link
Contributor

koln67 commented Sep 9, 2020

According to https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices, section 2.19, a loudness box ('ludt') should be provided for loudness information. However, there does not seem to be any additional information in the spec about 'ludt.'

@koln67
Copy link
Contributor

koln67 commented Sep 10, 2020

In addition, the following two parts of the spec mention how this conformance warning could potentially be resolved.

2.20. In the absence of a loudness box, Dolby Digital and Dolby Digital Plus loudness SHOULD be specified by the dialnorm field (ATSC A/52:2012).

2.21. In the absence of a loudness box, AAC dialog loudness SHOULD be specified by either AAC prog_ref_level (ISO 14496-3 subclause 4.5.2.7), as specified by SCTE 193-1 section 7.4.1; or by the loudnessInfo() payload as specified by ISO 23003-4, in which case, samplePeakLevel or truePeakLevel MUST be present, measurementSystem MUST be 2, and methodDefinition MUST be 1 or 2.

At a first glance, it appears that Dynamic Range Control (DRC), which is mentioned in both ISO 23003-4 and ISO 14496-3 subclause 4.5.2.7, is not yet supported/implemented in shaka packager.

@kqyang kqyang modified the milestones: v2.5, v2.6 Jun 11, 2021
@jeiea
Copy link

jeiea commented Aug 20, 2021

I recently ran mediastreamvalidator to shaka-packager m3u8 file and got the following.

hls.html.zip

hls

@joeyparrish joeyparrish modified the milestones: v2.6, Backlog Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: HLS The issue involves HLS output flag: spec compliance An issue with compliance to DASH, HLS, or other specs type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants