A media playlist lists the segments of one rendition, in order. Each segment is a URI line; the tags before it describe it. A live playlist is fetched again and again, and grows at the end while old segments drop off the start. The low-latency tags are on Low-latency HLS.
Date ranges
#EXT-X-DATERANGE marks a span of real time, such as an advert break or
a programme, so that players and apps can act on it. A playlist with date ranges must
have at least one EXT-X-PROGRAM-DATE-TIME.
| Attribute | Type | Meaning |
|---|---|---|
ID | quoted string, required | Unique in the playlist. Tags with the same ID add to one range, with identical values for shared attributes. |
CLASS | quoted string | A kind of range defined by the application. Ranges of one class may not overlap. |
START-DATE | quoted ISO 8601 date, required | When it starts. |
CUE | list of PRE, POST, ONCE | Run the action before playback, after it, and/or only once; not both PRE and POST. |
END-DATE | quoted ISO 8601 date | When it ends; must equal start plus DURATION if both are given. |
DURATION | float, not negative | Its length in seconds. |
PLANNED-DURATION | float, not negative | Its expected length, when the real one is not yet known. |
END-ON-NEXT | YES | Ends where the next range of the same class starts. Needs CLASS; no DURATION or END-DATE. |
SCTE35-CMD | hexadecimal | A whole SCTE-35 splice_info_section, big-endian, for commands such as splice_null. |
SCTE35-OUT | hexadecimal | The SCTE-35 section that starts a break (out_of_network_indicator 1). |
SCTE35-IN | hexadecimal | The section that ends it (out_of_network_indicator 0). |
X-name | quoted string, hexadecimal or signed float | Any application-defined attribute, such as X-COM-EXAMPLE-AD-ID. |
With no DURATION, END-DATE or END-ON-NEXT, the
length is unknown, even if PLANNED-DURATION is given.
Worked example
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:2680
#EXT-X-DISCONTINUITY-SEQUENCE:3
#EXT-X-MAP:URI="init.mp4"
#EXT-X-PROGRAM-DATE-TIME:2026-11-12T19:30:00.000Z
#EXTINF:6.006,
seg2680.m4s
#EXT-X-DATERANGE:ID="ad1",START-DATE="2026-11-12T19:30:06.006Z",PLANNED-DURATION=30.0,SCTE35-OUT=0xFC30…
#EXT-X-DISCONTINUITY
#EXT-X-MAP:URI="ad-init.mp4"
#EXTINF:6.0,
ad-0.m4s
#EXT-X-GAP
#EXTINF:6.0,
ad-1.m4s
EXT-X-ENDLIST). The first segment listed
is number 2680; an advert break starts after it, with a discontinuity and a new
initialisation section. ad-1.m4s is missing and must be skipped.