idnits 2.17.1 draft-pantos-hls-rfc8216bis-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- -- The document has an IETF Trust Provisions (28 Dec 2009) Section 6.c(i) Publication Limitation clause. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 8, 2018) is 2143 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Informational R. Pantos, Ed. 3 Internet-Draft Apple Inc. 4 Obsoletes: 8216 (if approved) June 8, 2018 5 Intended status: Informational 6 Expires: December 10, 2018 8 HTTP Live Streaming 2nd Edition 9 draft-pantos-hls-rfc8216bis-01 11 Abstract 13 This document obsoletes RFC 8216. It describes a protocol for 14 transferring unbounded streams of multimedia data. It specifies the 15 data format of the files and the actions to be taken by the server 16 (sender) and the clients (receivers) of the streams. It describes 17 version 8 of this protocol. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on December 10, 2018. 36 Copyright Notice 38 Copyright (c) 2018 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. 48 This document may not be modified, and derivative works of it may not 49 be created, except to format it for publication as an RFC or to 50 translate it into languages other than English. 52 This Informational Internet Draft is submitted as an RFC Editor 53 Contribution and/or non-IETF Document (not as a Contribution, IETF 54 Contribution, nor IETF Document) in accordance with BCP 78 and BCP 55 79. 57 Table of Contents 59 1. Introduction to HTTP Live Streaming . . . . . . . . . . . . . 4 60 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Media Segments . . . . . . . . . . . . . . . . . . . . . . . 6 62 3.1. Supported Media Segment Formats . . . . . . . . . . . . . 6 63 3.2. MPEG-2 Transport Streams . . . . . . . . . . . . . . . . 7 64 3.3. Fragmented MPEG-4 . . . . . . . . . . . . . . . . . . . . 7 65 3.4. Packed Audio . . . . . . . . . . . . . . . . . . . . . . 8 66 3.5. WebVTT . . . . . . . . . . . . . . . . . . . . . . . . . 8 67 3.6. IMSC Subtitles . . . . . . . . . . . . . . . . . . . . . 9 68 4. Playlists . . . . . . . . . . . . . . . . . . . . . . . . . . 9 69 4.1. Definition of a Playlist . . . . . . . . . . . . . . . . 10 70 4.2. Attribute Lists . . . . . . . . . . . . . . . . . . . . . 11 71 4.3. Variable Substitution . . . . . . . . . . . . . . . . . . 12 72 4.4. Playlist Tags . . . . . . . . . . . . . . . . . . . . . . 13 73 4.4.1. Basic Tags . . . . . . . . . . . . . . . . . . . . . 13 74 4.4.1.1. EXTM3U . . . . . . . . . . . . . . . . . . . . . 13 75 4.4.1.2. EXT-X-VERSION . . . . . . . . . . . . . . . . . . 13 76 4.4.2. Media Segment Tags . . . . . . . . . . . . . . . . . 13 77 4.4.2.1. EXTINF . . . . . . . . . . . . . . . . . . . . . 14 78 4.4.2.2. EXT-X-BYTERANGE . . . . . . . . . . . . . . . . . 14 79 4.4.2.3. EXT-X-DISCONTINUITY . . . . . . . . . . . . . . . 15 80 4.4.2.4. EXT-X-KEY . . . . . . . . . . . . . . . . . . . . 15 81 4.4.2.5. EXT-X-MAP . . . . . . . . . . . . . . . . . . . . 17 82 4.4.2.6. EXT-X-PROGRAM-DATE-TIME . . . . . . . . . . . . . 18 83 4.4.2.7. EXT-X-DATERANGE . . . . . . . . . . . . . . . . . 18 84 4.4.2.7.1. Mapping SCTE-35 into EXT-X-DATERANGE . . . . 20 85 4.4.2.8. EXT-X-GAP . . . . . . . . . . . . . . . . . . . . 22 86 4.4.3. Media Playlist Tags . . . . . . . . . . . . . . . . . 22 87 4.4.3.1. EXT-X-TARGETDURATION . . . . . . . . . . . . . . 23 88 4.4.3.2. EXT-X-MEDIA-SEQUENCE . . . . . . . . . . . . . . 23 89 4.4.3.3. EXT-X-DISCONTINUITY-SEQUENCE . . . . . . . . . . 23 90 4.4.3.4. EXT-X-ENDLIST . . . . . . . . . . . . . . . . . . 24 91 4.4.3.5. EXT-X-PLAYLIST-TYPE . . . . . . . . . . . . . . . 24 92 4.4.3.6. EXT-X-I-FRAMES-ONLY . . . . . . . . . . . . . . . 25 93 4.4.4. Master Playlist Tags . . . . . . . . . . . . . . . . 25 94 4.4.4.1. EXT-X-MEDIA . . . . . . . . . . . . . . . . . . . 26 95 4.4.4.1.1. Rendition Groups . . . . . . . . . . . . . . 29 97 4.4.4.2. EXT-X-STREAM-INF . . . . . . . . . . . . . . . . 29 98 4.4.4.2.1. Alternative Renditions . . . . . . . . . . . 33 99 4.4.4.3. EXT-X-I-FRAME-STREAM-INF . . . . . . . . . . . . 34 100 4.4.4.4. EXT-X-SESSION-DATA . . . . . . . . . . . . . . . 35 101 4.4.4.5. EXT-X-SESSION-KEY . . . . . . . . . . . . . . . . 36 102 4.4.5. Media or Master Playlist Tags . . . . . . . . . . . . 36 103 4.4.5.1. EXT-X-INDEPENDENT-SEGMENTS . . . . . . . . . . . 36 104 4.4.5.2. EXT-X-START . . . . . . . . . . . . . . . . . . . 37 105 4.4.5.3. EXT-X-DEFINE . . . . . . . . . . . . . . . . . . 38 106 5. Key Files . . . . . . . . . . . . . . . . . . . . . . . . . . 39 107 5.1. Structure of Key Files . . . . . . . . . . . . . . . . . 39 108 5.2. IV for AES-128 . . . . . . . . . . . . . . . . . . . . . 39 109 6. Client/Server Responsibilities . . . . . . . . . . . . . . . 39 110 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 39 111 6.2. Server Responsibilities . . . . . . . . . . . . . . . . . 39 112 6.2.1. General Server Responsibilities . . . . . . . . . . . 39 113 6.2.2. Live Playlists . . . . . . . . . . . . . . . . . . . 42 114 6.2.3. Encrypting Media Segments . . . . . . . . . . . . . . 43 115 6.2.4. Providing Variant Streams . . . . . . . . . . . . . . 44 116 6.3. Client Responsibilities . . . . . . . . . . . . . . . . . 45 117 6.3.1. General Client Responsibilities . . . . . . . . . . . 45 118 6.3.2. Loading the Media Playlist File . . . . . . . . . . . 46 119 6.3.3. Playing the Media Playlist File . . . . . . . . . . . 47 120 6.3.4. Reloading the Media Playlist File . . . . . . . . . . 48 121 6.3.5. Determining the Next Segment to Load . . . . . . . . 49 122 6.3.6. Decrypting Encrypted Media Segments . . . . . . . . . 50 123 7. Protocol Version Compatibility . . . . . . . . . . . . . . . 51 124 8. Playlist Examples . . . . . . . . . . . . . . . . . . . . . . 52 125 8.1. Simple Media Playlist . . . . . . . . . . . . . . . . . . 52 126 8.2. Live Media Playlist Using HTTPS . . . . . . . . . . . . . 52 127 8.3. Playlist with Encrypted Media Segments . . . . . . . . . 53 128 8.4. Master Playlist . . . . . . . . . . . . . . . . . . . . . 53 129 8.5. Master Playlist with I-Frames . . . . . . . . . . . . . . 54 130 8.6. Master Playlist with Alternative Audio . . . . . . . . . 54 131 8.7. Master Playlist with Alternative Video . . . . . . . . . 54 132 8.8. Session Data in a Master Playlist . . . . . . . . . . . . 55 133 8.9. CHARACTERISTICS Attribute Containing Multiple 134 Characteristics . . . . . . . . . . . . . . . . . . . . . 56 135 8.10. EXT-X-DATERANGE Carrying SCTE-35 Tags . . . . . . . . . . 56 136 9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 56 137 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 56 138 11. Security Considerations . . . . . . . . . . . . . . . . . . . 58 139 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 58 140 12.1. Normative References . . . . . . . . . . . . . . . . . . 58 141 12.2. Informative References . . . . . . . . . . . . . . . . . 62 142 Appendix A. Changes from RFC 8216 . . . . . . . . . . . . . . . 63 143 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 63 145 1. Introduction to HTTP Live Streaming 147 HTTP Live Streaming provides a reliable, cost-effective means of 148 delivering continuous and long-form video over the Internet. It 149 allows a receiver to adapt the bit rate of the media to the current 150 network conditions in order to maintain uninterrupted playback at the 151 best possible quality. It supports interstitial content boundaries. 152 It provides a flexible framework for media encryption. It can 153 efficiently offer multiple renditions of the same content, such as 154 audio translations. It offers compatibility with large-scale HTTP 155 caching infrastructure to support delivery to large audiences. 157 Since its first draft publication in 2009, HTTP Live Streaming has 158 been implemented and deployed by a wide array of content producers, 159 tools vendors, distributors, and device manufacturers. In the 160 subsequent eight years the protocol has been refined by extensive 161 review and discussion with a variety of media streaming implementors. 163 The purpose of this document is to facilitate interoperability 164 between HTTP Live Streaming implementations by describing the media 165 transmission protocol. Using this protocol, a client can receive a 166 continuous stream of media from a server for concurrent presentation. 168 This document describes version 8 of the protocol. 170 2. Overview 172 A multimedia presentation is specified by a Uniform Resource 173 Identifier (URI) [RFC3986] to a Playlist. 175 A Playlist is either a Media Playlist or a Master Playlist. Both are 176 UTF-8 text files containing URIs and descriptive tags. 178 A Media Playlist contains a list of Media Segments, which, when 179 played sequentially, will play the multimedia presentation. 181 Here is an example of a Media Playlist: 183 #EXTM3U 184 #EXT-X-TARGETDURATION:10 186 #EXTINF:9.009, 187 http://media.example.com/first.ts 188 #EXTINF:9.009, 189 http://media.example.com/second.ts 190 #EXTINF:3.003, 191 http://media.example.com/third.ts 193 The first line is the format identifier tag #EXTM3U. The line 194 containing #EXT-X-TARGETDURATION says that all Media Segments will be 195 10 seconds long or less. Then, three Media Segments are declared. 196 The first and second are 9.009 seconds long; the third is 3.003 197 seconds. 199 To play this Playlist, the client first downloads it and then 200 downloads and plays each Media Segment declared within it. The 201 client reloads the Playlist as described in this document to discover 202 any added segments. Data SHOULD be carried over HTTP [RFC7230], but, 203 in general, a URI can specify any protocol that can reliably transfer 204 the specified resource on demand. 206 A more complex presentation can be described by a Master Playlist. A 207 Master Playlist provides a set of Variant Streams, each of which 208 describes a different version of the same content. 210 A Variant Stream includes a Media Playlist that specifies media 211 encoded at a particular bit rate, in a particular format, and at a 212 particular resolution for media containing video. 214 A Variant Stream can also specify a set of Renditions. Renditions 215 are alternate versions of the content, such as audio produced in 216 different languages or video recorded from different camera angles. 218 Clients should switch between different Variant Streams to adapt to 219 network conditions. Clients should choose Renditions based on user 220 preferences. 222 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 223 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 224 "OPTIONAL" in this document are to be interpreted as described in BCP 225 14 [RFC2119] [RFC8174] when, and only when, they appear in all 226 capitals, as shown here. 228 3. Media Segments 230 A Media Playlist contains a series of Media Segments that make up the 231 overall presentation. A Media Segment is specified by a URI and 232 optionally a byte range. 234 The duration of each Media Segment is indicated in the Media Playlist 235 by its EXTINF tag (Section 4.4.2.1). 237 Each segment in a Media Playlist has a unique integer Media Sequence 238 Number. The Media Sequence Number of the first segment in the Media 239 Playlist is either 0 or declared in the Playlist (Section 4.4.3.2). 240 The Media Sequence Number of every other segment is equal to the 241 Media Sequence Number of the segment that precedes it plus one. 243 Each Media Segment MUST carry the continuation of the encoded 244 bitstream from the end of the segment with the previous Media 245 Sequence Number, where values in a series such as timestamps and 246 Continuity Counters MUST continue uninterrupted. The only exceptions 247 are the first Media Segment ever to appear in a Media Playlist and 248 Media Segments that are explicitly signaled as discontinuities 249 (Section 4.4.2.3). Unmarked media discontinuities can trigger 250 playback errors. 252 Any Media Segment that contains video SHOULD include enough 253 information to initialize a video decoder and decode a continuous set 254 of frames that includes the final frame in the Segment; network 255 efficiency is optimized if there is enough information in the Segment 256 to decode all frames in the Segment. For example, any Media Segment 257 containing H.264 video SHOULD contain an Instantaneous Decoding 258 Refresh (IDR); frames prior to the first IDR will be downloaded but 259 possibly discarded. 261 3.1. Supported Media Segment Formats 263 All Media Segments MUST be in a format described in this section. 264 Transport of other media file formats is not defined. 266 Some media formats require a common sequence of bytes to initialize a 267 parser before a Media Segment can be parsed. This format-specific 268 sequence is called the Media Initialization Section. The Media 269 Initialization Section can be specified by an EXT-X-MAP tag 270 (Section 4.4.2.5). The Media Initialization Section MUST NOT contain 271 sample data. 273 3.2. MPEG-2 Transport Streams 275 MPEG-2 Transport Streams are specified by [ISO_13818]. 277 The Media Initialization Section of an MPEG-2 Transport Stream 278 Segment is a Program Association Table (PAT) followed by a Program 279 Map Table (PMT). 281 Transport Stream Segments MUST contain a single MPEG-2 Program; 282 playback of Multi-Program Transport Streams is not defined. Each 283 Transport Stream Segment MUST contain a PAT and a PMT, or have an 284 EXT-X-MAP tag (Section 4.4.2.5) applied to it. The first two 285 Transport Stream packets in a Segment without an EXT-X-MAP tag SHOULD 286 be a PAT and a PMT. 288 3.3. Fragmented MPEG-4 290 MPEG-4 Fragments are specified by the ISO Base Media File Format 291 [ISOBMFF]. Unlike regular MPEG-4 files that have a Movie Box 292 ('moov') that contains sample tables and a Media Data Box ('mdat') 293 containing the corresponding samples, an MPEG-4 Fragment consists of 294 a Movie Fragment Box ('moof') containing a subset of the sample table 295 and a Media Data Box containing those samples. Use of MPEG-4 296 Fragments does require a Movie Box for initialization, but that Movie 297 Box contains only non-sample-specific information such as track and 298 sample descriptions. 300 A Fragmented MPEG-4 (fMP4) Segment is a "segment" as defined by 301 Section 3 of [ISOBMFF], including the constraints on Media Data Boxes 302 in Section 8.16 of [ISOBMFF]. 304 The Media Initialization Section for an fMP4 Segment is an ISO Base 305 Media File that can initialize a parser for that Segment. 307 Broadly speaking, fMP4 Segments and Media Initialization Sections are 308 [ISOBMFF] files that also satisfy the constraints described in this 309 section. 311 The Media Initialization Section for an fMP4 Segment MUST contain a 312 File Type Box ('ftyp') containing a brand that is compatible with 313 'iso6' or higher. The File Type Box MUST be followed by a Movie Box. 314 The Movie Box MUST contain a Track Box ('trak') for every Track 315 Fragment Box ('traf') in the fMP4 Segment, with matching track_ID. 316 Each Track Box SHOULD contain a sample table, but its sample count 317 MUST be zero. Movie Header Boxes ('mvhd') and Track Header Boxes 318 ('tkhd') MUST have durations of zero. A Movie Extends Box ('mvex') 319 MUST follow the last Track Box. Note that a Common Media Application 320 Format [CMAF] Header meets all these requirements. 322 In an fMP4 Segment, every Track Fragment Box MUST contain a Track 323 Fragment Decode Time Box ('tfdt'). fMP4 Segments MUST use movie- 324 fragment-relative addressing. fMP4 Segments MUST NOT use external 325 data references. Note that a CMAF Segment meets these requirements. 327 An fMP4 Segment in a Playlist containing the EXT-X-I-FRAMES-ONLY tag 328 (Section 4.4.3.6) MAY omit the portion of the Media Data Box 329 following the intra-coded frame (I-frame) sample data. 331 Each fMP4 Segment in a Media Playlist MUST have an EXT-X-MAP tag 332 applied to it. 334 3.4. Packed Audio 336 A Packed Audio Segment contains encoded audio samples and ID3 tags 337 that are simply packed together with minimal framing and no per- 338 sample timestamps. Supported Packed Audio formats are Advanced Audio 339 Coding (AAC) with Audio Data Transport Stream (ADTS) framing 340 [ISO_13818_7], MP3 [ISO_13818_3], AC-3 [AC_3], and Enhanced AC-3 341 [AC_3]. 343 A Packed Audio Segment has no Media Initialization Section. 345 Each Packed Audio Segment MUST signal the timestamp of its first 346 sample with an ID3 Private frame (PRIV) tag [ID3] at the beginning of 347 the segment. The ID3 PRIV owner identifier MUST be 348 "com.apple.streaming.transportStreamTimestamp". The ID3 payload MUST 349 be a 33-bit MPEG-2 Program Elementary Stream timestamp expressed as a 350 big-endian eight-octet number, with the upper 31 bits set to zero. 351 Clients SHOULD NOT play Packed Audio Segments without this ID3 tag. 353 3.5. WebVTT 355 A WebVTT Segment is a section of a WebVTT [WebVTT] file. WebVTT 356 Segments carry subtitles. 358 The Media Initialization Section of a WebVTT Segment is the WebVTT 359 header. 361 Each WebVTT Segment MUST contain all subtitle cues that are intended 362 to be displayed during the period indicated by the segment EXTINF 363 duration. The start time offset and end time offset of each cue MUST 364 indicate the total display time for that cue, even if part of the cue 365 time range is outside the Segment period. A WebVTT Segment MAY 366 contain no cues; this indicates that no subtitles are to be displayed 367 during that period. 369 Each WebVTT Segment MUST either start with a WebVTT header or have an 370 EXT-X-MAP tag applied to it. 372 In order to synchronize timestamps between audio/video and subtitles, 373 an X-TIMESTAMP-MAP metadata header SHOULD be added to each WebVTT 374 header. This header maps WebVTT cue timestamps to media timestamps 375 in other Renditions of the Variant Stream. Its format is: 377 X-TIMESTAMP-MAP=LOCAL:,MPEGTS: 378 e.g., X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000 380 indicating the media time to which the cue time MUST be mapped. The 381 cue timestamp in the LOCAL attribute MAY fall outside the range of 382 time covered by the segment. 384 The MPEGTS media timestamp MUST use a 90KHz timescale, even when non- 385 WebVTT Media Segments use a different timescale. 387 If a WebVTT segment does not have the X-TIMESTAMP-MAP, the client 388 MUST assume that the WebVTT cue time of 0 maps to an media timestamp 389 of 0. 391 When synchronizing WebVTT with PES timestamps, clients SHOULD account 392 for cases where the 33-bit PES timestamps have wrapped and the WebVTT 393 cue times have not. 395 3.6. IMSC Subtitles 397 An IMSC Segment is a Fragmented MPEG-4 (Section 3.3) Media Segment 398 that carries subtitle media according to MPEG-4 Part 30 399 [MP4_TIMED_TEXT]. This subtitle media MUST comply with the Text 400 Profile of IMSC1 [IMSC1]. 402 The Media Initialization Section of an IMSC Segment is specified in 403 Section 3.3. 405 Each IMSC Segment MUST contain all subtitle samples that are intended 406 to be displayed during the period indicated by the segment EXTINF 407 duration. Each Segment MUST contain definitions for all styles which 408 are applied to any part of any sample in the Segment. 410 4. Playlists 412 This section describes the Playlist files used by HTTP Live 413 Streaming. In this section, "MUST" and "MUST NOT" specify the rules 414 for the syntax and structure of legal Playlist files. Playlists that 415 violate these rules are invalid; clients MUST fail to parse them. 416 See Section 6.3.2. 418 The format of the Playlist files is derived from the M3U [M3U] 419 playlist file format and inherits two tags from that earlier file 420 format: EXTM3U (Section 4.4.1.1) and EXTINF (Section 4.4.2.1). 422 In the specification of tag syntax, a string enclosed by <> 423 identifies a tag parameter; its specific format is described in its 424 tag definition. If a parameter is further surrounded by [], it is 425 optional; otherwise, it is required. 427 Each Playlist file MUST be identifiable either by the path component 428 of its URI or by HTTP Content-Type. In the first case, the path MUST 429 end with either .m3u8 or .m3u. In the second, the HTTP Content-Type 430 MUST be "application/vnd.apple.mpegurl" or "audio/mpegurl". Clients 431 SHOULD refuse to parse Playlists that are not so identified. 433 4.1. Definition of a Playlist 435 Playlist files MUST be encoded in UTF-8 [RFC3629]. They MUST NOT 436 contain any Byte Order Mark (BOM); clients SHOULD fail to parse 437 Playlists that contain a BOM or do not parse as UTF-8. Playlist 438 files MUST NOT contain UTF-8 control characters (U+0000 to U+001F and 439 U+007F to U+009F), with the exceptions of CR (U+000D) and LF 440 (U+000A). All character sequences MUST be normalized according to 441 Unicode normalization form "NFC" [UNICODE]. Note that US-ASCII 442 [US_ASCII] conforms to these rules. 444 Lines in a Playlist file are terminated by either a single line feed 445 character or a carriage return character followed by a line feed 446 character. Each line is a URI, is blank, or starts with the 447 character '#'. Blank lines are ignored. Whitespace MUST NOT be 448 present, except for elements in which it is explicitly specified. 450 Lines that start with the character '#' are either comments or tags. 451 Tags begin with #EXT. They are case sensitive. All other lines that 452 begin with '#' are comments and SHOULD be ignored. 454 A URI line identifies a Media Segment or a Playlist file (see 455 Section 4.4.4.2). Each Media Segment is specified by a URI and the 456 tags that apply to it. 458 A Playlist is a Media Playlist if all URI lines in the Playlist 459 identify Media Segments. A Playlist is a Master Playlist if all URI 460 lines in the Playlist identify Media Playlists. A Playlist MUST be 461 either a Media Playlist or a Master Playlist; all other Playlists are 462 invalid. 464 A URI in a Playlist, whether it is a URI line or part of a tag, MAY 465 be relative. Any relative URI is considered to be relative to the 466 URI of the Playlist that contains it. 468 The duration of a Media Playlist is the sum of the durations of the 469 Media Segments within it. 471 The segment bit rate of a Media Segment is the size of the Media 472 Segment divided by its EXTINF duration (Section 4.4.2.1). Note that 473 this includes container overhead but does not include overhead 474 imposed by the delivery system, such as HTTP, TCP, or IP headers. 476 The peak segment bit rate of a Media Playlist is the largest bit rate 477 of any contiguous set of segments whose total duration is between 0.5 478 and 1.5 times the target duration. The bit rate of a set is 479 calculated by dividing the sum of the segment sizes by the sum of the 480 segment durations. 482 The average segment bit rate of a Media Playlist is the sum of the 483 sizes (in bits) of every Media Segment in the Media Playlist, divided 484 by the Media Playlist duration. Note that this includes container 485 overhead, but not HTTP or other overhead imposed by the delivery 486 system. 488 4.2. Attribute Lists 490 Certain tags have values that are attribute-lists. An attribute-list 491 is a comma-separated list of attribute/value pairs with no 492 whitespace. 494 An attribute/value pair has the following syntax: 496 AttributeName=AttributeValue 498 An AttributeName is an unquoted string containing characters from the 499 set [A..Z], [0..9], and '-'. Therefore, AttributeNames contain only 500 uppercase letters, not lowercase. There MUST NOT be any whitespace 501 between the AttributeName and the '=' character, nor between the '=' 502 character and the AttributeValue. 504 An AttributeValue is one of the following: 506 o decimal-integer: an unquoted string of characters from the set 507 [0..9] expressing an integer in base-10 arithmetic in the range 508 from 0 to 2^64-1 (18446744073709551615). A decimal-integer may be 509 from 1 to 20 characters long. 511 o hexadecimal-sequence: an unquoted string of characters from the 512 set [0..9] and [A..F] that is prefixed with 0x or 0X. The maximum 513 length of a hexadecimal-sequence depends on its AttributeNames. 515 o decimal-floating-point: an unquoted string of characters from the 516 set [0..9] and '.' that expresses a non-negative floating-point 517 number in decimal positional notation. 519 o signed-decimal-floating-point: an unquoted string of characters 520 from the set [0..9], '-', and '.' that expresses a signed 521 floating-point number in decimal positional notation. 523 o quoted-string: a string of characters within a pair of double 524 quotes (0x22). The following characters MUST NOT appear in a 525 quoted-string: line feed (0xA), carriage return (0xD), or double 526 quote (0x22). Quoted-string AttributeValues SHOULD be constructed 527 so that byte-wise comparison is sufficient to test two quoted- 528 string AttributeValues for equality. Note that this implies case- 529 sensitive comparison. 531 o enumerated-string: an unquoted character string from a set that is 532 explicitly defined by the AttributeName. An enumerated-string 533 will never contain double quotes ("), commas (,), or whitespace. 535 o decimal-resolution: two decimal-integers separated by the "x" 536 character. The first integer is a horizontal pixel dimension 537 (width); the second is a vertical pixel dimension (height). 539 The type of the AttributeValue for a given AttributeName is specified 540 by the attribute definition. 542 A given AttributeName MUST NOT appear more than once in a given 543 attribute-list. Clients SHOULD refuse to parse such Playlists. 545 4.3. Variable Substitution 547 The following Playlist elements are subject to variable substitution: 549 o URI lines 551 o quoted-string AttributeValues 553 o hexadecimal-sequence AttributeValues 555 A Variable Reference is a string of the form "{$" (0x7B,0x24) 556 followed by a Variable Name followed by "}" (0x7D). Variable Names 557 are defined by the EXT-X-DEFINE tag (Section 4.4.5.3). 559 See Section 6.3.1 for more information about variable substitution. 561 4.4. Playlist Tags 563 Playlist tags specify either global parameters of the Playlist or 564 information about the Media Segments or Media Playlists that appear 565 after them. 567 4.4.1. Basic Tags 569 These tags are allowed in both Media Playlists and Master Playlists. 571 4.4.1.1. EXTM3U 573 The EXTM3U tag indicates that the file is an Extended M3U [M3U] 574 Playlist file. It MUST be the first line of every Media Playlist and 575 every Master Playlist. Its format is: 577 #EXTM3U 579 4.4.1.2. EXT-X-VERSION 581 The EXT-X-VERSION tag indicates the compatibility version of the 582 Playlist file, its associated media, and its server. 584 The EXT-X-VERSION tag applies to the entire Playlist file. Its 585 format is: 587 #EXT-X-VERSION: 589 where n is an integer indicating the protocol compatibility version 590 number. 592 It MUST appear in all Playlists containing tags or attributes that 593 are not compatible with protocol version 1 to support 594 interoperability with older clients. Section 7 specifies the minimum 595 value of the compatibility version number for any given Playlist 596 file. 598 A Playlist file MUST NOT contain more than one EXT-X-VERSION tag. If 599 a client encounters a Playlist with multiple EXT-X-VERSION tags, it 600 MUST fail to parse it. 602 4.4.2. Media Segment Tags 604 Each Media Segment is specified by a series of Media Segment tags 605 followed by a URI. Some Media Segment tags apply to just the next 606 segment; others apply to all subsequent segments until another 607 instance of the same tag. 609 A Media Segment tag MUST NOT appear in a Master Playlist. Clients 610 MUST fail to parse Playlists that contain both Media Segment tags and 611 Master Playlist tags (Section 4.4.4). 613 4.4.2.1. EXTINF 615 The EXTINF tag specifies the duration of a Media Segment. It applies 616 only to the next Media Segment. This tag is REQUIRED for each Media 617 Segment. Its format is: 619 #EXTINF:,[] 621 where duration is a decimal-floating-point or decimal-integer number 622 (as described in Section 4.2) that specifies the duration of the 623 Media Segment in seconds. Durations SHOULD be decimal-floating- 624 point, with enough accuracy to avoid perceptible error when segment 625 durations are accumulated. However, if the compatibility version 626 number is less than 3, durations MUST be integers. Durations that 627 are reported as integers SHOULD be rounded to the nearest integer. 628 The remainder of the line following the comma is an optional human- 629 readable informative title of the Media Segment expressed as UTF-8 630 text. 632 4.4.2.2. EXT-X-BYTERANGE 634 The EXT-X-BYTERANGE tag indicates that a Media Segment is a sub-range 635 of the resource identified by its URI. It applies only to the next 636 URI line that follows it in the Playlist. Its format is: 638 #EXT-X-BYTERANGE:<n>[@<o>] 640 where n is a decimal-integer indicating the length of the sub-range 641 in bytes. If present, o is a decimal-integer indicating the start of 642 the sub-range, as a byte offset from the beginning of the resource. 643 If o is not present, the sub-range begins at the next byte following 644 the sub-range of the previous Media Segment. 646 If o is not present, a previous Media Segment MUST appear in the 647 Playlist file and MUST be a sub-range of the same media resource, or 648 the Media Segment is undefined and the client MUST fail to parse the 649 Playlist. 651 A Media Segment without an EXT-X-BYTERANGE tag consists of the entire 652 resource identified by its URI. 654 Use of the EXT-X-BYTERANGE tag REQUIRES a compatibility version 655 number of 4 or greater. 657 4.4.2.3. EXT-X-DISCONTINUITY 659 The EXT-X-DISCONTINUITY tag indicates a discontinuity between the 660 Media Segment that follows it and the one that preceded it. 662 Its format is: 664 #EXT-X-DISCONTINUITY 666 The EXT-X-DISCONTINUITY tag MUST be present if there is a change in 667 any of the following characteristics: 669 o file format 671 o number, type, and identifiers of tracks 673 o timestamp sequence 675 The EXT-X-DISCONTINUITY tag SHOULD be present if there is a change in 676 any of the following characteristics: 678 o encoding parameters 680 o encoding sequence 682 See Section 3, Section 6.2.1, and Section 6.3.3 for more information 683 about the EXT-X-DISCONTINUITY tag. 685 4.4.2.4. EXT-X-KEY 687 Media Segments MAY be encrypted. The EXT-X-KEY tag specifies how to 688 decrypt them. It applies to every Media Segment and to every Media 689 Initialization Section declared by an EXT-X-MAP tag that appears 690 between it and the next EXT-X-KEY tag in the Playlist file with the 691 same KEYFORMAT attribute (or the end of the Playlist file). Two or 692 more EXT-X-KEY tags with different KEYFORMAT attributes MAY apply to 693 the same Media Segment if they ultimately produce the same decryption 694 key. The format is: 696 #EXT-X-KEY:<attribute-list> 698 The following attributes are defined: 700 METHOD 701 The value is an enumerated-string that specifies the encryption 702 method. This attribute is REQUIRED. 704 The methods defined are: NONE, AES-128, and SAMPLE-AES. 706 An encryption method of NONE means that Media Segments are not 707 encrypted. If the encryption method is NONE, other attributes 708 MUST NOT be present. 710 An encryption method of AES-128 signals that Media Segments are 711 completely encrypted using the Advanced Encryption Standard (AES) 712 [AES_128] with a 128-bit key, Cipher Block Chaining (CBC), and 713 Public-Key Cryptography Standards #7 (PKCS7) padding [RFC5652]. 714 CBC is restarted on each segment boundary, using either the 715 Initialization Vector (IV) attribute value or the Media Sequence 716 Number as the IV; see Section 5.2. 718 An alternative to whole-segment encryption is Sample Encryption. 719 With Sample Encryption, only media sample data - such as audio 720 packets or video frames - is encrypted. The rest of the Media 721 Segment is unencrypted. Sample Encryption allows parts of the 722 Segment to be processed without (or before) decrypting the media 723 itself. 725 An encryption method of SAMPLE-AES means that the Media Segments 726 are Sample Encrypted using the Advanced Encryption Standard 727 [AES_128]. How these media streams are encrypted and encapsulated 728 in a segment depends on the media encoding and the media format of 729 the segment. fMP4 Media Segments are encrypted using the 'cbcs' 730 scheme of Common Encryption [COMMON_ENC]. Encryption of other 731 Media Segment formats containing H.264 [H_264], AAC [ISO_14496], 732 AC-3 [AC_3], and Enhanced AC-3 [AC_3] media streams is described 733 in the HTTP Live Streaming (HLS) Sample Encryption specification 734 [SampleEnc]. The IV attribute MAY be present; see Section 5.2. 736 URI 738 The value is a quoted-string containing a URI that specifies how 739 to obtain the key. This attribute is REQUIRED unless the METHOD 740 is NONE. 742 IV 744 The value is a hexadecimal-sequence that specifies a 128-bit 745 unsigned integer Initialization Vector to be used with the key. 746 Use of the IV attribute REQUIRES a compatibility version number of 747 2 or greater. See Section 5.2 for when the IV attribute is used. 749 KEYFORMAT 751 The value is a quoted-string that specifies how the key is 752 represented in the resource identified by the URI; see Section 5 753 for more detail. This attribute is OPTIONAL; its absence 754 indicates an implicit value of "identity". Use of the KEYFORMAT 755 attribute REQUIRES a compatibility version number of 5 or greater. 757 KEYFORMATVERSIONS 759 The value is a quoted-string containing one or more positive 760 integers separated by the "/" character (for example, "1", "1/2", 761 or "1/2/5"). If more than one version of a particular KEYFORMAT 762 is defined, this attribute can be used to indicate which 763 version(s) this instance complies with. This attribute is 764 OPTIONAL; if it is not present, its value is considered to be "1". 765 Use of the KEYFORMATVERSIONS attribute REQUIRES a compatibility 766 version number of 5 or greater. 768 If the Media Playlist file does not contain an EXT-X-KEY tag, then 769 Media Segments are not encrypted. 771 See Section 5 for the format of the Key file, and Section 5.2, 772 Section 6.2.3, and Section 6.3.6 for additional information on Media 773 Segment encryption. 775 4.4.2.5. EXT-X-MAP 777 The EXT-X-MAP tag specifies how to obtain the Media Initialization 778 Section (Section 3) required to parse the applicable Media Segments. 779 It applies to every Media Segment that appears after it in the 780 Playlist until the next EXT-X-MAP tag or until the end of the 781 Playlist. 783 Its format is: 785 #EXT-X-MAP:<attribute-list> 787 The following attributes are defined: 789 URI 791 The value is a quoted-string containing a URI that identifies a 792 resource that contains the Media Initialization Section. This 793 attribute is REQUIRED. 795 BYTERANGE 796 The value is a quoted-string specifying a byte range into the 797 resource identified by the URI attribute. This range SHOULD 798 contain only the Media Initialization Section. The format of the 799 byte range is described in Section 4.4.2.2. This attribute is 800 OPTIONAL; if it is not present, the byte range is the entire 801 resource indicated by the URI. 803 An EXT-X-MAP tag SHOULD be supplied for Media Segments in Playlists 804 with the EXT-X-I-FRAMES-ONLY tag when the first Media Segment (i.e., 805 I-frame) in the Playlist (or the first segment following an EXT- 806 X-DISCONTINUITY tag) does not immediately follow the Media 807 Initialization Section at the beginning of its resource. 809 Use of the EXT-X-MAP tag in a Media Playlist that contains the EXT- 810 X-I-FRAMES-ONLY tag REQUIRES a compatibility version number of 5 or 811 greater. Use of the EXT-X-MAP tag in a Media Playlist that DOES NOT 812 contain the EXT-X-I-FRAMES-ONLY tag REQUIRES a compatibility version 813 number of 6 or greater. 815 If the Media Initialization Section declared by an EXT-X-MAP tag is 816 encrypted with a METHOD of AES-128, the IV attribute of the EXT-X-KEY 817 tag that applies to the EXT-X-MAP is REQUIRED. 819 4.4.2.6. EXT-X-PROGRAM-DATE-TIME 821 The EXT-X-PROGRAM-DATE-TIME tag associates the first sample of a 822 Media Segment with an absolute date and/or time. It applies only to 823 the next Media Segment. Its format is: 825 #EXT-X-PROGRAM-DATE-TIME:<date-time-msec> 827 where date-time-msec is an ISO/IEC 8601:2004 [ISO_8601] date/time 828 representation, such as YYYY-MM-DDThh:mm:ss.SSSZ. It SHOULD indicate 829 a time zone and fractional parts of seconds, to millisecond accuracy. 831 For example: 833 #EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031+08:00 835 See Section 6.2.1 and Section 6.3.3 for more information on the EXT- 836 X-PROGRAM-DATE-TIME tag. 838 4.4.2.7. EXT-X-DATERANGE 840 The EXT-X-DATERANGE tag associates a Date Range (i.e., a range of 841 time defined by a starting and ending date) with a set of attribute/ 842 value pairs. Its format is: 844 #EXT-X-DATERANGE:<attribute-list> 846 where the defined attributes are: 848 ID 850 A quoted-string that uniquely identifies a Date Range in the 851 Playlist. This attribute is REQUIRED. 853 CLASS 855 A client-defined quoted-string that specifies some set of 856 attributes and their associated value semantics. All Date Ranges 857 with the same CLASS attribute value MUST adhere to these 858 semantics. This attribute is OPTIONAL. 860 START-DATE 862 A quoted-string containing the ISO-8601 date at which the Date 863 Range begins. This attribute is REQUIRED. 865 END-DATE 867 A quoted-string containing the ISO-8601 date at which the Date 868 Range ends. It MUST be equal to or later than the value of the 869 START-DATE attribute. This attribute is OPTIONAL. 871 DURATION 873 The duration of the Date Range expressed as a decimal-floating- 874 point number of seconds. It MUST NOT be negative. A single 875 instant in time (e.g., crossing a finish line) SHOULD be 876 represented with a duration of 0. This attribute is OPTIONAL. 878 PLANNED-DURATION 880 The expected duration of the Date Range expressed as a decimal- 881 floating-point number of seconds. It MUST NOT be negative. This 882 attribute SHOULD be used to indicate the expected duration of a 883 Date Range whose actual duration is not yet known. It is 884 OPTIONAL. 886 X-<client-attribute> 888 The "X-" prefix defines a namespace reserved for client-defined 889 attributes. The client-attribute MUST be a legal AttributeName. 890 Clients SHOULD use a reverse-DNS syntax when defining their own 891 attribute names to avoid collisions. The attribute value MUST be 892 a quoted-string, a hexadecimal-sequence, or a decimal-floating- 893 point. An example of a client-defined attribute is X-COM-EXAMPLE- 894 AD-ID="XYZ123". These attributes are OPTIONAL. 896 SCTE35-CMD, SCTE35-OUT, SCTE35-IN 898 Used to carry SCTE-35 data; see Section 4.4.2.7.1 for more 899 information. These attributes are OPTIONAL. 901 END-ON-NEXT 903 An enumerated-string whose value MUST be YES. This attribute 904 indicates that the end of the range containing it is equal to the 905 START-DATE of its Following Range. The Following Range is the 906 Date Range of the same CLASS that has the earliest START-DATE 907 after the START-DATE of the range in question. This attribute is 908 OPTIONAL. 910 An EXT-X-DATERANGE tag with an END-ON-NEXT=YES attribute MUST have a 911 CLASS attribute. Other EXT-X-DATERANGE tags with the same CLASS 912 attribute MUST NOT specify Date Ranges that overlap. 914 An EXT-X-DATERANGE tag with an END-ON-NEXT=YES attribute MUST NOT 915 contain DURATION or END-DATE attributes. 917 A Date Range with neither a DURATION, an END-DATE, nor an END-ON- 918 NEXT=YES attribute has an unknown duration, even if it has a PLANNED- 919 DURATION. 921 If a Playlist contains an EXT-X-DATERANGE tag, it MUST also contain 922 at least one EXT-X-PROGRAM-DATE-TIME tag. 924 If a Playlist contains two EXT-X-DATERANGE tags with the same ID 925 attribute value, then any AttributeName that appears in both tags 926 MUST have the same AttributeValue. 928 If a Date Range contains both a DURATION attribute and an END-DATE 929 attribute, the value of the END-DATE attribute MUST be equal to the 930 value of the START-DATE attribute plus the value of the DURATION 931 attribute. 933 Clients SHOULD ignore EXT-X-DATERANGE tags with illegal syntax. 935 4.4.2.7.1. Mapping SCTE-35 into EXT-X-DATERANGE 937 Splice information carried in source media according to the SCTE-35 938 specification [SCTE35] MAY be represented in a Media Playlist using 939 EXT-X-DATERANGE tags. 941 Each SCTE-35 splice_info_section() containing a splice_null(), 942 splice_schedule(), bandwidth_reservation(), or private_cmd() SHOULD 943 be represented by an EXT-X-DATERANGE tag with an SCTE35-CMD attribute 944 whose value is the big-endian binary representation of the 945 splice_info_section(), expressed as a hexadecimal-sequence. 947 An SCTE-35 splice out/in pair signaled by a pair of splice_insert() 948 commands SHOULD be represented by one or more EXT-X-DATERANGE tags 949 carrying the same ID attribute, which MUST be unique to that splice 950 out/in pair. The "out" splice_info_section() (with 951 out_of_network_indicator set to 1) MUST be placed in an SCTE35-OUT 952 attribute, with the same formatting as SCTE35-CMD. The "in" 953 splice_info_section() (with out_of_network_indicator set to 0) MUST 954 be placed in an SCTE35-IN attribute, with the same formatting as 955 SCTE35-CMD. 957 An SCTE-35 splice out/in pair signaled by a pair of time_signal() 958 commands, each carrying a single segmentation_descriptor(), SHOULD be 959 represented by one or more EXT-X-DATERANGE tags carrying the same ID 960 attribute, which MUST be unique to that splice out/in pair. The 961 "out" splice_info_section() MUST be placed in an SCTE35-OUT 962 attribute; the "in" splice_info_section() MUST be placed in an 963 SCTE35-IN attribute. 965 Different types of segmentation, as indicated by the 966 segmentation_type_id in the segmentation_descriptor(), SHOULD be 967 represented by separate EXT-X-DATERANGE tags, even if two or more 968 segmentation_descriptor()s arrive in the same splice_info_section(). 969 In that case, each EXT-X-DATERANGE tag will have an SCTE35-OUT, 970 SCTE35-IN, or SCTE35-CMD attribute whose value is the entire 971 splice_info_section(). 973 An SCTE-35 time_signal() command that does not signal a splice out or 974 in point SHOULD be represented by an EXT-X-DATERANGE tag with an 975 SCTE35-CMD attribute. 977 The START-DATE of an EXT-X-DATERANGE tag containing an SCTE35-OUT 978 attribute MUST be the date and time that corresponds to the program 979 time of that splice. 981 The START-DATE of an EXT-X-DATERANGE tag containing an SCTE35-CMD 982 MUST be the date and time specified by the splice_time() in the 983 command or the program time at which the command appeared in the 984 source stream if the command does not specify a splice_time(). 986 An EXT-X-DATERANGE tag containing an SCTE35-OUT attribute MAY contain 987 a PLANNED-DURATION attribute. Its value MUST be the planned duration 988 of the splice. 990 The DURATION of an EXT-X-DATERANGE tag containing an SCTE35-IN 991 attribute MUST be the actual (not planned) program duration between 992 the corresponding out-point and that in-point. 994 The END-DATE of an EXT-X-DATERANGE tag containing an SCTE35-IN 995 attribute MUST be the actual (not planned) program date and time of 996 that in-point. 998 If the actual end date and time is not known when an SCTE35-OUT 999 attribute is added to the Playlist, the DURATION attribute and the 1000 END-TIME attribute MUST NOT be present; the actual end date of the 1001 splice SHOULD be signaled by another EXT-X-DATERANGE tag once it has 1002 been established. 1004 A canceled splice SHOULD NOT appear in the Playlist as an EXT- 1005 X-DATERANGE tag. 1007 An EXT-X-DATERANGE tag announcing a splice SHOULD be added to a 1008 Playlist at the same time as the last pre-splice Media Segment, or 1009 earlier if possible. 1011 The ID attribute of an EXT-X-DATERANGE tag MAY contain a 1012 splice_event_id and/or a segmentation_event_id, but it MUST be unique 1013 in the Playlist. If there is a possibility that an SCTE-35 id will 1014 be reused, the ID attribute value MUST include disambiguation, such 1015 as a date or sequence number. 1017 4.4.2.8. EXT-X-GAP 1019 The EXT-X-GAP tag indicates that the segment URL to which it applies 1020 does not contain media data and SHOULD NOT be loaded by clients. It 1021 applies only to the next Media Segment. 1023 Its format is: 1025 #EXT-X-GAP 1027 See Section 6.2.1 and Section 6.3.3 for more information on the EXT- 1028 X-GAP tag. 1030 4.4.3. Media Playlist Tags 1032 Media Playlist tags describe global parameters of the Media Playlist. 1033 There MUST NOT be more than one Media Playlist tag of each type in 1034 any Media Playlist. 1036 A Media Playlist tag MUST NOT appear in a Master Playlist 1038 4.4.3.1. EXT-X-TARGETDURATION 1040 The EXT-X-TARGETDURATION tag specifies the maximum Media Segment 1041 duration. The EXTINF duration of each Media Segment in the Playlist 1042 file, when rounded to the nearest integer, MUST be less than or equal 1043 to the target duration; longer segments can trigger playback stalls 1044 or other errors. It applies to the entire Playlist file. Its format 1045 is: 1047 #EXT-X-TARGETDURATION:<s> 1049 where s is a decimal-integer indicating the target duration in 1050 seconds. The EXT-X-TARGETDURATION tag is REQUIRED. 1052 4.4.3.2. EXT-X-MEDIA-SEQUENCE 1054 The EXT-X-MEDIA-SEQUENCE tag indicates the Media Sequence Number of 1055 the first Media Segment that appears in a Playlist file. Its format 1056 is: 1058 #EXT-X-MEDIA-SEQUENCE:<number> 1060 where number is a decimal-integer. 1062 If the Media Playlist file does not contain an EXT-X-MEDIA-SEQUENCE 1063 tag, then the Media Sequence Number of the first Media Segment in the 1064 Media Playlist SHALL be considered to be 0. A client MUST NOT assume 1065 that segments with the same Media Sequence Number in different Media 1066 Playlists contain matching content (see Section 6.3.2). 1068 A URI for a Media Segment is not required to contain its Media 1069 Sequence Number. 1071 See Section 6.2.1 and Section 6.3.5 for more information on setting 1072 the EXT-X-MEDIA-SEQUENCE tag. 1074 The EXT-X-MEDIA-SEQUENCE tag MUST appear before the first Media 1075 Segment in the Playlist. 1077 4.4.3.3. EXT-X-DISCONTINUITY-SEQUENCE 1079 The EXT-X-DISCONTINUITY-SEQUENCE tag allows synchronization between 1080 different Renditions of the same Variant Stream or different Variant 1081 Streams that have EXT-X-DISCONTINUITY tags in their Media Playlists. 1083 Its format is: 1085 #EXT-X-DISCONTINUITY-SEQUENCE:<number> 1087 where number is a decimal-integer. 1089 If the Media Playlist does not contain an EXT-X-DISCONTINUITY- 1090 SEQUENCE tag, then the Discontinuity Sequence Number of the first 1091 Media Segment in the Playlist SHALL be considered to be 0. 1093 The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before the first 1094 Media Segment in the Playlist. 1096 The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before any EXT- 1097 X-DISCONTINUITY tag. 1099 See Section 6.2.1 and Section 6.2.2 for more information about 1100 setting the value of the EXT-X-DISCONTINUITY-SEQUENCE tag. 1102 4.4.3.4. EXT-X-ENDLIST 1104 The EXT-X-ENDLIST tag indicates that no more Media Segments will be 1105 added to the Media Playlist file. It MAY occur anywhere in the Media 1106 Playlist file. Its format is: 1108 #EXT-X-ENDLIST 1110 4.4.3.5. EXT-X-PLAYLIST-TYPE 1112 The EXT-X-PLAYLIST-TYPE tag provides mutability information about the 1113 Media Playlist file. It applies to the entire Media Playlist file. 1114 It is OPTIONAL. Its format is: 1116 #EXT-X-PLAYLIST-TYPE:<type-enum> 1118 where type-enum is either EVENT or VOD. 1120 Section 6.2.1 defines the implications of the EXT-X-PLAYLIST-TYPE 1121 tag. 1123 If the EXT-X-PLAYLIST-TYPE value is EVENT, Media Segments can only be 1124 added to the end of the Media Playlist. If the EXT-X-PLAYLIST-TYPE 1125 value is Video On Demand (VOD), the Media Playlist cannot change. 1127 If the EXT-X-PLAYLIST-TYPE tag is omitted from a Media Playlist, the 1128 Playlist can be updated according to the rules in Section 6.2.1 with 1129 no additional restrictions. For example, a live Playlist 1130 (Section 6.2.2) MAY be updated to remove Media Segments in the order 1131 that they appeared. 1133 4.4.3.6. EXT-X-I-FRAMES-ONLY 1135 The EXT-X-I-FRAMES-ONLY tag indicates that each Media Segment in the 1136 Playlist describes a single I-frame. I-frames are encoded video 1137 frames whose decoding does not depend on any other frame. I-frame 1138 Playlists can be used for trick play, such as fast forward, rapid 1139 reverse, and scrubbing. 1141 The EXT-X-I-FRAMES-ONLY tag applies to the entire Playlist. Its 1142 format is: 1144 #EXT-X-I-FRAMES-ONLY 1146 In a Playlist with the EXT-X-I-FRAMES-ONLY tag, the Media Segment 1147 duration (EXTINF tag value) is the time between the presentation time 1148 of the I-frame in the Media Segment and the presentation time of the 1149 next I-frame in the Playlist, or the end of the presentation if it is 1150 the last I-frame in the Playlist. 1152 Media resources containing I-frame segments MUST begin with either a 1153 Media Initialization Section (Section 3) or be accompanied by an EXT- 1154 X-MAP tag indicating the Media Initialization Section so that clients 1155 can load and decode I-frame segments in any order. The byte range of 1156 an I-frame segment with an EXT-X-BYTERANGE tag applied to it 1157 (Section 4.4.2.2) MUST NOT include its Media Initialization Section; 1158 clients can assume that the Media Initialization Section is defined 1159 by the EXT-X-MAP tag, or is located between the start of the resource 1160 and the offset of the first I-frame segment in that resource. 1162 Use of the EXT-X-I-FRAMES-ONLY REQUIRES a compatibility version 1163 number of 4 or greater. 1165 4.4.4. Master Playlist Tags 1167 Master Playlist tags define the Variant Streams, Renditions, and 1168 other global parameters of the presentation. 1170 Master Playlist tags MUST NOT appear in a Media Playlist; clients 1171 MUST fail to parse any Playlist that contains both a Master Playlist 1172 tag and either a Media Playlist tag or a Media Segment tag. 1174 4.4.4.1. EXT-X-MEDIA 1176 The EXT-X-MEDIA tag is used to relate Media Playlists that contain 1177 alternative Renditions (Section 4.4.4.2.1) of the same content. For 1178 example, three EXT-X-MEDIA tags can be used to identify audio-only 1179 Media Playlists that contain English, French, and Spanish Renditions 1180 of the same presentation. Or, two EXT-X-MEDIA tags can be used to 1181 identify video-only Media Playlists that show two different camera 1182 angles. 1184 Its format is: 1186 #EXT-X-MEDIA:<attribute-list> 1188 The following attributes are defined: 1190 TYPE 1192 The value is an enumerated-string; valid strings are AUDIO, VIDEO, 1193 SUBTITLES, and CLOSED-CAPTIONS. This attribute is REQUIRED. 1195 Typically, closed-caption [CEA608] media is carried in the video 1196 stream. Therefore, an EXT-X-MEDIA tag with TYPE of CLOSED- 1197 CAPTIONS does not specify a Rendition; the closed-caption media is 1198 present in the Media Segments of every video Rendition. 1200 URI 1202 The value is a quoted-string containing a URI that identifies the 1203 Media Playlist file. This attribute is OPTIONAL; see 1204 Section 4.4.4.2.1. If the TYPE is CLOSED-CAPTIONS, the URI 1205 attribute MUST NOT be present. 1207 GROUP-ID 1209 The value is a quoted-string that specifies the group to which the 1210 Rendition belongs. See Section 4.4.4.1.1. This attribute is 1211 REQUIRED. 1213 LANGUAGE 1215 The value is a quoted-string containing one of the standard Tags 1216 for Identifying Languages [RFC5646], which identifies the primary 1217 language used in the Rendition. This attribute is OPTIONAL. 1219 ASSOC-LANGUAGE 1220 The value is a quoted-string containing a language tag [RFC5646] 1221 that identifies a language that is associated with the Rendition. 1222 An associated language is often used in a different role than the 1223 language specified by the LANGUAGE attribute (e.g., written versus 1224 spoken, or a fallback dialect). This attribute is OPTIONAL. 1226 The LANGUAGE and ASSOC-LANGUAGE attributes can be used, for 1227 example, to link Norwegian Renditions that use different spoken 1228 and written languages. 1230 NAME 1232 The value is a quoted-string containing a human-readable 1233 description of the Rendition. If the LANGUAGE attribute is 1234 present, then this description SHOULD be in that language. This 1235 attribute is REQUIRED. 1237 DEFAULT 1239 The value is an enumerated-string; valid strings are YES and NO. 1240 If the value is YES, then the client SHOULD play this Rendition of 1241 the content in the absence of information from the user indicating 1242 a different choice. This attribute is OPTIONAL. Its absence 1243 indicates an implicit value of NO. 1245 AUTOSELECT 1247 The value is an enumerated-string; valid strings are YES and NO. 1248 This attribute is OPTIONAL. Its absence indicates an implicit 1249 value of NO. If the value is YES, then the client MAY choose to 1250 play this Rendition in the absence of explicit user preference 1251 because it matches the current playback environment, such as 1252 chosen system language. 1254 If the AUTOSELECT attribute is present, its value MUST be YES if 1255 the value of the DEFAULT attribute is YES. 1257 FORCED 1259 The value is an enumerated-string; valid strings are YES and NO. 1260 This attribute is OPTIONAL. Its absence indicates an implicit 1261 value of NO. The FORCED attribute MUST NOT be present unless the 1262 TYPE is SUBTITLES. 1264 A value of YES indicates that the Rendition contains content that 1265 is considered essential to play. When selecting a FORCED 1266 Rendition, a client SHOULD choose the one that best matches the 1267 current playback environment (e.g., language). 1269 A value of NO indicates that the Rendition contains content that 1270 is intended to be played in response to explicit user request. 1272 INSTREAM-ID 1274 The value is a quoted-string that specifies a Rendition within the 1275 segments in the Media Playlist. This attribute is REQUIRED if the 1276 TYPE attribute is CLOSED-CAPTIONS, in which case it MUST have one 1277 of the values: "CC1", "CC2", "CC3", "CC4", or "SERVICEn" where n 1278 MUST be an integer between 1 and 63 (e.g., "SERVICE9" or 1279 "SERVICE42"). 1281 The values "CC1", "CC2", "CC3", and "CC4" identify a Line 21 Data 1282 Services channel [CEA608]. The "SERVICE" values identify a 1283 Digital Television Closed Captioning [CEA708] service block 1284 number. 1286 For all other TYPE values, the INSTREAM-ID MUST NOT be specified. 1288 CHARACTERISTICS 1290 The value is a quoted-string containing one or more Uniform Type 1291 Identifiers [UTI] separated by comma (,) characters. This 1292 attribute is OPTIONAL. Each UTI indicates an individual 1293 characteristic of the Rendition. 1295 A SUBTITLES Rendition MAY include the following characteristics: 1296 "public.accessibility.transcribes-spoken-dialog", 1297 "public.accessibility.describes-music-and-sound", and 1298 "public.easy-to-read" (which indicates that the subtitles have 1299 been edited for ease of reading). 1301 An AUDIO Rendition MAY include the following characteristic: 1302 "public.accessibility.describes-video". 1304 The CHARACTERISTICS attribute MAY include private UTIs. 1306 CHANNELS 1308 The value is a quoted-string that specifies an ordered, slash- 1309 separated ("/") list of parameters. If the TYPE attribute is 1310 AUDIO, then the first parameter is a count of audio channels 1311 expressed as a decimal-integer, indicating the maximum number of 1312 independent, simultaneous audio channels present in any Media 1313 Segment in the Rendition. For example, an AC-3 5.1 Rendition 1314 would have a CHANNELS="6" attribute. No other CHANNELS parameters 1315 are currently defined. 1317 All audio EXT-X-MEDIA tags SHOULD have a CHANNELS attribute. If a 1318 Master Playlist contains two Renditions with the same NAME encoded 1319 with the same codec but a different number of channels, then the 1320 CHANNELS attribute is REQUIRED; otherwise, it is OPTIONAL. 1322 4.4.4.1.1. Rendition Groups 1324 A set of one or more EXT-X-MEDIA tags with the same GROUP-ID value 1325 and the same TYPE value defines a Group of Renditions. Each member 1326 of the Group MUST be an alternative Rendition of the same content; 1327 otherwise, playback errors can occur. 1329 All EXT-X-MEDIA tags in a Playlist MUST meet the following 1330 constraints: 1332 o All EXT-X-MEDIA tags in the same Group MUST have different NAME 1333 attributes. 1335 o A Group MUST NOT have more than one member with a DEFAULT 1336 attribute of YES. 1338 o Each EXT-X-MEDIA tag with an AUTOSELECT=YES attribute SHOULD have 1339 a combination of LANGUAGE [RFC5646], ASSOC-LANGUAGE, FORCED, and 1340 CHARACTERISTICS attributes that is distinct from those of other 1341 AUTOSELECT=YES members of its Group. 1343 A Playlist MAY contain multiple Groups of the same TYPE in order to 1344 provide multiple encodings of that media type. If it does so, each 1345 Group of the same TYPE MUST have the same set of members, and each 1346 corresponding member MUST have identical attributes with the 1347 exception of the URI and CHANNELS attributes. 1349 Each member in a Group of Renditions MAY have a different sample 1350 format. For example, an English Rendition can be encoded with AC-3 1351 5.1 while a Spanish Rendition is encoded with AAC stereo. However, 1352 any EXT-X-STREAM-INF tag (Section 4.4.4.2) or EXT-X-I-FRAME-STREAM- 1353 INF tag (Section 4.4.4.3) that references such a Group MUST have a 1354 CODECS attribute that lists every sample format present in any 1355 Rendition in the Group, or client playback failures can occur. In 1356 the example above, the CODECS attribute would include 1357 "ac-3,mp4a.40.2". 1359 4.4.4.2. EXT-X-STREAM-INF 1361 The EXT-X-STREAM-INF tag specifies a Variant Stream, which is a set 1362 of Renditions that can be combined to play the presentation. The 1363 attributes of the tag provide information about the Variant Stream. 1365 The URI line that follows the EXT-X-STREAM-INF tag specifies a Media 1366 Playlist that carries a Rendition of the Variant Stream. The URI 1367 line is REQUIRED. Clients that do not support multiple video 1368 Renditions SHOULD play this Rendition. 1370 Its format is: 1372 #EXT-X-STREAM-INF:<attribute-list> 1373 <URI> 1375 The following attributes are defined: 1377 BANDWIDTH 1379 The value is a decimal-integer of bits per second. It represents 1380 the peak segment bit rate of the Variant Stream. 1382 If all the Media Segments in a Variant Stream have already been 1383 created, the BANDWIDTH value MUST be the largest sum of peak 1384 segment bit rates that is produced by any playable combination of 1385 Renditions. (For a Variant Stream with a single Media Playlist, 1386 this is just the peak segment bit rate of that Media Playlist.) 1387 An inaccurate value can cause playback stalls or prevent clients 1388 from playing the variant. 1390 If the Master Playlist is to be made available before all Media 1391 Segments in the presentation have been encoded, the BANDWIDTH 1392 value SHOULD be the BANDWIDTH value of a representative period of 1393 similar content, encoded using the same settings. 1395 Every EXT-X-STREAM-INF tag MUST include the BANDWIDTH attribute. 1397 AVERAGE-BANDWIDTH 1399 The value is a decimal-integer of bits per second. It represents 1400 the average segment bit rate of the Variant Stream. 1402 If all the Media Segments in a Variant Stream have already been 1403 created, the AVERAGE-BANDWIDTH value MUST be the largest sum of 1404 average segment bit rates that is produced by any playable 1405 combination of Renditions. (For a Variant Stream with a single 1406 Media Playlist, this is just the average segment bit rate of that 1407 Media Playlist.) An inaccurate value can cause playback stalls or 1408 prevent clients from playing the variant. 1410 If the Master Playlist is to be made available before all Media 1411 Segments in the presentation have been encoded, the AVERAGE- 1412 BANDWIDTH value SHOULD be the AVERAGE-BANDWIDTH value of a 1413 representative period of similar content, encoded using the same 1414 settings. 1416 The AVERAGE-BANDWIDTH attribute is OPTIONAL. 1418 CODECS 1420 The value is a quoted-string containing a comma-separated list of 1421 formats, where each format specifies a media sample type that is 1422 present in one or more Renditions specified by the Variant Stream. 1423 Valid format identifiers are those in the ISO Base Media File 1424 Format Name Space defined by "The 'Codecs' and 'Profiles' 1425 Parameters for "Bucket" Media Types" [RFC6381]. 1427 For example, a stream containing AAC low complexity (AAC-LC) audio 1428 and H.264 Main Profile Level 3.0 video would have a CODECS value 1429 of "mp4a.40.2,avc1.4d401e". 1431 Note that if a Variant Stream specifies one or more Renditions 1432 that include IMSC subtitles, the CODECS attribute MUST indicate 1433 this with a format identifier such as "stpp.ttml.im1t". 1435 Every EXT-X-STREAM-INF tag SHOULD include a CODECS attribute. 1437 RESOLUTION 1439 The value is a decimal-resolution describing the optimal pixel 1440 resolution at which to display all the video in the Variant 1441 Stream. 1443 The RESOLUTION attribute is OPTIONAL but is recommended if the 1444 Variant Stream includes video. 1446 FRAME-RATE 1448 The value is a decimal-floating-point describing the maximum frame 1449 rate for all the video in the Variant Stream, rounded to three 1450 decimal places. 1452 The FRAME-RATE attribute is OPTIONAL but is recommended if the 1453 Variant Stream includes video. The FRAME-RATE attribute SHOULD be 1454 included if any video in a Variant Stream exceeds 30 frames per 1455 second. 1457 HDCP-LEVEL 1459 The value is an enumerated-string; valid strings are TYPE-0, TYPE- 1460 1, and NONE. This attribute is advisory. A value of TYPE-0 1461 indicates that the Variant Stream could fail to play unless the 1462 output is protected by High-bandwidth Digital Content Protection 1463 (HDCP) Type 0 [HDCP] or equivalent. A value of TYPE-1 indicates 1464 that the Variant Stream could fail to play unless the output is 1465 protected by HDCP Type 1 or equivalent. A value of NONE indicates 1466 that the content does not require output copy protection. 1468 Encrypted Variant Streams with different HDCP levels SHOULD use 1469 different media encryption keys. 1471 The HDCP-LEVEL attribute is OPTIONAL. It SHOULD be present if any 1472 content in the Variant Stream will fail to play without HDCP. 1473 Clients without output copy protection SHOULD NOT load a Variant 1474 Stream with an HDCP-LEVEL attribute unless its value is NONE. 1476 VIDEO-RANGE 1478 The value is an enumerated-string; valid strings are SDR and PQ. 1480 The value MUST be SDR if all the video in the Variant Stream is 1481 encoded using a reference opto-electronic transfer characteristic 1482 function specified by the TransferCharacteristics code point 1 1483 [CICP]. 1485 The value MUST be PQ if video in the Variant Stream includes some 1486 content that is encoded using a reference opto-electronic transfer 1487 characteristic function specified by the TransferCharacteristics 1488 code point 16 or 18, and potentially other content qualifying as 1489 SDR (see above). Note that certain TransferCharacteristics code 1490 points use the same transfer function. 1492 Otherwise the attribute MUST NOT be present. 1494 AUDIO 1496 The value is a quoted-string. It MUST match the value of the 1497 GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the Master 1498 Playlist whose TYPE attribute is AUDIO. It indicates the set of 1499 audio Renditions that SHOULD be used when playing the 1500 presentation. See Section 4.4.4.2.1. 1502 The AUDIO attribute is OPTIONAL. 1504 VIDEO 1506 The value is a quoted-string. It MUST match the value of the 1507 GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the Master 1508 Playlist whose TYPE attribute is VIDEO. It indicates the set of 1509 video Renditions that SHOULD be used when playing the 1510 presentation. See Section 4.4.4.2.1. 1512 The VIDEO attribute is OPTIONAL. 1514 SUBTITLES 1516 The value is a quoted-string. It MUST match the value of the 1517 GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the Master 1518 Playlist whose TYPE attribute is SUBTITLES. It indicates the set 1519 of subtitle Renditions that can be used when playing the 1520 presentation. See Section 4.4.4.2.1. 1522 The SUBTITLES attribute is OPTIONAL. 1524 CLOSED-CAPTIONS 1526 The value can be either a quoted-string or an enumerated-string 1527 with the value NONE. If the value is a quoted-string, it MUST 1528 match the value of the GROUP-ID attribute of an EXT-X-MEDIA tag 1529 elsewhere in the Playlist whose TYPE attribute is CLOSED-CAPTIONS, 1530 and it indicates the set of closed-caption Renditions that can be 1531 used when playing the presentation. See Section 4.4.4.2.1. 1533 If the value is the enumerated-string value NONE, all EXT-X- 1534 STREAM-INF tags MUST have this attribute with a value of NONE, 1535 indicating that there are no closed captions in any Variant Stream 1536 in the Master Playlist. Having closed captions in one Variant 1537 Stream but not another can trigger playback inconsistencies. 1539 The CLOSED-CAPTIONS attribute is OPTIONAL. 1541 4.4.4.2.1. Alternative Renditions 1543 When an EXT-X-STREAM-INF tag contains an AUDIO, VIDEO, SUBTITLES, or 1544 CLOSED-CAPTIONS attribute, it indicates that alternative Renditions 1545 of the content are available for playback of that Variant Stream. 1547 When defining alternative Renditions, the following constraints MUST 1548 be met to prevent client playback errors: 1550 o All playable combinations of Renditions associated with an EXT-X- 1551 STREAM-INF tag MUST have an aggregate bandwidth less than or equal 1552 to the BANDWIDTH attribute of the EXT-X-STREAM-INF tag. 1554 o If an EXT-X-STREAM-INF tag contains a RESOLUTION attribute and a 1555 VIDEO attribute, then every alternative video Rendition MUST have 1556 an optimal display resolution matching the value of the RESOLUTION 1557 attribute. 1559 o Every alternative Rendition associated with an EXT-X-STREAM-INF 1560 tag MUST meet the constraints for a Variant Stream described in 1561 Section 6.2.4. 1563 The URI attribute of the EXT-X-MEDIA tag is REQUIRED if the media 1564 type is SUBTITLES, but OPTIONAL if the media type is VIDEO or AUDIO. 1565 If the media type is VIDEO or AUDIO, a missing URI attribute 1566 indicates that the media data for this Rendition is included in the 1567 Media Playlist of any EXT-X-STREAM-INF tag referencing this EXT- 1568 X-MEDIA tag. If the media TYPE is AUDIO and the URI attribute is 1569 missing, clients MUST assume that the audio data for this Rendition 1570 is present in every video Rendition specified by the EXT-X-STREAM-INF 1571 tag. 1573 The URI attribute of the EXT-X-MEDIA tag MUST NOT be included if the 1574 media type is CLOSED-CAPTIONS. 1576 4.4.4.3. EXT-X-I-FRAME-STREAM-INF 1578 The EXT-X-I-FRAME-STREAM-INF tag identifies a Media Playlist file 1579 containing the I-frames of a multimedia presentation. It stands 1580 alone, in that it does not apply to a particular URI in the Master 1581 Playlist. Its format is: 1583 #EXT-X-I-FRAME-STREAM-INF:<attribute-list> 1585 All attributes defined for the EXT-X-STREAM-INF tag (Section 4.4.4.2) 1586 are also defined for the EXT-X-I-FRAME-STREAM-INF tag, except for the 1587 FRAME-RATE, AUDIO, SUBTITLES, and CLOSED-CAPTIONS attributes. In 1588 addition, the following attribute is defined: 1590 URI 1592 The value is a quoted-string containing a URI that identifies the 1593 I-frame Media Playlist file. That Playlist file MUST contain an 1594 EXT-X-I-FRAMES-ONLY tag. 1596 Every EXT-X-I-FRAME-STREAM-INF tag MUST include a BANDWIDTH attribute 1597 and a URI attribute. 1599 The provisions in Section 4.4.4.2.1 also apply to EXT-X-I-FRAME- 1600 STREAM-INF tags with a VIDEO attribute. 1602 A Master Playlist that specifies alternative VIDEO Renditions and 1603 I-frame Playlists SHOULD include an alternative I-frame VIDEO 1604 Rendition for each regular VIDEO Rendition, with the same NAME and 1605 LANGUAGE attributes. 1607 4.4.4.4. EXT-X-SESSION-DATA 1609 The EXT-X-SESSION-DATA tag allows arbitrary session data to be 1610 carried in a Master Playlist. 1612 Its format is: 1614 #EXT-X-SESSION-DATA:<attribute-list> 1616 The following attributes are defined: 1618 DATA-ID 1620 The value of DATA-ID is a quoted-string that identifies a 1621 particular data value. The DATA-ID SHOULD conform to a reverse 1622 DNS naming convention, such as "com.example.movie.title"; however, 1623 there is no central registration authority, so Playlist authors 1624 SHOULD take care to choose a value that is unlikely to collide 1625 with others. This attribute is REQUIRED. 1627 VALUE 1629 VALUE is a quoted-string. It contains the data identified by 1630 DATA-ID. If the LANGUAGE is specified, VALUE SHOULD contain a 1631 human-readable string written in the specified language. 1633 URI 1635 The value is a quoted-string containing a URI. The resource 1636 identified by the URI MUST be formatted as JSON [RFC8259]; 1637 otherwise, clients may fail to interpret the resource. 1639 LANGUAGE 1641 The value is a quoted-string containing a language tag [RFC5646] 1642 that identifies the language of the VALUE. This attribute is 1643 OPTIONAL. 1645 Each EXT-X-SESSION-DATA tag MUST contain either a VALUE or URI 1646 attribute, but not both. 1648 A Playlist MAY contain multiple EXT-X-SESSION-DATA tags with the same 1649 DATA-ID attribute. A Playlist MUST NOT contain more than one EXT-X- 1650 SESSION-DATA tag with the same DATA-ID attribute and the same 1651 LANGUAGE attribute. 1653 4.4.4.5. EXT-X-SESSION-KEY 1655 The EXT-X-SESSION-KEY tag allows encryption keys from Media Playlists 1656 to be specified in a Master Playlist. This allows the client to 1657 preload these keys without having to read the Media Playlist(s) 1658 first. 1660 Its format is: 1662 #EXT-X-SESSION-KEY:<attribute-list> 1664 All attributes defined for the EXT-X-KEY tag (Section 4.4.2.4) are 1665 also defined for the EXT-X-SESSION-KEY, except that the value of the 1666 METHOD attribute MUST NOT be NONE. If an EXT-X-SESSION-KEY is used, 1667 the values of the METHOD, KEYFORMAT, and KEYFORMATVERSIONS attributes 1668 MUST match any EXT-X-KEY with the same URI value. 1670 EXT-X-SESSION-KEY tags SHOULD be added if multiple Variant Streams or 1671 Renditions use the same encryption keys and formats. An EXT-X- 1672 SESSION-KEY tag is not associated with any particular Media Playlist. 1674 A Master Playlist MUST NOT contain more than one EXT-X-SESSION-KEY 1675 tag with the same METHOD, URI, IV, KEYFORMAT, and KEYFORMATVERSIONS 1676 attribute values. 1678 The EXT-X-SESSION-KEY tag is optional. 1680 4.4.5. Media or Master Playlist Tags 1682 The tags in this section can appear in either Master Playlists or 1683 Media Playlists. If one of these tags appears in a Master Playlist, 1684 it SHOULD NOT appear in any Media Playlist referenced by that Master 1685 Playlist. A tag that appears in both MUST have the same value; 1686 otherwise, clients SHOULD ignore the value in the Media Playlist(s). 1688 These tags MUST NOT appear more than once in a Playlist. If a tag 1689 appears more than once, clients MUST fail to parse the Playlist. 1691 4.4.5.1. EXT-X-INDEPENDENT-SEGMENTS 1693 The EXT-X-INDEPENDENT-SEGMENTS tag indicates that all media samples 1694 in a Media Segment can be decoded without information from other 1695 segments. It applies to every Media Segment in the Playlist. 1697 Its format is: 1699 #EXT-X-INDEPENDENT-SEGMENTS 1700 If the EXT-X-INDEPENDENT-SEGMENTS tag appears in a Master Playlist, 1701 it applies to every Media Segment in every Media Playlist in the 1702 Master Playlist. 1704 4.4.5.2. EXT-X-START 1706 The EXT-X-START tag indicates a preferred point at which to start 1707 playing a Playlist. By default, clients SHOULD start playback at 1708 this point when beginning a playback session. This tag is OPTIONAL. 1710 Its format is: 1712 #EXT-X-START:<attribute-list> 1714 The following attributes are defined: 1716 TIME-OFFSET 1718 The value of TIME-OFFSET is a signed-decimal-floating-point number 1719 of seconds. A positive number indicates a time offset from the 1720 beginning of the Playlist. A negative number indicates a negative 1721 time offset from the end of the last Media Segment in the 1722 Playlist. This attribute is REQUIRED. 1724 The absolute value of TIME-OFFSET SHOULD NOT be larger than the 1725 Playlist duration. If the absolute value of TIME-OFFSET exceeds 1726 the duration of the Playlist, it indicates either the end of the 1727 Playlist (if positive) or the beginning of the Playlist (if 1728 negative). 1730 If the Playlist does not contain the EXT-X-ENDLIST tag, the TIME- 1731 OFFSET SHOULD NOT be within three target durations of the end of 1732 the Playlist file. 1734 PRECISE 1736 The value is an enumerated-string; valid strings are YES and NO. 1737 If the value is YES, clients SHOULD start playback at the Media 1738 Segment containing the TIME-OFFSET, but SHOULD NOT render media 1739 samples in that segment whose presentation times are prior to the 1740 TIME-OFFSET. If the value is NO, clients SHOULD attempt to render 1741 every media sample in that segment. This attribute is OPTIONAL. 1742 If it is missing, its value should be treated as NO. 1744 4.4.5.3. EXT-X-DEFINE 1746 The EXT-X-DEFINE tag provides a Playlist variable definition or 1747 declaration. This tag is OPTIONAL. 1749 Its format is: 1751 #EXT-X-DEFINE:<attribute-list> 1753 The following attributes are defined: 1755 NAME 1757 The value is a quoted-string which specifies the Variable Name. 1758 All characters in the quoted-string MUST be from the following 1759 set: [a..z], [A..Z], [0..9], '-', and '_'. 1761 VALUE 1763 The value is a quoted-string which specifies the Variable Value. 1764 This attribute is REQUIRED if the EXT-X-DEFINE tag has a NAME 1765 attribute. 1767 IMPORT 1769 The value is a quoted-string which specifies the Variable Name and 1770 indicates that its value is that of the variable of the same name 1771 in the Master Playlist. EXT-X-DEFINE tags containing the IMPORT 1772 attribute MUST NOT occur in Master Playlists; they are only 1773 allowed in Media Playlists. 1775 If the IMPORT attribute value does not match any Variable Name 1776 declared in the Master Playlist, or if the Media Playlist was not 1777 loaded from a Master Playlist, the parser MUST fail to parse the 1778 Playlist. 1780 An EXT-X-DEFINE tag MUST contain either a NAME or an IMPORT 1781 attribute, but not both. 1783 An EXT-X-DEFINE tag MUST NOT specify the same Variable Name as any 1784 other EXT-X-DEFINE tag in the same Playlist. Parsers that encounter 1785 duplicate Variable Name declarations MUST fail to parse the Playlist. 1787 EXT-X-DEFINE tags do NOT implicitly persist across Playlist reloads. 1789 5. Key Files 1791 5.1. Structure of Key Files 1793 An EXT-X-KEY tag with a URI attribute identifies a Key file. A Key 1794 file contains a cipher key that can decrypt Media Segments in the 1795 Playlist. 1797 [AES_128] encryption uses 16-octet keys. If the KEYFORMAT of an EXT- 1798 X-KEY tag is "identity", the Key file is a single packed array of 16 1799 octets in binary format. 1801 5.2. IV for AES-128 1803 [AES_128] REQUIRES the same 16-octet IV to be supplied when 1804 encrypting and decrypting. Varying this IV increases the strength of 1805 the cipher. 1807 An IV attribute on an EXT-X-KEY tag with a KEYFORMAT of "identity" 1808 specifies an IV that can be used when decrypting Media Segments 1809 encrypted with that Key file. IV values for AES-128 are 128-bit 1810 numbers. 1812 An EXT-X-KEY tag with a KEYFORMAT of "identity" that does not have an 1813 IV attribute indicates that the Media Sequence Number is to be used 1814 as the IV when decrypting a Media Segment, by putting its big-endian 1815 binary representation into a 16-octet (128-bit) buffer and padding 1816 (on the left) with zeros. 1818 6. Client/Server Responsibilities 1820 6.1. Introduction 1822 This section describes how the server generates the Playlist and 1823 Media Segments and how the client should download them for playback. 1825 6.2. Server Responsibilities 1827 6.2.1. General Server Responsibilities 1829 The production of the source media is outside the scope of this 1830 document, which simply presumes a source of continuous encoded media 1831 containing the presentation. 1833 The server MUST divide the source media into individual Media 1834 Segments whose duration is less than or equal to a constant target 1835 duration. Segments that are longer than the planned target duration 1836 can trigger playback stalls and other errors. 1838 The server SHOULD attempt to divide the source media at points that 1839 support effective decode of individual Media Segments, e.g., on 1840 packet and key frame boundaries. 1842 The server MUST create a URI for every Media Segment that enables its 1843 clients to obtain the segment data. If a server supports partial 1844 loading of resources (e.g., via HTTP Range requests), it MAY specify 1845 segments as sub-ranges of larger resources using the EXT-X-BYTERANGE 1846 tag. 1848 The absence of media data (due to, for example, the temporary 1849 unavailability of an encoder) SHOULD be signaled by adding one or 1850 more Media Segments to the Playlist whose Segment durations add up to 1851 the duration of absent media; these Media Segments MUST have EXT- 1852 X-GAP tags applied to them. Attempting to download these segments 1853 MAY produce an error, such as HTTP 404 or 410. 1855 Any Media Segment that is specified in a Playlist loaded by a client 1856 MUST be available for immediate download unless it has been marked 1857 with an EXT-X-GAP tag; otherwise playback errors can occur. Once 1858 download starts, its transfer rate SHOULD NOT be constrained by the 1859 segment production process. 1861 HTTP servers SHOULD transfer text files -- such as Playlists and 1862 WebVTT segments -- using the "gzip" Content-Encoding if the client 1863 indicates that it is prepared to accept it. 1865 The server must create a Media Playlist file (Section 4) that 1866 contains a URI for each Media Segment that the server wishes to make 1867 available, in the order in which they are to be played. 1869 The value of the EXT-X-VERSION tag (Section 4.4.1.2) SHOULD NOT be 1870 greater than what is required for the tags and attributes in the 1871 Playlist (see Section 7). 1873 Changes to the Playlist file MUST be made atomically from the point 1874 of view of the clients, or playback errors MAY occur. 1876 The server MUST NOT change the Media Playlist file, except to: 1878 Append lines to it (Section 6.2.1). 1880 Remove Media Segment URIs from the Playlist in the order that they 1881 appear, along with any tags that apply only to those segments 1882 (Section 6.2.2). 1884 Increment the value of the EXT-X-MEDIA-SEQUENCE or EXT-X- 1885 DISCONTINUITY-SEQUENCE tags (Section 6.2.2). 1887 Add an EXT-X-ENDLIST tag to the Playlist (Section 6.2.1). 1889 A Media Playlist has further constraints on its updates if it 1890 contains an EXT-X-PLAYLIST-TYPE tag. An EXT-X-PLAYLIST-TYPE tag with 1891 a value of VOD indicates that the Playlist file MUST NOT change. An 1892 EXT-X-PLAYLIST-TYPE tag with a value of EVENT indicates that the 1893 server MUST NOT change or delete any part of the Playlist file; it 1894 MAY append lines to it. 1896 The value of the EXT-X-TARGETDURATION tag in the Media Playlist MUST 1897 NOT change. A typical target duration is 10 seconds. 1899 Playlist changes other than those allowed here can trigger playback 1900 errors and inconsistent client behavior. 1902 Each Media Segment in a Media Playlist has an integer Discontinuity 1903 Sequence Number. The Discontinuity Sequence Number can be used in 1904 addition to the timestamps within the media to synchronize Media 1905 Segments across different Renditions. 1907 A segment's Discontinuity Sequence Number is the value of the EXT-X- 1908 DISCONTINUITY-SEQUENCE tag (or zero if none) plus the number of EXT- 1909 X-DISCONTINUITY tags in the Playlist preceding the URI line of the 1910 segment. 1912 The server MAY associate an absolute date and time with a Media 1913 Segment by applying an EXT-X-PROGRAM-DATE-TIME tag to it. This 1914 defines an informative mapping of the (wall-clock) date and time 1915 specified by the tag to the first media timestamp in the segment, 1916 which may be used as a basis for seeking, for display, or for other 1917 purposes. If a server provides this mapping, it SHOULD apply an EXT- 1918 X-PROGRAM-DATE-TIME tag to every segment that has an EXT- 1919 X-DISCONTINUITY tag applied to it. 1921 The Server MUST NOT add any EXT-X-PROGRAM-DATE-TIME tag to a Playlist 1922 that would cause the mapping between program date and Media Segment 1923 to become ambiguous. 1925 The server MUST NOT remove an EXT-X-DATERANGE tag from a Playlist if 1926 any date in the range maps to a Media Segment in the Playlist. 1928 The server MUST NOT reuse the ID attribute value of an EXT- 1929 X-DATERANGE tag for any new Date Range in the same Playlist. 1931 Once the Following Range of a Date Range with an END-ON-NEXT=YES 1932 attribute is added to a Playlist, the Server MUST NOT subsequently 1933 add a Date Range with the same CLASS attribute whose START-DATE is 1934 between that of the END-ON-NEXT=YES range and its Following Range. 1936 For Date Ranges with a PLANNED-DURATION attribute, the Server SHOULD 1937 signal the actual end of the range once it has been established. It 1938 can do so by adding another EXT-X-DATERANGE tag with the same ID 1939 attribute value and either a DURATION or an END-DATE attribute or, if 1940 the Date Range has an END-ON-NEXT=YES attribute, by adding a 1941 Following Range. 1943 If the Media Playlist contains the final Media Segment of the 1944 presentation, then the Playlist file MUST contain the EXT-X-ENDLIST 1945 tag; this allows clients to minimize unproductive Playlist reloads. 1947 If a Media Playlist does not contain the EXT-X-ENDLIST tag, the 1948 server MUST make a new version of the Playlist file available that 1949 contains at least one new Media Segment. It MUST be made available 1950 no later than 1.5 times the target duration after the previous time 1951 the Playlist was updated with a Media Segment. This allows clients 1952 to utilize the network efficiently. 1954 If the server wishes to remove an entire presentation, it SHOULD 1955 provide a clear indication to clients that the Playlist file is no 1956 longer available (e.g., with an HTTP 404 or 410 response). It MUST 1957 ensure that all Media Segments in the Playlist file remain available 1958 to clients for at least the duration of the Playlist file at the time 1959 of removal to prevent interruption of in-progress playback. 1961 6.2.2. Live Playlists 1963 The server MAY limit the availability of Media Segments by removing 1964 Media Segments from the Playlist file (Section 6.2.1). If Media 1965 Segments are to be removed, the Playlist file MUST contain an EXT-X- 1966 MEDIA-SEQUENCE tag. Its value MUST be incremented by 1 for every 1967 Media Segment that is removed from the Playlist file; it MUST NOT 1968 decrease or wrap. Clients can malfunction if each Media Segment does 1969 not have a consistent, unique Media Sequence Number. 1971 Media Segments MUST be removed from the Playlist file in the order 1972 that they appear in the Playlist; otherwise, client playback can 1973 malfunction. 1975 The server MUST NOT remove a Media Segment from a Playlist file 1976 without an EXT-X-ENDLIST tag if that would produce a Playlist whose 1977 duration is less than three times the target duration. Doing so can 1978 trigger playback stalls. 1980 The Availability Duration of a Media Segment is the duration of the 1981 segment plus the duration of the longest-duration Playlist 1982 distributed by the server containing that segment. If the server 1983 removes a Media Segment URI from a Playlist that contains an EXT- 1984 X-ENDLIST tag, clients MUST be able to download the corresponding 1985 Media Segment until the time of removal plus the segment's 1986 Availability Duration. If the server removes a Media Segment URI 1987 from a Playlist that does not contain an EXT-X-ENDLIST tag, clients 1988 MUST be able to download the segment until the time at which it first 1989 appeared in the Playlist plus the segment's Availability Duration. 1991 If the server wishes to remove segments from a Media Playlist 1992 containing an EXT-X-DISCONTINUITY tag, the Media Playlist MUST 1993 contain an EXT-X-DISCONTINUITY-SEQUENCE tag. Without the EXT-X- 1994 DISCONTINUITY-SEQUENCE tag, it can be impossible for a client to 1995 locate corresponding segments between Renditions. 1997 If the server removes an EXT-X-DISCONTINUITY tag from the Media 1998 Playlist, it MUST increment the value of the EXT-X-DISCONTINUITY- 1999 SEQUENCE tag so that the Discontinuity Sequence Numbers of the 2000 segments still in the Media Playlist remain unchanged. The value of 2001 the EXT-X-DISCONTINUITY-SEQUENCE tag MUST NOT decrease or wrap. 2002 Clients can malfunction if each Media Segment does not have a 2003 consistent Discontinuity Sequence Number. 2005 If a server plans to remove a Media Segment after it is delivered to 2006 clients over HTTP, it SHOULD ensure that the HTTP response contains 2007 an Expires header that reflects the planned time-to-live. 2009 A Live Playlist MUST NOT contain the EXT-X-PLAYLIST-TYPE tag, as no 2010 value of that tag allows Media Segments to be removed. 2012 6.2.3. Encrypting Media Segments 2014 Media Segments MAY be encrypted. Every encrypted Media Segment MUST 2015 have an EXT-X-KEY tag (Section 4.4.2.4) applied to it with a URI that 2016 the client can use to obtain a Key file (Section 5) containing the 2017 decryption key. 2019 A Media Segment can only be encrypted with one encryption METHOD, 2020 using one encryption key and IV. However, a server MAY offer 2021 multiple ways to retrieve that key by providing multiple EXT-X-KEY 2022 tags, each with a different KEYFORMAT attribute value. 2024 The server MAY set the HTTP Expires header in the key response to 2025 indicate the duration for which the key can be cached. 2027 Any unencrypted Media Segment in a Playlist that is preceded by an 2028 encrypted Media Segment MUST have an EXT-X-KEY tag applied to it with 2029 a METHOD attribute of NONE. Otherwise, the client will misinterpret 2030 those segments as encrypted. 2032 If the encryption METHOD is AES-128 and the Playlist does not contain 2033 the EXT-X-I-FRAMES-ONLY tag, AES encryption as described in 2034 Section 4.4.2.4 SHALL be applied to individual Media Segments. 2036 If the encryption METHOD is AES-128 and the Playlist contains an EXT- 2037 X-I-FRAMES-ONLY tag, the entire resource MUST be encrypted using 2038 AES-128 CBC with PKCS7 padding [RFC5652]. Encryption MAY be 2039 restarted on 16-byte block boundaries, unless the first block 2040 contains an I-frame. The IV used for encryption MUST be either the 2041 Media Sequence Number of the Media Segment or the value of the IV 2042 attribute of the EXT-X-KEY tag, as described in Section 5.2. These 2043 constraints allow a client to load and decrypt individual I-frames 2044 specified as sub-ranges of regular encrypted Media Segments, and 2045 their Media Initialization Sections. 2047 If the encryption METHOD indicates Sample Encryption, media samples 2048 MAY be encrypted prior to encapsulation in a Media Segment. 2050 The server MUST NOT remove an EXT-X-KEY tag from the Playlist file if 2051 it applies to any Media Segment in the Playlist file, or clients who 2052 subsequently load that Playlist will be unable to decrypt those Media 2053 Segments. 2055 6.2.4. Providing Variant Streams 2057 A server MAY offer multiple Media Playlist files to provide different 2058 encodings of the same presentation. If it does so, it SHOULD provide 2059 a Master Playlist file that lists each Variant Stream to allow 2060 clients to switch between encodings dynamically. 2062 Master Playlists describe regular Variant Streams with EXT-X-STREAM- 2063 INF tags and I-frame Variant Streams with EXT-X-I-FRAME-STREAM-INF 2064 tags. 2066 If an EXT-X-STREAM-INF tag or EXT-X-I-FRAME-STREAM-INF tag contains 2067 the CODECS attribute, the attribute value MUST include every media 2068 format [RFC6381] present in any Media Segment in any of the 2069 Renditions specified by the Variant Stream. 2071 The server MUST meet the following constraints when producing Variant 2072 Streams in order to allow clients to switch between them seamlessly: 2074 Each Variant Stream MUST present the same content. 2076 Matching content in Variant Streams MUST have matching timestamps. 2077 This allows clients to synchronize the media. 2079 Matching content in Variant Streams MUST have matching 2080 Discontinuity Sequence Numbers (see Section 4.4.3.3). 2082 Each Media Playlist in each Variant Stream MUST have the same 2083 target duration. The only exceptions are SUBTITLES Renditions and 2084 Media Playlists containing an EXT-X-I-FRAMES-ONLY tag, which MAY 2085 have different target durations if they have an EXT-X-PLAYLIST- 2086 TYPE of VOD. 2088 Content that appears in a Media Playlist of one Variant Stream but 2089 not in another MUST appear either at the beginning or at the end 2090 of the Media Playlist file and MUST NOT be longer than the target 2091 duration. 2093 If any Media Playlists have an EXT-X-PLAYLIST-TYPE tag, all Media 2094 Playlists MUST have an EXT-X-PLAYLIST-TYPE tag with the same 2095 value. 2097 If the Playlist contains an EXT-X-PLAYLIST-TYPE tag with the value 2098 of VOD, the first segment of every Media Playlist in every Variant 2099 Stream MUST start at the same media timestamp. 2101 If any Media Playlist in a Master Playlist contains an EXT-X- 2102 PROGRAM-DATE-TIME tag, then all Media Playlists in that Master 2103 Playlist MUST contain EXT-X-PROGRAM-DATE-TIME tags with consistent 2104 mappings of date and time to media timestamps. 2106 Each Variant Stream MUST contain the same set of Date Ranges. The 2107 EXT-X-DATERANGE tags of corresponding Date Ranges MUST have the 2108 same ID attribute value and contain the same set of attribute/ 2109 value pairs. 2111 In addition, for broadest compatibility, Variant Streams SHOULD 2112 contain the same encoded audio bitstream. This allows clients to 2113 switch between Variant Streams without audible glitching. 2115 The rules for Variant Streams also apply to alternative Renditions 2116 (see Section 4.4.4.2.1). 2118 6.3. Client Responsibilities 2120 6.3.1. General Client Responsibilities 2122 How the client obtains the URI to the Playlist file is outside the 2123 scope of this document; it is presumed to have done so. 2125 The client obtains the Playlist file from the URI. If the Playlist 2126 file so obtained is a Master Playlist, the client can select a 2127 Variant Stream to load from the Master Playlist. 2129 Clients MUST ensure that loaded Playlists comply with Section 4 and 2130 that the EXT-X-VERSION tag, if present, specifies a protocol version 2131 supported by the client; if either check fails, the client MUST NOT 2132 attempt to use the Playlist, or unintended behavior could occur. 2134 When parsing Playlist elements that are subject to variable 2135 substitution, a Variable Reference whose Variable Name has been 2136 provided by an EXT-X-DEFINE tag that precedes the Variable Reference 2137 MUST be replaced by the corresponding Variable Value. Such 2138 replacements themselves are NOT subject to variable substitution. 2140 When parsing Playlist elements that are subject to variable 2141 substitution, a Variable Reference whose Variable Name has NOT been 2142 provided by an EXT-X-DEFINE tag preceding the Variable Reference MUST 2143 trigger a parsing error. 2145 If any URI element in a Playlist contains an URI scheme that the 2146 client cannot handle, the client MUST stop playback. All clients 2147 MUST support HTTP schemes. 2149 To support forward compatibility, when parsing Playlists, clients 2150 MUST: 2152 o ignore any unrecognized tags. 2154 o ignore any attribute/value pair with an unrecognized 2155 AttributeName. 2157 o ignore any tag containing an attribute/value pair of type 2158 enumerated-string whose AttributeName is recognized but whose 2159 AttributeValue is not recognized, unless the definition of the 2160 attribute says otherwise. 2162 Algorithms used by the client to switch between Variant Streams are 2163 beyond the scope of this document. 2165 6.3.2. Loading the Media Playlist File 2167 Every time a Media Playlist is loaded or reloaded from a Playlist 2168 URI, the client MUST determine the next Media Segment to load, as 2169 described in Section 6.3.5, if it intends to play the presentation 2170 normally (i.e., in Playlist order at the nominal playback rate). 2172 If the Media Playlist contains the EXT-X-MEDIA-SEQUENCE tag, the 2173 client SHOULD assume that each Media Segment in it will become 2174 unavailable at the time that the Playlist file was loaded plus the 2175 duration of the Playlist file. 2177 A client MAY use the segment Media Sequence Number to track the 2178 location of a Media Segment within a Playlist when the Playlist is 2179 reloaded. 2181 A client MUST NOT assume that segments with the same Media Sequence 2182 Number in different Variant Streams or Renditions have the same 2183 position in the presentation; Playlists MAY have independent Media 2184 Sequence Numbers. Instead, a client MUST use the relative position 2185 of each segment on the Playlist timeline and its Discontinuity 2186 Sequence Number to locate corresponding segments. 2188 A client MUST load the Media Playlist file of every Rendition 2189 selected for playback in order to locate the media specific to that 2190 Rendition. But, to prevent unnecessary load on the server, it SHOULD 2191 NOT load the Playlist file of any other Rendition. 2193 For some Variant Streams, it is possible to select Renditions that do 2194 not include the Rendition specified by the EXT-X-STREAM-INF tag. As 2195 noted above, the client SHOULD NOT load that Rendition in those 2196 cases. 2198 6.3.3. Playing the Media Playlist File 2200 The client SHALL choose which Media Segment to play first from the 2201 Media Playlist when playback starts. If the EXT-X-ENDLIST tag is not 2202 present and the client intends to play the media normally, the client 2203 SHOULD NOT choose a segment that starts less than the duration of the 2204 last segment in the Playlist plus two target durations from the end 2205 of the Playlist file. Doing so can trigger playback stalls. 2207 Normal playback can be achieved by playing the Media Segments in the 2208 order that they appear in the Playlist. The client MAY present the 2209 available media in any way it wishes, including normal playback, 2210 random access, and trick modes. 2212 The client SHOULD NOT attempt to load Media Segments that have been 2213 marked with an EXT-X-GAP tag. Instead, clients are encouraged to 2214 look for another Variant Stream of the same Rendition which does not 2215 have the same gap, and play that instead. 2217 The encoding parameters for samples in a Media Segment and across 2218 multiple Media Segments in a Media Playlist SHOULD remain consistent. 2219 However, clients SHOULD deal with encoding changes as they are 2220 encountered, for example, by scaling video content to accommodate a 2221 resolution change. If the Variant Stream includes a RESOLUTION 2222 attribute, clients SHOULD display all video within a rectangle with 2223 the same proportions as that resolution. 2225 Clients SHOULD be prepared to handle multiple tracks of a particular 2226 type (e.g., audio or video). A client with no other preference 2227 SHOULD choose the track with the lowest numerical track identifier 2228 that it can play. 2230 Clients SHOULD ignore private streams inside Transport Streams that 2231 they do not recognize. Private streams can be used to support 2232 different devices with the same stream, although stream authors 2233 SHOULD be sensitive to the additional network load that this imposes. 2235 The client MUST be prepared to reset its parser(s) and decoder(s) 2236 before playing a Media Segment that has an EXT-X-DISCONTINUITY tag 2237 applied to it; otherwise, playback errors can occur. 2239 The client SHOULD attempt to load Media Segments in advance of when 2240 they will be required for uninterrupted playback to compensate for 2241 temporary variations in latency and throughput. 2243 The client MAY use the value of the EXT-X-PROGRAM-DATE-TIME tag to 2244 display the program origination time to the user. If the value 2245 includes time zone information, the client SHALL take it into 2246 account; if it does not, the client MAY assume the time to be local. 2248 Note that dates in Playlists can refer to when the content was 2249 produced (or to other times), which have no relation to the time of 2250 playback. 2252 If the first EXT-X-PROGRAM-DATE-TIME tag in a Playlist appears after 2253 one or more Media Segment URIs, the client SHOULD extrapolate 2254 backward from that tag (using EXTINF durations and/or media 2255 timestamps) to associate dates with those segments. To associate a 2256 date with any other Media Segment that does not have an EXT-X- 2257 PROGRAM-DATE-TIME tag applied to it directly, the client SHOULD 2258 extrapolate forward from the last EXT-X-PROGRAM-DATE-TIME tag 2259 appearing before that segment in the Playlist. 2261 6.3.4. Reloading the Media Playlist File 2263 The client MUST periodically reload a Media Playlist file to learn 2264 what media is currently available, unless it contains an EXT-X- 2265 PLAYLIST-TYPE tag with a value of VOD, or a value of EVENT and the 2266 EXT-X-ENDLIST tag is also present. 2268 However, the client MUST NOT attempt to reload the Playlist file more 2269 frequently than specified by this section, in order to limit the 2270 collective load on the server. 2272 When a client loads a Playlist file for the first time or reloads a 2273 Playlist file and finds that it has changed since the last time it 2274 was loaded, the client MUST wait for at least the duration of the 2275 last segment in the Playlist before attempting to reload the Playlist 2276 file again, measured from the last time the client began loading the 2277 Playlist file. 2279 If the client reloads a Playlist file and finds that it has not 2280 changed, then it MUST wait for a period of one-half the target 2281 duration before retrying. 2283 After reloading a Media Playlist, the client SHOULD verify that each 2284 Media Segment in it has the same URI (and byte range, if specified) 2285 as the Media Segment with the same Media Sequence Number in the 2286 previous Media Playlist. It SHOULD halt playback if it does not, as 2287 this normally indicates a server error. 2289 In order to reduce server load, the client SHOULD NOT reload the 2290 Playlist files of Variant Streams or alternate Renditions that are 2291 not currently being played. If it decides to switch playback to a 2292 different Variant Stream, it SHOULD stop reloading the Playlist of 2293 the old Variant Stream and begin loading the Playlist of the new 2294 Variant Stream. It can use the EXTINF durations and the constraints 2295 in Section 6.2.4 to determine the approximate location of 2296 corresponding media. Once media from the new Variant Stream has been 2297 loaded, the timestamps in the Media Segments can be used to 2298 synchronize the old and new timelines precisely. 2300 A client MUST NOT attempt to use the Media Sequence Number to 2301 synchronize between streams (see Section 6.3.2). 2303 6.3.5. Determining the Next Segment to Load 2305 The client MUST examine the Media Playlist file every time it is 2306 loaded or reloaded to determine the next Media Segment to load, as 2307 the set of available media MAY have changed. 2309 The first segment to load is generally the segment that the client 2310 has chosen to play first (see Section 6.3.3). 2312 In order to play the presentation normally, the next Media Segment to 2313 load is the one with the lowest Media Sequence Number that is greater 2314 than the Media Sequence Number of the last Media Segment loaded. 2316 6.3.6. Decrypting Encrypted Media Segments 2318 If a Media Playlist file contains an EXT-X-KEY tag that specifies a 2319 Key file URI, the client can obtain that Key file and use the key 2320 inside it to decrypt all Media Segments to which that EXT-X-KEY tag 2321 applies. 2323 A client MUST ignore any EXT-X-KEY tag with an unsupported or 2324 unrecognized KEYFORMAT attribute, to allow for cross-device 2325 addressability. If the Playlist contains a Media Segment to which 2326 only EXT-X-KEY tags with unrecognized or unsupported KEYFORMAT 2327 attributes are applied, playback SHOULD fail. 2329 A client MUST NOT attempt to decrypt any segments whose EXT-X-KEY tag 2330 has a METHOD attribute that it does not recognize. 2332 If the encryption METHOD is AES-128, AES-128 CBC decryption SHALL be 2333 applied to individual Media Segments, whose encryption format is 2334 described in Section 4.4.2.4. 2336 If the encryption METHOD is AES-128 and the Media Segment is part of 2337 an I-frame Playlist (Section 4.4.3.6) and it has an EXT-X-BYTERANGE 2338 tag applied to it, special care needs to be taken in loading and 2339 decrypting the segment, because the resource identified by the URI is 2340 encrypted in 16-byte blocks from the start of the resource. 2342 The decrypted I-frame can be recovered by first widening its byte 2343 range, as specified by the EXT-X-BYTERANGE tag, so that it starts and 2344 ends on 16-byte boundaries from the start of the resource. 2346 Next, the byte range is widened further to include a 16-byte block at 2347 the beginning of the range. This 16-byte block allows the correct IV 2348 for the following block to be calculated. 2350 The widened byte range can then be loaded and decrypted with AES-128 2351 CBC using an arbitrary IV. The number of bytes added to the 2352 beginning and the end of the original byte range are discarded from 2353 the decrypted bytes; what remains is the decrypted I-frame. 2355 If the encryption METHOD indicates Sample Encryption, decryption 2356 SHALL be applied to encrypted media samples within the Media Segment. 2358 An EXT-X-KEY tag with a METHOD of NONE indicates that the Media 2359 Segments it applies to are not encrypted. 2361 7. Protocol Version Compatibility 2363 Protocol compatibility is specified by the EXT-X-VERSION tag. A 2364 Playlist that contains tags or attributes that are not compatible 2365 with protocol version 1 MUST include an EXT-X-VERSION tag. 2367 A client MUST NOT attempt playback if it does not support the 2368 protocol version specified by the EXT-X-VERSION tag, or unintended 2369 behavior could occur. 2371 A Media Playlist MUST indicate an EXT-X-VERSION of 2 or higher if it 2372 contains: 2374 o The IV attribute of the EXT-X-KEY tag. 2376 A Media Playlist MUST indicate an EXT-X-VERSION of 3 or higher if it 2377 contains: 2379 o Floating-point EXTINF duration values. 2381 A Media Playlist MUST indicate an EXT-X-VERSION of 4 or higher if it 2382 contains: 2384 o The EXT-X-BYTERANGE tag. 2386 o The EXT-X-I-FRAMES-ONLY tag. 2388 A Media Playlist MUST indicate an EXT-X-VERSION of 5 or higher if it 2389 contains: 2391 o An EXT-X-KEY tag with a METHOD of SAMPLE-AES. 2393 o The KEYFORMAT and KEYFORMATVERSIONS attributes of the EXT-X-KEY 2394 tag. 2396 o The EXT-X-MAP tag. 2398 A Media Playlist MUST indicate an EXT-X-VERSION of 6 or higher if it 2399 contains: 2401 o The EXT-X-MAP tag in a Media Playlist that does not contain EXT- 2402 X-I-FRAMES-ONLY. 2404 Note that in protocol version 6, the semantics of the EXT- 2405 X-TARGETDURATION tag changed slightly. In protocol version 5 and 2406 earlier it indicated the maximum segment duration; in protocol 2407 version 6 and later it indicates the the maximum segment duration 2408 rounded to the nearest integer number of seconds. 2410 A Master Playlist MUST indicate an EXT-X-VERSION of 7 or higher if it 2411 contains: 2413 o "SERVICE" values for the INSTREAM-ID attribute of the EXT-X-MEDIA 2414 tag. 2416 A Playlist MUST indicate an EXT-X-VERSION of 8 or higher if it 2417 contains: 2419 o Variable substitution. 2421 The EXT-X-MEDIA tag and the AUDIO, VIDEO, and SUBTITLES attributes of 2422 the EXT-X-STREAM-INF tag are backward compatible to protocol version 2423 1, but playback on older clients may not be desirable. A server MAY 2424 consider indicating an EXT-X-VERSION of 4 or higher in the Master 2425 Playlist but is not required to do so. 2427 The PROGRAM-ID attribute of the EXT-X-STREAM-INF and the EXT-X-I- 2428 FRAME-STREAM-INF tags was removed in protocol version 6. 2430 The EXT-X-ALLOW-CACHE tag was removed in protocol version 7. 2432 8. Playlist Examples 2434 8.1. Simple Media Playlist 2436 #EXTM3U 2437 #EXT-X-TARGETDURATION:10 2438 #EXT-X-VERSION:3 2439 #EXTINF:9.009, 2440 http://media.example.com/first.ts 2441 #EXTINF:9.009, 2442 http://media.example.com/second.ts 2443 #EXTINF:3.003, 2444 http://media.example.com/third.ts 2445 #EXT-X-ENDLIST 2447 8.2. Live Media Playlist Using HTTPS 2448 #EXTM3U 2449 #EXT-X-VERSION:3 2450 #EXT-X-TARGETDURATION:8 2451 #EXT-X-MEDIA-SEQUENCE:2680 2453 #EXTINF:7.975, 2454 https://priv.example.com/fileSequence2680.ts 2455 #EXTINF:7.941, 2456 https://priv.example.com/fileSequence2681.ts 2457 #EXTINF:7.975, 2458 https://priv.example.com/fileSequence2682.ts 2460 8.3. Playlist with Encrypted Media Segments 2462 #EXTM3U 2463 #EXT-X-VERSION:3 2464 #EXT-X-MEDIA-SEQUENCE:7794 2465 #EXT-X-TARGETDURATION:15 2467 #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=52" 2469 #EXTINF:2.833, 2470 http://media.example.com/fileSequence52-A.ts 2471 #EXTINF:15.0, 2472 http://media.example.com/fileSequence52-B.ts 2473 #EXTINF:13.333, 2474 http://media.example.com/fileSequence52-C.ts 2476 #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=53" 2478 #EXTINF:15.0, 2479 http://media.example.com/fileSequence53-A.ts 2481 8.4. Master Playlist 2483 #EXTM3U 2484 #EXT-X-STREAM-INF:BANDWIDTH=1280000,AVERAGE-BANDWIDTH=1000000 2485 http://example.com/low.m3u8 2486 #EXT-X-STREAM-INF:BANDWIDTH=2560000,AVERAGE-BANDWIDTH=2000000 2487 http://example.com/mid.m3u8 2488 #EXT-X-STREAM-INF:BANDWIDTH=7680000,AVERAGE-BANDWIDTH=6000000 2489 http://example.com/hi.m3u8 2490 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5" 2491 http://example.com/audio-only.m3u8 2493 8.5. Master Playlist with I-Frames 2495 #EXTM3U 2496 #EXT-X-STREAM-INF:BANDWIDTH=1280000 2497 low/audio-video.m3u8 2498 #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=86000,URI="low/iframe.m3u8" 2499 #EXT-X-STREAM-INF:BANDWIDTH=2560000 2500 mid/audio-video.m3u8 2501 #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=150000,URI="mid/iframe.m3u8" 2502 #EXT-X-STREAM-INF:BANDWIDTH=7680000 2503 hi/audio-video.m3u8 2504 #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=550000,URI="hi/iframe.m3u8" 2505 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5" 2506 audio-only.m3u8 2508 8.6. Master Playlist with Alternative Audio 2510 In this example, the CODECS attributes have been condensed for space. 2511 A '\' is used to indicate that the tag continues on the following 2512 line with whitespace removed: 2514 #EXTM3U 2515 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="English", \ 2516 DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en", \ 2517 URI="main/english-audio.m3u8" 2518 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Deutsch", \ 2519 DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="de", \ 2520 URI="main/german-audio.m3u8" 2521 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Commentary", \ 2522 DEFAULT=NO,AUTOSELECT=NO,LANGUAGE="en", \ 2523 URI="commentary/audio-only.m3u8" 2524 #EXT-X-STREAM-INF:BANDWIDTH=1280000,CODECS="...",AUDIO="aac" 2525 low/video-only.m3u8 2526 #EXT-X-STREAM-INF:BANDWIDTH=2560000,CODECS="...",AUDIO="aac" 2527 mid/video-only.m3u8 2528 #EXT-X-STREAM-INF:BANDWIDTH=7680000,CODECS="...",AUDIO="aac" 2529 hi/video-only.m3u8 2530 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5",AUDIO="aac" 2531 main/english-audio.m3u8 2533 8.7. Master Playlist with Alternative Video 2535 This example shows three different video Renditions (Main, 2536 Centerfield, and Dugout) and three different Variant Streams (low, 2537 mid, and high). In this example, clients that did not support the 2538 EXT-X-MEDIA tag and the VIDEO attribute of the EXT-X-STREAM-INF tag 2539 would only be able to play the video Rendition "Main". 2541 Since the EXT-X-STREAM-INF tag has no AUDIO attribute, all video 2542 Renditions would be required to contain the audio. 2544 In this example, the CODECS attributes have been condensed for space. 2545 A '\' is used to indicate that the tag continues on the following 2546 line with whitespace removed: 2548 #EXTM3U 2549 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="low",NAME="Main", \ 2550 DEFAULT=YES,URI="low/main/audio-video.m3u8" 2551 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="low",NAME="Centerfield", \ 2552 DEFAULT=NO,URI="low/centerfield/audio-video.m3u8" 2553 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="low",NAME="Dugout", \ 2554 DEFAULT=NO,URI="low/dugout/audio-video.m3u8" 2556 #EXT-X-STREAM-INF:BANDWIDTH=1280000,CODECS="...",VIDEO="low" 2557 low/main/audio-video.m3u8 2559 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="mid",NAME="Main", \ 2560 DEFAULT=YES,URI="mid/main/audio-video.m3u8" 2561 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="mid",NAME="Centerfield", \ 2562 DEFAULT=NO,URI="mid/centerfield/audio-video.m3u8" 2563 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="mid",NAME="Dugout", \ 2564 DEFAULT=NO,URI="mid/dugout/audio-video.m3u8" 2566 #EXT-X-STREAM-INF:BANDWIDTH=2560000,CODECS="...",VIDEO="mid" 2567 mid/main/audio-video.m3u8 2569 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="hi",NAME="Main", \ 2570 DEFAULT=YES,URI="hi/main/audio-video.m3u8" 2571 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="hi",NAME="Centerfield", \ 2572 DEFAULT=NO,URI="hi/centerfield/audio-video.m3u8" 2573 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="hi",NAME="Dugout", \ 2574 DEFAULT=NO,URI="hi/dugout/audio-video.m3u8" 2576 #EXT-X-STREAM-INF:BANDWIDTH=7680000,CODECS="...",VIDEO="hi" 2577 hi/main/audio-video.m3u8 2579 8.8. Session Data in a Master Playlist 2581 In this example, only the EXT-X-SESSION-DATA is shown: 2583 #EXT-X-SESSION-DATA:DATA-ID="com.example.lyrics",URI="lyrics.json" 2585 #EXT-X-SESSION-DATA:DATA-ID="com.example.title",LANGUAGE="en", \ 2586 VALUE="This is an example" 2587 #EXT-X-SESSION-DATA:DATA-ID="com.example.title",LANGUAGE="es", \ 2588 VALUE="Este es un ejemplo" 2590 8.9. CHARACTERISTICS Attribute Containing Multiple Characteristics 2592 Certain characteristics are valid in combination, as in: 2594 CHARACTERISTICS= 2595 "public.accessibility.transcribes-spoken-dialog,public.easy-to-read" 2597 8.10. EXT-X-DATERANGE Carrying SCTE-35 Tags 2599 This example shows two EXT-X-DATERANGE tags that describe a single 2600 Date Range, with an SCTE-35 "out" splice_insert() command that is 2601 subsequently updated with an SCTE-35 "in" splice_insert() command. 2603 #EXTM3U 2604 ... 2605 #EXT-X-DATERANGE:ID="splice-6FFFFFF0",START-DATE="2014-03-05T11: 2606 15:00Z",PLANNED-DURATION=59.993,SCTE35-OUT=0xFC002F0000000000FF0 2607 00014056FFFFFF000E011622DCAFF000052636200000000000A0008029896F50 2608 000008700000000 2610 ... Media Segment declarations for 60s worth of media 2612 #EXT-X-DATERANGE:ID="splice-6FFFFFF0",DURATION=59.993,SCTE35-IN= 2613 0xFC002A0000000000FF00000F056FFFFFF000401162802E6100000000000A00 2614 08029896F50000008700000000 2615 ... 2617 9. Contributors 2619 Significant contributions to the design of this protocol were made by 2620 Jim Batson, David Biderman, Bill May, Roger Pantos, Alan Tseng, and 2621 Eryk Vershen. Stuart Cheshire helped edit the specification. 2623 Significant contributions to the update of this protocol were made by 2624 Bill May and Eryk Vershen. 2626 10. IANA Considerations 2628 IANA has registered the following media type [RFC2046]: 2630 Type name: application 2631 Subtype name: vnd.apple.mpegurl 2633 Required parameters: none 2635 Optional parameters: none 2637 Encoding considerations: encoded as UTF-8, which is 8-bit text. This 2638 media type may require encoding on transports not capable of handling 2639 8-bit text. See Section 4 for more information. 2641 Security considerations: See Section 11. 2643 Compression: this media type does not employ compression. 2645 Interoperability considerations: There are no byte-ordering issues, 2646 since files are 8-bit text. Applications could encounter 2647 unrecognized tags, which SHOULD be ignored. 2649 Published specification: see Section 4. 2651 Applications that use this media type: Multimedia applications such 2652 as the iPhone media player in iOS 3.0 and later and QuickTime Player 2653 in Mac OS X version 10.6 and later. 2655 Fragment identifier considerations: no Fragment Identifiers are 2656 defined for this media type. 2658 Additional information: 2660 Deprecated alias names for this type: none 2661 Magic number(s): #EXTM3U 2662 File extension(s): .m3u8, .m3u (see Section 4) 2663 Macintosh file type code(s): none 2665 Person & email address to contact for further information: David 2666 Singer, singer AT apple.com. 2668 Intended usage: LIMITED USE 2670 Restrictions on usage: none 2672 Author: Roger Pantos 2674 Change Controller: David Singer 2676 11. Security Considerations 2678 Since the protocol generally uses HTTP to transfer data, most of the 2679 same security considerations apply. See Section 15 of HTTP 2680 [RFC7230]. 2682 Media file parsers are typically subject to "fuzzing" attacks. 2683 Implementors SHOULD pay particular attention to code that will parse 2684 data received from a server and ensure that all possible inputs are 2685 handled correctly. 2687 Playlist files contain URIs, which clients will use to make network 2688 requests of arbitrary entities. Clients SHOULD range-check responses 2689 to prevent buffer overflows. See also the Security Considerations 2690 section of "Uniform Resource Identifier (URI): Generic Syntax" 2691 [RFC3986]. 2693 Apart from URL resolution, this format does not employ any form of 2694 active content. 2696 Clients SHOULD limit each playback session to a reasonable number of 2697 concurrent downloads (for example, four) to avoid contributing to 2698 denial-of-service attacks. 2700 HTTP requests often include session state ("cookies"), which may 2701 contain private user data. Implementations MUST follow cookie 2702 restriction and expiry rules specified by "HTTP State Management 2703 Mechanism" [RFC6265] to protect themselves from attack. See also the 2704 Security Considerations section of that document, and "Use of HTTP 2705 State Management" [RFC2964]. 2707 Encryption keys are specified by URI. The delivery of these keys 2708 SHOULD be secured by a mechanism such as HTTP Over TLS [RFC2818] 2709 (formerly SSL) in conjunction with a secure realm or a session token. 2711 12. References 2713 12.1. Normative References 2715 [AC_3] Advanced Television Systems Committee, "Digital Audio 2716 Compression (AC-3) (E-AC-3)", ATSC Standard A/52:2010, 2717 November 2010, <http://atsc.org/wp- 2718 content/uploads/2015/03/A52-201212-17.pdf>. 2720 [AES_128] National Institute of Standards and Technology, "Advanced 2721 Encryption Standard (AES)", FIPS PUB 197, DOI 2722 10.6028/NIST.FIPS.197, November 2001, 2723 <http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197.pdf>. 2725 [CEA608] Consumer Technology Association, "Line 21 Data Services", 2726 ANSI/CTA Standard 608-E, April 2008, 2727 <https://standards.cta.tech/kwspub/published_docs/ 2728 ANSI-CTA-608-E-R-2014-Preview.pdf>. 2730 [CEA708] Consumer Technology Association, "Digital Television (DTV) 2731 Closed Captioning", ANSI/CTA Standard CEA-708-E, August 2732 2013, <https://standards.cta.tech/kwspub/published_docs/ 2733 ANSI-CTA-708-E-Preview.pdf>. 2735 [CICP] International Organization for Standardization, 2736 "Information technology - MPEG systems technologies - Part 2737 8: Coding-independent code points", ISO/IEC International 2738 Standard 23001-8:2016, 2016, <https://www.iso.org/obp/ 2739 ui/#iso:std:iso-iec:23001:-8:ed-2:v1:en>. 2741 [CMAF] International Organization for Standardization, 2742 "Information technology -- Multimedia application format 2743 (MPEG-A) -- Part 19: Common media application format 2744 (CMAF) for segmented media", ISO/IEC International 2745 Standard 23000-19:2017, December 2017, 2746 <https://www.iso.org/standard/71975.html>. 2748 [COMMON_ENC] 2749 International Organization for Standardization, 2750 "Information technology -- MPEG systems technologies -- 2751 Part 7: Common encryption in ISO base media file format 2752 files", ISO/IEC International Standard 23001-7:2016, 2753 February 2016, <http://www.iso.org/iso/ 2754 catalogue_detail.htm?csnumber=68042>. 2756 [H_264] International Telecommunications Union, "Advanced video 2757 coding for generic audiovisual services", January 2012, 2758 <http://www.itu.int/rec/T-REC-H.264>. 2760 [HDCP] Digital Content Protection LLC, "High-bandwidth Digital 2761 Content Protection System - Mapping HDCP to HDMI", 2762 February 2013, <http://www.digital- 2763 cp.com/sites/default/files/specifications/ 2764 HDCP%20on%20HDMI%20Specification%20Rev2_2_Final1.pdf>. 2766 [IMSC1] W3C, "TTML Profiles for Internet Media Subtitles and 2767 Captions 1.0 (IMSC1)", April 2016, 2768 <https://www.w3.org/TR/ttml-imsc1/>. 2770 [ISO_13818] 2771 International Organization for Standardization, "Generic 2772 coding of moving pictures and associated audio 2773 information", ISO/IEC International Standard 13818:2007, 2774 October 2007, 2775 <http://www.iso.org/iso/catalogue_detail?csnumber=44169>. 2777 [ISO_13818_3] 2778 International Organization for Standardization, "Generic 2779 coding of moving pictures and associated audio information 2780 -- Part 3: Audio", ISO/IEC International 2781 Standard 13818-3:1998, April 1998, 2782 <http://www.iso.org/iso/home/store/catalogue_tc/ 2783 catalogue_detail.htm?csnumber=26797>. 2785 [ISO_13818_7] 2786 International Organization for Standardization, "Generic 2787 coding of moving pictures and associated audio information 2788 -- Part 7: Advanced Audio Coding (AAC)", ISO/IEC 2789 International Standard 13818-7:2006, January 2006, 2790 <http://www.iso.org/iso/home/store/catalogue_tc/ 2791 catalogue_detail.htm?csnumber=43345>. 2793 [ISO_14496] 2794 International Organization for Standardization, 2795 "Information technology -- Coding of audio-visual objects 2796 -- Part 3: Audio", ISO/IEC International 2797 Standard 14496-3:2009, 2009, 2798 <http://www.iso.org/iso/catalogue_detail?csnumber=53943>. 2800 [ISO_8601] 2801 International Organization for Standardization, "Data 2802 elements and interchange formats -- Information 2803 interchange -- Representation of dates and times", ISO/IEC 2804 International Standard 8601:2004, December 2004, 2805 <http://www.iso.org/iso/catalogue_detail?csnumber=40874>. 2807 [ISOBMFF] International Organization for Standardization, 2808 "Information technology -- Coding of audio-visual objects 2809 -- Part 12: ISO base media file format", ISO/IEC 2810 International Standard 14496-12:2015, December 2015, 2811 <http://www.iso.org/iso/ 2812 catalogue_detail.htm?csnumber=68960>. 2814 [MP4_TIMED_TEXT] 2815 International Organization for Standardization, 2816 "Information technology -- Coding of audio-visual objects 2817 -- Part 30: Timed text and other visual overlays in ISO 2818 base media file format", ISO/IEC International 2819 Standard 14496-30:2014, March 2014, 2820 <https://www.iso.org/standard/63107.html>. 2822 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2823 Extensions (MIME) Part Two: Media Types", RFC 2046, 2824 DOI 10.17487/RFC2046, November 1996, 2825 <https://www.rfc-editor.org/info/rfc2046>. 2827 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2828 Requirement Levels", BCP 14, RFC 2119, 2829 DOI 10.17487/RFC2119, March 1997, 2830 <https://www.rfc-editor.org/info/rfc2119>. 2832 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 2833 DOI 10.17487/RFC2818, May 2000, 2834 <https://www.rfc-editor.org/info/rfc2818>. 2836 [RFC2964] Moore, K. and N. Freed, "Use of HTTP State Management", 2837 BCP 44, RFC 2964, DOI 10.17487/RFC2964, October 2000, 2838 <https://www.rfc-editor.org/info/rfc2964>. 2840 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2841 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2842 2003, <https://www.rfc-editor.org/info/rfc3629>. 2844 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2845 Resource Identifier (URI): Generic Syntax", STD 66, 2846 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2847 <https://www.rfc-editor.org/info/rfc3986>. 2849 [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying 2850 Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, 2851 September 2009, <https://www.rfc-editor.org/info/rfc5646>. 2853 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2854 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2855 <https://www.rfc-editor.org/info/rfc5652>. 2857 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 2858 DOI 10.17487/RFC6265, April 2011, 2859 <https://www.rfc-editor.org/info/rfc6265>. 2861 [RFC6381] Gellens, R., Singer, D., and P. Frojdh, "The 'Codecs' and 2862 'Profiles' Parameters for "Bucket" Media Types", RFC 6381, 2863 DOI 10.17487/RFC6381, August 2011, 2864 <https://www.rfc-editor.org/info/rfc6381>. 2866 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2867 Protocol (HTTP/1.1): Message Syntax and Routing", 2868 RFC 7230, DOI 10.17487/RFC7230, June 2014, 2869 <https://www.rfc-editor.org/info/rfc7230>. 2871 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2872 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2873 May 2017, <https://www.rfc-editor.org/info/rfc8174>. 2875 [RFC8216] Pantos, R., Ed. and W. May, "HTTP Live Streaming", 2876 RFC 8216, DOI 10.17487/RFC8216, August 2017, 2877 <https://www.rfc-editor.org/info/rfc8216>. 2879 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2880 Interchange Format", STD 90, RFC 8259, 2881 DOI 10.17487/RFC8259, December 2017, 2882 <https://www.rfc-editor.org/info/rfc8259>. 2884 [SCTE35] Society of Cable Telecommunications Engineers, "Digital 2885 Program Insertion Cueing Message for Cable", ANSI/SCTE 35, 2886 August 2014, <http://www.scte.org/documents/pdf/Standards/ 2887 ANSI_SCTE%2035%202014.pdf>. 2889 [US_ASCII] 2890 American National Standards Institute, "Coded Character 2891 Sets - 7-Bit American National Standard Code for 2892 Information Interchange (7-Bit ASCII)", ANSI X3.4, 2893 December 1986. 2895 [WebVTT] World Wide Web Consortium (W3C), ""WebVTT: The Web Video 2896 Text Tracks Format", Draft Community Group Report", July 2897 2013, <http://dev.w3.org/html5/webvtt/>. 2899 12.2. Informative References 2901 [ID3] ID3.org, "The ID3 audio file data tagging format", 2902 <http://www.id3.org/Developer_Information>. 2904 [M3U] Nullsoft, Inc., "The M3U Playlist format, originally 2905 invented for the Winamp media player", 2906 <http://wikipedia.org/wiki/M3U>. 2908 [SampleEnc] 2909 Apple Inc., "MPEG-2 Stream Encryption Format for HTTP Live 2910 Streaming", <https://developer.apple.com/library/ios/docum 2911 entation/AudioVideo/Conceptual/HLS_Sample_Encryption/>. 2913 [UNICODE] The Unicode Consortium, "The Unicode Standard", 2914 <https://www.unicode.org/versions/latest/>. 2916 [UTI] Apple Inc., "Uniform Type Identifier", <http://developer.a 2917 pple.com/library/ios/#documentation/general/conceptual/ 2918 DevPedia-CocoaCore/UniformTypeIdentifier.html>. 2920 Appendix A. Changes from RFC 8216 2922 Several changes have been made since the publication of RFC 8216 2923 [RFC8216]. 2925 The following tags have been added: EXT-X-GAP and EXT-X-DEFINE 2926 (including variable substitution). 2928 IMSC has been added to the set of recognized subtitle formats. 2930 The VIDEO-RANGE attribute has been added to the EXT-X-STREAM-INF and 2931 EXT-X-I-FRAME-STREAM-INF tags. 2933 TYPE-1 has been added as a defined value for the HDCP-LEVEL 2934 attribute. 2936 The minimum new segment publication latency has been removed from 2937 server timing model. 2939 The Availability Duration of a Media Segment now depends on the 2940 presence of an EXT-X-ENDLIST tag. 2942 The recommended playlist offset to join a live stream has changed. 2944 The minimum delay before reloading a Playlist file has changed. 2946 There have been a number of minor editorial changes. 2948 Author's Address 2950 Roger Pantos (editor) 2951 Apple Inc. 2952 Cupertino, California 2953 United States 2955 Email: http-live-streaming-review@group.apple.com