Syntax
Attributes
| Attribute | Value | Required | What it means |
|---|---|---|---|
| ID | Any string, unique in the playlist | Yes | Identifies the date range. Tags with the same ID describe the same range and must not contradict each other. |
| CLASS | Any string, often reverse-DNS | If END-ON-NEXT=YES | Names a set of attributes and their meanings that the client understands. All ranges with the same CLASS follow the same semantics. |
| START-DATE | ISO 8601 date and time | Yes | When the date range begins. The RFC 8216bis draft lets later tags with the same ID leave it out. |
| CUE | PRE, POST and/or ONCE | No | When to trigger the action tied to the range: before playback (PRE), after it (POST), and whether only once (ONCE). Added in the RFC 8216bis draft. |
| END-DATE | ISO 8601 date and time | No | When the date range ends. It must not be earlier than START-DATE. |
| DURATION | Seconds, not negative | No | How long the range lasts. A single instant, such as a goal being scored, should use 0. |
| PLANNED-DURATION | Seconds, not negative | No | The expected length when the real length is not yet known, such as a planned ad break. |
| X-* | Name starting with X-, such as X-COM-EXAMPLE-AD-ID | No | Client-defined attributes for any extra data. Reverse-DNS names help avoid clashes. |
| SCTE35-CMD | SCTE-35 splice_info_section in hex | No | An SCTE-35 command that is not a splice out or splice in, such as a time signal. |
| SCTE35-OUT | SCTE-35 splice_info_section in hex | No | The SCTE-35 splice-out message, marking the start of a break. |
| SCTE35-IN | SCTE-35 splice_info_section in hex | No | The SCTE-35 splice-in message, marking the end of a break. |
| END-ON-NEXT | YES | No | Ends this range where the next range of the same CLASS starts. Requires CLASS and rules out DURATION and END-DATE. |
What EXT-X-DATERANGE means
EXT-X-DATERANGE attaches information to a span of real-world time. A date range has a start date, an optional end or duration, and any number of extra attributes. Servers use it to mark ad breaks, program boundaries, agenda items and other events that players and apps can react to.
Dates are matched to segments through EXT-X-PROGRAM-DATE-TIME, so the tag's position in the playlist does not decide which segment it belongs to.
Where it goes
Media playlists only. RFC 8216 defines it among the media segment tags; the RFC 8216bis draft moves it into a new group of media metadata tags. A playlist can contain many date ranges. The same range can also appear in more than one tag with the same ID, for example once when an ad break starts and again when its real end is known.
Rules from RFC 8216
Section 4.3.2.7 and section 6.2.1 set these rules:
IDandSTART-DATEare required.END-DATEmust not be earlier thanSTART-DATE, andDURATIONandPLANNED-DURATIONmust not be negative.- If both
DURATIONandEND-DATEare present, the end must equal the start plus the duration. - A range with
END-ON-NEXT=YESmust have aCLASSand must not haveDURATIONorEND-DATE. It ends where the next range of the same class starts. - A range with no
DURATION,END-DATEorEND-ON-NEXT=YEShas an unknown length, even if it has aPLANNED-DURATION. - Two tags with the same
IDmust give the same value for any attribute they both contain. - A playlist with a date range must contain at least one
EXT-X-PROGRAM-DATE-TIMEtag. - Servers must not remove a date range while any of its dates still maps to a segment in the playlist, and must not reuse an
IDfor a new range. - Every variant stream in a master playlist must carry the same set of date ranges.
- Players should ignore date range tags with invalid syntax.
SCTE-35 ad markers
SCTE-35 is the broadcast standard for signaling ad breaks. RFC 8216 maps it onto this tag: the splice-out message goes in SCTE35-OUT, the splice-in message in SCTE35-IN, and other commands in SCTE35-CMD, each as the binary message written out in hexadecimal.
Common mistakes
- No program date time. Without
EXT-X-PROGRAM-DATE-TIME, the dates cannot be placed on the timeline. - Reused IDs. Players treat tags with the same
IDas one range, so a new event given an old ID gets merged with the old one. - Custom attributes without the prefix. Private data must use names that start with
X-, ideally in reverse-DNS form such asX-COM-EXAMPLE-AD-ID.
How players treat it
Players do not usually show date ranges on screen. They pass them to the app around them, which can use them for ad tracking, chapter markers or alerts. The RFC 8216bis draft builds HLS interstitials on this tag: date ranges with CLASS="com.apple.hls.interstitial" tell supporting players to play separate content, such as an ad, at a set time.
Example
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-PROGRAM-DATE-TIME:2026-03-04T18:30:00.000Z
#EXTINF:6.000,
seg0.ts
#EXT-X-DATERANGE:ID="agenda-4",CLASS="com.example.agenda",START-DATE="2026-03-04T18:30:06.000Z",DURATION=12.0,X-COM-EXAMPLE-TITLE="Public comment"
#EXTINF:6.000,
seg1.ts
#EXTINF:6.000,
seg2.ts
#EXT-X-ENDLISTThe date range marks a 12-second agenda item that starts with the second segment; X-COM-EXAMPLE-TITLE is a client-defined attribute.
How m3u8.cloud handles it
The m3u8 inspector lists every EXT-X-DATERANGE in a playlist. Date ranges are not written into the saved file, so a video saved with m3u8.cloud carries no ad markers or other date range data.
Related tags
Check the tags in any playlist
Open the m3u8 inspector