idnits 2.17.1 draft-ietf-codec-oggopus-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 3 instances of too long lines in the document, the longest one being 4 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (May 24, 2013) is 3983 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 3533 -- Possible downref: Non-RFC (?) normative reference: ref. 'EBU-R128' Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 codec T.B. Terriberry 3 Internet-Draft Mozilla Corporation 4 Intended status: Standards Track R. Lee 5 Expires: November 23, 2013 Voicetronix 6 R. Giles 7 Mozilla Corporation 8 May 24, 2013 10 Ogg Encapsulation for the Opus Audio Codec 11 draft-ietf-codec-oggopus-01 13 Abstract 15 This document defines the Ogg encapsulation for the Opus interactive 16 speech and audio codec. This allows data encoded in the Opus format 17 to be stored in an Ogg logical bitstream. Ogg encapsulation provides 18 Opus with a long-term storage format supporting all of the essential 19 features, including metadata, fast and accurate seeking, corruption 20 detection, recapture after errors, low overhead, and the ability to 21 multiplex Opus with other codecs (including video) with minimal 22 buffering. It also provides a live streamable format, capable of 23 delivery over a reliable stream-oriented transport, without requiring 24 all the data, or even the total length of the data, up-front, in a 25 form that is identical to the on-disk storage format. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on November 23, 2013. 44 Copyright Notice 46 Copyright (c) 2013 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 62 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 63 3. Packet Organization . . . . . . . . . . . . . . . . . . . . . 3 64 4. Granule Position . . . . . . . . . . . . . . . . . . . . . . . 4 65 4.1. Pre-skip . . . . . . . . . . . . . . . . . . . . . . . . . 5 66 4.2. PCM Sample Position . . . . . . . . . . . . . . . . . . . 6 67 4.3. End Trimming . . . . . . . . . . . . . . . . . . . . . . . 6 68 4.4. Restrictions on the Initial Granule Position . . . . . . . 7 69 4.5. Seeking and Pre-roll . . . . . . . . . . . . . . . . . . . 8 70 5. Header Packets . . . . . . . . . . . . . . . . . . . . . . . . 8 71 5.1. Identification Header . . . . . . . . . . . . . . . . . . 8 72 5.1.1. Channel Mapping . . . . . . . . . . . . . . . . . . . 12 73 5.1.1.1. Channel Mapping Family 0 . . . . . . . . . . . . . 13 74 5.1.1.2. Channel Mapping Family 1 . . . . . . . . . . . . . 14 75 5.1.1.3. Channel Mapping Family 255 . . . . . . . . . . . . 14 76 5.1.1.4. Undefined Channel Mappings . . . . . . . . . . . . 15 77 5.1.1.5. Downmixing . . . . . . . . . . . . . . . . . . . . 15 78 5.2. Comment Header . . . . . . . . . . . . . . . . . . . . . . 17 79 6. Packet Size Limits . . . . . . . . . . . . . . . . . . . . . . 19 80 7. Implementation Status . . . . . . . . . . . . . . . . . . . . 20 81 8. Security Considerations . . . . . . . . . . . . . . . . . . . 20 82 9. Content Type . . . . . . . . . . . . . . . . . . . . . . . . . 21 83 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 84 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 21 85 12. Copying Conditions . . . . . . . . . . . . . . . . . . . . . . 21 86 13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22 87 13.1. Normative References . . . . . . . . . . . . . . . . . . 22 88 13.2. Informative References . . . . . . . . . . . . . . . . . 22 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 23 91 1. Introduction 93 The IETF Opus codec is a low-latency audio codec optimized for both 94 voice and general-purpose audio. See [RFC6716] for technical 95 details. This document defines the encapsulation of Opus in a 96 continuous, logical Ogg bitstream [RFC3533]. 98 Ogg bitstreams are made up of a series of 'pages', each of which 99 contains data from one or more 'packets'. Pages are the fundamental 100 unit of multiplexing in an Ogg stream. Each page is associated with 101 a particular logical stream and contains a capture pattern and 102 checksum, flags to mark the beginning and end of the logical stream, 103 and a 'granule position' that represents an absolute position in the 104 stream, to aid seeking. A single page can contain up to 65,025 105 octets of packet data from up to 255 different packets. Packets may 106 be split arbitrarily across pages, and continued from one page to the 107 next (allowing packets much larger than would fit on a single page). 108 Each page contains 'lacing values' that indicate how the data is 109 partitioned into packets, allowing a demuxer to recover the packet 110 boundaries without examining the encoded data. A packet is said to 111 'complete' on a page when the page contains the final lacing value 112 corresponding to that packet. 114 This encapsulation defines the required contents of the packet data, 115 including the necessary headers, the organization of those packets 116 into a logical stream, and the interpretation of the codec-specific 117 granule position field. It does not attempt to describe or specify 118 the existing Ogg container format. Readers unfamiliar with the basic 119 concepts mentioned above are encouraged to review the details in 120 [RFC3533]. 122 2. Terminology 124 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 125 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 126 document are to be interpreted as described in [RFC2119]. 128 Implementations that fail to satisfy one or more "MUST" requirements 129 are considered non-compliant. Implementations that satisfy all 130 "MUST" requirements, but fail to satisfy one or more "SHOULD" 131 requirements are said to be "conditionally compliant". All other 132 implementations are "unconditionally compliant". 134 3. Packet Organization 136 An Opus stream is organized as follows. 138 There are two mandatory header packets. The granule position of the 139 pages on which these packets complete MUST be zero. 141 The first packet in the logical Ogg bitstream MUST contain the 142 identification (ID) header, which uniquely identifies a stream as 143 Opus audio. The format of this header is defined in Section 5.1. It 144 MUST be placed alone (without any other packet data) on the first 145 page of the logical Ogg bitstream, and must complete on that page. 146 This page MUST have its 'beginning of stream' flag set. 148 The second packet in the logical Ogg bitstream MUST contain the 149 comment header, which contains user-supplied metadata. The format of 150 this header is defined in Section 5.2. It MAY span one or more 151 pages, beginning on the second page of the logical stream. However 152 many pages it spans, the comment header packet MUST finish the page 153 on which it completes. 155 All subsequent pages are audio data pages, and the Ogg packets they 156 contain are audio data packets. Each audio data packet contains one 157 Opus packet for each of N different streams, where N is typically one 158 for mono or stereo, but may be greater than one for, e.g., 159 multichannel audio. The value N is specified in the ID header (see 160 Section 5.1.1), and is fixed over the entire length of the logical 161 Ogg bitstream. 163 The first N-1 Opus packets, if any, are packed one after another into 164 the Ogg packet, using the self-delimiting framing from Appendix B of 165 [RFC6716]. The remaining Opus packet is packed at the end of the Ogg 166 packet using the regular, undelimited framing from Section 3 of 167 [RFC6716]. All of the Opus packets in a single Ogg packet MUST be 168 constrained to have the same duration. The duration and coding modes 169 of each Opus packet are contained in the TOC (table of contents) 170 sequence in the first few bytes. A decoder SHOULD treat any Opus 171 packet whose duration is different from that of the first Opus packet 172 in an Ogg packet as if it were an Opus packet with an illegal TOC 173 sequence. 175 The first audio data page SHOULD NOT have the 'continued packet' flag 176 set (which would indicate the first audio data packet is continued 177 from a previous page). Packets MUST be placed into Ogg pages in 178 order until the end of stream. Audio packets MAY span page 179 boundaries. A decoder MUST treat a zero-octet audio data packet as 180 if it were an Opus packet with an illegal TOC sequence. The last 181 page SHOULD have the 'end of stream' flag set, but implementations 182 should be prepared to deal with truncated streams that do not have a 183 page marked 'end of stream'. The final packet on the last page 184 SHOULD NOT be a continued packet, i.e., the final lacing value should 185 be less than 255. There MUST NOT be any more pages in an Opus 186 logical bitstream after a page marked 'end of stream'. 188 4. Granule Position 190 The granule position of an audio data page encodes the total number 191 of PCM samples in the stream up to and including the last fully- 192 decodable sample from the last packet completed on that page. A page 193 that is entirely spanned by a single packet (that completes on a 194 subsequent page) has no granule position, and the granule position 195 field MUST be set to the special value '-1' in two's complement. 197 The granule position of an audio data page is in units of PCM audio 198 samples at a fixed rate of 48 kHz (per channel; a stereo stream's 199 granule position does not increment at twice the speed of a mono 200 stream). It is possible to run an Opus decoder at other sampling 201 rates, but the value in the granule position field always counts 202 samples assuming a 48 kHz decoding rate, and the rest of this 203 specification makes the same assumption. 205 The duration of an Opus packet may be any multiple of 2.5 ms, up to a 206 maximum of 120 ms. This duration is encoded in the TOC sequence at 207 the beginning of each packet. The number of samples returned by a 208 decoder corresponds to this duration exactly, even for the first few 209 packets. For example, a 20 ms packet fed to a decoder running at 210 48 kHz will always return 960 samples. A demuxer can parse the TOC 211 sequence at the beginning of each Ogg packet to work backwards or 212 forwards from a packet with a known granule position (i.e., the last 213 packet completed on some page) in order to assign granule positions 214 to every packet, or even every individual sample. The one exception 215 is the last page in the stream, as described below. 217 All other pages with completed packets after the first MUST have a 218 granule position equal to the number of samples contained in packets 219 that complete on that page plus the granule position of the most 220 recent page with completed packets. This guarantees that a demuxer 221 can assign individual packets the same granule position when working 222 forwards as when working backwards. For this to work, there cannot 223 be any gaps. In order to support capturing a stream that uses 224 discontinuous transmission (DTX), an encoder SHOULD emit packets that 225 explicitly request the use of Packet Loss Concealment (PLC) (i.e., 226 with a frame length of 0, as defined in Section 3.2.1 of [RFC6716]) 227 in place of the packets that were not transmitted. 229 4.1. Pre-skip 231 There is some amount of latency introduced during the decoding 232 process, to allow for overlap in the MDCT modes, stereo mixing in the 233 LP modes, and resampling, and the encoder will introduce even more 234 latency (though the exact amount is not specified). Therefore, the 235 first few samples produced by the decoder do not correspond to real 236 input audio, but are instead composed of padding inserted by the 237 encoder to compensate for this latency. These samples need to be 238 stored and decoded, as Opus is an asymptotically convergent 239 predictive codec, meaning the decoded contents of each frame depend 240 on the recent history of decoder inputs. However, a decoder will 241 want to skip these samples after decoding them. 243 A 'pre-skip' field in the ID header (see Section 5.1) signals the 244 number of samples which SHOULD be skipped (decoded but discarded) at 245 the beginning of the stream. This provides sufficient history to the 246 decoder so that it has already converged before the stream's output 247 begins. It may also be used to perform sample-accurate cropping of 248 existing encoded streams. This amount need not be a multiple of 249 2.5 ms, may be smaller than a single packet, or may span the contents 250 of several packets. 252 4.2. PCM Sample Position 254 The PCM sample position is determined from the granule position using 255 the formula 257 'PCM sample position' = 'granule position' - 'pre-skip' . 259 For example, if the granule position of the first audio data page is 260 59,971, and the pre-skip is 11,971, then the PCM sample position of 261 the last decoded sample from that page is 48,000. This can be 262 converted into a playback time using the formula 264 'PCM sample position' 265 'playback time' = --------------------- . 266 48000.0 268 The initial PCM sample position before any samples are played is 269 normally '0'. In this case, the PCM sample position of the first 270 audio sample to be played starts at '1', because it marks the time on 271 the clock -after- that sample has been played, and a stream that is 272 exactly one second long has a final PCM sample position of '48000', 273 as in the example here. 275 Vorbis streams use a granule position smaller than the number of 276 audio samples contained in the first audio data page to indicate that 277 some of those samples must be trimmed from the output (see [vorbis- 278 trim]). However, to do so, Vorbis requires that the first audio data 279 page contains exactly two packets, in order to allow the decoder to 280 perform PCM position adjustments before needing to return any PCM 281 data. Opus uses the pre-skip mechanism for this purpose instead, 282 since the encoder may introduce more than a single packet's worth of 283 latency, and since very large packets in streams with a very large 284 number of channels might not fit on a single page. 286 4.3. End Trimming 287 The page with the 'end of stream' flag set MAY have a granule 288 position that indicates the page contains less audio data than would 289 normally be returned by decoding up through the final packet. This 290 is used to end the stream somewhere other than an even frame 291 boundary. The granule position of the most recent audio data page 292 with completed packets is used to make this determination, or '0' is 293 used if there were no previous audio data pages with a completed 294 packet. The difference between these granule positions indicates how 295 many samples to keep after decoding the packets that completed on the 296 final page. The remaining samples are discarded. The number of 297 discarded samples SHOULD be no larger than the number decoded from 298 the last packet. 300 4.4. Restrictions on the Initial Granule Position 302 The granule position of the first audio data page with a completed 303 packet MAY be larger than the number of samples contained in packets 304 that complete on that page, however it MUST NOT be smaller, unless 305 that page has the 'end of stream' flag set. Allowing a granule 306 position larger than the number of samples allows the beginning of a 307 stream to be cropped or a live stream to be joined without rewriting 308 the granule position of all the remaining pages. This means that the 309 PCM sample position just before the first sample to be played may be 310 larger than '0'. Synchronization when multiplexing with other 311 logical streams still uses the PCM sample position relative to '0' to 312 compute sample times. This does not affect the behavior of pre-skip: 313 exactly 'pre-skip' samples should be skipped from the beginning of 314 the decoded output, even if the initial PCM sample position is 315 greater than zero. 317 On the other hand, a granule position that is smaller than the number 318 of decoded samples prevents a demuxer from working backwards to 319 assign each packet or each individual sample a valid granule 320 position, since granule positions must be non-negative. A decoder 321 MUST reject as invalid any stream where the granule position is 322 smaller than the number of samples contained in packets that complete 323 on the first audio data page with a completed packet, unless that 324 page has the 'end of stream' flag set. It MAY defer this action 325 until it decodes the last packet completed on that page. 327 If that page has the 'end of stream' flag set, a demuxer MUST reject 328 as invalid any stream where its granule position is smaller than the 329 'pre-skip' amount. This would indicate that more samples should be 330 skipped from the initial decoded output than exist in the stream. If 331 the granule position is smaller than the number of decoded samples 332 produced by the packets that complete on that page, then a demuxer 333 MUST use an initial granule position of '0', and can work forwards 334 from '0' to timestamp individual packets. If the granule position is 335 larger than the number of decoded samples available, then the demuxer 336 MUST still work backwards as described above, even if the 'end of 337 stream' flag is set, to determine the initial granule position, and 338 thus the initial PCM sample position. Both of these will be greater 339 than '0' in this case. 341 4.5. Seeking and Pre-roll 343 Seeking in Ogg files is best performed using a bisection search for a 344 page whose granule position corresponds to a PCM position at or 345 before the seek target. With appropriately weighted bisection, 346 accurate seeking can be performed with just three or four bisections 347 even in multi-gigabyte files. See [seeking] for general 348 implementation guidance. 350 When seeking within an Ogg Opus stream, the decoder SHOULD start 351 decoding (and discarding the output) at least 3840 samples (80 ms) 352 prior to the seek target in order to ensure that the output audio is 353 correct by the time it reaches the seek target. This 'pre-roll' is 354 separate from, and unrelated to, the 'pre-skip' used at the beginning 355 of the stream. If the point 80 ms prior to the seek target comes 356 before the initial PCM sample position, the decoder SHOULD start 357 decoding from the beginning of the stream, applying pre-skip as 358 normal, regardless of whether the pre-skip is larger or smaller than 359 80 ms, and then continue to discard the samples required to reach the 360 seek target (if any). 362 5. Header Packets 364 An Opus stream contains exactly two mandatory header packets: an 365 identification header and a comment header. 367 5.1. Identification Header 369 0 1 2 3 370 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 372 | 'O' | 'p' | 'u' | 's' | 373 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 374 | 'H' | 'e' | 'a' | 'd' | 375 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 376 | Version = 1 | Channel Count | Pre-skip | 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 378 | Input Sample Rate (Hz) | 379 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 380 | Output Gain (Q7.8 in dB) | Mapping Family| | 381 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : 382 | | 383 : Optional Channel Mapping Table... : 384 | | 385 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 387 Figure 1: ID Header Packet 389 The fields in the identification (ID) header have the following 390 meaning: 392 1. *Magic Signature*: 394 This is an 8-octet (64-bit) field that allows codec 395 identification and is human-readable. It contains, in order, the 396 magic numbers: 398 0x4F 'O' 400 0x70 'p' 402 0x75 'u' 404 0x73 's' 406 0x48 'H' 408 0x65 'e' 410 0x61 'a' 412 0x64 'd' 414 Starting with "Op" helps distinguish it from audio data packets, as 415 this is an invalid TOC sequence. 417 2. *Version* (8 bits, unsigned): 419 The version number MUST always be '1' for this version of the 420 encapsulation specification. Implementations SHOULD treat 421 streams where the upper four bits of the version number match 422 that of a recognized specification as backwards-compatible with 423 that specification. That is, the version number can be split 424 into "major" and "minor" version sub-fields, with changes to the 425 "minor" sub-field (in the lower four bits) signaling compatible 426 changes. For example, a decoder implementing this specification 427 SHOULD accept any stream with a version number of '15' or less, 428 and SHOULD assume any stream with a version number '16' or 429 greater is incompatible. The initial version '1' was chosen to 430 keep implementations from relying on this octet as a null 431 terminator for the "OpusHead" string. 433 3. *Output Channel Count* 'C' (8 bits, unsigned): 435 This is the number of output channels. This might be different 436 than the number of encoded channels, which can change on a 437 packet-by-packet basis. This value MUST NOT be zero. The 438 maximum allowable value depends on the channel mapping family, 439 and might be as large as 255. See Section 5.1.1 for details. 441 4. *Pre-skip* (16 bits, unsigned, little endian): 443 This is the number of samples (at 48 kHz) to discard from the 444 decoder output when starting playback, and also the number to 445 subtract from a page's granule position to calculate its PCM 446 sample position. When cropping the beginning of existing Ogg 447 Opus streams, a pre-skip of at least 3,840 samples (80 ms) is 448 RECOMMENDED to ensure complete convergence in the decoder. 450 5. *Input Sample Rate* (32 bits, unsigned, little endian): 452 This field is -not- the sample rate to use for playback of the 453 encoded data. 455 Opus has a handful of coding modes, with internal audio 456 bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream 457 may have a different audio bandwidth. Regardless of the audio 458 bandwidth, the reference decoder supports decoding any stream at 459 a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample 460 rate of the encoder input is not preserved by the lossy 461 compression. 463 An Ogg Opus player SHOULD select the playback sample rate 464 according to the following procedure: 466 1. If the hardware supports 48 kHz playback, decode at 48 kHz. 468 2. Otherwise, if the hardware's highest available sample rate is 469 a supported rate, decode at this sample rate. 471 3. Otherwise, if the hardware's highest available sample rate is 472 less than 48 kHz, decode at the highest supported rate above 473 this and resample. 475 4. Otherwise, decode at 48 kHz and resample. 477 However, the 'Input Sample Rate' field allows the encoder to pass the 478 sample rate of the original input stream as metadata. This may be 479 useful when the user requires the output sample rate to match the 480 input sample rate. For example, a non-player decoder writing PCM 481 format samples to disk might choose to resample the output audio back 482 to the original input sample rate to reduce surprise to the user, who 483 might reasonably expect to get back a file with the same sample rate 484 as the one they fed to the encoder. 486 A value of zero indicates 'unspecified'. Encoders SHOULD write the 487 actual input sample rate or zero, but decoder implementations which 488 do something with this field SHOULD take care to behave sanely if 489 given crazy values (e.g., do not actually upsample the output to 10 490 MHz if requested). 492 6. *Output Gain* (16 bits, signed, little endian): 494 This is a gain to be applied by the decoder. It is 20*log10 of 495 the factor to scale the decoder output by to achieve the desired 496 playback volume, stored in a 16-bit, signed, two's complement 497 fixed-point value with 8 fractional bits (i.e., Q7.8). To apply 498 the gain, a decoder could use 500 sample *= pow(10, output_gain/(20.0*256)) , 502 where output_gain is the raw 16-bit value from the header. 504 Virtually all players and media frameworks should apply it by 505 default. If a player chooses to apply any volume adjustment or gain 506 modification, such as the R128_TRACK_GAIN (see Section 5.2) or a 507 user-facing volume knob, the adjustment MUST be applied in addition 508 to this output gain in order to achieve playback at the desired 509 volume. 511 An encoder SHOULD set this field to zero, and instead apply any gain 512 prior to encoding, when this is possible and does not conflict with 513 the user's wishes. The output gain should only be nonzero when the 514 gain is adjusted after encoding, or when the user wishes to adjust 515 the gain for playback while preserving the ability to recover the 516 original signal amplitude. 518 Although the output gain has enormous range (+/- 128 dB, enough to 519 amplify inaudible sounds to the threshold of physical pain), most 520 applications can only reasonably use a small portion of this range 521 around zero. The large range serves in part to ensure that gain can 522 always be losslessly transferred between OpusHead and R128_TRACK_GAIN 523 (see below) without saturating. 525 7. *Channel Mapping Family* (8 bits, unsigned): 527 This octet indicates the order and semantic meaning of the 528 various channels encoded in each Ogg packet. 530 Each possible value of this octet indicates a mapping family, 531 which defines a set of allowed channel counts, and the ordered 532 set of channel names for each allowed channel count. The details 533 are described in Section 5.1.1. 535 8. *Channel Mapping Table*: This table defines the mapping from 536 encoded streams to output channels. It is omitted when the 537 channel mapping family is 0, but REQUIRED otherwise. Its 538 contents are specified in Section 5.1.1. 540 All fields in the ID headers are REQUIRED, except for the channel 541 mapping table, which is omitted when the channel mapping family is 0. 542 Implementations SHOULD reject ID headers which do not contain enough 543 data for these fields, even if they contain a valid Magic Signature. 544 Future versions of this specification, even backwards-compatible 545 versions, might include additional fields in the ID header. If an ID 546 header has a compatible major version, but a larger minor version, an 547 implementation MUST NOT reject it for containing additional data not 548 specified here. However, implementations MAY reject streams in which 549 the ID header does not complete on the first page. 551 5.1.1. Channel Mapping 553 An Ogg Opus stream allows mapping one number of Opus streams (N) to a 554 possibly larger number of decoded channels (M+N) to yet another 555 number of output channels (C), which might be larger or smaller than 556 the number of decoded channels. The order and meaning of these 557 channels are defined by a channel mapping, which consists of the 558 'channel mapping family' octet and, for channel mapping families 559 other than family 0, a channel mapping table, as illustrated in 560 Figure 2. 562 0 1 2 3 563 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 564 +-+-+-+-+-+-+-+-+ 565 | Stream Count | 566 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 567 | Coupled Count | Channel Mapping... : 568 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 570 Figure 2: Channel Mapping Table 572 The fields in the channel mapping table have the following meaning: 574 1. *Stream Count* 'N' (8 bits, unsigned): 576 This is the total number of streams encoded in each Ogg packet. 577 This value is required to correctly parse the packed Opus packets 578 inside an Ogg packet, as described in Section 3. This value MUST 579 NOT be zero, as without at least one Opus packet with a valid TOC 580 sequence, a demuxer cannot recover the duration of an Ogg packet. 582 For channel mapping family 0, this value defaults to 1, and is 583 not coded. 585 2. *Coupled Stream Count* 'M' (8 bits, unsigned): This is the number 586 of streams whose decoders should be configured to produce two 587 channels. This MUST be no larger than the total number of 588 streams, N. 590 Each packet in an Opus stream has an internal channel count of 1 591 or 2, which can change from packet to packet. This is selected 592 by the encoder depending on the bitrate and the audio being 593 encoded. The original channel count of the encoder input is not 594 preserved by the lossy compression. 596 Regardless of the internal channel count, any Opus stream can be 597 decoded as mono (a single channel) or stereo (two channels) by 598 appropriate initialization of the decoder. The 'coupled stream 599 count' field indicates that the first M Opus decoders are to be 600 initialized in stereo mode, and the remaining N-M decoders are to 601 be initialized in mono mode. The total number of decoded 602 channels, (M+N), MUST be no larger than 255, as there is no way 603 to index more channels than that in the channel mapping. 605 For channel mapping family 0, this value defaults to C-1 (i.e., 0 606 for mono and 1 for stereo), and is not coded. 608 3. *Channel Mapping* (8*C bits): This contains one octet per output 609 channel, indicating which decoded channel should be used for each 610 one. Let 'index' be the value of this octet for a particular 611 output channel. This value MUST either be smaller than (M+N), or 612 be the special value 255. If 'index' is less than 2*M, the 613 output MUST be taken from decoding stream ('index'/2) as stereo 614 and selecting the left channel if 'index' is even, and the right 615 channel if 'index' is odd. If 'index' is 2*M or larger, the 616 output MUST be taken from decoding stream ('index'-M) as mono. 617 If 'index' is 255, the corresponding output channel MUST contain 618 pure silence. 620 The number of output channels, C, is not constrained to match the 621 number of decoded channels (M+N). A single index value MAY 622 appear multiple times, i.e., the same decoded channel might be 623 mapped to multiple output channels. Some decoded channels might 624 not be assigned to any output channel, as well. 626 For channel mapping family 0, the first index defaults to 0, and 627 if C==2, the second index defaults to 1. Neither index is coded. 629 After producing the output channels, the channel mapping family 630 determines the semantic meaning of each one. Currently there are 631 three defined mapping families, although more may be added. 633 5.1.1.1. Channel Mapping Family 0 635 Allowed numbers of channels: 1 or 2. RTP mapping. 637 o 1 channel: monophonic (mono). 639 o 2 channels: stereo (left, right). 641 *Special mapping*: This channel mapping value also indicates that the 642 contents consists of a single Opus stream that is stereo if and only 643 if C==2, with stream index 0 mapped to output channel 0 (mono, or 644 left channel) and stream index 1 mapped to output channel 1 (right 645 channel) if stereo. When the 'channel mapping family' octet has this 646 value, the channel mapping table MUST be omitted from the ID header 647 packet. 649 5.1.1.2. Channel Mapping Family 1 651 Allowed numbers of channels: 1...8. Vorbis channel order. 653 Each channel is assigned to a speaker location in a conventional 654 surround configuration. Specific locations depend on the number of 655 channels, and are given below in order of the corresponding channel 656 indicies. 658 o 1 channel: monophonic (mono). 660 o 2 channels: stereo (left, right). 662 o 3 channels: linear surround (left, center, right) 664 o 4 channels: quadraphonic (front left, front right, rear left, 665 rear right). 667 o 5 channels: 5.0 surround (front left, front center, front right, 668 rear left, rear right). 670 o 6 channels: 5.1 surround (front left, front center, front right, 671 rear left, rear right, LFE). 673 o 7 channels: 6.1 surround (front left, front center, front right, 674 side left, side right, rear center, LFE). 676 o 8 channels: 7.1 surround (front left, front center, front right, 677 side left, side right, rear left, rear right, LFE) 679 This set of surround configurations and speaker location orderings is 680 the same as the one used by the Vorbis codec. [vorbis-mapping] The 681 ordering is different from the one used by the WAVE [wave- 682 multichannel] and FLAC [flac] formats, although the configurations 683 match, so correct ordering requires permutation of the output 684 channels when encoding from or decoding to those formats. 'LFE' here 685 refers to a Low Frequency Effects, often mapped to a subwoofer with 686 no particular spacial position. Implementations SHOULD identify 687 'side' or 'rear' speaker locations with 'surround' and 'back' as 688 appropriate when interfacing with audio formats or systems which 689 prefer that terminology. 691 5.1.1.3. Channel Mapping Family 255 693 Allowed numbers of channels: 1...255. No defined channel meaning. 695 Channels are unidentified. General-purpose players SHOULD NOT 696 attempt to play these streams, and offline decoders MAY deinterleave 697 the output into separate PCM files, one per channel. Decoders SHOULD 698 NOT produce output for channels mapped to stream index 255 (pure 699 silence) unless they have no other way to indicate the index of non- 700 silent channels. 702 5.1.1.4. Undefined Channel Mappings 704 The remaining channel mapping families (2...254) are reserved. A 705 decoder encountering a reserved channel mapping family value SHOULD 706 act as though the value is 255. 708 5.1.1.5. Downmixing 710 An Ogg Opus player MUST play any Ogg Opus stream with a channel 711 mapping family of 0 or 1, even if the number of channels does not 712 match the physically connected audio hardware. Players SHOULD 713 perform channel mixing to increase or reduce the number of channels 714 as needed. 716 Implementations MAY use the following matricies to implement 717 downmixing from multichannel files using Channel Mapping Family 1 718 (Section 5.1.1.2), which are known to give acceptable results for 719 stereo. Matricies for 3 and 4 channels are normalized so each 720 coefficent row sums to 1 to avoid clipping. For 5 or more channels 721 they are normalized to 2 as a compromize between clipping and dynamic 722 range reduction. 724 In these matricies the front left and front right channels are 725 generally passed through directly. When a surround channel is split 726 between both the left and right stereo channels, coefficients are 727 chosen so their squares sum to 1, which helps preserve the perceived 728 intensity. Rear channels are mixed more diffusely or attenuated to 729 maintain focus on the front channels. 731 Left output = ( 0.585786 * left + 0.414214 * center ) 732 Right output = ( 0.414214 * center + 0.585786 * right ) 734 Exact coefficient values are 1 and 1/sqrt(2), multiplied by 1/(1 + 1/ 735 sqrt(2)) for normalization. 737 Figure 3: Stereo downmix matrix for the linear surround channel mapping 739 / \ / \ / FL \ 740 | L output | | 0.422650 0.000000 0.366025 0.211325 | | FR | 741 | R output | = | 0.000000 0.422650 0.211325 0.366025 | | RL | 742 \ / \ / \ RR / 744 Exact coefficient values are 1, sqrt(3)/2 and 1/2, multiplied by 1/ 745 (1 + sqrt(3)/2 + 1/2) for normalization. 747 Figure 4: Stereo downmix matrix for the quadraphonic channel mapping 749 / FL \ 750 / \ / \ | FC | 751 | L | | 0.650802 0.460186 0.000000 0.563611 0.325401 | | FR | 752 | R | = | 0.000000 0.460186 0.650802 0.325401 0.563611 | | RL | 753 \ / \ / | RR | 754 \ / 756 Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, 757 multiplied by 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2) for normalization. 759 Figure 5: Stereo downmix matrix for the 5.0 surround mapping 761 /FL \ 762 / \ / \ |FC | 763 |L| | 0.529067 0.374107 0.000000 0.458186 0.264534 0.374107 | |FR | 764 |R| = | 0.000000 0.374107 0.529067 0.264534 0.458186 0.374107 | |RL | 765 \ / \ / |RR | 766 \LFE/ 768 Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, 769 multiplied by 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2 + 1/sqrt(2)) for 770 normalization. 772 Figure 6: Stereo downmix matrix for the 5.1 surround mapping 774 / \ 775 | 0.455310 0.321953 0.000000 0.394310 0.227655 0.278819 0.321953 | 776 | 0.000000 0.321953 0.455310 0.227655 0.394310 0.278819 0.321953 | 777 \ / 779 Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2, 1/2 and sqrt(3) 780 /2/sqrt(2), multiplied by 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2 + 781 sqrt(3)/2/sqrt(2) + 1/sqrt(2)) for normalization. The coeffients are 782 in the same order as in Section 5.1.1.2, and the matricies above. 784 Figure 7: Stereo downmix matrix for the 6.1 surround mapping 786 / \ 787 | .388631 .274804 .000000 .336565 .194316 .336565 .194316 .274804 | 788 | .000000 .274804 .388631 .194316 .336565 .194316 .336565 .274804 | 789 \ / 791 Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, 792 multiplied by 2/(2 + 2/sqrt(2) + sqrt(3)) for normalization. The 793 coeffients are in the same order as in Section 5.1.1.2, and the 794 matricies above. 796 Figure 8: Stereo downmix matrix for the 7.1 surround mapping 798 5.2. Comment Header 800 0 1 2 3 801 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 802 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 803 | 'O' | 'p' | 'u' | 's' | 804 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 805 | 'T' | 'a' | 'g' | 's' | 806 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 807 | Vendor String Length | 808 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 809 | | 810 : Vendor String... : 811 | | 812 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 813 | User Comment List Length | 814 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 815 | User Comment #0 String Length | 816 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 817 | | 818 : User Comment #0 String... : 819 | | 820 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 821 | User Comment #1 String Length | 822 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 823 : : 825 Figure 9: Comment Header Packet 827 The comment header consists of a 64-bit magic signature, followed by 828 data in the same format as the [vorbis-comment] header used in Ogg 829 Vorbis (without the final "framing bit"), Ogg Theora, and Speex. 831 1. *Magic Signature*: 833 This is an 8-octet (64-bit) field that allows codec 834 identification and is human-readable. It contains, in order, the 835 magic numbers: 837 0x4F 'O' 839 0x70 'p' 841 0x75 'u' 843 0x73 's' 845 0x54 'T' 847 0x61 'a' 849 0x67 'g' 850 0x73 's' 852 Starting with "Op" helps distinguish it from audio data packets, as 853 this is an invalid TOC sequence. 855 2. *Vendor String Length* (32 bits, unsigned, little endian): 857 This field gives the length of the following vendor string, in 858 octets. It MUST NOT indicate that the vendor string is longer 859 than the rest of the packet. 861 3. *Vendor String* (variable length, UTF-8 vector): 863 This is a simple human-readable tag for vendor information, 864 encoded as a UTF-8 string [RFC3629]. No terminating null octet 865 is required. 867 This tag is intended to identify the codec encoder and 868 encapsulation implementations, for tracing differences in 869 technical behavior. User-facing encoding applications can use 870 the 'ENCODER' user comment tag to identify themselves. 872 4. *User Comment List Length* (32 bits, unsigned, little endian): 874 This field indicates the number of user-supplied comments. It 875 MAY indicate there are zero user-supplied comments, in which case 876 there are no additional fields in the packet. It MUST NOT 877 indicate that there are so many comments that the comment string 878 lengths would require more data than is available in the rest of 879 the packet. 881 5. *User Comment #i String Length* (32 bits, unsigned, little 882 endian): 884 This field gives the length of the following user comment string, 885 in octets. There is one for each user comment indicated by the 886 'user comment list length' field. It MUST NOT indicate that the 887 string is longer than the rest of the packet. 889 6. *User Comment #i String* (variable length, UTF-8 vector): 891 This field contains a single user comment string. There is one 892 for each user comment indicated by the 'user comment list length' 893 field. 895 The vendor string length and user comment list length are REQUIRED, 896 and implementations SHOULD reject comment headers that do not contain 897 enough data for these fields, or that do not contain enough data for 898 the corresponding vendor string or user comments they describe. 899 Making this check before allocating the associated memory to contain 900 the data may help prevent a possible Denial-of-Service (DoS) attack 901 from small comment headers that claim to contain strings longer than 902 the entire packet or more user comments than than could possibly fit 903 in the packet. 905 The user comment strings follow the NAME=value format described by 906 [vorbis-comment] with the same recommended tag names. One new 907 comment tag is introduced for Ogg Opus: 909 R128_TRACK_GAIN=-573 911 representing the volume shift needed to normalize the track's volume. 912 The gain is a Q7.8 fixed point number in dB, as in the ID header's 913 'output gain' field. This tag is similar to the 914 REPLAYGAIN_TRACK_GAIN tag in Vorbis [replay-gain], except that 915 the normal volume reference is the [EBU-R128] standard. 917 An Ogg Opus file MUST NOT have more than one such tag, and if present 918 its value MUST be an integer from -32768 to 32767, inclusive, 919 represented in ASCII with no whitespace. If present, it MUST 920 correctly represent the R128 normalization gain relative to the 921 'output gain' field specified in the ID header. If a player chooses 922 to make use of the R128_TRACK_GAIN tag, it MUST be applied -in 923 addition- to the 'output gain' value. If an encoder wishes to use 924 R128 normalization, and the output gain is not otherwise constrained 925 or specified, the encoder SHOULD write the R128 gain into the 'output 926 gain' field and store a tag containing "R128_TRACK_GAIN=0". That is, 927 it should assume that by default tools will respect the 'output gain' 928 field, and not the comment tag. If a tool modifies the ID header's 929 'output gain' field, it MUST also update or remove the 930 R128_TRACK_GAIN comment tag. 932 To avoid confusion with multiple normalization schemes, an Opus 933 comment header SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, 934 REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or 935 REPLAYGAIN_ALBUM_PEAK tags. 937 There is no Opus comment tag corresponding to REPLAYGAIN_ALBUM_GAIN. 938 That information should instead be stored in the ID header's 'output 939 gain' field. 941 6. Packet Size Limits 942 Technically valid Opus packets can be arbitrarily large due to the 943 padding format, although the amount of non-padding data they can 944 contain is bounded. These packets might be spread over a similarly 945 enormous number of Ogg pages. Encoders SHOULD use no more padding 946 than required to make a variable bitrate (VBR) stream constant 947 bitrate (CBR). Decoders SHOULD avoid attempting to allocate 948 excessive amounts of memory when presented with a very large packet. 949 The presence of an extremely large packet in the stream could 950 indicate a memory exhaustion attack or stream corruption. Decoders 951 SHOULD reject a packet that is too large to process, and display a 952 warning message. 954 In an Ogg Opus stream, the largest possible valid packet that does 955 not use padding has a size of (61,298*N - 2) octets, or about 60 kB 956 per Opus stream. With 255 streams, this is 15,630,988 octets 957 (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which 958 will have a granule position of -1. This is of course a very extreme 959 packet, consisting of 255 streams, each containing 120 ms of audio 960 encoded as 2.5 ms frames, each frame using the maximum possible 961 number of octets (1275) and stored in the least efficient manner 962 allowed (a VBR code 3 Opus packet). Even in such a packet, most of 963 the data will be zeros as 2.5 ms frames cannot actually use all 964 1275 octets. The largest packet consisting of entirely useful data 965 is (15,326*N - 2) octets, or about 15 kB per stream. This 966 corresponds to 120 ms of audio encoded as 10 ms frames in either LP 967 or Hybrid mode, but at a data rate of over 1 Mbps, which makes little 968 sense for the quality achieved. A more reasonable limit is 969 (7,664*N - 2) octets, or about 7.5 kB per stream. This corresponds 970 to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a 971 total bitrate just under 511 kbps (not counting the Ogg encapsulation 972 overhead). With N=8, the maximum number of channels currently 973 defined by mapping family 1, this gives a maximum packet size of 974 61,310 octets, or just under 60 kB. This is still quite 975 conservative, as it assumes each output channel is taken from one 976 decoded channel of a stereo packet. An implementation could 977 reasonably choose any of these numbers for its internal limits. 979 7. Implementation Status 981 A brief summary of major implementations of this draft is available at 982 https://wiki.xiph.org/OggOpusImplementation, along with their status. 984 [Note to RFC Editor: please remove this entire section before final 985 publication per [draft-sheffer-running-code].] 987 8. Security Considerations 988 Implementations of the Opus codec need to take appropriate security 989 considerations into account, as outlined in [RFC4732]. This is just 990 as much a problem for the container as it is for the codec itself. 991 It is extremely important for the decoder to be robust against 992 malicious payloads. Malicious payloads must not cause the decoder to 993 overrun its allocated memory or to take an excessive amount of 994 resources to decode. Although problems in encoders are typically 995 rarer, the same applies to the encoder. Malicious audio streams must 996 not cause the encoder to misbehave because this would allow an 997 attacker to attack transcoding gateways. 999 Like most other container formats, Ogg Opus files should not be used 1000 with insecure ciphers or cipher modes that are vulnerable to known- 1001 plaintext attacks. Elements such as the Ogg page capture pattern and 1002 the magic signatures in the ID header and the comment header all have 1003 easily predictable values, in addition to various elements of the 1004 codec data itself. 1006 9. Content Type 1008 An "Ogg Opus file" consists of one or more sequentially multiplexed 1009 segments, each containing exactly one Ogg Opus stream. The 1010 RECOMMENDED mime-type for Ogg Opus files is "audio/ogg". 1012 If more specificity is desired, one MAY indicate the presence of Opus 1013 streams using the codecs parameter defined in [RFC6381], e.g., 1015 audio/ogg; codecs=opus 1017 for an Ogg Opus file. 1019 The RECOMMENDED filename extension for Ogg Opus files is '.opus'. 1021 When Opus is concurrently multiplexed with other streams in an Ogg 1022 container, one SHOULD use one of the "audio/ogg", "video/ogg", or 1023 "application/ogg" mime-types, as defined in [RFC5334]. Such streams 1024 are not strictly "Ogg Opus files" as described above, since they 1025 contain more than a single Opus stream per sequentially multiplexed 1026 segment, e.g. video or multiple audio tracks. In such cases the the 1027 '.opus' filename extension is NOT RECOMMENDED. 1029 10. IANA Considerations 1031 This document has no actions for IANA. 1033 11. Acknowledgments 1035 Thanks to Greg Maxwell, Christopher "Monty" Montgomery, and Jean-Marc 1036 Valin for their valuable contributions to this document. Additional 1037 thanks to Andrew D'Addesio, Greg Maxwell, and Vincent Penqeurc'h for 1038 their feedback based on early implementations. 1040 12. Copying Conditions 1041 The authors agree to grant third parties the irrevocable right to 1042 copy, use, and distribute the work, with or without modification, in 1043 any medium, without royalty, provided that, unless separate 1044 permission is granted, redistributed modified works do not contain 1045 misleading author, version, name of work, or endorsement information. 1047 13. References 1049 13.1. Normative References 1051 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1052 Requirement Levels", BCP 14, RFC 2119, March 1997. 1054 [RFC3533] Pfeiffer, S., "The Ogg Encapsulation Format Version 0", 1055 RFC 3533, May 2003. 1057 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 1058 10646", STD 63, RFC 3629, November 2003. 1060 [RFC5334] Goncalves, I., Pfeiffer, S., and C. Montgomery, "Ogg Media 1061 Types", RFC 5334, September 2008. 1063 [RFC6381] Gellens, R., Singer, D., and P. Frojdh, "The 'Codecs' and 1064 'Profiles' Parameters for "Bucket" Media Types", RFC 6381, 1065 August 2011. 1067 [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the 1068 Opus Audio Codec", RFC 6716, September 2012. 1070 [EBU-R128] 1071 ""Loudness Recommendation EBU R128", August 2011, . 1074 [vorbis-comment] 1075 Montgomery, C., "Ogg Vorbis I Format Specification: 1076 Comment Field and Header Specification", July 2002, . 1079 [vorbis-mapping] 1080 Montgomery, C., "The Vorbis I Specification, Section 4.3.9 1081 Output Channel Order", January 2010, . 1084 13.2. Informative References 1086 [RFC4732] Handley, M., Rescorla, E., IAB, "Internet Denial-of- 1087 Service Considerations", RFC 4732, December 2006. 1089 [draft-sheffer-running-code] 1090 Sheffer, Y. and A. Farrel, "Improving "Rough Consensus" 1091 with Running Code", May 2013, . 1094 [flac] Coalson, J., "FLAC - Free Lossless Audio Codec Format 1095 Description", January 2008, . 1098 [replay-gain] 1099 Parker, C. and M. Leese, "VorbisComment: Replay Gain", 1100 June 2009, . 1103 [seeking] Pfeiffer, S., Parker, C., and G. Maxwell, "Granulepos 1104 Encoding and How Seeking Really Works", May 2012, . 1107 [vorbis-trim] 1108 Montgomery, C., "The Vorbis I Specification, Appendix A: 1109 Embedding Vorbis into an Ogg stream", November 2008, 1110 . 1113 [wave-multichannel] 1114 "Multiple Channel Audio Data and WAVE Files", March 2007, 1115 . 1118 Authors' Addresses 1120 Timothy B. Terriberry 1121 Mozilla Corporation 1122 650 Castro Street 1123 Mountain View, CA 94041 1124 USA 1126 Phone: +1 650 903-0800 1127 Email: tterribe@xiph.org 1129 Ron Lee 1130 Voicetronix 1131 246 Pulteney Street, Level 1 1132 Adelaide, SA 5000 1133 Australia 1135 Phone: +61 8 8232 9112 1136 Email: ron@debian.org 1137 Ralph Giles 1138 Mozilla Corporation 1139 163 West Hastings Street 1140 Vancouver, BC V6B 1H5 1141 Canada 1143 Phone: +1 604 778 1540 1144 Email: giles@xiph.org