Updated October 2026: draft-22 of the HLS 2nd edition is in the RFC Editor queue, WWDC 2026 added key preload hints and Date Range Schedules, desktop Chrome plays m3u8 natively since version 142, and App Store guideline 2.5.7 (HLS over cellular) is gone.

Why This Matters

Almost every conversation about a streaming product eventually reaches an m3u8 file, and the people who can read that file fix problems faster than the people who can't. A product manager who can read a multivariant playlist can answer questions about device support and bitrate ladder without paging engineering. A new engineer who can read a media playlist can debug a stall by looking at three tags instead of attaching a debugger. A non-technical founder who knows what a segment is can read a CDN bill and ask the right questions about cache-hit ratio. HLS is also the protocol you ship even when you don't ship HLS — it is the only adaptive format Apple's AVPlayer plays natively, the LL-HLS variant is the standard low-latency stack across Apple devices, desktop Chrome has played .m3u8 natively since version 142 (late 2025), and every CDN's "live streaming" SKU is HLS first. Understanding HLS is the price of entry for talking sensibly about modern video delivery.


What HLS is, in one paragraph

HLS is a protocol for delivering video as a list of small files over the same HTTP that serves the rest of the web. A producer encodes the video, chops it into pieces of two to six seconds each (called segments), writes a text file that lists those segments in order (called a media playlist, with the extension .m3u8), and uploads everything to a normal web server. A player asks for the playlist, reads which segments exist and where to find them, downloads them in order, and stitches them back into a continuous video. That is the entire idea. Every other tag, attribute, and refinement in the specification is there to handle adaptive bitrate, multiple audio tracks, subtitles, encryption, live updates, ad insertion, and trick play — but the core mechanism is "fetch a text file that points to small media files."

The protocol was introduced by Apple in 2009, was first published as an Internet-Draft the same year, and became IETF Informational RFC 8216 in August 2017. RFC 8216 is the canonical reference, but the protocol has continued to evolve through a series of Internet-Drafts that the IETF tracker labels draft-pantos-hls-rfc8216bis-NN. The current revision is draft-22, published on 1 May 2026. It describes version 13 of the protocol and will obsolete RFC 8216 once it is published: the Independent Submissions Editor sent it to the RFC Editor on 15 May 2026, and as of October 2026 it is in the RFC Editor queue (IETF Datatracker). Apple's WWDC 2026 preliminary edition (8 June 2026) adds a KEY type to EXT-X-PRELOAD-HINT, so players can fetch a rotated decryption key ahead of time, and Date Range Schedules for server-driven interstitials, without changing the protocol version. In parallel, Apple maintains a living document — the HLS Authoring Specification for Apple Devices, last revised on 26 June 2025 — that layers normative requirements on top of the RFC for content that intends to play on iPhone, iPad, Apple TV, and Mac. In practice you read both: the IETF document for what HLS is, the Apple document for what HLS must be to ship on Apple's devices.

HLS vs m3u8: what is the difference?

HLS is the streaming protocol; m3u8 is the playlist file format that HLS uses. An .m3u8 file is a UTF-8 text playlist (the "8" stands for UTF-8) that lists media segments or other playlists. HLS is the whole system around it: the tags and their rules, the segment formats, how a player reloads a live playlist and switches bitrates. So "HLS vs m3u8" is not a choice between two options: every HLS stream is described by m3u8 files, and an m3u8 file contains no video at all. See the glossary entry for m3u8 for the one-line definition.

TermWhat it isContains video?Defined in
HLSAdaptive streaming protocol over HTTPDelivers itRFC 8216 (2017); draft-pantos-hls-rfc8216bis-22 (2026)
.m3u8UTF-8 playlist: multivariant or mediaNo — text that points to segmentsRFC 8216 §4
.m3uThe older audio-player playlist format m3u8 grew out of; HLS still accepts the extensionNoDe facto format, no standard
.ts / .m4sMedia segments: MPEG-TS or fMP4/CMAFYesISO/IEC 13818-1; ISO/IEC 14496-12 and 23000-19
.mpdMPEG-DASH manifest (XML), the DASH counterpart of an m3u8NoISO/IEC 23009-1
Table 1. HLS, m3u8 and the files around them. The playlist is text; the video lives in the segments it lists.

Two practical consequences. A server must identify a playlist either by a path ending in .m3u8 or .m3u or by the Content-Type application/vnd.apple.mpegurl (or audio/mpegurl), and clients should refuse anything else (draft-22 §4). And "converting an m3u8 to MP4" really means downloading the segments the playlist lists and remuxing them into one file.

The two-tier playlist model

HLS uses two kinds of playlist, and almost every confusion about HLS in production comes down to forgetting which tier the file in front of you belongs to.

The multivariant playlist (sometimes still called master playlist — Apple renamed it in revision 2023-04 because the same content was being delivered in many forms, not from a single master) lists every variant of a piece of content. A variant is one combination of video bitrate, video resolution, audio track, codecs, and optionally subtitles. A typical movie has one multivariant playlist that points at four to seven video variants, three to five audio renditions, and one or two subtitle tracks. The multivariant playlist contains no media itself. It is a menu.

The media playlist lists the actual segments for one variant. If the multivariant playlist points at a 1080p H.264 variant, there is a media playlist for that variant, and that media playlist contains a list of the 1080p segment files in order along with each one's duration. The player downloads the multivariant playlist first, picks a variant based on bandwidth and screen size, then downloads that variant's media playlist, then starts pulling segments from it. When network conditions change, the player can switch to another variant by downloading a different media playlist and continuing from there.

The two playlists do not have to share a hostname or a path. Many production stacks serve the multivariant playlist from one origin and the media playlists from a different one — a packager origin for the menu, a CDN edge for the segments. That separation is what lets HLS scale to internet-scale audiences: the multivariant playlist is small and changes rarely, the segments are huge and change every few seconds, and you can cache the two with completely different policies.

Three stacked tiers of the HLS playlist model. Tier 1, the multivariant playlist master.m3u8, is called a menu of variants that contains no media; it holds three cards, each with an EXT-X-STREAM-INF line, a BANDWIDTH of 1280000, 3200000 or 6400000, a RESOLUTION of 640x360, 1280x720 or 1920x1080, and the URI 360p, 720p or 1080p playlist.m3u8. Arrows run down to Tier 2, media playlists, one per variant: three cards named 360p, 720p and 1080p playlist.m3u8, each listing EXTM3U, EXT-X-VERSION:7 and two pairs of EXTINF:6.000 with seg_00001.m4s and seg_00002.m4s. Arrows run down again to Tier 3, the segments themselves as ordinary files over HTTP: four chips reading seg_00001.m4s, seg_00002.m4s, seg_00003.m4s and 3,597 more. A closing box gives the player's reading order in four steps - fetch master.m3u8 once because it is small and changes rarely; pick a variant by bandwidth, screen size and codec support; fetch that variant's media playlist and pull its segments over HTTP; on a network drop load another media playlist, leaving the menu unread. Two final lines state that a multivariant playlist holds no media while a media playlist holds no variants, and that the two tiers cache separately, which is why HLS scales like any web file. Figure 1. The two-tier playlist model. The multivariant playlist is a menu of variants. Each variant has its own media playlist that lists the segment files in playback order.

What an m3u8 file actually looks like

An m3u8 file is plain UTF-8 text. Every line is either a comment, a tag (a line that begins with #EXT), or a URI (a line that does not begin with #). The first line of every HLS playlist is the magic header #EXTM3U. That marker is the only thing telling the parser that this file is an HLS playlist and not a different variant of the older M3U format used by audio players in the 2000s.

Here is a minimal multivariant playlist that points at three video qualities:

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-STREAM-INF:BANDWIDTH=1280000,AVERAGE-BANDWIDTH=1100000,RESOLUTION=640x360,CODECS="avc1.64001f,mp4a.40.2",FRAME-RATE=25
360p/playlist.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3200000,AVERAGE-BANDWIDTH=2900000,RESOLUTION=1280x720,CODECS="avc1.640020,mp4a.40.2",FRAME-RATE=25
720p/playlist.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=6400000,AVERAGE-BANDWIDTH=5800000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",FRAME-RATE=25
1080p/playlist.m3u8

Read it top to bottom. The #EXTM3U line declares the file an HLS playlist. The #EXT-X-VERSION:6 line declares the minimum HLS protocol version the player must support to parse this file. The #EXT-X-INDEPENDENT-SEGMENTS line is a player hint that every segment can be decoded without needing the previous segment — a property that matters for ABR switching and trick play. Then three #EXT-X-STREAM-INF lines describe three variant streams, each immediately followed by a URI pointing at the variant's media playlist. The BANDWIDTH value is the peak bitrate the variant can reach. AVERAGE-BANDWIDTH is the long-run average. RESOLUTION and FRAME-RATE give the player the geometry. CODECS is the formal codec string — avc1.64001f means H.264 High profile, level 3.1; mp4a.40.2 means AAC-LC. A player uses those strings to know whether the device can decode the variant at all before trying.

A media playlist looks different. Here is the corresponding 720p/playlist.m3u8:

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="init.mp4"
#EXTINF:6.000,
segment_00001.m4s
#EXTINF:6.000,
segment_00002.m4s
#EXTINF:6.000,
segment_00003.m4s
#EXTINF:4.480,
segment_00004.m4s
#EXT-X-ENDLIST

#EXT-X-TARGETDURATION:6 says no segment in the list exceeds six seconds, rounded to the nearest integer. #EXT-X-MEDIA-SEQUENCE:0 says the first segment in this playlist has sequence number zero — for VOD that does not change, but for live it advances every refresh. #EXT-X-PLAYLIST-TYPE:VOD tells the player this is a finite, non-changing playlist. #EXT-X-MAP:URI="init.mp4" points to the initialisation segment that contains the codec configuration (this tag only appears when the media is fragmented MP4 / CMAF, not when it's MPEG-TS). Then a series of #EXTINF lines each declare the duration of the next segment, followed by the segment's URI on its own line. The last line, #EXT-X-ENDLIST, tells the player the playlist will not grow.

Two rules from the spec answer most "is this playlist valid?" questions. First, a VOD media playlist cannot change at all: not a segment URI, not an EXTINF duration, not the order (draft-22 §4.4.3.5). An EVENT playlist may only append segments to the end. Second, every relative URI in a playlist (segment, key, init section, media playlist) is resolved against the URI of the playlist that contains it, using RFC 3986 §5.2. Keeping index.m3u8 in the same directory as its segments and listing them by bare file name (segment_00001.m4s) is therefore the most portable layout: the whole folder can move between origin, CDN and a local disk without rewriting a line.

That is HLS in twenty lines. Everything that follows is detail.

Two annotated playlist listings, every line of code paired with its job. Upper panel, multivariant playlist master.m3u8: EXTM3U is the magic line that marks the file as HLS; EXT-X-VERSION:6 is the minimum parser version; EXT-X-INDEPENDENT-SEGMENTS means every segment decodes alone; EXT-X-STREAM-INF:BANDWIDTH=1280000 with RESOLUTION=640x360 and CODECS= Figure 2. The anatomy of a minimal HLS playlist pair. Multivariant playlist on the left, media playlist for one variant on the right, every tag annotated with its job.

Segment formats: MPEG-TS, fMP4, CMAF

Segments carry the actual video and audio bytes. HLS supports two container formats, with a third being a profile of the second.

MPEG-TS (.ts) is the legacy format. It is the same MPEG-2 Transport Stream that has been used in digital television since the 1990s, with a 188-byte packet structure designed for broadcast. When Apple shipped HLS in 2009, MPEG-TS was the only choice. It has a 5–10% overhead from packet headers and timestamps and cannot easily be shared with DASH. New HLS deployments rarely choose it. Old deployments still ship it because every device that ever played HLS plays MPEG-TS, including very old set-top boxes and the first generation of Apple TV.

Fragmented MP4 (.m4s or .mp4, often just called fMP4) became official in HLS in iOS 10 / 2016. fMP4 is a profile of the ISO Base Media File Format (ISO BMFF, ISO/IEC 14496-12), structured as a small initialisation segment (the moov atom) followed by a series of media segments (each a pair of moof + mdat atoms). Overhead is 1–3%. The init segment is downloaded once and pointed to with the #EXT-X-MAP tag; every subsequent segment can be decoded as long as the init segment is in the player's cache.

Common Media Application Format (CMAF) is a standard first published in 2018 as ISO/IEC 23000-19 (current edition 2024; Amendment 2, published in 2026, adds another structural CMAF brand profile), that defines a specific profile of fMP4 designed to be playable as both HLS and DASH. A CMAF segment is an fMP4 segment with constraints that match DASH's expectations — single track per file, specific brand identifiers, well-defined chunk boundaries. The economic argument for CMAF is that one set of files on disk serves both HLS and DASH players, halving storage and CDN egress for content distributed in both formats. In 2026, CMAF is the dominant choice for new HLS deployments outside the Apple-only ecosystem; every modern packager (Shaka Packager, AWS MediaPackage, Unified Streaming, Bento4) produces CMAF by default. Apple supports CMAF in HLS for both H.264 and H.265.

The numeric example: a one-hour 1080p H.264 stream at 5 Mbps that is stored as both HLS-only MPEG-TS and CMAF-shared fMP4. The MPEG-TS path stores 1 × 5 Mbps × 3,600 s ÷ 8 ≈ 2.25 GB of .ts files plus a separate 2.25 GB of DASH .m4s files if you also need DASH — 4.5 GB total. The CMAF path stores one set of .m4s files used by both HLS and DASH, around 2.18 GB total. Across a 10,000-hour catalogue at $0.023 per GB per month of S3 storage, the difference is roughly $530 per month — a real number even before CDN egress is factored in.

The HLS tags that matter, grouped by job

The HLS specification defines several dozen tags. In practice, the 27 tags in Table 2 carry almost all of the meaning across both playlists. Group them by the job they do, and the protocol becomes much easier to memorise.

Playlist identity and version. #EXTM3U marks the file as HLS. #EXT-X-VERSION:N declares the minimum protocol version a parser needs; raise the number when you use a tag that requires a newer version. #EXT-X-INDEPENDENT-SEGMENTS is a hint that every segment can decode without referring to the previous one (it matters for ABR switching and seek). #EXT-X-DEFINE declares variable substitutions inside the playlist (variable substitution needs EXT-X-VERSION:8; the QUERYPARAM form needs version 11, per draft-22 §8).

Segment identity and timing. #EXTINF:duration,title precedes every segment URI and declares the segment's exact duration in seconds (decimal, not integer). #EXT-X-TARGETDURATION:N declares the upper bound; for VOD it is a property, for live the player polls the playlist no faster than every TARGETDURATION seconds when the playlist is static. #EXT-X-MEDIA-SEQUENCE:N is the sequence number of the first segment listed; for live this advances every reload. #EXT-X-DISCONTINUITY-SEQUENCE:N tracks how many discontinuities have appeared before the first segment in the list. #EXT-X-PROGRAM-DATE-TIME:YYYY-MM-DDTHH:MM:SSZ ties a segment to wall-clock time — the player can synchronise across renditions and to an external clock.

Segment relationships. #EXT-X-MAP:URI="init.mp4" declares the initialisation segment for fMP4/CMAF; the player downloads it once and re-uses it. #EXT-X-BYTERANGE:length[@offset] lets multiple segments live inside a single file as byte ranges of that file — useful when you want to ship a single .mp4 and let the player fetch ranges. #EXT-X-DISCONTINUITY between two segments tells the player that something fundamental changed: encoder restart, ad break, content change, splice. #EXT-X-GAP marks a missing segment that the player should skip.

Encryption and DRM. #EXT-X-KEY:METHOD=AES-128,URI="key",IV=0x... declares that subsequent segments are encrypted with the named key and method. METHOD=SAMPLE-AES encrypts only the media samples; in fMP4 it uses the cbcs scheme of Common Encryption (ISO/IEC 23001-7), the scheme FairPlay requires and Widevine and PlayReady also accept in CMAF stacks. METHOD=SAMPLE-AES-CTR uses the cenc scheme instead, and draft-22 adds whole-segment AES-256-GCM. Clients must support NONE, AES-128 and SAMPLE-AES; the other two are optional. #EXT-X-SESSION-KEY is the multivariant-playlist counterpart: it pre-declares keys so the player can fetch them up front before picking a variant.

Multivariant playlist tags. #EXT-X-STREAM-INF precedes every variant and carries the bitrate, resolution, codecs, and frame rate. #EXT-X-MEDIA declares an alternate rendition (e.g. an alternate-language audio track or a subtitle track) and groups it under a GROUP-ID that variants reference. #EXT-X-I-FRAME-STREAM-INF declares a special "I-frames-only" variant used for trick play (fast forward, rewind). #EXT-X-SESSION-DATA lets the publisher attach arbitrary key/value pairs to the multivariant playlist (e.g., the show's title in multiple languages).

Live-specific tags. #EXT-X-PLAYLIST-TYPE:EVENT tells the player that segments will be appended but never removed; the playlist always grows. #EXT-X-PLAYLIST-TYPE:VOD tells the player the playlist is finite and will not change. The absence of both means a sliding window (typical live): the playlist holds the last N segments and shifts forward every TARGETDURATION. #EXT-X-ENDLIST marks the end of any playlist that is finished.

Low-latency tags (added in 2019, still part of HLS in 2026). #EXT-X-PART declares a partial segment — a 200–500 ms slice of an in-progress segment that the player can fetch before the segment is complete. #EXT-X-PRELOAD-HINT tells the player to start fetching the next part or map before its #EXT-X-PART line appears. #EXT-X-RENDITION-REPORT lets a media playlist for one variant report the latest sequence number on a sibling variant, so a switching player doesn't need to refetch every variant's playlist. #EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES allows blocking-reload behaviour: the player asks for playlist.m3u8?_HLS_msn=N&_HLS_part=K and the server holds the request open until that part exists. These are the six mechanisms that turn 30-second HLS into 2–5 second LL-HLS — covered in detail in LL-HLS in depth.

Metadata and ad-insertion. #EXT-X-DATERANGE:ID=...,START-DATE=...,DURATION=...,SCTE35-OUT=... carries arbitrary in-band metadata, most often SCTE-35 ad markers translated from broadcast feeds. #EXT-X-SKIP is a delta-playlist mechanism: the server may send a smaller playlist that skips a contiguous range of older segments, identified by sequence numbers, and the client knows it already has those.

TierTagsJob
Identity#EXTM3U, #EXT-X-VERSION, #EXT-X-INDEPENDENT-SEGMENTS, #EXT-X-DEFINEMark the file, declare protocol version, give parsing hints
Segment#EXTINF, #EXT-X-TARGETDURATION, #EXT-X-MEDIA-SEQUENCE, #EXT-X-PROGRAM-DATE-TIME, #EXT-X-MAP, #EXT-X-BYTERANGE, #EXT-X-DISCONTINUITY, #EXT-X-GAPDeclare and locate the actual media
Encryption#EXT-X-KEY, #EXT-X-SESSION-KEYWire DRM and AES into the segment fetch
Multivariant#EXT-X-STREAM-INF, #EXT-X-MEDIA, #EXT-X-I-FRAME-STREAM-INF, #EXT-X-SESSION-DATADescribe variants, alternate renditions, trick-play
Live#EXT-X-PLAYLIST-TYPE, #EXT-X-ENDLISTTell the player whether the playlist grows, slides, or ends
Low-latency#EXT-X-PART, #EXT-X-PRELOAD-HINT, #EXT-X-RENDITION-REPORT, #EXT-X-SERVER-CONTROL, #EXT-X-PART-INFCut latency from 30 s to 2–5 s
Metadata#EXT-X-DATERANGE, #EXT-X-SKIPCarry ad markers, deltas, and arbitrary metadata
Table 2. The HLS tags that matter, grouped by the job they do. Memorise the column on the right and most production debugging questions become "which row?"

Multi-variant playlists and the bitrate ladder

The point of the multivariant playlist is adaptive bitrate. The player picks a variant when it starts, measures throughput while the first few segments arrive, and switches up or down between variants as conditions change. The protocol does not dictate the algorithm — that is the player's job, and the algorithm choice is itself a deep topic covered in the ABR articles of Block 5. What HLS dictates is the shape of the menu the player chooses from.

A well-designed bitrate ladder for HLS in 2026 looks roughly like the table below. The exact numbers come from a synthesis of the Netflix per-title ladder, Apple's recommendations in the HLS Authoring Specification, and the bandwidth distribution Bitmovin and Conviva measure in their annual reports.

VariantResolutionVideo bitrateCodecWhen the player picks it
1416 × 234200 kbpsH.264 BaselineSub-3G cellular, congested public Wi-Fi
2640 × 360400 kbpsH.264 BaselineSlow 4G, weak Wi-Fi
3768 × 432800 kbpsH.264 MainAverage 4G
4960 × 5401.6 MbpsH.264 MainStrong 4G, home broadband baseline
51280 × 7203.0 MbpsH.264 HighStandard home broadband
61280 × 7204.5 MbpsH.264 HighStrong home broadband (premium 720p)
71920 × 10806.0 MbpsH.264 HighFast broadband, large screen
81920 × 10808.0 MbpsH.265 MainSame audience, ~30% smaller files
93840 × 216016 MbpsH.265 Main104K capable device, gigabit broadband
Table 3. A modern HLS ladder for a 2026 OTT live event. H.264 carries the wide-compatibility floors; H.265 (HEVC) carries the premium tiers where 30%-ish bitrate savings are real.

Apple's HLS Authoring Specification (last revised June 2025) and field practice add rules on top of the structure:

  • Rule of thumb: keep adjacent rungs roughly 1.5–2× apart in BANDWIDTH, so the player has enough headroom between rungs to switch with confidence. The current Apple spec does not fix a ratio; it publishes example ladders instead.
  • Every EXT-X-STREAM-INF MUST carry a complete CODECS string (Apple rule 9.1), and in practice RESOLUTION and FRAME-RATE too. Variants that omit CODECS cannot be filtered by capability and are ignored on devices that don't decode the missing codec.
  • For iOS over cellular, the multivariant playlist MUST contain a variant whose peak BANDWIDTH is 192 kbit/s or less (rule 9.21), and a 192 kbit/s H.264 variant in MPEG-TS SHOULD be provided for backward compatibility (rule 9.22). The 200 kbps video rung in Table 3 plus audio sits above that line, so add an audio-only or lower rung if cellular viewers matter.
  • If you ship HEVC variants, ship a parallel H.264 ladder so older devices have something to play.
  • For HDR content, you ship a parallel SDR ladder. The HLS spec defines VIDEO-RANGE=SDR|PQ|HLG on #EXT-X-STREAM-INF so the player can pick by signal type.

The #EXT-X-MEDIA tag handles alternate renditions of the same content. A typical multi-language film has one #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="English",LANGUAGE="en",DEFAULT=YES,URI="audio_en.m3u8" per language, all sharing the GROUP-ID="aac", and each video variant in #EXT-X-STREAM-INF references that group via the AUDIO="aac" attribute. The player downloads the chosen video variant's media playlist and the chosen audio rendition's media playlist in parallel and synchronises them by EXT-X-PROGRAM-DATE-TIME.

EXT-X-MEDIA accepts four TYPE values: AUDIO, VIDEO, SUBTITLES and CLOSED-CAPTIONS (draft-22 §4.4.6.1). Multiple audio tracks and alternate video angles therefore use the same grouping mechanism: one rendition per track, one GROUP-ID, and an AUDIO= or VIDEO= reference on each variant. Since WWDC 2026 a rendition can also be flagged as machine-generated with CHARACTERISTICS="public.machine-generated", and AVKit then labels it, for example, "English Generated".

A modern HLS multivariant playlist in four bands. Band one, nine video variants in two columns, noting the rule of thumb that adjacent rungs sit 1.5 to 2 times apart and that HEVC ships beside H.264: 416x234 at 200 kbps H.264 Baseline; 640x360 at 400 kbps H.264 Baseline; 768x432 at 800 kbps H.264 Main; 960x540 at 1.6 Mbps H.264 Main; 1280x720 at 3.0 Mbps H.264 High; 1280x720 at 4.5 Mbps H.264 High; 1920x1080 at 6.0 Mbps H.264 High; 1920x1080 at 8.0 Mbps H.265 Main; 3840x2160 at 16 Mbps H.265 Main10. Band two, EXT-X-MEDIA with GROUP-ID= Figure 3. A modern HLS multivariant playlist for a 9-rung video ladder, three-language audio, two-language subtitles. The audio and subtitle renditions live in #EXT-X-MEDIA groups; each video variant points at its groups by GROUP-ID.

Live HLS: the sliding window

For a live event the playlist is not finite. The encoder produces a new segment every TARGETDURATION seconds, appends it to the media playlist, and (typically) removes the oldest segment to keep the playlist length bounded. The result is a sliding window of N segments that advances forward as time progresses.

A typical live media playlist has six to twelve segments at any moment — three to four times the target duration gives the player enough buffer to absorb variance without storing more than a minute of recent content. The player polls the playlist no more often than once per TARGETDURATION (or once per EXT-X-PART-INF for LL-HLS), reads the new EXT-X-MEDIA-SEQUENCE value to see what changed, downloads any new segments, and discards segments that have rolled off the front of the playlist.

The mechanics of live HLS without LL-HLS produce a 15–45 second glass-to-glass latency. Consider a 6-second target duration:

  1. The encoder produces 6 seconds of segment before the segment file exists. Glass-to-segment-complete: 6 s.
  2. The encoder uploads the segment to origin. Origin-to-CDN: typically 200–500 ms.
  3. The player's playlist poll happens at most every 6 s in the worst case and on average every 3 s. Average wait before the player sees the new segment in a refresh: 3 s.
  4. The player downloads the segment from CDN. Download time at 5 Mbps over typical broadband: ~500 ms.
  5. The player buffers two segments before playing them to absorb network variance. Two segments × 6 s = 12 s buffer (typical 1.5–3× the target duration).

Total: 6 + 0.5 + 3 + 0.5 + 12 ≈ 22 seconds glass-to-glass for a standard 6-second-segment HLS live event. Drop the target duration to 2 seconds and the same math gives about 8 seconds. Add Apple's LL-HLS extensions and the same math gives 2–5 seconds. The protocol's latency floor is set by the segment duration, the buffer multiplier, and the playlist refresh cadence — three knobs that all push in the same direction.

A common pitfall: the codec string

The single most common reason a properly-encoded HLS variant fails to play on a real device is a wrong CODECS string. The codec string is a formal RFC 6381 / ISO/IEC 14496-15 identifier: a four-character code plus a profile and level. For H.264 it's avc1.PPCCLL where PP is the profile, CC is the constraint flags, and LL is the level. For HEVC it's hvc1. or hev1. followed by profile/tier/level/constraints. For AAC-LC it's mp4a.40.2. For Opus it's opus. For AC-3 it's ac-3.

The pitfall pattern: a packager writes CODECS="avc1.640028" on the multivariant playlist (H.264 High profile, level 4.0), but the encoder actually produced level 4.1 video. iOS plays it because Safari is permissive; Android decoders reject the variant during the capability check and never download it. The user sees the lower-bitrate fallback variants on Android only. The fix is to reconcile the codec string with the actual encode: declare avc1.640029 for level 4.1, or re-encode at the level you declared, and check the result with ffprobe or Apple's mediastreamvalidator before the playlist ships.

The second common pitfall: omitting CODECS entirely. Apple's HLS Authoring Specification states that CODECS is required on every variant. Some 2018-era packagers still ship playlists without it. The player then doesn't know what it's about to decode, may pick the wrong variant, may fail without a clear error, and may simply skip variants on devices that strictly enforce the rule.

The third common pitfall: using avc1. and mp4a. for an HEVC + AC-3 stream. The codec string and the actual segments must agree. Mismatch is a guarantee of "plays on my Mac, not on the user's Roku."

How to open, test and create an m3u8 playlist

To open an m3u8, load its HTTP URL in a player (Safari, desktop Chrome 142 or later, VLC, or an hls.js demo page) instead of double-clicking a saved copy: the playlist only lists segment paths, and relative paths break once the file leaves its folder. The rest of the toolbox fits in four commands.

  • Inspect. curl -sI https://cdn.example.com/live/index.m3u8 shows the Content-Type (expect application/vnd.apple.mpegurl), Cache-Control and CORS headers; ffprobe -i https://cdn.example.com/vod/master.m3u8 lists every variant with its codec and resolution.
  • Validate. Apple's mediastreamvalidator and hlsreport check a stream against the spec and the Authoring Specification. Since WWDC 2026 the HLS tools run with full feature parity on Red Hat Enterprise Linux 9.5, Ubuntu 24.04.3 LTS and Debian 13.2 as well as macOS, so the check fits into a Linux CI pipeline.
  • Create a VOD rung. ffmpeg -i input.mp4 -c:v libx264 -c:a aac -f hls -hls_time 6 -hls_playlist_type vod -hls_segment_type fmp4 -hls_segment_filename "720p/seg_%05d.m4s" 720p/index.m3u8 writes a VOD media playlist, an init section and 6-second fMP4 segments. A full ladder adds -var_stream_map and -master_pl_name, or moves to a packager such as Shaka Packager.
  • Convert to MP4. ffmpeg -i https://cdn.example.com/vod/720p/index.m3u8 -c copy out.mp4 downloads the listed segments and remuxes them without re-encoding. DRM-protected streams will not convert.

Why Apple still owns HLS

HLS is an IETF Informational document, but Apple still defines the protocol in practice. Three reasons.

First, AVFoundation plays HLS natively and has no built-in DASH player. AVPlayer, Apple TV and AirPlay take HLS as the adaptive format; DASH on an iPhone needs a JavaScript player on Safari's ManagedMediaSource or a third-party native player. The App Store rule that once made HLS explicit (guideline 2.5.7: HLS for video over cellular longer than ten minutes) now reads "Intentionally omitted" in the App Store Review Guidelines, checked in October 2026. But the Authoring Specification still requires a 192 kbit/s variant for cellular, and in practice live and long-form VOD on Apple devices still ship as HLS.

Second, the HLS Authoring Specification is normative for Apple devices. The IETF document is informational and permits many shapes of playlist that Apple's devices will reject. To get content to play on AirPlay, native AVPlayer, Apple TV, and Safari, you author to Apple's revision-tracked spec, not to the IETF document. Apple revises the spec several times a year: the 2023 revisions added stereo MV-HEVC and visionOS rules, and seven revisions between March and June 2025 added spatial-video (APMP, AIV) guidelines, offline-download guidelines and a container rule for AV1. Protocol changes arrive through the rfc8216bis drafts instead: that is where master playlist became multivariant playlist, and Apple's January 2020 LL-HLS update replaced HTTP/2 push with EXT-X-PRELOAD-HINT.

Third, the reference implementation is in Safari and AVFoundation, and there is no public conformance suite that beats it. Apple's mediastreamvalidator tool is the de-facto compliance checker the industry runs before shipping. If your playlist passes mediastreamvalidator and plays in Safari, it plays. If it doesn't, no amount of spec-correctness will help on Apple devices.

The practical consequence: every vendor in the streaming stack — Bitmovin, AWS Elemental, Mux, Wowza, Cloudflare Stream, JW Player, THEO, hls.js maintainers — implements HLS against Apple's spec first and the IETF document second. The IETF document is where you learn the shape of the protocol; the Apple document is where you learn the rules to ship.

Why every other vendor implements HLS anyway

Outside Apple's ecosystem, HLS is still the protocol the wider industry implements first, even where DASH is technically a better fit. The reasons are the same reasons HLS won in the first place.

It is HTTP. Every cache, every CDN, every corporate proxy, every consumer router can serve and accept HLS without configuration. There is no UDP hole-punching, no port range to open, no per-viewer connection state on the origin.

It is text. The multivariant playlist is human-readable; the media playlist is human-readable. Debugging a stall in production starts with curl and ends with a re-encode plus a one-line fix.

It is everywhere. Every modern browser, every smart TV (Tizen, webOS, Roku, Vidaa, Android TV, Fire TV), every set-top box, every gaming console, every iOS and Android device speaks HLS natively or through a small JavaScript library — hls.js for browsers without native support, AVPlayer or ExoPlayer on mobile, Shaka Player as a cross-platform option.

Desktop Chrome joined that list late. Chrome 142 (late 2025) turned on a built-in HLS player, so an .m3u8 URL in a <video> tag now plays in Chrome and Edge on desktop without hls.js. The rollout came with a bug: Mux tracked elevated native-HLS playback errors from Chrome 141.0.7390.123 onward, while playback through Media Source Extensions was unaffected. The safe pattern is unchanged: if MSE is available, play through hls.js (1.7.3 as of September 2026), and fall back to native playback only where MSE is missing.

It carries every other capability the industry needs. Multi-language audio via EXT-X-MEDIA. Subtitles via WebVTT and IMSC1. DRM via FairPlay, Widevine, PlayReady through CENC. Ad insertion via EXT-X-DATERANGE and SCTE-35. Trick play via I-frame-only variants. Live, VOD, and event-style playback in one format.

The result is that HLS is the floor under every modern OTT stack. Even when a product ships DASH as the primary delivery protocol — for example, Netflix outside the Apple ecosystem — it ships HLS for iOS, AirPlay, and Apple TV as a parallel rendition pulled from the same CMAF segments via a separate multivariant playlist. That last sentence is the whole CMAF argument: one set of files, two playlists, every device covered.

A live walked example, line by line

Below is a real-shape live HLS media playlist as it would look two minutes into a stream. Each line is annotated.

#EXTM3U                                          ; HLS playlist marker
#EXT-X-VERSION:9                                 ; uses LL-HLS features, needs v9+
#EXT-X-TARGETDURATION:4                          ; each segment ≈4 s
#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,PART-HOLD-BACK=1.0,HOLD-BACK=12.0
                                                  ; player may use blocking reload; latency anchors
#EXT-X-PART-INF:PART-TARGET=0.5                  ; partial segments ≈0.5 s each
#EXT-X-MEDIA-SEQUENCE:300                        ; first full segment listed is #300
#EXT-X-DISCONTINUITY-SEQUENCE:1                  ; one discontinuity has rolled past
#EXT-X-MAP:URI="init.mp4"                        ; init segment for fMP4/CMAF
#EXT-X-PROGRAM-DATE-TIME:2026-05-21T14:00:00.000Z; wall-clock anchor for the sliding window
#EXTINF:4.000,
segment_00300.m4s
#EXTINF:4.000,
segment_00301.m4s
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_0.m4s",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_1.m4s"
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_2.m4s"
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_3.m4s"
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_4.m4s"
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_5.m4s"
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_6.m4s"
#EXT-X-PART:DURATION=0.500,URI="segment_00302_part_7.m4s"
#EXTINF:4.000,
segment_00302.m4s
#EXT-X-PART:DURATION=0.500,URI="segment_00303_part_0.m4s",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.500,URI="segment_00303_part_1.m4s"
#EXT-X-PRELOAD-HINT:TYPE=PART,URI="segment_00303_part_2.m4s"
#EXT-X-RENDITION-REPORT:URI="../720p/playlist.m3u8",LAST-MSN=303,LAST-PART=1
#EXT-X-RENDITION-REPORT:URI="../1080p/playlist.m3u8",LAST-MSN=303,LAST-PART=1

Read in order. The header announces a v9+ LL-HLS playlist with a 4-second target duration and 0.5-second partial segments. The sliding window starts at segment 300. Segments 300 and 301 are complete and listed as whole files; segment 302 is in the past for the playlist refresh and is shown both as eight EXT-X-PART slices (so an earlier player saw it as it was being produced) and as a complete #EXTINF:4.000 file once it finished. Segment 303 is in progress: two parts are complete and listed, and the third is announced as a preload hint. Two EXT-X-RENDITION-REPORT lines tell the player exactly how far along the sibling 720p and 1080p playlists are, so a switch can happen without re-polling them.

A player joining this stream now will pick a variant from the multivariant playlist, fetch this media playlist, jump to EXT-X-PART for segment 303 to start the playback head as close to live as possible, and use the preload hint to start the next part's fetch in parallel. Glass-to-glass latency lands around 2 seconds.

HLS and m3u8: frequently asked questions

Is m3u8 the same as HLS?

No. HLS is the streaming protocol; m3u8 is the UTF-8 playlist format it uses to list segments and variants. Every HLS stream is described by m3u8 files, but an m3u8 file holds no video itself.

Is a master playlist the same as a multivariant playlist?

Yes. The rfc8216bis drafts renamed the "master playlist" of RFC 8216 to "multivariant playlist"; the file and its EXT-X-STREAM-INF tags are unchanged.

Can a VOD playlist change after it is published?

No. With EXT-X-PLAYLIST-TYPE:VOD the media playlist cannot change at all, including segment URIs and EXTINF durations (draft-22 §4.4.3.5). An EVENT playlist may only append segments.

Where should segments live relative to index.m3u8?

Relative segment URIs resolve against the playlist's own URI, so putting segments in the same directory as index.m3u8 and listing bare file names is the most portable layout.

How do I add multiple audio tracks to HLS?

Declare one #EXT-X-MEDIA:TYPE=AUDIO rendition per language under a shared GROUP-ID, and point each video variant at that group with AUDIO="group-id". Alternate video angles use TYPE=VIDEO the same way.

Is HLS an official standard?

HLS is IETF Informational RFC 8216 (2017). Its second edition, draft-pantos-hls-rfc8216bis-22 (protocol version 13), was sent to the RFC Editor on 15 May 2026 and was still in the RFC Editor queue in October 2026.

Does Chrome play HLS natively?

Yes, on desktop since Chrome 142 (late 2025), and on Android for years. Production players still use hls.js over Media Source Extensions where MSE is available, because early native builds had playback bugs.

What MIME type should an m3u8 file use?

application/vnd.apple.mpegurl, or audio/mpegurl for compatibility; otherwise the path must end in .m3u8 or .m3u.

How much latency does HLS add?

About 22 seconds glass-to-glass with 6-second segments, about 8 seconds with 2-second segments, and 2–5 seconds with LL-HLS partial segments, using the arithmetic in the live section above.

↓ Free download: HLS Multivariant Playlist — Cheat Sheet (2026)One printable page: the tags that matter grouped by job, a worked multivariant playlist, the codec-string format, and a 9-rung bitrate ladder for 2026.

Where Fora Soft fits in

Fora Soft has shipped HLS-backed products on every Apple and non-Apple device that matters since 2009 — telemedicine streams that must play on hospital iPads, OTT live events on Apple TV and Roku and Tizen and webOS in parallel, AR/VR companion streams behind a CMAF packager, and e-learning catalogues with multi-language audio rendered through EXT-X-MEDIA groups. Our delivery teams maintain reference HLS ladders for live and VOD and a CMAF-first packaging pipeline that produces HLS and DASH from one origin. When a client ships a video product to the iOS App Store and the same product to a smart-TV ecosystem, the answer is almost always one CMAF packager, one multivariant playlist per market, one bug to fix when it breaks. That CMAF-first pipeline is what our OTT and IPTV platform team ships, and our HLS and DASH streaming engineers can review an existing ladder before it reaches App Store review.

Video Streaming: A Complete Guide to Video Delivery: From Network Protocols and Transport to Ingest, HLS, and MPEG-DASH - book cover

The book

Video Streaming: A Complete Guide to Video Delivery: From Network Protocols and Transport to Ingest, HLS, and MPEG-DASH

This article reads one m3u8 line by line. Book 2 of the handbook is where the rest of that path lives: 1,124 pages on the transport half of the stack — what TCP, UDP, QUIC and HTTP/3 do to a live stream, contribution and ingest over RTMP, SRT and RIST, and the packaging step that turns an encoder's output into HLS, MPEG-DASH and CMAF segments. Read it and the tags above stop being syntax: target duration, playlist type and rung spacing become choices you can defend in a design review. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Is your multivariant playlist doing what you think it is?

Send us your playlist and the list of devices you have to reach, and we will tell you which rungs a player never picks, which codec strings a 2019 smart TV will reject, and what your 6-second segments are costing you in latency — 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →

See our case studies

References

  1. IETF RFC 8216 — HTTP Live Streaming (Pantos & May, August 2017). The canonical HLS specification. https://www.rfc-editor.org/rfc/rfc8216 — primary source for everything in this article that did not require draft-22 detail.
  2. draft-pantos-hls-rfc8216bis-22 — HTTP Live Streaming 2nd Edition (Pantos, 1 May 2026). The Internet-Draft that will obsolete RFC 8216; describes version 13 of the protocol. Sent to the RFC Editor by the Independent Submissions Editor on 15 May 2026 (Datatracker history, checked 26 October 2026). https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-22
  3. Apple HLS Authoring Specification for Apple Devices, revision 2025-06-26. The living document that layers normative requirements on top of the RFC for content intending to play on Apple devices. https://developer.apple.com/documentation/http-live-streaming/hls-authoring-specification-for-apple-devices — cited for the revision history (2023 and 2025 entries), the CODECS requirement (rule 9.1) and the cellular 192 kbit/s variant (rules 9.21–9.22) in §"Multi-variant playlists and the bitrate ladder."
  4. Apple, What's new in HTTP Live Streaming (WWDC 2026, 8 June 2026). https://developer.apple.com/streaming/Whats-new-HLS.pdf — first-party source for EXT-X-PRELOAD-HINT:TYPE=KEY, Date Range Schedules, public.machine-generated renditions and the HLS tools on Linux. The full change list is in Apple's diff of draft-22 against the WWDC 2026 edition.
  5. ISO/IEC 23000-19:2024 — Common Media Application Format (CMAF) for segmented media. The packaging-format standard that defines the CMAF profile of fMP4 used by HLS and DASH. https://www.iso.org/standard/85623.html — paywalled; cited for the CMAF segment structure summary in §"Segment formats."
  6. ISO/IEC 14496-12:2026 — Information technology — Coding of audio-visual objects — Part 12: ISO Base Media File Format. The fMP4 base specification. https://www.iso.org/standard/85596.html
  7. IETF RFC 6381 — The 'Codecs' and 'Profiles' Parameters for "Bucket" Media Types (Gellens, Singer, Frojdh, August 2011). The codec-string format used in CODECS attributes. https://www.rfc-editor.org/rfc/rfc6381 — cited in §"A common pitfall: the codec string."
  8. ISO/IEC 23001-7:2023 — Information technology — MPEG systems technologies — Part 7: Common encryption in ISO base media file format files. The CENC framework used by HLS Sample-AES variants. https://www.iso.org/standard/84637.html
  9. Apple, App Store Review Guidelines. https://developer.apple.com/app-store/review/guidelines/ — guideline 2.5.7, the former HLS-over-cellular rule, reads "Intentionally omitted" (checked 26 October 2026).
  10. Mux, Investigating elevated playback errors on Chrome version 141.0.7390.123 and later (October–November 2025). https://status.mux.com/incidents/g4wcv5cm02sg — native HLS rollout in Chrome 141–142 and the MSE fallback.
  11. hls.js releases (video-dev). https://github.com/video-dev/hls.js/releases — v1.7.3, September 2026.
  12. Mux, Low-Latency HLS Part 2 (30 January 2020). https://www.mux.com/blog/low-latency-hls-part-2 — Apple's January 2020 LL-HLS update that replaced HTTP/2 push with EXT-X-PRELOAD-HINT.
  13. Mux Engineering, HLS Tags — Everything You Need to Know. A first-party engineering reference from a player and packager vendor; useful cross-check for the tag-by-tag descriptions in §"The HLS tags that matter." https://www.mux.com/articles/hls-ext-tags — secondary source; in any disagreement with the IETF draft or Apple spec, this article followed the standards documents.
  14. DASH-IF Implementation Guidelines: Content Protection and Security. The CENC implementation profile used by HLS-DASH-shared CMAF stacks. https://dashif.org/guidelines/
  15. DASH-IF Implementation Guidelines: Low-Latency Live Streaming (v1.2, 2024). Cross-referenced for the comparison points between LL-HLS and LL-DASH cited at the end of §"Low-latency tags." Index of current DASH-IF guidelines: https://dashif.org/guidelines/

Note on hierarchy: in any disagreement between sources above, this article followed the standards documents (RFC 8216, draft-pantos-hls-rfc8216bis-22, ISO/IEC 23000-19, ISO/IEC 23001-7, RFC 6381) and the Apple HLS Authoring Specification over vendor blogs and analyst reports. The HTTP/2-push and multivariant-naming details, in particular, follow the Apple spec's revision history and contradict older blog posts.