idnits 2.17.1 draft-pantos-http-live-streaming-12.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(ii) Publication Limitation clause. If this document is intended for submission to the IESG for publication, this constitutes an error. 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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 14, 2013) is 3844 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 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Informational R. Pantos, Ed. 3 Internet-Draft W. May 4 Intended status: Informational Apple Inc. 5 Expires: April 17, 2014 October 14, 2013 7 HTTP Live Streaming 8 draft-pantos-http-live-streaming-12 10 Abstract 12 This document describes a protocol for transferring unbounded streams 13 of multimedia data. It specifies the data format of the files and 14 the actions to be taken by the server (sender) and the clients 15 (receivers) of the streams. It describes version 6 of this protocol. 17 Status of this Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. This document may not be modified, 21 and derivative works of it may not be created, and it may not be 22 published except as an Internet-Draft. 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 http://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 April 17, 2014. 36 Copyright Notice 38 Copyright (c) 2013 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 (http://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 Informational Internet Draft is submitted as an RFC Editor 49 Contribution and/or non-IETF Document (not as a Contribution, IETF 50 Contribution, nor IETF Document) in accordance with BCP 78 and BCP 51 79. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 2. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 3. The Playlist file . . . . . . . . . . . . . . . . . . . . . . 4 58 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 4 59 3.2. Attribute Lists . . . . . . . . . . . . . . . . . . . . . 5 60 3.3. Standard Tags . . . . . . . . . . . . . . . . . . . . . . 6 61 3.3.1. EXTM3U . . . . . . . . . . . . . . . . . . . . . . . . 6 62 3.3.2. EXTINF . . . . . . . . . . . . . . . . . . . . . . . . 7 63 3.4. New Tags . . . . . . . . . . . . . . . . . . . . . . . . . 7 64 3.4.1. EXT-X-BYTERANGE . . . . . . . . . . . . . . . . . . . 7 65 3.4.2. EXT-X-TARGETDURATION . . . . . . . . . . . . . . . . . 8 66 3.4.3. EXT-X-MEDIA-SEQUENCE . . . . . . . . . . . . . . . . . 8 67 3.4.4. EXT-X-KEY . . . . . . . . . . . . . . . . . . . . . . 9 68 3.4.5. EXT-X-PROGRAM-DATE-TIME . . . . . . . . . . . . . . . 10 69 3.4.6. EXT-X-ALLOW-CACHE . . . . . . . . . . . . . . . . . . 11 70 3.4.7. EXT-X-PLAYLIST-TYPE . . . . . . . . . . . . . . . . . 11 71 3.4.8. EXT-X-ENDLIST . . . . . . . . . . . . . . . . . . . . 11 72 3.4.9. EXT-X-MEDIA . . . . . . . . . . . . . . . . . . . . . 11 73 3.4.9.1. Rendition Groups . . . . . . . . . . . . . . . . . 14 74 3.4.10. EXT-X-STREAM-INF . . . . . . . . . . . . . . . . . . . 15 75 3.4.10.1. Alternative Renditions . . . . . . . . . . . . . . 16 76 3.4.11. EXT-X-DISCONTINUITY . . . . . . . . . . . . . . . . . 17 77 3.4.12. EXT-X-DISCONTINUITY-SEQUENCE . . . . . . . . . . . . . 18 78 3.4.13. EXT-X-I-FRAMES-ONLY . . . . . . . . . . . . . . . . . 18 79 3.4.14. EXT-X-MAP . . . . . . . . . . . . . . . . . . . . . . 19 80 3.4.15. EXT-X-I-FRAME-STREAM-INF . . . . . . . . . . . . . . . 20 81 3.4.16. EXT-X-START . . . . . . . . . . . . . . . . . . . . . 20 82 3.4.17. EXT-X-VERSION . . . . . . . . . . . . . . . . . . . . 21 83 4. Media segments . . . . . . . . . . . . . . . . . . . . . . . . 22 84 5. Key files . . . . . . . . . . . . . . . . . . . . . . . . . . 23 85 5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 23 86 5.2. IV for [AES_128] . . . . . . . . . . . . . . . . . . . . . 24 87 6. Client/Server Actions . . . . . . . . . . . . . . . . . . . . 24 88 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 24 89 6.2. Server Process . . . . . . . . . . . . . . . . . . . . . . 24 90 6.2.1. Introduction . . . . . . . . . . . . . . . . . . . . . 24 91 6.2.2. Live Playlists . . . . . . . . . . . . . . . . . . . . 27 92 6.2.3. Encrypting media segments . . . . . . . . . . . . . . 27 93 6.2.4. Providing variant streams . . . . . . . . . . . . . . 28 94 6.3. Client Process . . . . . . . . . . . . . . . . . . . . . . 29 95 6.3.1. Introduction . . . . . . . . . . . . . . . . . . . . . 29 96 6.3.2. Loading the Playlist file . . . . . . . . . . . . . . 29 97 6.3.3. Playing the Playlist file . . . . . . . . . . . . . . 30 98 6.3.4. Reloading the Playlist file . . . . . . . . . . . . . 31 99 6.3.5. Determining the next segment to load . . . . . . . . . 31 100 6.3.6. Decrypting encrypted media segments . . . . . . . . . 32 101 7. Protocol version compatibility . . . . . . . . . . . . . . . . 32 102 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 103 8.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 33 104 8.2. Simple Media Playlist file . . . . . . . . . . . . . . . . 34 105 8.3. Live Media Playlist, using HTTPS . . . . . . . . . . . . . 34 106 8.4. Playlist file with encrypted media segments . . . . . . . 34 107 8.5. Master Playlist file . . . . . . . . . . . . . . . . . . . 35 108 8.6. Master Playlist with I-Frames . . . . . . . . . . . . . . 35 109 8.7. Master Playlist with Alternative audio . . . . . . . . . . 35 110 8.8. Master Playlist with Alternative video . . . . . . . . . . 36 111 9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 37 112 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 113 11. Security Considerations . . . . . . . . . . . . . . . . . . . 38 114 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 39 115 12.1. Normative References . . . . . . . . . . . . . . . . . . . 39 116 12.2. Informative References . . . . . . . . . . . . . . . . . . 41 117 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 41 119 1. Introduction 121 This document describes a protocol for transferring unbounded streams 122 of multimedia data. The protocol supports the encryption of media 123 data and allows clients to choose from among different encodings of 124 the presentation. Media data can be transferred soon after it is 125 created, allowing it to be played in near real-time. Data is usually 126 carried over HTTP [RFC2616]. 128 External references that describe related standards such as HTTP are 129 listed in Section 11. 131 2. Summary 133 A multimedia presentation is specified by a URI [RFC3986] to a 134 Playlist file, which is an ordered list of media URIs and 135 informational tags. The URIs and their associated tags specify a 136 series of media segments. 138 To play the presentation, the client first obtains the Playlist file 139 and then obtains and plays each media segment in the Playlist. It 140 reloads the Playlist file as described in this document to discover 141 additional segments. 143 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 144 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 145 document are to be interpreted as described in RFC 2119 [RFC2119]. 147 3. The Playlist file 149 3.1. Introduction 151 Playlists MUST be Extended M3U Playlist files [M3U]. This document 152 extends the M3U file format further by defining additional tags. 154 An M3U Playlist is a text file that consists of individual lines. 155 Lines are terminated by either a single LF character or a CR 156 character followed by an LF character. Each line is a URI, blank, or 157 starts with the character '#'. Blank lines are ignored. White space 158 MUST NOT be present, except for elements in which it is explicitly 159 specified. 161 A URI line identifies a media segment or a Playlist file (see 162 Section 3.4.10). Each media segment is specified by a media URI and 163 the tags that apply to it. 165 A Playlist is known as a Media Playlist if all URI lines in the 166 Playlist identify media segments. A Playlist is known as a Master 167 Playlist if all URI lines in the Playlist identify Media Playlists. 169 Lines that start with the character '#' are either comments or tags. 171 Tags begin with #EXT. All other lines that begin with '#' are 172 comments and SHOULD be ignored. 174 A URI in a Playlist, whether it is a URI line or part of a tag, MAY 175 be relative. Relative URIs MUST be resolved against the URI of the 176 Playlist file that contains it. 178 The duration of a Media Playlist file is the sum of the durations of 179 the media segments within it. 181 Playlist files whose names end in .m3u8 and/or have the HTTP Content- 182 Type "application/vnd.apple.mpegurl" are encoded in UTF-8 [RFC3629]. 183 Files whose names end with .m3u and/or have the HTTP Content-Type 184 [RFC2616] "audio/mpegurl" are encoded in US-ASCII [US_ASCII]. 186 Playlist files MUST have names that end in .m3u8 and/or have the 187 Content-Type "application/vnd.apple.mpegurl" (if transferred over 188 HTTP), or have names that end in .m3u and/or have the HTTP Content- 189 Type type "audio/mpegurl" (for compatibility). 191 3.2. Attribute Lists 193 Certain extended M3U tags have values which are Attribute Lists. An 194 Attribute List is a comma-separated list of attribute/value pairs 195 with no whitespace. 197 An attribute/value pair has the following syntax: 199 AttributeName=AttributeValue 201 An AttributeName is an unquoted string containing characters from the 202 set [A..Z] and '-'. 204 An AttributeValue is one of the following: 206 o decimal-integer: an unquoted string of characters from the set 207 [0..9] expressing an integer in base-10 arithmetic. 209 o hexadecimal-integer: an unquoted string of characters from the set 210 [0..9] and [A..F] that is prefixed with 0x or 0X and which 211 expresses an integer in base-16 arithmetic. 213 o decimal-floating-point: an unquoted string of characters from the 214 set [0..9] and '.' which expresses a floating-point number in 215 decimal positional notation. 217 o quoted-string: a string of characters within a pair of double- 218 quotes ("), including Uniform Type Identifiers [UTI]. The set of 219 characters allowed in the string and any rules for escaping 220 special characters are specified by the Attribute definition, but 221 characters within a quoted-string MUST NOT include linefeed (0xA), 222 carriage-return (0xD) or double quote (0x22). Attributes that 223 wish to carry these characters must do so in an escaped form, such 224 as percent-encoded for a URI. 226 o enumerated-string: an unquoted character string from a set which 227 is explicitly defined by the Attribute. An enumerated-string will 228 never contain double-quotes ("), commas (,), or whitespace. 230 o decimal-resolution: two decimal-integers separated by the "x" 231 character. The first integer is a horizontal pixel dimension 232 (width); the second is a vertical pixel dimension (height). 234 The type of the AttributeValue for a given AttributeName is specified 235 by the Attribute definition. 237 A given AttributeName MUST NOT appear more than once in a given 238 Attribute List. 240 An Attribute/value pair with an unrecognized AttributeName MUST be 241 ignored by the client. 243 Any tag containing an attribute/value pair of type enumerated-string 244 whose AttributeName is recognized but whose AttributeValue is not 245 recognized MUST be ignored by the client. 247 3.3. Standard Tags 249 3.3.1. EXTM3U 251 An Extended M3U file is distinguished from a basic M3U file by its 252 first line, which MUST be the tag #EXTM3U. This tag MUST be included 253 in both Media Playlists and Master Playlists. Its format is: 255 #EXTM3U 257 3.3.2. EXTINF 259 The EXTINF tag specifies the duration of a media segment. It applies 260 only to the media segment that follows it, and MUST be followed by a 261 media segment URI. Each media segment MUST be preceded by an EXTINF 262 tag. Its format is: 264 #EXTINF:, 266 where duration is an decimal-integer or decimal-floating-point number 267 that specifies the duration of the media segment in seconds. 268 Durations that are reported as integers SHOULD be rounded to the 269 nearest integer. Durations MUST be integers if the protocol version 270 of the Playlist file is less than 3. Durations SHOULD be floating- 271 point if the version is equal to or greater than 3. The remainder of 272 the line following the comma is an optional human-readable 273 informative title of the media segment. 275 3.4. New Tags 277 This document defines the following new tags: EXT-X-BYTERANGE, EXT-X- 278 TARGETDURATION, EXT-X-MEDIA-SEQUENCE, EXT-X-KEY, EXT-X-PROGRAM-DATE- 279 TIME, EXT-X-ALLOW-CACHE, EXT-X-PLAYLIST-TYPE, EXT-X-STREAM-INF, EXT- 280 X-I-FRAME-STREAM-INF, EXT-X-I-FRAMES-ONLY, EXT-X-MEDIA, EXT-X- 281 ENDLIST, EXT-X-DISCONTINUITY, EXT-X-DISCONTINUITY-SEQUENCE, EXT-X- 282 START, and EXT-X-VERSION. 284 3.4.1. EXT-X-BYTERANGE 286 The EXT-X-BYTERANGE tag indicates that a media segment is a sub-range 287 of the resource identified by its media URI. It applies only to the 288 next media URI that follows it in the Playlist. Its format is: 290 #EXT-X-BYTERANGE:<n>[@<o>] 292 where n is a decimal-integer indicating the length of the sub-range 293 in bytes. If present, o is a decimal-integer indicating the start of 294 the sub-range, as a byte offset from the beginning of the resource. 295 If o is not present, the sub-range begins at the next byte following 296 the sub-range of the previous media segment. 298 If o is not present, a previous media segment MUST appear in the 299 Playlist file and MUST be a sub-range of the same media resource. 301 A media URI with no EXT-X-BYTERANGE tag applied to it specifies a 302 media segment that consists of the entire resource. 304 The EXT-X-BYTERANGE tag appeared in version 4 of the protocol. It 305 MUST NOT appear in a Master Playlist. 307 3.4.2. EXT-X-TARGETDURATION 309 The EXT-X-TARGETDURATION tag specifies the maximum media segment 310 duration. The EXTINF duration of each media segment in the Playlist 311 file, when rounded to the nearest integer, MUST be less than or equal 312 to the target duration. This tag MUST appear once in a Media 313 Playlist file. It applies to the entire Playlist file. Its format 314 is: 316 #EXT-X-TARGETDURATION:<s> 318 where s is a decimal-integer indicating the target duration in 319 seconds. 321 The EXT-X-TARGETDURATION tag MUST NOT appear in a Master Playlist. 323 3.4.3. EXT-X-MEDIA-SEQUENCE 325 Each media segment in a Playlist has a unique integer sequence 326 number. The sequence number of a segment is equal to the sequence 327 number of the segment that preceded it plus one. The EXT-X-MEDIA- 328 SEQUENCE tag indicates the sequence number of the first segment that 329 appears in a Playlist file. Its format is: 331 #EXT-X-MEDIA-SEQUENCE:<number> 333 where number is a decimal-integer. The sequence number MUST NOT 334 decrease. 336 A Media Playlist file MUST NOT contain more than one EXT-X-MEDIA- 337 SEQUENCE tag. If the Media Playlist file does not contain an EXT-X- 338 MEDIA-SEQUENCE tag then the sequence number of the first segment in 339 the playlist SHALL be considered to be 0. A client MUST NOT assume 340 that segments with the same sequence number in different Media 341 Playlists contain matching content. 343 A media URI is not required to contain its sequence number. 345 See Section 6.2.1, Section 6.3.2 and Section 6.3.5 for information on 346 handling the EXT-X-MEDIA-SEQUENCE tag. 348 The EXT-X-MEDIA-SEQUENCE tag MUST NOT appear in a Master Playlist. 350 3.4.4. EXT-X-KEY 352 Media segments MAY be encrypted. The EXT-X-KEY tag specifies how to 353 decrypt them. It applies to every media segment that appears between 354 it and the next EXT-X-KEY tag in the Playlist file with the same 355 KEYFORMAT attribute (or the end of the Playlist file). Two or more 356 EXT-X-KEY tags with different KEYFORMAT attributes MAY apply to the 357 same media segment, in which case they MUST resolve to the same key. 358 Its format is: 360 #EXT-X-KEY:<attribute-list> 362 The following attributes are defined: 364 METHOD 366 The value is an enumerated-string that specifies the encryption 367 method. This attribute is REQUIRED. 369 The methods defined are: NONE, AES-128, and SAMPLE-AES. 371 An encryption method of NONE means that media segments are not 372 encrypted. If the encryption method is NONE, the following 373 attributes MUST NOT be present: URI; IV; KEYFORMAT; 374 KEYFORMATVERSIONS. 376 An encryption method of AES-128 means that media segments are 377 completely encrypted using the Advanced Encryption Standard [AES_128] 378 with a 128-bit key and PKCS7 padding [RFC5652]. If the encryption 379 method is AES-128, the URI attribute MUST be present. The IV 380 attribute MAY be present; see Section 5.2. 382 An encryption method of SAMPLE-AES means that the media segments 383 contain elementary streams of audio, video, or other samples that are 384 encrypted using the Advanced Encryption Standard [AES_128]. How an 385 elementary stream is encrypted depends on the media encoding. The 386 encryption format for H.264 [H_264], AAC [ISO_14496] and AC-3 [AC_3] 387 elementary streams is described by [SampleEnc]. The IV attribute MAY 388 be present; see Section 5.2. 390 A client MUST NOT not attempt to decrypt any segments whose EXT-X-KEY 391 tag has a METHOD attribute that it does not recognize. 393 URI 395 The value is a quoted-string containing a URI [RFC3986] that 396 specifies how to obtain the key. This attribute is REQUIRED unless 397 the METHOD is NONE. 399 IV 401 The value is a hexadecimal-integer that specifies the Initialization 402 Vector to be used with the key. The IV attribute appeared in 403 protocol version 2. See Section 5.2 for when the IV attribute is 404 used. 406 KEYFORMAT 408 The value is a quoted-string that specifies how the key is 409 represented in the resource identified by the URI; see Section 5 for 410 more detail. This attribute is OPTIONAL; its absence indicates, an 411 implicit value of "identity". The KEYFORMAT attribute appeared in 412 protocol version 5. 414 KEYFORMATVERSIONS 416 The value is a quoted-string containing one or more positive integers 417 separated by the "/" character (for example, "1/3"). If more than 418 one version of a particular KEYFORMAT is defined, this attribute can 419 be used to indicate which version(s) this instance complies with. 420 This attribute is OPTIONAL; if it is not present, its value is 421 considered to be "1". The KEYFORMATVERSIONS attribute appeared in 422 protocol version 5. 424 If the Media Playlist file does not contain an EXT-X-KEY tag then 425 media segments are not encrypted. 427 See Section 5 for the format of the key file, and Section 5.2, 428 Section 6.2.3 and Section 6.3.6 for additional information on media 429 segment encryption. 431 3.4.5. EXT-X-PROGRAM-DATE-TIME 433 The EXT-X-PROGRAM-DATE-TIME tag associates the first sample of a 434 media segment with an absolute date and/or time. It applies only to 435 the next media segment. 437 The date/time representation is ISO/IEC 8601:2004 [ISO_8601] and 438 SHOULD indicate a time zone: 440 #EXT-X-PROGRAM-DATE-TIME:<YYYY-MM-DDThh:mm:ssZ> 442 For example: 444 #EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031+08:00 446 See Section 6.2.1 and Section 6.3.3 for more information on the EXT- 447 X-PROGRAM-DATE-TIME tag. 449 The EXT-X-PROGRAM-DATE-TIME tag MUST NOT appear in a Master Playlist. 451 3.4.6. EXT-X-ALLOW-CACHE 453 The EXT-X-ALLOW-CACHE tag indicates whether the client MAY or MUST 454 NOT cache downloaded media segments for later replay. It MAY occur 455 anywhere in a Media Playlist file; it MUST NOT occur more than once. 456 The EXT-X-ALLOW-CACHE tag applies to all segments in the playlist. 457 Its format is: 459 #EXT-X-ALLOW-CACHE:<YES|NO> 461 See Section 6.3.3 for more information on the EXT-X-ALLOW-CACHE tag. 463 3.4.7. EXT-X-PLAYLIST-TYPE 465 The EXT-X-PLAYLIST-TYPE tag provides mutability information about the 466 Playlist file. It applies to the entire Playlist file. It is 467 OPTIONAL. Its format is: 469 #EXT-X-PLAYLIST-TYPE:<EVENT|VOD> 471 Section 6.2.1 defines the implications of the EXT-X-PLAYLIST-TYPE 472 tag. 474 The EXT-X-PLAYLIST-TYPE tag MUST NOT appear in a Master Playlist. 476 3.4.8. EXT-X-ENDLIST 478 The EXT-X-ENDLIST tag indicates that no more media segments will be 479 added to the Media Playlist file. It MAY occur anywhere in the 480 Playlist file; it MUST NOT occur more than once. Its format is: 482 #EXT-X-ENDLIST 484 The EXT-X-ENDLIST tag MUST NOT appear in a Master Playlist. 486 3.4.9. EXT-X-MEDIA 488 The EXT-X-MEDIA tag is used to relate Media Playlists that contain 489 alternative renditions of the same content. For example, three EXT- 490 X-MEDIA tags can be used to identify audio-only Media Playlists that 491 contain English, French and Spanish renditions of the same 492 presentation. Or two EXT-X-MEDIA tags can be used to identify video- 493 only Media Playlists that show two different camera angles. 495 The EXT-X-MEDIA tag stands alone, in that it does not apply to a 496 particular URI in the Master Playlist. Its format is: 498 #EXT-X-MEDIA:<attribute-list> 500 The following attributes are defined: 502 TYPE 504 The value is enumerated-string; valid strings are AUDIO, VIDEO, 505 SUBTITLES and CLOSED-CAPTIONS. If the value is AUDIO, the Playlist 506 described by the tag MUST contain audio media. If the value is 507 VIDEO, the Playlist MUST contain video media. If the value is 508 SUBTITLES, the Playlist MUST contain subtitle media. If the value is 509 CLOSED-CAPTIONS, the media segments for the video renditions can 510 include closed captions. This attribute is REQUIRED. 512 URI 514 The value is a quoted-string containing a URI that identifies the 515 Playlist file. This attribute is OPTIONAL; see Section 3.4.10.1. If 516 the TYPE is CLOSED-CAPTIONS, the URI attribute MUST NOT be present. 518 GROUP-ID 520 The value is a quoted-string identifying a mutually-exclusive group 521 of renditions. The presence of this attribute signals membership in 522 the group. See Section 3.4.9.1. This attribute is REQUIRED. 524 LANGUAGE 526 The value is a quoted-string containing an RFC 5646 [RFC5646] 527 language tag that identifies the primary language used in the 528 rendition. This attribute is OPTIONAL. 530 ASSOC-LANGUAGE 532 The value is a quoted-string containing an RFC 5646 [RFC5646] 533 language tag that identifies a language that is associated with the 534 rendition. An associated language is often used in a different role 535 than the language specified by the LANGUAGE attribute (e.g. written 536 vs. spoken, or as a fallback dialect). This attribute is OPTIONAL. 538 NAME 540 The value is a quoted-string containing a human-readable description 541 of the rendition. If the LANGUAGE attribute is present then this 542 description SHOULD be in that language. This attribute is REQUIRED. 544 DEFAULT 546 The value is an enumerated-string; valid strings are YES and NO. If 547 the value is YES, then the client SHOULD play this rendition of the 548 content in the absence of information from the user indicating a 549 different choice. This attribute is OPTIONAL. Its absence indicates 550 an implicit value of NO. 552 AUTOSELECT 554 The value is an enumerated-string; valid strings are YES and NO. 555 This attribute is OPTIONAL. If it is present, its value MUST be YES 556 if the value of the DEFAULT attribute is YES. If the value is YES, 557 then the client MAY choose to play this rendition in the absence of 558 explicit user preference because it matches the current playback 559 environment, such as chosen system language. 561 FORCED 563 The value is an enumerated-string; valid strings are YES and NO. 564 This attribute is OPTIONAL. Its absence indicates an implicit value 565 of NO. The FORCED attribute MUST NOT be present unless the TYPE is 566 SUBTITLES. 568 A value of YES indicates that the rendition contains content which is 569 considered essential to play. When selecting a FORCED rendition, a 570 client should choose the one that best matches the current playback 571 environment (e.g. language). 573 A value of NO indicates that the rendition contains content which is 574 intended to be played in response to explicit user request. 576 INSTREAM-ID 578 The value is a quoted-string that specifies a rendition within the 579 segments in the Media Playlist. This attribute is REQUIRED if the 580 TYPE attribute is CLOSED-CAPTIONS, in which case it MUST have one of 581 the values: "CC1", "CC2", "CC3", "CC4". For all other TYPE values, 582 the INSTREAM-ID SHOULD NOT be specified. 584 CHARACTERISTICS 586 The value is a quoted-string containing one or more Uniform Type 587 Identifiers [UTI] separated by comma (,) characters. This attribute 588 is OPTIONAL. Each UTI indicates an individual characteristic of the 589 rendition. 591 A SUBTITLES rendition MAY include the following characteristics: 593 "public.accessibility.transcribes-spoken-dialog"; 594 "public.accessibility.describes-music-and-sound"; "public.easy-to- 595 read" (which indicates that the subtitles have been edited for ease 596 of reading). 598 An AUDIO rendition MAY include the following characteristics: 599 "public.accessibility.describes-video". 601 The CHARACTERISTICS attribute MAY include private UTIs. 603 The EXT-X-MEDIA tag appeared in version 4 of the protocol. The EXT- 604 X-MEDIA tag MUST NOT appear in a Media Playlist. 606 3.4.9.1. Rendition Groups 608 A set of EXT-X-MEDIA tags with the same GROUP-ID value forms a group 609 of renditions. Each member of the group MUST represent an 610 alternative rendition of the same content. 612 All EXT-X-MEDIA tags in a Playlist MUST meet the following 613 constraints: 615 o All EXT-X-MEDIA tags in the same group MUST have the same TYPE 616 attribute. 618 o All EXT-X-MEDIA tags in the same group MUST have different NAME 619 attributes. 621 o A group MUST NOT have more than one member with a DEFAULT 622 attribute of YES. 624 o All members of a group whose AUTOSELECT attribute has a value of 625 YES MUST have LANGUAGE [RFC5646] attributes with unique values. 627 A Playlist MAY contain multiple groups of the same TYPE in order to 628 provide multiple encodings of each group. If it does so, each group 629 of the same TYPE MUST contain identical attributes, with the 630 exception of the URI attribute. 632 Each member in a group of renditions MAY have a different sample 633 format. However, any EXT-X-STREAM-INF tag or EXT-X-I-FRAME-STREAMINF 634 tag which references that group MUST have a CODECS attribute that 635 lists every sample format present in any rendition in the group. 636 Please see Section 3.4.10 and Section 3.4.15. 638 3.4.10. EXT-X-STREAM-INF 640 The EXT-X-STREAM-INF tag specifies a variant stream, which is a set 641 of renditions which can be combined to play the presentation. The 642 attributes of the tag provide information about the variant stream. 644 The EXT-X-STREAM-INF tag identifies the next URI line in the Playlist 645 as a rendition of the variant stream. 647 The EXT-X-STREAM-INF tag MUST NOT appear in a Media Playlist. 649 Its format is: 651 #EXT-X-STREAM-INF:<attribute-list> 652 <URI> 654 The following attributes are defined: 656 BANDWIDTH 658 The value is a decimal-integer of bits per second. It MUST be an 659 upper bound of the overall bitrate of each media segment (calculated 660 to include container overhead) that appears or will appear in the 661 Playlist. 663 Every EXT-X-STREAM-INF tag MUST include the BANDWIDTH attribute. 665 CODECS 667 The value is a quoted-string containing a comma-separated list of 668 formats, where each format specifies a media sample type that is 669 present in a media segment in the Media Playlist file. Valid format 670 identifiers are those in the ISO Base Media File Format Name Space 671 defined by RFC 6381 [RFC6381]. 673 Every EXT-X-STREAM-INF tag SHOULD include a CODECS attribute. 675 RESOLUTION 677 The value is a decimal-resolution describing the approximate encoded 678 horizontal and vertical resolution of video within the presentation. 680 The RESOLUTION attribute is OPTIONAL but is recommended if the 681 variant stream includes video. 683 AUDIO 685 The value is a quoted-string. It MUST match the value of the 686 GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the Master 687 Playlist whose TYPE attribute is AUDIO. It indicates the set of 688 audio renditions that MAY be used when playing the presentation. See 689 Section 3.4.10.1. 691 The AUDIO attribute is OPTIONAL. 693 VIDEO 695 The value is a quoted-string. It MUST match the value of the 696 GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the Master 697 Playlist whose TYPE attribute is VIDEO. It indicates the set of 698 video renditions that MAY be used when playing the presentation. See 699 Section 3.4.10.1. 701 The VIDEO attribute is OPTIONAL. 703 SUBTITLES 705 The value is a quoted-string. It MUST match the value of the 706 GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in the Master 707 Playlist whose TYPE attribute is SUBTITLES. It indicates the set of 708 subtitle renditions that MAY be used when playing the presentation. 709 See Section 3.4.10.1. 711 The SUBTITLES attribute is OPTIONAL. 713 CLOSED-CAPTIONS 715 The value can be either a quoted-string or an enumerated-string with 716 the value NONE. If the value is a quoted-string, it MUST match the 717 value of the GROUP-ID attribute of an EXT-X-MEDIA tag elsewhere in 718 the Playlist whose TYPE attribute is CLOSED-CAPTIONS, and indicates 719 the set of closed-caption renditions that may be used when playlist 720 the presentation. See Section 3.4.10.1. 722 If the value is the enumerated-string value NONE, all EXT-X-STREAM- 723 INF tags MUST have this attribute with a value of NONE. This 724 indicates that there are no closed captions in any variant stream in 725 the Master Playlist. 727 The CLOSED-CAPTIONS attribute is OPTIONAL. 729 3.4.10.1. Alternative Renditions 731 When an EXT-X-STREAM-INF tag contains an AUDIO, VIDEO, SUBTITLES, or 732 CLOSED-CAPTIONS attribute, it indicates that alternative renditions 733 of the content are available for playback of that variant stream. 735 When defining alternative renditions, the following constraints MUST 736 be met: 738 o All playable combinations of renditions associated with an EXT-X- 739 STREAM-INF tag MUST have an aggregate bandwidth less than or equal 740 to the BANDWIDTH attribute of the EXT-X-STREAM-INF tag. 742 o If an EXT-X-STREAM-INF tag contains a RESOLUTION attribute and a 743 VIDEO attribute, then every alternative video rendition MUST match 744 the value of the RESOLUTION attribute. 746 o Every alternative rendition associated with an EXT-X-STREAM-INF 747 tag MUST meet the constraints for a variant stream described in 748 Section 6.2.4. 750 The URI attribute is REQUIRED if the media type is SUBTITLES, but 751 OPTIONAL if the media type is VIDEO or AUDIO. If the media type is 752 VIDEO or AUDIO, a missing URI attribute indicates that the media data 753 for this rendition is included in the Media playlist of any EXT-X- 754 STREAM-INF tag referencing this MEDIA tag. If the media type is 755 AUDIO, the audio data for this rendition MUST also be present in any 756 video renditions specified by the EXT-X-STREAM-INF tag. 758 The URI attribute MUST NOT be included if the media type is CLOSED- 759 CAPTIONS. 761 Note that if a client chooses to play renditions of audio and video 762 that are not present in the main Media Playlist described by the EXT- 763 X-STREAM-INF tag, or if the client chooses to play an audio rendition 764 and the main Playlist is audio-only, then the client MAY ignore the 765 main Playlist and its media. 767 3.4.11. EXT-X-DISCONTINUITY 769 The EXT-X-DISCONTINUITY tag indicates an encoding discontinuity 770 between the media segment that follows it and the one that preceded 771 it. The set of characteristics that MAY change is: 773 o file format 775 o number and type of tracks 777 o encoding parameters 779 o encoding sequence 781 o timestamp sequence 782 Its format is: 784 #EXT-X-DISCONTINUITY 786 See Section 4, Section 6.2.1, and Section 6.3.3 for more information 787 about the EXT-X-DISCONTINUITY tag. 789 The EXT-X-DISCONTINUITY tag MUST NOT appear in a Master Playlist. 791 3.4.12. EXT-X-DISCONTINUITY-SEQUENCE 793 The EXT-X-DISCONTINUITY-SEQUENCE tag allows synchronization between 794 different renditions of the same variant stream or different variant 795 streams that have EXT-X-DISCONTINUITY tags in their Media Playlists. 797 Its format is: 799 #EXT-X-DISCONTINUITY-SEQUENCE:<number> 801 where number is a decimal-integer. The discontinuity sequence number 802 MUST NOT decrease. 804 A Media Playlist MUST NOT contain more than one EXT-X-DISCONTINUITY- 805 SEQUENCE tag. If the Media Playlist does not contain an EXT-X- 806 DISCONTINUITY-SEQUENCE tag, then the discontinuity sequence number of 807 the first segment in the playlist SHALL be considered to be 0. 809 The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before any EXT-X- 810 DISCONTINUITY tag. 812 A media playlist MUST NOT contain a EXT-X-DISCONTINUITY-SEQUENCE if 813 its EXT-X-PLAYLIST-TYPE is VOD or EVENT. 815 An EXT-X-DISCONTINUITY-SEQUENCE tag MUST ONLY appear in a Media 816 Playlist. 818 See Section 6.2.1 and Section 6.2.2 for more information about the 819 EXT-X-DISCONTINUITY-SEQUENCE tag. 821 3.4.13. EXT-X-I-FRAMES-ONLY 823 The EXT-X-I-FRAMES-ONLY tag indicates that each media segment in the 824 Playlist describes a single I-frame. I-frames (or Intra frames) are 825 encoded video frames whose encoding does not depend on any other 826 frame. 828 The EXT-X-I-FRAMES-ONLY tag applies to the entire Playlist. Its 829 format is: 831 #EXT-X-I-FRAMES-ONLY 833 In a Playlist with the EXT-X-I-FRAMES-ONLY tag, the media segment 834 duration (EXTINF tag value) is the time between the presentation time 835 of the I-frame in the media segment and the presentation time of the 836 next I-frame in the Playlist, or the end of the presentation if it is 837 the last I-frame in the Playlist. 839 Media resources containing I-frame segments MUST begin with either a 840 Transport Stream PAT/PMT or be accompanied by an EXT-X-MAP tag 841 indicating the proper PAT/PMT. The byte range of an I-frame segment 842 with an EXT-X-BYTERANGE tag applied to it (Section 3.4.1) MUST NOT 843 include a PAT/PMT. 845 The EXT-X-I-FRAMES-ONLY tag appeared in version 4 of the protocol. 846 The EXT-X-I-FRAMES-ONLY tag MUST NOT appear in a Master Playlist. 848 3.4.14. EXT-X-MAP 850 The EXT-X-MAP tag specifies how to obtain header information required 851 to parse the applicable media segments, such as the Transport Stream 852 PAT/PMT or the WebVTT header. It applies to every media segment that 853 appears after it in the Playlist until the next EXT-X-DISCONTINUITY 854 tag, or until the end of the playlist. 856 Its format is: 858 #EXT-X-MAP:<attribute-list> 860 The following attributes are defined: 862 URI 864 The value is a quoted-string containing a URI that identifies a 865 resource that contains segment header information. This attribute is 866 REQUIRED. 868 BYTERANGE 870 The value is a quoted-string specifying a byte range into the 871 resource identified by the URI attribute. This range SHOULD contain 872 only the header information. The format of the byte range is 873 described in Section 3.4.1. This attribute is OPTIONAL; if it is not 874 present, the byte range is the entire resource indicated by the URI. 876 The EXT-X-MAP tag appeared in version 5 of the protocol for use in 877 Media Playlist that contain the EXT-X-I-FRAMES-ONLY tag. In protocol 878 version 6, it may appear in any Media Playlist. 880 The EXT-X-MAP tag MUST NOT appear in a Master Playlist. 882 3.4.15. EXT-X-I-FRAME-STREAM-INF 884 The EXT-X-I-FRAME-STREAM-INF tag identifies a Media Playlist file 885 containing the I-frames of a multimedia presentation. It stands 886 alone, in that it does not apply to a particular URI in the Master 887 Playlist. Its format is: 889 #EXT-X-I-FRAME-STREAM-INF:<attribute-list> 891 All attributes defined for the EXT-X-STREAM-INF tag (Section 3.4.10) 892 are also defined for the EXT-X-I-FRAME-STREAM-INF tag, except for the 893 AUDIO, SUBTITLES and CLOSED-CAPTIONS attributes. In addition, the 894 following attribute is defined: 896 URI 898 The value is a quoted-string containing a URI that identifies the 899 I-frame Playlist file. 901 Every EXT-X-I-FRAME-STREAM-INF tag MUST include a BANDWIDTH attribute 902 and a URI attribute. 904 The provisions in Section 3.4.10.1 also apply to EXT-X-I-FRAME- 905 STREAM-INF tags with a VIDEO attribute. 907 A Master Playlist that specifies alternative VIDEO renditions and 908 I-frame Playlists SHOULD include an alternative I-frame VIDEO 909 rendition for each regular VIDEO rendition, with the same NAME and 910 LANGUAGE attributes. 912 The EXT-X-I-FRAME-STREAM-INF tag appeared in version 4 of the 913 protocol. Clients that do not implement protocol version 4 or higher 914 MUST ignore it. The EXT-X-I-FRAME-STREAM-INF tag MUST NOT appear in 915 a Media Playlist. 917 3.4.16. EXT-X-START 919 The EXT-X-START tag indicates a preferred point at which to start 920 playing a Playlist. By default, clients SHOULD start playback at 921 this point when beginning a playback session. It MUST NOT appear 922 more than once in a Playlist. This tag is OPTIONAL. 924 If the EXT-X-START tag appears in a Master Playlist, it indicates the 925 preferred starting point of every Media Playlist in the Master 926 Playlist. If this tag appears in a Media Playlist that is referenced 927 by a Master Playlist, then every other Media Playlist in the Master 928 Playlist MUST also contain an EXT-X-START tag with the same 929 attributes and values. 931 Its format is: 933 #EXT-X-START:<attribute list> 935 The following attributes are defined: 937 TIME-OFFSET 939 The value of TIME-OFFSET is a decimal-floating-point number of 940 seconds. A positive number indicates a time offset from the 941 beginning of the Playlist. A negative number indicates a negative 942 time offset from the end of the last segment in the Playlist. This 943 attribute is REQUIRED. 945 The absolute value of TIME-OFFSET MUST NOT be larger than the 946 Playlist duration. 948 If the Playlist does not contain the EXT-X-ENDLIST tag, the TIME- 949 OFFSET SHOULD NOT be within three target durations of the end of the 950 Playlist file. 952 PRECISE 954 The value is an enumerated-string; valid strings are YES and NO. If 955 the value is YES, clients SHOULD start playback at the segment 956 containing the TIME-OFFSET, but SHOULD NOT render media samples in 957 that segment whose presentation times are prior to the TIME-OFFSET. 958 If the value is NO, clients SHOULD attempt to render every media 959 sample in that segment. This attribute is OPTIONAL. If it is 960 missing, its value should be treated as NO. 962 The EXT-X-START tag appeared in version 6 of the protocol. 964 3.4.17. EXT-X-VERSION 966 The EXT-X-VERSION tag indicates the compatibility version of the 967 Playlist file. The Playlist file, its associated media, and its 968 server MUST comply with all provisions of the most-recent version of 969 this document describing the protocol version indicated by the tag 970 value. 972 The EXT-X-VERSION tag applies to the entire Playlist file. Its 973 format is: 975 #EXT-X-VERSION:<n> 977 where n is an integer indicating the protocol version. 979 A Playlist file MUST NOT contain more than one EXT-X-VERSION tag. A 980 Playlist file that does not contain an EXT-X-VERSION tag MUST comply 981 with version 1 of this protocol. 983 The EXT-X-VERSION tag MAY appear in either Master Playlist or Media 984 Playlist. It MUST appear in all playlists containing tags or 985 attributes that are not compatible with protocol version 1. 987 4. Media segments 989 Each media URI in a Playlist file specifies a media segment which is 990 part of the overall presentation. If a media URI has an EXT-X- 991 BYTERANGE tag applied to it, the segment is a sub-range of the media 992 file identified by the URI. Otherwise, the segment is the entire 993 media file. 995 Each media segment MUST be formatted as an MPEG-2 Transport Stream 996 [ISO_13818], an MPEG audio elementary stream [ISO_11172], or a WebVTT 997 [WebVTT] file. 999 Transport Stream segments MUST contain a single MPEG-2 Program. 1000 There SHOULD be a Program Association Table (PAT) and a Program Map 1001 Table (PMT) at the start of each segment. A segment that contains 1002 video SHOULD have at least one key frame and enough information to 1003 completely initialize a video decoder. 1005 A Transport Stream or audio elementary stream segment MUST be the 1006 continuation of the encoded media at the end of the segment with the 1007 previous sequence number, where values in a continuous series, such 1008 as timestamps and Continuity Counters, continue uninterrupted - 1009 unless the media segment was the first ever to appear in the Playlist 1010 file or has an EXT-X-DISCONTINUITY tag applied to it. 1012 Clients SHOULD be prepared to handle multiple tracks of a particular 1013 type (e.g. audio or video). A client with no other preference SHOULD 1014 choose the track with the lowest numerical PID that it can play. 1016 Clients MUST ignore private streams inside Transport Streams that 1017 they do not recognize. 1019 Each Elementary Audio Stream segment MUST signal the timestamp of its 1020 first sample with an ID3 PRIV tag [ID3] at the beginning of the 1021 segment. The ID3 PRIV owner identifier MUST be 1022 "com.apple.streaming.transportStreamTimestamp". The ID3 payload MUST 1023 be a 33-bit MPEG-2 Program Elementary Stream timestamp expressed as a 1024 big-endian eight-octet number, with the upper 31 bits set to zero. 1026 The encoding parameters for samples in a media segment and across 1027 multiple media segments in a Media Playlist SHOULD remain consistent. 1028 However clients SHOULD deal with encoding changes as they are 1029 encountered, for example by scaling video content to accommodate a 1030 resolution change. 1032 Subtitle segments MUST be formatted as WebVTT [WebVTT] files. Each 1033 subtitle segment MUST contain all subtitle cues that are intended to 1034 be displayed during the period indicated by the segment EXTINF 1035 duration. The start time offset and end time offset of each cue MUST 1036 indicate the total display time for that cue, even if that time range 1037 extends beyond the EXTINF duration. A WebVTT segment MAY contain no 1038 cues; this indicates that no subtitles are to be displayed during 1039 that period. 1041 Each subtitle segment MUST either start with a WebVTT header or have 1042 an EXT-X-MAP tag applied to it in the Media Playlist. 1044 Within each WebVTT header there MUST be an X-TIMESTAMP-MAP metadata 1045 header. This header synchronizes the cue timestamps in the WebVTT 1046 file with the MPEG-2 (PES) timestamps in other renditions of the 1047 variant stream. Its format is: 1049 X-TIMESTAMP-MAP=LOCAL:<cue time>,MPEGTS:<MPEG-2 time> 1050 e.g. X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000 1052 The cue timestamp in the LOCAL attribute MAY fall outside the range 1053 of time covered by the segment. 1055 5. Key files 1057 5.1. Introduction 1059 An EXT-X-KEY tag with a URI attribute identifies a Key file. A Key 1060 file contains the cipher key that MUST be used to decrypt subsequent 1061 media segments in the Playlist. 1063 [AES_128] encryption uses 16-octet keys. If the KEYFORMAT of an EXT- 1064 X-KEY tag is "identity", the Key file is a single packed array of 16 1065 octets in binary format. 1067 5.2. IV for [AES_128] 1069 [AES_128] requires the same 16-octet Initialization Vector (IV) to be 1070 supplied when encrypting and decrypting. Varying this IV increases 1071 the strength of the cipher. 1073 If an EXT-X-KEY tag has a KEYFORMAT of "identity" and an IV attribute 1074 is present, implementations MUST use the attribute value as the IV 1075 when encrypting or decrypting with that key. The value MUST be 1076 interpreted as a 128-bit number. 1078 If an EXT-X-KEY tag with a KEYFORMAT of "identity" does not have the 1079 IV attribute, implementations MUST use the sequence number of the 1080 media segment as the IV when encrypting or decrypting that media 1081 segment. The big-endian binary representation of the sequence number 1082 SHALL be placed in a 16-octet buffer and padded (on the left) with 1083 zeros. 1085 6. Client/Server Actions 1087 6.1. Introduction 1089 This section describes how the server generates the Playlist and 1090 media segments and how the client should download and play them. 1092 6.2. Server Process 1094 6.2.1. Introduction 1096 The production of the source media is outside the scope of this 1097 document, which simply presumes a source of continuous encoded media 1098 containing the presentation. 1100 The server MUST divide the source media into individual media 1101 segments whose duration is less than or equal to a constant target 1102 duration. The server SHOULD attempt to divide the source media at 1103 points that support effective decode of individual media segments, 1104 e.g. on packet and key frame boundaries. 1106 The server MUST create a URI for every media segment that enables its 1107 clients to obtain the segment data. If a server supports partial 1108 loading of resources (e.g. via HTTP Range requests), it MAY specify 1109 segments as sub-ranges of larger resources using the EXT-X-BYTERANGE 1110 tag. 1112 If WebVTT segments are distributed by HTTP, the server SHOULD support 1113 client requests to use the "gzip" Content-Encoding. 1115 The server MUST create a Media Playlist file. The Playlist file MUST 1116 conform to the format described in Section 3. A URI for each media 1117 segment that the server wishes to make available MUST appear in the 1118 Media Playlist in the order in which it is to be played. The entire 1119 media segment MUST be available to clients if its URI is in the 1120 Playlist file. 1122 The Media Playlist file MUST contain an EXT-X-TARGETDURATION tag. 1123 Its value MUST be equal to or greater than the EXTINF duration of any 1124 media segment that appears or will appear in the Playlist file, 1125 rounded to the nearest integer. Its value MUST NOT change. A 1126 typical target duration is 10 seconds. 1128 The Playlist file SHOULD contain one EXT-X-VERSION tag which 1129 indicates its compatibility version. Its value MUST be the lowest 1130 protocol version with which the server, Playlist file, and associated 1131 media segments all comply. Its value MUST NOT change. 1133 The server MUST create a URI for the Playlist file that will allow 1134 its clients to obtain the file. 1136 If the Playlist file is distributed by HTTP, the server SHOULD 1137 support client requests to use "gzip" Content-Encoding. 1139 Changes to the Playlist file MUST be made atomically from the point 1140 of view of the clients. 1142 The server MUST NOT change the Media Playlist file, except to: 1144 Append lines to it (Section 6.2.1). 1146 Remove media segment URIs from the Playlist in the order that they 1147 appear, along with any tags that apply only to those segments 1148 (Section 6.2.2). 1150 Increment the value of the EXT-X-MEDIA-SEQUENCE or EXT-X- 1151 DISCONTINUITY-SEQUENCE tags (Section 6.2.2). 1153 Add or remove EXT-X-STREAM-INF tags or EXT-X-I-FRAME-STREAM-INF 1154 tags (Section 6.2.4). Note that clients are not required to 1155 reload Master Playlist files, so changing them may not have 1156 immediate effect. 1158 Add an EXT-X-ENDLIST tag to the Playlist (Section 6.2.1). 1160 Furthermore, the Playlist file MAY contain an EXT-X-PLAYLIST-TYPE tag 1161 with a value of either EVENT or VOD. If the tag is present and has a 1162 value of EVENT, the server MUST NOT change or delete any part of the 1163 Playlist file (although it MAY append lines to it). If the tag is 1164 present and has a value of VOD, the Playlist file MUST NOT change. 1166 Every media segment in a Playlist MUST have an EXTINF tag applied to 1167 it indicating the duration of the media segment. 1169 Each segment in a Media Playlist has an integer discontinuity 1170 sequence number. The discontinuity sequence number can be used in 1171 addition to the timestamps within the media to synchronize media 1172 segments across different renditions. 1174 A segment's discontinuity sequence number is the value of the EXT-X- 1175 DISCONTINUITY-SEQUENCE tag (or zero if none) plus the number of EXT- 1176 X-DISCONTINUITY tags in the playlist preceding the URI line of the 1177 segment. 1179 A Media Playlist that contains an EXT-X-PLAYLIST-TYPE tag with a 1180 value of EVENT or VOD MUST NOT contain an EXT-X-DISCONTINUITY- 1181 SEQUENCE tag. 1183 The server MAY associate an absolute date and time with a media 1184 segment by applying an EXT-X-PROGRAM-DATE-TIME tag to it. This 1185 defines an informative mapping of the (wall-clock) date and time 1186 specified by the tag to the first media timestamp in the segment, 1187 which may be used as a basis for seeking, for display, or for other 1188 purposes. If a server provides this mapping, it SHOULD apply an EXT- 1189 X-PROGRAM-DATE-TIME tag to every segment that has an EXT-X- 1190 DISCONTINUITY tag applied to it. 1192 If the Media Playlist contains the final media segment of the 1193 presentation then the Playlist file MUST contain the EXT-X-ENDLIST 1194 tag. 1196 If a Media Playlist does not contain the EXT-X-ENDLIST tag, the 1197 server MUST make a new version of the Playlist file available that 1198 contains at least one new media segment. It MUST be made available 1199 relative to the time that the previous version of the Playlist file 1200 was made available: no earlier than one-half the target duration 1201 after that time, and no later than 1.5 times the target duration 1202 after that time. 1204 If the server wishes to remove an entire presentation, it MUST make 1205 the Playlist file unavailable to clients. It SHOULD ensure that all 1206 media segments in the Playlist file remain available to clients for 1207 at least the duration of the Playlist file at the time of removal. 1209 6.2.2. Live Playlists 1211 The server MAY limit the availability of media segments by removing 1212 media segments from the Playlist file (Section 6.2.1). If media 1213 segments are to be removed, the Playlist file MUST contain exactly 1214 one EXT-X-MEDIA-SEQUENCE tag. Its value MUST be incremented by 1 for 1215 every media segment that is removed from the Playlist file. 1217 Media segments MUST be removed from the Playlist file in the order 1218 that they appear in the Playlist. 1220 The server MUST NOT remove a media segment from the Playlist file if 1221 the duration of the Playlist file minus the duration of the segment 1222 is less than three times the target duration. 1224 When the server removes a media segment from the Playlist, the 1225 corresponding media URI SHOULD remain available to clients for a 1226 period of time equal to the duration of the segment plus the duration 1227 of the longest Playlist file distributed by the server containing 1228 that segment. 1230 If the server wishes to remove segments from a Media Playlist 1231 containing an EXT-X-DISCONTINUITY tag, the playlist MUST contain an 1232 EXT-X-DISCONTINUITY-SEQUENCE tag. 1234 If the server removes a EXT-X-DISCONTINUITY tag from the Media 1235 Playlist, it MUST increment the value of the EXT-X-DISCONTINUITY- 1236 SEQUENCE tag so that the discontinuity sequence numbers of the 1237 segments still in the playlist remain unchanged. 1239 If a server plans to remove a media segment after it is delivered to 1240 clients over HTTP, it SHOULD ensure that the HTTP response contains 1241 an Expires header that reflects the planned time-to-live. 1243 A Live Playlist MUST NOT contain the EXT-X-PLAYLIST-TYPE tag. 1245 6.2.3. Encrypting media segments 1247 If media segments are to be encrypted the server MUST define a URI 1248 which will allow authorized clients to obtain a Key file containing a 1249 decryption key. The Key file MUST conform to the format described in 1250 Section 5. 1252 The server MAY set the HTTP Expires header in the key response to 1253 indicate that the key may be cached. 1255 The server MUST encrypt every media segment in a Playlist according 1256 to the EXT-X-KEY tag that applies to its URI in the Playlist file. 1258 Media segments with an EXT-X-KEY tag whose METHOD is NONE, or which 1259 do not have an EXT-X-KEY tag applied to them, MUST NOT be encrypted. 1261 If the encryption METHOD is AES-128 and the Playlist does not contain 1262 the EXT-X-I-FRAMES-ONLY tag, AES-128 CBC encryption with PKCS7 1263 padding [RFC5652] SHALL be applied to individual media segments. The 1264 entire segment MUST be encrypted. Cipher Block Chaining MUST NOT be 1265 applied across media segments. The IV used for encryption MUST be 1266 either the sequence number of the media segment or the value of the 1267 IV attribute of the EXT-X-KEY tag, as described in Section 5.2. 1269 If the encryption METHOD is AES-128 and the Playlist contains an EXT- 1270 X-I-FRAMES-ONLY tag, AES-128 CBC encryption with PKCS7 padding 1271 [RFC5652] MUST be applied to the entire resource. The entire 1272 resource MUST be encrypted. Encryption MAY be restarted on 16-byte 1273 block boundaries, unless the first block contains an I-frame. The IV 1274 used for encryption MUST be either the sequence number of the media 1275 segment or the value of the IV attribute of the EXT-X-KEY tag, as 1276 described in Section 5.2. 1278 If the encryption METHOD is SAMPLE-AES, certain elementary streams 1279 MAY be encrypted prior to encapsulation in a media segment. The 1280 encryption format for H.264, AAC and AC-3 elementary streams is 1281 described by [SampleEnc]. 1283 The server MUST NOT remove an EXT-X-KEY tag from the Playlist file if 1284 it applies to any media segment in the Playlist file. 1286 6.2.4. Providing variant streams 1288 A server MAY offer multiple Media Playlist files to provide different 1289 encodings of the same presentation. If it does so it SHOULD provide 1290 a Master Playlist file that lists each variant stream to allow 1291 clients to switch between encodings dynamically. 1293 Master Playlists MUST contain an EXT-X-STREAM-INF tag or EXT-X-I- 1294 FRAME-STREAM-INF tag for each variant stream. 1296 If an EXT-X-STREAM-INF tag or EXT-X-I-FRAME-STREAM-INF tag contains 1297 the CODECS attribute, the attribute value MUST include every format 1298 defined by [RFC6381] that is present in any media segment that is 1299 part of the variant stream, including in any rendition. 1301 The server MUST meet the following constraints when producing variant 1302 streams: 1304 Each variant stream MUST present the same content, including EXT- 1305 X-DISCONTINUITY tags at the same points in each rendition. 1307 Matching content in variant streams MUST have matching timestamps. 1308 This allows clients to synchronize the media. 1310 Each Media Playlist in each variant stream MUST have the same 1311 target duration. The only exception is that SUBTITLES renditions 1312 with a EXT-X-PLAYLIST-TYPE of VOD MAY have longer target 1313 durations. 1315 Content that appears in a Media Playlist of one variant stream but 1316 not in another MUST appear either at the beginning or at the end 1317 of the Media Playlist file and MUST NOT be longer than the target 1318 duration. 1320 If any Media Playlist in a Master Playlist contains an EXT-X- 1321 PROGRAM-DATE-TIME tag, then all Media Playlists in that Master 1322 Playlist MUST contain EXT-X-PROGRAM-DATE-TIME tags with consistent 1323 mappings of date and time to media timestamps. 1325 In addition, for broadest compatibility, variant streams SHOULD 1326 contain the same encoded audio bitstream. This allows clients to 1327 switch between variant streams without audible glitching. 1329 The rules for variant streams also apply to alternative renditions - 1330 see Section 3.4.10.1. 1332 6.3. Client Process 1334 6.3.1. Introduction 1336 How the client obtains the URI to the Playlist file is outside the 1337 scope of this document; it is presumed to have done so. 1339 The client MUST obtain the Playlist file from the URI. If the 1340 Playlist file so obtained is a Master Playlist, the client MUST 1341 obtain the Media Playlist file from the Master Playlist. 1343 This document does not specify the treatment of variant streams by 1344 clients. 1346 6.3.2. Loading the Playlist file 1348 Every time a Playlist file is loaded or reloaded from the Playlist 1349 URI: 1351 The client MUST ensure that the Playlist file begins with the 1352 EXTM3U tag and that the EXT-X-VERSION tag, if present, specifies a 1353 protocol version supported by the client; if not, the client MUST 1354 NOT attempt to use the Playlist. 1356 The client SHOULD ignore any tags and attributes it does not 1357 recognize. 1359 The client MUST determine the next media segment to load, as 1360 described in Section 6.3.5. 1362 If the Media Playlist contains the EXT-X-MEDIA-SEQUENCE tag, the 1363 client SHOULD assume that each media segment in it will become 1364 unavailable at the time that the Playlist file was loaded plus the 1365 duration of the Playlist file. 1367 6.3.3. Playing the Playlist file 1369 The client SHALL choose which media segment to play first from the 1370 Media Playlist when playback starts. If the EXT-X-ENDLIST tag is not 1371 present and the client intends to play the media regularly (i.e. in 1372 playlist order at the nominal playback rate), the client SHOULD NOT 1373 choose a segment which starts less than three target durations from 1374 the end of the Playlist file. Doing so can trigger playback stalls. 1376 To achieve regular playback, media segments MUST be played in the 1377 order that they appear in the Playlist file. The client MAY present 1378 the available media in any way it wishes, including regular playback, 1379 random access, and trick modes. 1381 The client MUST be prepared to reset its parser(s) and decoder(s) 1382 before playing a media segment that has an EXT-X-DISCONTINUITY tag 1383 applied to it. 1385 The client SHOULD attempt to load media segments in advance of when 1386 they will be required for uninterrupted playback to compensate for 1387 temporary variations in latency and throughput. 1389 If the Playlist file contains the EXT-X-ALLOW-CACHE tag and its value 1390 is NO, the client MUST NOT cache downloaded media segments after they 1391 have been played. Otherwise the client MAY cache downloaded media 1392 segments indefinitely for later replay. 1394 The client MAY use the value of the EXT-X-PROGRAM-DATE-TIME tag to 1395 display the program origination time to the user. If the value 1396 includes time zone information the client SHALL take it into account, 1397 but if it does not the client MUST NOT infer an originating time 1398 zone. 1400 The client MUST NOT depend upon the correctness or the consistency of 1401 the value of the EXT-X-PROGRAM-DATE-TIME tag. 1403 6.3.4. Reloading the Playlist file 1405 The client MUST periodically reload the Media Playlist file unless it 1406 contains the EXT-X-ENDLIST tag. 1408 However the client MUST NOT attempt to reload the Playlist file more 1409 frequently than specified by this section. 1411 When a client loads a Playlist file for the first time or reloads a 1412 Playlist file and finds that it has changed since the last time it 1413 was loaded, the client MUST wait for at least the target duration 1414 before attempting to reload the Playlist file again, measured from 1415 the last time the client began loading the Playlist file. 1417 If the client reloads a Playlist file and finds that it has not 1418 changed then it MUST wait for a period of one-half the target 1419 duration before retrying. 1421 In order to reduce server load, the client SHOULD NOT reload the 1422 Playlist files of variant streams or alternate renditions that are 1423 not currently being played. If it decides to switch playback to a 1424 different variant stream, it SHOULD stop reloading the Playlist of 1425 the old variant stream and begin loading the Playlist of the new 1426 variant stream. It can use the EXTINF durations and the constraints 1427 in Section 6.2.4 to determine the approximate location of 1428 corresponding media. Once media from the new variant stream has been 1429 loaded, the timestamps in the media segments can be used to 1430 synchronize the old and new timelines precisely. A client MUST NOT 1431 assume that segments with the same media sequence number in different 1432 variant streams or different renditions contain matching content. 1434 6.3.5. Determining the next segment to load 1436 The client MUST examine the Media Playlist file every time it is 1437 loaded or reloaded to determine the next media segment to load. 1439 The first segment to load MUST be the segment that the client has 1440 chosen to play first, as described in Section 6.3.3. 1442 If the first segment to be played has been loaded and the Playlist 1443 file does not contain the EXT-X-MEDIA-SEQUENCE tag then the client 1444 MUST verify that the current Playlist file contains the URI of the 1445 last loaded media segment at the offset it was originally found at, 1446 halting playback if it does not. The next media segment to load MUST 1447 be the first media segment following the last-loaded segment in the 1448 Playlist. 1450 If the first segment to be played has been loaded and the Playlist 1451 file contains the EXT-X-MEDIA-SEQUENCE tag then the next media 1452 segment to load SHALL be the one with the lowest sequence number that 1453 is greater than the sequence number of the last media segment loaded. 1455 6.3.6. Decrypting encrypted media segments 1457 If a Media Playlist file contains an EXT-X-KEY tag that specifies a 1458 Key file URI, the client MUST obtain that key file and use the key 1459 inside it to decrypt all media segments to which that EXT-X-KEY tag 1460 applies. 1462 A client MUST NOT attempt to use an EXT-X-KEY tag with an unsupported 1463 or unrecognized KEYFORMAT attribute. A client SHOULD fail playback 1464 if the Playlist contains a media segment to which only EXT-X-KEY tags 1465 with unrecognized or unsupported KEYFORMAT attributes are applied. 1467 If the encryption METHOD is AES-128, AES-128 CBC decryption SHALL be 1468 applied to individual media segments. The entire segment MUST be 1469 decrypted. Cipher Block Chaining MUST NOT be applied across media 1470 segments. The IV used for decryption MUST be either the sequence 1471 number of the media segment or the value of the IV attribute of the 1472 EXT-X-KEY tag, as described in Section 5.2. 1474 If the encryption METHOD is AES-128 and the media segment is part of 1475 an I-frame playlist (Section 3.4.13) special care MUST be taken in 1476 loading and decrypting the segment, because the resource identified 1477 by the URI is encrypted in 16-byte blocks from the start of the 1478 resource (offset 0). The sub-range specified by the EXT-X-BYTERANGE 1479 tag MUST be widened to include the 16-byte blocks in which the 1480 beginning and end of the sub-range fall. Next, it MUST be widened 1481 further to include the previous 16-byte block. That range MUST be 1482 loaded and decrypted with AES-128 CBC using an arbitrary IV. The 1483 decrypted segment will then be in the original (unwidened) sub-range. 1485 If the encryption METHOD is SAMPLE-AES, AES-128 decryption SHALL be 1486 applied to encrypted elementary streams within the media segment. 1487 The encryption format for H.264, AAC and AC-3 elementary streams is 1488 described by [SampleEnc]. 1490 An EXT-X-KEY tag with a METHOD of NONE indicates that the media 1491 segments it applies to are not encrypted. 1493 7. Protocol version compatibility 1495 Clients and servers MUST implement protocol version 2 or higher to 1496 use: 1498 o The IV attribute of the EXT-X-KEY tag. 1500 Clients and servers MUST implement protocol version 3 or higher to 1501 use: 1503 o Floating-point EXTINF duration values. 1505 Clients and servers MUST implement protocol version 4 or higher to 1506 use: 1508 o The EXT-X-BYTERANGE tag. 1510 o The EXT-X-I-FRAME-STREAM-INF tag. 1512 o The EXT-X-I-FRAMES-ONLY tag. 1514 o The EXT-X-MEDIA tag. 1516 o The AUDIO and VIDEO attributes of the EXT-X-STREAM-INF tag. 1518 Clients and servers MUST implement protocol version 5 or higher to 1519 use: 1521 o The KEYFORMAT and KEYFORMATVERSIONS attributes of the EXT-X-KEY 1522 tag. 1524 o The EXT-X-MAP tag. 1526 Clients and servers MUST implement protocol version 6 or higher to 1527 use: 1529 o The EXT-X-MAP tag in a Media playlist that does not contain EXT-X- 1530 I-FRAMES-ONLY. 1532 The PROGRAM-ID attribute of the EXT-X-STREAM-INF and the EXT-X-I- 1533 FRAME-STREAM-INF tags has been removed in protocol version 6. 1535 8. Examples 1537 8.1. Introduction 1539 This section contains several example Playlist files. 1541 8.2. Simple Media Playlist file 1543 #EXTM3U 1544 #EXT-X-VERSION:3 1545 #EXT-X-TARGETDURATION:5220 1546 #EXTINF:5219.2, 1547 http://media.example.com/entire.ts 1548 #EXT-X-ENDLIST 1550 8.3. Live Media Playlist, using HTTPS 1552 #EXTM3U 1553 #EXT-X-VERSION:3 1554 #EXT-X-TARGETDURATION:8 1555 #EXT-X-MEDIA-SEQUENCE:2680 1557 #EXTINF:7.975, 1558 https://priv.example.com/fileSequence2680.ts 1559 #EXTINF:7.941, 1560 https://priv.example.com/fileSequence2681.ts 1561 #EXTINF:7.975, 1562 https://priv.example.com/fileSequence2682.ts 1564 8.4. Playlist file with encrypted media segments 1566 #EXTM3U 1567 #EXT-X-VERSION:3 1568 #EXT-X-MEDIA-SEQUENCE:7794 1569 #EXT-X-TARGETDURATION:15 1571 #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=52" 1573 #EXTINF:2.833, 1574 http://media.example.com/fileSequence52-A.ts 1575 #EXTINF:15.0, 1576 http://media.example.com/fileSequence52-B.ts 1577 #EXTINF:13.333, 1578 http://media.example.com/fileSequence52-C.ts 1580 #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=53" 1582 #EXTINF:15.0, 1583 http://media.example.com/fileSequence53-A.ts 1585 8.5. Master Playlist file 1587 #EXTM3U 1588 #EXT-X-STREAM-INF:BANDWIDTH=1280000 1589 http://example.com/low.m3u8 1590 #EXT-X-STREAM-INF:BANDWIDTH=2560000 1591 http://example.com/mid.m3u8 1592 #EXT-X-STREAM-INF:BANDWIDTH=7680000 1593 http://example.com/hi.m3u8 1594 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5" 1595 http://example.com/audio-only.m3u8 1597 8.6. Master Playlist with I-Frames 1599 #EXTM3U 1600 #EXT-X-STREAM-INF:BANDWIDTH=1280000 1601 low/audio-video.m3u8 1602 #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=86000,URI="low/iframe.m3u8" 1603 #EXT-X-STREAM-INF:BANDWIDTH=2560000 1604 mid/audio-video.m3u8 1605 #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=150000,URI="mid/iframe.m3u8" 1606 #EXT-X-STREAM-INF:BANDWIDTH=7680000 1607 hi/audio-video.m3u8 1608 #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=550000,URI="hi/iframe.m3u8" 1609 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5" 1610 audio-only.m3u8 1612 8.7. Master Playlist with Alternative audio 1614 In this example, the CODECS attributes have been condensed for space. 1615 A '\' is used to indicate that the tag continues on the following 1616 line with whitespace removed: 1618 #EXTM3U 1619 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="English", \ 1620 DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en", \ 1621 URI="main/english-audio.m3u8" 1622 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Deutsch", \ 1623 DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="de", \ 1624 URI="main/german-audio.m3u8" 1625 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Commentary", \ 1626 DEFAULT=NO,AUTOSELECT=NO,URI="commentary/audio-only.m3u8" 1627 #EXT-X-STREAM-INF:BANDWIDTH=1280000,CODECS="...",AUDIO="aac" 1628 low/video-only.m3u8 1629 #EXT-X-STREAM-INF:BANDWIDTH=2560000,CODECS="...",AUDIO="aac" 1630 mid/video-only.m3u8 1631 #EXT-X-STREAM-INF:BANDWIDTH=7680000,CODECS="...",AUDIO="aac" 1632 hi/video-only.m3u8 1633 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5",AUDIO="aac" 1634 main/english-audio.m3u8 1636 8.8. Master Playlist with Alternative video 1638 In this example, the CODECS attributes have been condensed for space. 1639 A '\' is used to indicate that the tag continues on the following 1640 line with whitespace removed: 1642 #EXTM3U 1643 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="low",NAME="Main", \ 1644 DEFAULT=YES,URI="low/main/audio-video.m3u8" 1645 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="low",NAME="Centerfield", \ 1646 DEFAULT=NO,URI="low/centerfield/audio-video.m3u8" 1647 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="low",NAME="Dugout", \ 1648 DEFAULT=NO,URI="low/dugout/audio-video.m3u8" 1650 #EXT-X-STREAM-INF:BANDWIDTH=1280000,CODECS="...",VIDEO="low" 1651 low/main/audio-video.m3u8 1653 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="mid",NAME="Main", \ 1654 DEFAULT=YES,URI="mid/main/audio-video.m3u8" 1655 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="mid",NAME="Centerfield", \ 1656 DEFAULT=NO,URI="mid/centerfield/audio-video.m3u8" 1657 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="mid",NAME="Dugout", \ 1658 DEFAULT=NO,URI="mid/dugout/audio-video.m3u8" 1660 #EXT-X-STREAM-INF:BANDWIDTH=2560000,CODECS="...",VIDEO="mid" 1661 mid/main/audio-video.m3u8 1663 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="hi",NAME="Main", \ 1664 DEFAULT=YES,URI="hi/main/audio-video.m3u8" 1665 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="hi",NAME="Centerfield", \ 1666 DEFAULT=NO,URI="hi/centerfield/audio-video.m3u8" 1667 #EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="hi",NAME="Dugout", \ 1668 DEFAULT=NO,URI="hi/dugout/audio-video.m3u8" 1670 #EXT-X-STREAM-INF:BANDWIDTH=7680000,CODECS="...",VIDEO="hi" 1671 hi/main/audio-video.m3u8 1673 #EXT-X-STREAM-INF:BANDWIDTH=65000,CODECS="mp4a.40.5" 1674 main/audio-only.m3u8 1676 9. Contributors 1678 Significant contributions to the design of this protocol were made by 1679 Jim Batson, David Biderman, Bill May, Roger Pantos, Alan Tseng, and 1680 Eryk Vershen. 1682 10. IANA Considerations 1684 This memo requests that the following MIME type [RFC2046] be 1685 registered with the IANA: 1687 Type name: "application" 1688 Subtype name: "vnd.apple.mpegurl" 1690 Required parameters: (none) 1692 Optional parameters: (none) 1694 Encoding considerations: encoded as text. See Section 3 for more 1695 information. 1697 Security considerations: See Section 11. 1699 Compression: this media type does not employ compression. 1701 Interoperability considerations: There are no byte-ordering issues, 1702 since files are 7- or 8-bit text. Applications could encounter 1703 unrecognized tags, which SHOULD be ignored. 1705 Published specification: see Section 3. 1707 Applications that use this media type: Multimedia applications such 1708 as the iPhone media player in iOS 3.0 and later and QuickTime Player 1709 in Mac OS X version 10.6 and later. 1711 Additional information: files begin with the magic number #EXTM3U. 1712 Filenames normally end with .m3u8 or .m3u (see Section 3). No 1713 Macintosh file type codes have been registered. 1715 Person & email address to contact for further information: David 1716 Singer, singer AT apple.com. 1718 Intended usage: LIMITED USE 1720 Restrictions on usage: (none) 1722 Author: Roger Pantos 1724 Change Controller: David Singer 1726 11. Security Considerations 1728 Since the protocol generally uses HTTP to transfer data, most of the 1729 same security considerations apply. See section 15 of RFC 2616 1730 [RFC2616]. 1732 Media file parsers are typically subject to "fuzzing" attacks. 1733 Clients SHOULD take care when parsing segments received from a server 1734 that non-compliant segments are rejected. 1736 Playlist files contain URIs, which clients will use to make network 1737 requests of arbitrary entities. Clients SHOULD range-check responses 1738 to prevent buffer overflows. See also the Security Considerations 1739 section of RFC 3986 [RFC3986]. 1741 Clients SHOULD load resources identified by URI lazily to avoid 1742 contributing to denial-of-service attacks. 1744 HTTP requests often include session state ("cookies"), which may 1745 contain private user data. Implementations MUST follow cookie 1746 restriction and expiry rules specified by RFC 6265 [RFC6265]. See 1747 also the Security Considerations section of RFC 6265, and RFC 2964 1748 [RFC2964]. 1750 Encryption keys are specified by URI. The delivery of these keys 1751 SHOULD be secured by a mechanism such as HTTP over TLS [RFC5246] 1752 (formerly SSL) in conjunction with a secure realm or a session 1753 cookie. 1755 12. References 1757 12.1. Normative References 1759 [AC_3] Advanced Television Systems Committee, "ATSC Standard: 1760 A/52:2010: Digital Audio Compression (AC-3) (E-AC-3) 1761 Standard", November 2010, 1762 <http://www.atsc.org/cms/standards/a_52-2010.pdf>. 1764 [AES_128] U.S. Department of Commerce/National Institute of 1765 Standards and Technology, "Advanced Encryption Standard 1766 (AES), FIPS PUB 197", November 2001, <http:// 1767 csrc.nist.gov/publications/fips/fips197/fips-197.pdf>. 1769 [H_264] International Telecommunications Union, "Advanced video 1770 coding for generic audiovisual services", January 2012, 1771 <http://www.itu.int/rec/T-REC-H.264>. 1773 [ISO_11172] 1774 International Organization for Standardization, "ISO/IEC 1775 International Standard 11172-1; Coding of moving pictures 1776 and associated audio for digital storage media -- Part 1: 1777 Systems", 1993, 1778 <http://www.iso.org/iso/catalogue_detail?csnumber=19180>. 1780 [ISO_13818] 1781 International Organization for Standardization, "ISO/IEC 1782 International Standard 13818; Generic coding of moving 1783 pictures and associated audio information", October 2007, 1784 <http://www.iso.org/iso/catalogue_detail?csnumber=44169>. 1786 [ISO_14496] 1787 International Organization for Standardization, "ISO/IEC 1788 14496-3:2009 Information technology -- Coding of audio- 1789 visual objects -- Part 3: Audio", 2009, 1790 <http://www.iso.org/iso/catalogue_detail?csnumber=53943>. 1792 [ISO_8601] 1793 International Organization for Standardization, "ISO/IEC 1794 International Standard 8601:2004; Data elements and 1795 interchange formats -- Information interchange -- 1796 Representation of dates and times", December 2004, 1797 <http://www.iso.org/iso/catalogue_detail?csnumber=40874>. 1799 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1800 Extensions (MIME) Part Two: Media Types", RFC 2046, 1801 November 1996. 1803 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1804 Requirement Levels", BCP 14, RFC 2119, March 1997. 1806 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1807 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1808 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1810 [RFC2964] Moore, K. and N. Freed, "Use of HTTP State Management", 1811 BCP 44, RFC 2964, October 2000. 1813 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 1814 10646", STD 63, RFC 3629, November 2003. 1816 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1817 Resource Identifier (URI): Generic Syntax", STD 66, 1818 RFC 3986, January 2005. 1820 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1821 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1823 [RFC5646] Phillips, A. and M. Davis, "Tags for Identifying 1824 Languages", BCP 47, RFC 5646, September 2009. 1826 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 1827 RFC 5652, September 2009. 1829 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 1830 April 2011. 1832 [RFC6381] Gellens, R., Singer, D., and P. Frojdh, "The 'Codecs' and 1833 'Profiles' Parameters for "Bucket" Media Types", RFC 6381, 1834 August 2011. 1836 [US_ASCII] 1837 American National Standards Institute, "ANSI X3.4-1986, 1838 Information Systems -- Coded Character Sets 7-Bit American 1839 National Standard Code for Information Interchange (7-Bit 1840 ASCII)", December 1986. 1842 [WebVTT] World Wide Web Consortium (W3C), "WebVTT: The Web Video 1843 Text Tracks Format", July 2013, 1844 <http://dev.w3.org/html5/webvtt/>. 1846 12.2. Informative References 1848 [ID3] ID3.org, "The ID3 audio file data tagging format", 1849 <http://www.id3.org/Developer_Information>. 1851 [M3U] Nullsoft, Inc., "The M3U Playlist format, originally 1852 invented for the Winamp media player", 1853 <http://wikipedia.org/wiki/M3U>. 1855 [SampleEnc] 1856 Apple Inc., "MPEG-2 Stream Encryption Format for HTTP Live 1857 Streaming", <https://developer.apple.com/library/ios/ 1858 documentation/AudioVideo/Conceptual/ 1859 HLS_Sample_Encryption/>. 1861 [UTI] Apple Inc., "Uniform Type Identifier", <http:// 1862 developer.apple.com/library/ios/#documentation/general/ 1863 conceptual/DevPedia-CocoaCore/UniformTypeIdentifier.html>. 1865 Authors' Addresses 1867 Roger Pantos (editor) 1868 Apple Inc. 1869 Cupertino, California 1870 United States 1872 Email: http-live-streaming-review@group.apple.com 1873 William May, Jr. 1874 Apple Inc. 1875 Cupertino, California 1876 United States 1878 Email: http-live-streaming-review@group.apple.com