HLS Protocol in Detail: Spec Concepts Explained
Protocol Building Blocks
At its core HLS is: variants + segments + playlists delivered over HTTP. Clients parse playlists, schedule media downloads, decrypt if required, and append to a media buffer for playback.
Versions and Compatibility
Playlists declare #EXT-X-VERSION. Higher versions unlock features (byte ranges, advanced codecs, LL features). Players that do not support a required version may fail — keep version only as high as needed.
Playlist Types
- VOD — complete, ENDLIST present.
- EVENT — append-only growing list.
- Live sliding window — updates and drops old segments.
See live vs VOD.
Media Features Worth Knowing
- Discontinuity — ad inserts or codec changes.
- Keys — AES-128 / SAMPLE-AES signaling via EXT-X-KEY.
- Alternate renditions — audio/subtitles via EXT-X-MEDIA.
- Start offset — EXT-X-START suggestions.
Tag reference: M3U8 extended tags.
Client Playback Loop
- Fetch master playlist.
- Select variant (ABR or manual).
- Fetch media playlist.
- Download/decrypt segments into buffer.
- For live, reload playlist and continue.
Implementation angle: HTML5 M3U8 player internals.
Frequently Asked Questions
Is HLS a transport like RTMP?
No — it is an HTTP adaptive streaming method.
Where is the official thinking documented?
Apple’s HLS authoring/spec materials and IETF HLS drafts/RFCs for modern versions.
Do I need every advanced tag?
No — start minimal and add features as required.
How do I debug protocol issues?
Read the playlist text and player network logs.