Key HLS Tags: A Practical Reference for .m3u8 Manifests
A working reference to the essential HLS playlist tags — STREAM-INF, MEDIA, EXTINF, KEY, MAP, DATERANGE and more — each with a real m3u8 snippet.
HLS is defined by its tags. Each #EXT-X-* line in an .m3u8 carries one piece
of instruction to the player, and knowing exactly what each one does turns a wall
of text into a readable spec. This is a reference-style walk through the tags you
will actually encounter, grouped by where they appear. If you want to see them
parsed against a live stream, drop a manifest into the
manifest inspector on the player page. For the bigger-picture
structure, start with HLS Manifest Internals.
Basic / both playlists
EXT-X-VERSION
#EXT-X-VERSION:7
Declares the protocol version, which determines the legal feature set. Rough
guide: version 3 for floating-point EXTINF durations, version 4 for
EXT-X-BYTERANGE and I-frame playlists, version 5 for SAMPLE-AES, version 6
for EXT-X-MAP in media playlists, and version 7 for fMP4 segments. A player
that does not support the declared version should refuse the playlist.
Master (multivariant) playlist tags
EXT-X-STREAM-INF
#EXT-X-STREAM-INF:BANDWIDTH=2600000,AVERAGE-BANDWIDTH=2350000,RESOLUTION=1280x720,FRAME-RATE=29.970,CODECS="avc1.64001f,mp4a.40.2",AUDIO="aud-en"
v720/index.m3u8
The most important tag in the master playlist. It declares one variant; the URI on the next line is its media playlist. Key attributes:
- BANDWIDTH (required) — peak bits per second of this variant including audio. This is the number ABR logic must keep below the estimated throughput.
- AVERAGE-BANDWIDTH — typical bits per second; smoother for steady-state decisions.
- CODECS — RFC 6381 codec strings (e.g.
avc1.64001ffor H.264 High@3.1,mp4a.40.2for AAC-LC). Lets the player skip variants it cannot decode. - RESOLUTION — pixel dimensions, used for display and for not upswitching past the viewport.
- FRAME-RATE — useful when a ladder mixes 30 and 60 fps rungs.
- AUDIO / SUBTITLES / CLOSED-CAPTIONS — group IDs binding this variant to
EXT-X-MEDIArenditions.
EXT-X-MEDIA
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud-en",NAME="English",LANGUAGE="en",DEFAULT=YES,AUTOSELECT=YES,URI="audio/en/index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",LANGUAGE="en",FORCED=NO,AUTOSELECT=YES,URI="subs/en/index.m3u8"
Declares an alternate rendition — typically a separate audio language or a
subtitle track — that variants reference by GROUP-ID. DEFAULT=YES marks the
track selected on startup; AUTOSELECT=YES lets the player choose it based on
system language; FORCED=YES (subtitles) marks captions that must show even when
subtitles are off.
EXT-X-I-FRAME-STREAM-INF
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=180000,RESOLUTION=1280x720,CODECS="avc1.64001f",URI="v720/iframe.m3u8"
Describes an I-frame-only playlist used for trick-play (fast scrub / thumbnail seeking). The player loads only keyframes when the user drags the scrub bar, which is far cheaper than decoding full segments.
Media playlist tags
EXT-X-TARGETDURATION
#EXT-X-TARGETDURATION:6
The maximum segment duration in the playlist, rounded up to an integer. Required in every media playlist. For live streams it also sets the baseline reload cadence — the player should refetch the playlist roughly every target duration.
EXTINF
#EXTINF:6.006,
v720/seg-00000.m4s
Precedes each segment and gives its exact duration in seconds (the trailing comma is required; an optional title can follow it). These durations are summed to build the timeline and seek bar, so they must match the real media precisely.
EXT-X-MEDIA-SEQUENCE
#EXT-X-MEDIA-SEQUENCE:1024
The sequence number of the first segment in the playlist. For VOD it is usually 0; for live it increments as the sliding window advances, letting the player detect missed or duplicated segments across reloads.
EXT-X-PLAYLIST-TYPE
#EXT-X-PLAYLIST-TYPE:VOD
VOD means the playlist is fixed and fully seekable. EVENT means segments are
only ever appended (a live event you can scrub back through). The tag's absence
implies a standard sliding-window live stream where old segments are removed.
EXT-X-ENDLIST
#EXT-X-ENDLIST
Marks the end of the playlist. Once a player sees it, it stops reloading the playlist. For live, you transition a stream to VOD-on-demand by appending this tag when the event ends.
EXT-X-MAP
#EXT-X-MAP:URI="v720/init.mp4"
Points at the initialization segment for fMP4/CMAF renditions — the ftyp/moov
boxes that configure the decoder. Must be fetched before any media segment, and
re-fetched when switching to a rendition with different codec parameters.
EXT-X-KEY
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://drm.example.com/asset-42",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
Declares the encryption applied to subsequent segments. METHOD is NONE,
AES-128 (whole-segment), or SAMPLE-AES (sample-level, used by FairPlay and
multi-DRM cbcs). URI locates the key or license; IV supplies an explicit
initialization vector; KEYFORMAT identifies the DRM system. A later
METHOD=NONE line ends encryption — handy for clear ad insertions.
EXT-X-DATERANGE
#EXT-X-DATERANGE:ID="ad-break-3",START-DATE="2026-05-25T18:30:00.000Z",DURATION=30.0,SCTE35-OUT=0xFC30...
Attaches metadata to a point or interval on the timeline — most commonly SCTE-35
ad-break markers, but also chapter and program boundaries. Server-side ad
insertion and client-side ad triggering both rely on DATERANGE (or its
companion EXT-X-CUE-OUT/EXT-X-CUE-IN tags). See how markers drive ad
stitching in the SSAI tool.
A complete annotated media playlist
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="v720/init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://drm.example.com/a42",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:6.006,
v720/seg-00000.m4s
#EXTINF:6.006,
v720/seg-00001.m4s
#EXT-X-DATERANGE:ID="ad-1",START-DATE="2026-05-25T18:30:12.012Z",DURATION=15.0,SCTE35-OUT=0xFC30...
#EXTINF:6.006,
v720/seg-00002.m4s
#EXT-X-ENDLIST
Where to go next
Tags are the vocabulary; the manifest internals guide
covers the grammar that strings them together. To understand how a player turns
the BANDWIDTH values above into switching decisions, read
Adaptive Bitrate (ABR) at the Player Level, and to
design the variants those tags describe, see
Building the Bitrate Ladder.
Try it yourself
Reading about streaming is one thing — pull apart a real manifest, play a stream, and measure its QoE with the toolkit.
Browse all tools