HLS
HLS
Intro
Every HLS file has these properties
#EXTM3U
#EXT-X-VERSION:4
HLS Playlist Types
De-Muxed | Muxing
Test Streams
developer.apple.com/streaming/examples/
dash: 'https://cdn.bitmovin.com/content/assets/sintel/sintel.mpd'
hls:'https://cdn.bitmovin.com/content/assets/sintel/hls/playlist.m3u'
Apple HLS examples - bib bop advance HEVC
Apple HLS examples - Multiple audio and subtitles
Apple HLS examples - bib bop normal
HLS stream having :
. 6 video qualities for Adaptive Bitrate
. 2 alternate audio tracks (English and French)
. 3 alternate subtitle tracks (English, English with audio description and French)
Link
HLS Keys
TARGET DURATION
This sets the playlist or the video processor that all the components .mp4
or .ts
or segments of audio/video/text are of specific secs. In this example the target segments are of 10 secs
each.
#EXT-X-TARGETDURATION:10
#EXTINF:10.0,
fileSequenceA.ts
#EXTINF:10.0,
fileSequenceB.ts
So if the targetDuration is higher then the avPlayer library would take some time to buffer first 2 - 3 fragments and then resume.
So 10 secs * 2
so 20 secs of content. This is what I assume I understand from my conversation about this.
CONTENT METADATA
Protocol HLSTagDescriptor
and HLSTagValueIdentifier
HLSTagDescriptor
= EXT-X-XCAL-CONTENTMETADATA | the tag name
HLSValueIdentifier
= KEYID | DRMAGNOSTIC | the attribute names in the tag
#EXT-X-XCAL-CONTENTMETADATA:KEYID="bd8e7d69-saw4-6a00-1eb9-637364ad6a4c",DRMAGNOSTIC="ZXlKNE5YUWpVekksa3r3XXzNFTnZrSFE="
I-FRAME
#EXT-X-I-FRAMES-ONLY
iOS supports fast forward and reverse playback. However, you don't need to produce special-purpose content to support fast forward and reverse playback. All you need to do is specify where the I-frames are. I-frames, or intra-coded frames, are encoded video frames whose encoding is independent of any other frame. To specify where the I-frames are, iOS 5 and later use an I-frame only playlist. The EXT-X-I-FRAMES-ONLY tag indicates that each media segment in the playlist describes a single I-frame.
Independent Segments
#EXT-X-INDEPENDENT-SEGMENTS
Techniques
Switch Live to Event Record
When I think of an EVENT style playlist in streaming world, I think of DVR | Video Recordings. If a user is scrolling the Live Grid in video stream app and they want to record an episode, that playlist will go from LIVE
-> EVENT
. Best way to see this is to select a live program, hit Record, wait until the UI says the recording is set. Next, hit Watch and you'll see the Live
HLS manifest file program is now Event
Thumbnails
#EXT-NOM-I-FRAME-DISTANCE
Advertising
#EXT-X-ADVERTISING:SYSCODE=231532523532377442
DRM
#EXT-X-XCAL-CONTENTMETADATA:
KEYID="017ee539-UUID-string",
DRMAGNOSTIC="some_base_64_key_value"
Apple Interstitials
Getting Started With HLS Interstitials - apple developer
Other
Low Latency
Specifications
HLS content steering | apple specs
Highest quality
video - 0 = is the highest quality in the HLS format.
Playback
Tools
This gives us a debug analysis of the stream in question to validate whether its a stream issue or our player code issue.
mediastreamvalidator https://314.linear-ag-xcr/v1/frag/bmff/enc/wea/t/OsaK_UD_T_7381_0_7683.m3u8
After that it will create a json file which we can ingest into the hlsreport tool.
hlsreport validation_data_4K_superbowl.json
streams
Test streams provided for HLS testing or playback.
Apple
Third Party
Spatial 3D HLS
historic_planet_content 3D video
References
what-is-hls-video-streaming-and-how-does-it-work
hls-http-live-streaming-how-does-it-work
what-is-hls-streaming-and-how-do-you-deploy-it
apple developer | doc archive | HLS Overview