1 <?xml version="1.0" encoding="US-ASCII" ?> 2 <!DOCTYPE rfc SYSTEM "rfc2629.dtd"> 3 4 <?rfc rfcedstyle="yes"?> 5 <?rfc subcompact="no"?> 6 <?rfc toc="yes"?> 7 <?rfc symrefs="yes" ?> 8 <?rfc sortrefs="yes" ?> 9 10 <rfc number="5215" category="std"> 11 12 <front> 13 <title abbrev="Vorbis RTP Payload Format">RTP Payload Format for Vorbis Encoded Audio</title> 14 15 <author initials="L" surname="Barbato" fullname="Luca Barbato"> 16 <organization abbrev="Xiph">Xiph.Org Foundation</organization> 17 <address> 18 <email>lu_zero (a] gentoo.org</email> 19 <uri>http://xiph.org/</uri> 20 </address> 21 </author> 22 23 <date month="August" year="2008" /> 24 25 <area>General</area> 26 <workgroup>AVT Working Group</workgroup> 27 <keyword>I-D</keyword> 28 29 <keyword>Internet-Draft</keyword> 30 <keyword>Vorbis</keyword> 31 <keyword>RTP</keyword> 32 33 <keyword>example</keyword> 34 35 <abstract> 36 37 <t> 38 This document describes an RTP payload format for transporting Vorbis encoded 39 audio. It details the RTP encapsulation mechanism for raw Vorbis data and 40 the delivery mechanisms for the decoder probability model (referred to 41 as a codebook), as well as other setup information. 42 </t> 43 44 <t> 45 Also included within this memo are media type registrations and the details 46 necessary for the use of Vorbis with the Session Description Protocol (SDP). 47 </t> 48 49 </abstract> 50 51 </front> 52 53 <middle> 54 55 <section anchor="Introduction" title="Introduction"> 56 57 <t> 58 Vorbis is a general purpose perceptual audio codec intended to allow 59 maximum encoder flexibility, thus allowing it to scale competitively 60 over an exceptionally wide range of bit rates. At the high 61 quality/bitrate end of the scale (CD or DAT rate stereo, 16/24 bits), it 62 is in the same league as MPEG-4 AAC. 63 Vorbis is also intended for lower and higher sample rates (from 64 8kHz telephony to 192kHz digital masters) and a range of channel 65 representations (monaural, polyphonic, stereo, quadraphonic, 5.1, 66 ambisonic, or up to 255 discrete channels). 67 </t> 68 69 <t> 70 Vorbis encoded audio is generally encapsulated within an Ogg format bitstream 71 <xref target="RFC3533"></xref>, which provides framing and synchronization. 72 For the purposes of RTP transport, this layer is unnecessary, and so raw Vorbis 73 packets are used in the payload. 74 </t> 75 76 <section anchor="Terminology" title="Conformance and Document Conventions"> 77 78 <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, <xref target="RFC2119"/> and indicate requirement levels for compliant implementations. Requirements apply to all implementations unless otherwise stated.</t> 79 <t>An implementation is a software module that supports one of the media types defined in this document. Software modules may support multiple media types, but conformance is considered individually for each type.</t> 80 <t>Implementations that fail to satisfy one or more "MUST" requirements are considered non-compliant. Implementations that satisfy all "MUST" requirements, but fail to satisfy one or more "SHOULD" requirements, are said to be "conditionally compliant". All other implementations are "unconditionally compliant".</t> 81 82 </section> 83 </section> 84 85 <section anchor="Payload Format" title="Payload Format"> 86 87 <t> 88 For RTP-based transport of Vorbis-encoded audio, the standard RTP header is 89 followed by a 4-octet payload header, and then the payload data. The payload 90 headers are used to associate the Vorbis data with its associated decoding 91 codebooks as well as indicate if the following packet contains fragmented 92 Vorbis data and/or the number of whole Vorbis data frames. The payload data 93 contains the raw Vorbis bitstream information. There are 3 types of Vorbis 94 data; an RTP payload MUST contain just one of them at a time. 95 </t> 96 97 <section anchor="RTP Header" title="RTP Header"> 98 99 <t> 100 The format of the RTP header is specified in <xref target="RFC3550"></xref> 101 and shown in <xref target="RTP Header Figure"/>. This payload format 102 uses the fields of the header in a manner consistent with that specification. 103 </t> 104 105 <t> 106 <figure anchor="RTP Header Figure" title="RTP Header"> 107 <artwork><![CDATA[ 108 0 1 2 3 109 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 110 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 111 |V=2|P|X| CC |M| PT | sequence number | 112 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 113 | timestamp | 114 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 115 | synchronization source (SSRC) identifier | 116 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 117 | contributing source (CSRC) identifiers | 118 | ... | 119 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 120 ]]></artwork> 121 </figure> 122 </t> 123 124 <t> 125 The RTP header begins with an octet of fields (V, P, X, and CC) to support 126 specialized RTP uses (see <xref target="RFC3550"></xref> and 127 <xref target="RFC3551"></xref> for details). For Vorbis RTP, the following 128 values are used. 129 </t> 130 131 <t> 132 Version (V): 2 bits</t> 133 <t> 134 This field identifies the version of RTP. The version used by this 135 specification is two (2). 136 </t> 137 138 <t> 139 Padding (P): 1 bit</t> 140 <t> 141 Padding MAY be used with this payload format according to Section 5.1 of 142 <xref target="RFC3550"></xref>. 143 </t> 144 145 <t> 146 Extension (X): 1 bit</t> 147 <t> 148 The Extension bit is used in accordance with <xref target="RFC3550"></xref>. 149 </t> 150 151 <t> 152 CSRC count (CC): 4 bits</t> 153 <t> 154 The CSRC count is used in accordance with <xref target="RFC3550"></xref>. 155 </t> 156 157 <t> 158 Marker (M): 1 bit</t> 159 <t> 160 Set to zero. Audio silence suppression is not used. This conforms to Section 4.1 161 of <xref target="VORBIS-SPEC-REF"></xref>. 162 </t> 163 164 <t> 165 Payload Type (PT): 7 bits</t> 166 <t> 167 An RTP profile for a class of applications is expected to assign a payload type 168 for this format, or a dynamically allocated payload type SHOULD be chosen that 169 designates the payload as Vorbis. 170 </t> 171 172 <t> 173 Sequence number: 16 bits</t> 174 <t> 175 The sequence number increments by one for each RTP data packet sent, and may be 176 used by the receiver to detect packet loss and to restore the packet sequence. This 177 field is detailed further in <xref target="RFC3550"></xref>. 178 </t> 179 180 <t> 181 Timestamp: 32 bits</t> 182 <t> 183 A timestamp representing the sampling time of the first sample of the first 184 Vorbis packet in the RTP payload. The clock frequency MUST be set to the sample 185 rate of the encoded audio data and is conveyed out-of-band (e.g., as an SDP parameter). 186 </t> 187 188 <t> 189 SSRC/CSRC identifiers: </t> 190 <t> 191 These two fields, 32 bits each with one SSRC field and a maximum of 16 CSRC 192 fields, are as defined in <xref target="RFC3550"> 193 </xref>. 194 </t> 195 196 </section> 197 198 <section anchor="Payload Header" title="Payload Header"> 199 200 <t> 201 The 4 octets following the RTP Header section are the Payload Header. This 202 header is split into a number of bit fields detailing the format of the 203 following payload data packets. 204 </t> 205 206 <figure anchor="Payload Header Figure" title="Payload Header"> 207 <artwork><![CDATA[ 208 0 1 2 3 209 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 210 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 211 | Ident | F |VDT|# pkts.| 212 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 213 ]]></artwork> 214 </figure> 215 216 <t> 217 Ident: 24 bits</t> 218 <t> 219 This 24-bit field is used to associate the Vorbis data to a decoding 220 Configuration. It is stored as a network byte order integer. 221 </t> 222 223 <t> 224 Fragment type (F): 2 bits</t> 225 <t> 226 This field is set according to the following list: 227 </t> 228 <vspace blankLines="1" /> 229 <list style="empty"> 230 <t> 0 = Not Fragmented</t> 231 <t> 1 = Start Fragment</t> 232 <t> 2 = Continuation Fragment</t> 233 <t> 3 = End Fragment</t> 234 </list> 235 236 <t> 237 Vorbis Data Type (VDT): 2 bits</t> 238 <t> 239 This field specifies the kind of Vorbis data stored in this RTP packet. There 240 are currently three different types of Vorbis payloads. Each packet MUST contain only a single type of Vorbis packet (e.g., you must not aggregate configuration and comment packets in the same RTP payload). 241 </t> 242 243 <vspace blankLines="1" /> 244 <list style="empty"> 245 <t> 0 = Raw Vorbis payload</t> 246 <t> 1 = Vorbis Packed Configuration payload</t> 247 <t> 2 = Legacy Vorbis Comment payload</t> 248 <t> 3 = Reserved</t> 249 </list> 250 251 <t> The packets with a VDT of value 3 MUST be ignored.</t> 252 253 <t> 254 The last 4 bits represent the number of complete packets in this payload. This 255 provides for a maximum number of 15 Vorbis packets in the payload. If the 256 payload contains fragmented data, the number of packets MUST be set to 0. 257 </t> 258 259 </section> 260 261 <section anchor="Payload Data" title="Payload Data"> 262 263 <t> 264 Raw Vorbis packets are currently unbounded in length; application profiles will 265 likely define a practical limit. Typical Vorbis packet sizes range from very 266 small (2-3 bytes) to quite large (8-12 kilobytes). The reference implementation 267 <xref target="LIBVORBIS"></xref> typically produces packets less than ~800 268 bytes, except for the setup header packets, which are ~4-12 kilobytes. Within an 269 RTP context, to avoid fragmentation, the Vorbis data packet size SHOULD be kept 270 sufficiently small so that after adding the RTP and payload headers, the 271 complete RTP packet is smaller than the path MTU. 272 </t> 273 274 <figure anchor="Payload Data Figure" title="Payload Data Header"> 275 <artwork><![CDATA[ 276 0 1 2 3 277 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 278 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 279 | length | vorbis packet data .. 280 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 281 ]]></artwork> 282 </figure> 283 284 <t> 285 Each Vorbis payload packet starts with a two octet length header, which is used 286 to represent the size in bytes of the following data payload, and is followed by the 287 raw Vorbis data padded to the nearest byte boundary, as explained by the <xref target="VORBIS-SPEC-REF">Vorbis I Specification</xref>. The length value is stored 288 as a network byte order integer. 289 </t> 290 291 <t> 292 For payloads that consist of multiple Vorbis packets, the payload data consists 293 of the packet length followed by the packet data for each of the Vorbis packets 294 in the payload. 295 </t> 296 297 <t> 298 The Vorbis packet length header is the length of the Vorbis data block only and 299 does not include the length field. 300 </t> 301 302 <t> 303 The payload packing of the Vorbis data packets MUST follow the guidelines 304 set out in <xref target="RFC3551"></xref>, where the oldest Vorbis packet occurs 305 immediately after the RTP packet header. Subsequent Vorbis packets, if any, MUST 306 follow in temporal order. 307 </t> 308 309 <t> 310 Audio channel mapping is in accordance with the 311 <xref target="VORBIS-SPEC-REF">Vorbis I Specification</xref>. 312 </t> 313 314 </section> 315 316 <section anchor="Example RTP Packet" title="Example RTP Packet"> 317 318 <t> 319 Here is an example RTP payload containing two Vorbis packets. 320 </t> 321 322 <figure anchor="Example Raw Vorbis Packet" title="Example Raw Vorbis Packet"> 323 <artwork><![CDATA[ 324 0 1 2 3 325 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 326 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 327 | 2 |0|0| 0 |0| PT | sequence number | 328 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 329 | timestamp (in sample rate units) | 330 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 331 | synchronisation source (SSRC) identifier | 332 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 333 | contributing source (CSRC) identifiers | 334 | ... | 335 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 336 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 337 | Ident | 0 | 0 | 2 pks | 338 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 339 | length | vorbis data .. 340 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 341 .. vorbis data | 342 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 343 | length | next vorbis packet data .. 344 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 345 .. vorbis data .. 346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 347 .. vorbis data | 348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 349 ]]></artwork> 350 </figure> 351 352 <t> 353 The payload data section of the RTP packet begins with the 24-bit Ident field 354 followed by the one octet bit field header, which has the number of Vorbis 355 frames set to 2. Each of the Vorbis data frames is prefixed by the two octets 356 length field. The Packet Type and Fragment Type are set to 0. The Configuration 357 that will be used to decode the packets is the one indexed by the ident value. 358 </t> 359 360 </section> 361 </section> 362 363 364 365 <section anchor="Configuration Headers" title="Configuration Headers"> 366 367 <t> 368 Unlike other mainstream audio codecs, Vorbis has no statically 369 configured probability model. Instead, it packs all entropy decoding 370 configuration, Vector Quantization and Huffman models into a data block 371 that must be transmitted to the decoder with the compressed data. 372 A decoder also requires information detailing the number of audio 373 channels, bitrates, and similar information to configure itself for a 374 particular compressed data stream. These two blocks of information are 375 often referred to collectively as the "codebooks" for a Vorbis stream, 376 and are included as special "header" packets at the start 377 of the compressed data. In addition, 378 the <xref target="VORBIS-SPEC-REF">Vorbis I specification</xref> 379 requires the presence of a comment header packet that gives simple 380 metadata about the stream, but this information is not required for 381 decoding the frame sequence. 382 </t> 383 384 <t> 385 Thus, these two codebook header packets must be received by the decoder before 386 any audio data can be interpreted. These requirements pose problems in RTP, 387 which is often used over unreliable transports. 388 </t> 389 390 <t> 391 Since this information must be transmitted reliably and, as the RTP 392 stream may change certain configuration data mid-session, there are 393 different methods for delivering this configuration data to a 394 client, both in-band and out-of-band, which are detailed below. 395 In order to set up an initial state for the client application, the 396 configuration MUST be conveyed via the signalling channel used to set up 397 the session. One example of such signalling is 398 <xref target="RFC4566">SDP</xref> with the 399 <xref target="RFC3264">Offer/Answer Model</xref>. 400 Changes to the configuration MAY be communicated via a re-invite, 401 conveying a new SDP, or sent in-band in the RTP channel. 402 Implementations MUST support an in-band delivery of updated codebooks, 403 and SHOULD support out-of-band codebook update using a new SDP file. 404 The changes may be due to different codebooks as well as 405 different bitrates of the RTP stream. 406 </t> 407 408 <t>For non-chained streams, the recommended Configuration delivery 409 method is inside the <xref target="Packed Configuration">Packed 410 Configuration</xref> in the SDP as explained the <xref 411 target="Mapping Media Type Parameters into SDP"> Mapping Media Type 412 Parameters into SDP</xref>. 413 </t> 414 415 <t> 416 The 24-bit Ident field is used to map which Configuration will be used to 417 decode a packet. When the Ident field changes, it indicates that a change in 418 the stream has taken place. The client application MUST have in advance the 419 correct configuration. If the client detects a change in the Ident value and 420 does not have this information, it MUST NOT decode the raw associated Vorbis 421 data until it fetches the correct Configuration. 422 </t> 423 424 <section anchor="In-band Header Transmission" title="In-band Header Transmission"> 425 426 <t> 427 The <xref target="Packed Configuration">Packed Configuration</xref> Payload is 428 sent in-band with the packet type bits set to match the Vorbis Data Type. 429 Clients MUST be capable of dealing with fragmentation and periodic 430 <xref target="RFC4588">re-transmission of</xref> the configuration headers. 431 The RTP timestamp value MUST reflect the transmission time of the first data packet for which this configuration applies. 432 </t> 433 434 <section anchor="Packed Configuration" title="Packed Configuration"> 435 436 <t> 437 A Vorbis Packed Configuration is indicated with the Vorbis Data Type field set 438 to 1. Of the three headers defined in the 439 <xref target="VORBIS-SPEC-REF">Vorbis I specification</xref>, the 440 Identification and the Setup MUST be packed as they are, while the Comment 441 header MAY be replaced with a dummy one.</t> 442 <t> 443 The packed configuration stores Xiph codec 444 configurations in a generic way: the first field stores the number of the following packets 445 minus one (count field), the next ones represent the size of the headers 446 (length fields), and the headers immediately follow the list of length fields. 447 The size of the last header is implicit.</t> 448 <t> 449 The count and the length fields are encoded using the following logic: the data 450 is in network byte order; every byte has the most significant bit used 451 as a flag, and the following 7 bits are used to store the value. 452 The first 7 most significant bits are stored in the first byte. 453 If there are remaining bits, the flag bit is set to 1 and the subsequent 454 7 bits are stored in the following byte. 455 If there are remaining bits, set the flag to 1 and the same procedure is 456 repeated. 457 The ending byte has the flag bit set to 0. To decode, simply iterate 458 over the bytes until the flag bit is set to 0. For every byte, the data 459 is added to the accumulated value multiplied by 128.</t> 460 <t> 461 The headers are packed in the same order as they are present in Ogg <xref target="VORBIS-SPEC-REF" />: 462 Identification, Comment, Setup.</t> 463 464 <t> 465 The 2 byte length tag defines the length of the packed headers as the sum of 466 the Configuration, Comment, and Setup lengths.</t> 467 468 <figure anchor="Packed Configuration Figure" title="Packed Configuration Figure"> 469 <artwork><![CDATA[ 470 0 1 2 3 471 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 472 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 473 |V=2|P|X| CC |M| PT | xxxx | 474 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 475 | xxxxx | 476 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 477 | synchronization source (SSRC) identifier | 478 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 479 | contributing source (CSRC) identifiers | 480 | ... | 481 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 482 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 483 | Ident | 0 | 1 | 1| 484 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 485 | length | n. of headers | length1 | 486 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 487 | length2 | Identification .. 488 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 489 .. Identification .. 490 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 491 .. Identification .. 492 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 493 .. Identification .. 494 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 495 .. Identification | Comment .. 496 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 497 .. Comment .. 498 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 499 .. Comment .. 500 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 501 .. Comment .. 502 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 503 .. Comment | Setup .. 504 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 505 .. Setup .. 506 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 507 .. Setup .. 508 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 509 ]]></artwork> 510 </figure> 511 512 <t>The Ident field is set with the value that will be used by the Raw Payload 513 Packets to address this Configuration. The Fragment type is set to 0 because the 514 packet bears the full Packed configuration. The number of the packet is set to 1.</t> 515 </section> 516 </section> 517 518 <section anchor="Out of Band Transmission" title="Out of Band Transmission"> 519 520 <t> 521 The following packet definition MUST be used when Configuration is inside 522 in the SDP. 523 </t> 524 525 <section anchor="Packed Headers" title="Packed Headers"> 526 527 <t> 528 As mentioned above, the RECOMMENDED delivery vector for Vorbis configuration 529 data is via a retrieval method that can be performed using a reliable transport 530 protocol. As the RTP headers are not required for this method of delivery, the 531 structure of the configuration data is slightly different. The packed header 532 starts with a 32-bit (network-byte ordered) count field, which details 533 the number of packed headers that are contained in the bundle. The 534 following shows the Packed header 535 payload for each chained Vorbis stream. 536 </t> 537 538 <figure anchor="Packed Headers Overview Figure" title="Packed Headers Overview"> 539 <artwork><![CDATA[ 540 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 541 | Number of packed headers | 542 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 543 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 544 | Packed header | 545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 546 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 547 | Packed header | 548 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 549 ]]></artwork> 550 </figure> 551 552 <figure anchor="Packed Headers Detail Figure" title="Packed Headers Detail"> 553 <artwork><![CDATA[ 554 0 1 2 3 555 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 556 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 557 | Ident | length .. 558 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 559 .. | n. of headers | length1 | length2 .. 560 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 561 .. | Identification Header .. 562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 563 ................................................................. 564 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 565 .. | Comment Header .. 566 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 567 ................................................................. 568 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 569 .. Comment Header | 570 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 571 | Setup Header .. 572 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 573 ................................................................. 574 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 575 .. Setup Header | 576 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 577 ]]></artwork> 578 </figure> 579 <t> 580 The key difference between the in-band format and this one is that there is no 581 need for the payload header octet. In this figure, the comment has a size bigger 582 than 127 bytes. 583 </t> 584 </section> 585 586 </section> 587 588 <section anchor="Loss of Configuration Headers" title="Loss of Configuration Headers"> 589 590 <t> 591 Unlike the loss of raw Vorbis payload data, loss of a configuration header 592 leads to a situation where it will not be possible to successfully decode the 593 stream. Implementations MAY try to recover from an error by requesting again the 594 missing Configuration or, if the delivery method is in-band, by buffering the 595 payloads waiting for the Configuration needed to decode them. 596 The baseline reaction SHOULD either be reset or end the RTP session. 597 </t> 598 599 </section> 600 601 </section> 602 603 <section anchor="Comment Headers" title="Comment Headers"> 604 605 <t> 606 Vorbis Data Type flag set to 2 indicates that the packet contains 607 the comment metadata, such as artist name, track title, and so on. These 608 metadata messages are not intended to be fully descriptive but rather to offer basic 609 track/song information. Clients MAY ignore it completely. The details on the 610 format of the comments can be found in the <xref target="VORBIS-SPEC-REF">Vorbis I Specification</xref>. 611 </t> 612 <figure anchor="Comment Packet Figure" title="Comment Packet"> 613 <artwork><![CDATA[ 614 0 1 2 3 615 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 616 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 617 |V=2|P|X| CC |M| PT | xxxx | 618 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 619 | xxxxx | 620 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 621 | synchronization source (SSRC) identifier | 622 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 623 | contributing source (CSRC) identifiers | 624 | ... | 625 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 626 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 627 | Ident | 0 | 2 | 1| 628 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 629 | length | Comment .. 630 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 631 .. Comment .. 632 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 633 .. Comment | 634 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 635 ]]></artwork> 636 </figure> 637 638 <t> 639 The 2-byte length field is necessary since this packet could be fragmented. 640 </t> 641 642 </section> 643 <section anchor="Frame Packetization" title="Frame Packetization"> 644 645 <t> 646 Each RTP payload contains either one Vorbis packet fragment or an integer 647 number of complete Vorbis packets (up to a maximum of 15 packets, since the 648 number of packets is defined by a 4-bit value). 649 </t> 650 651 <t> 652 Any Vorbis data packet that is less than path MTU SHOULD be bundled in the RTP 653 payload with as many Vorbis packets as will fit, up to a maximum of 15, except 654 when such bundling would exceed an application's desired transmission latency. 655 Path MTU is detailed in <xref target="RFC1191"></xref> and <xref target="RFC1981"></xref>. 656 </t> 657 658 <t> 659 A fragmented packet has a zero in the last four bits of the payload header. 660 The first fragment will set the Fragment type to 1. Each fragment after the 661 first will set the Fragment type to 2 in the payload header. The consecutive 662 fragments MUST be sent without any other payload being sent between the first 663 and the last fragment. The RTP payload containing the last fragment of the 664 Vorbis packet will have the Fragment type set to 3. To maintain the correct 665 sequence for fragmented packet reception, the timestamp field of fragmented 666 packets MUST be the same as the first packet sent, with the sequence number 667 incremented as normal for the subsequent RTP payloads; this will affect the 668 RTCP jitter measurement. The length field shows the fragment length. 669 </t> 670 671 <section anchor="Example Fragmented Vorbis Packet" title="Example Fragmented Vorbis Packet"> 672 673 <t> 674 Here is an example of a fragmented Vorbis packet split over three RTP payloads. 675 Each of them contains the standard RTP headers as well as the 4-octet Vorbis 676 headers. 677 </t> 678 679 <figure anchor="Example Fragmented Packet (Packet 1)" title="Example Fragmented Packet (Packet 1)"> 680 <artwork><![CDATA[ 681 Packet 1: 682 683 0 1 2 3 684 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 685 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 686 |V=2|P|X| CC |M| PT | 1000 | 687 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 688 | 12345 | 689 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 690 | synchronization source (SSRC) identifier | 691 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 692 | contributing source (CSRC) identifiers | 693 | ... | 694 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 695 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 696 | Ident | 1 | 0 | 0| 697 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 698 | length | vorbis data .. 699 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 700 .. vorbis data | 701 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 702 ]]></artwork> 703 </figure> 704 705 <t> 706 In this payload, the initial sequence number is 1000 and the timestamp is 12345. The Fragment type is set to 1, the number of packets field is set to 0, and as 707 the payload is raw Vorbis data, the VDT field is set to 0. 708 </t> 709 710 <figure anchor="Example Fragmented Packet (Packet 2)" title="Example Fragmented Packet (Packet 2)"> 711 <artwork><![CDATA[ 712 Packet 2: 713 714 0 1 2 3 715 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 716 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 717 |V=2|P|X| CC |M| PT | 1001 | 718 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 719 | 12345 | 720 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 721 | synchronization source (SSRC) identifier | 722 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 723 | contributing source (CSRC) identifiers | 724 | ... | 725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 726 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 727 | Ident | 2 | 0 | 0| 728 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 729 | length | vorbis data .. 730 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 731 .. vorbis data | 732 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 733 ]]></artwork> 734 </figure> 735 736 <t> 737 The Fragment type field is set to 2, and the number of packets field is set to 0. 738 For large Vorbis fragments, there can be several of these types of payloads. 739 The maximum packet size SHOULD be no greater than the path MTU, 740 including all RTP and payload headers. The sequence number has been incremented 741 by one, but the timestamp field remains the same as the initial payload. 742 </t> 743 744 <figure anchor="Example Fragmented Packet (Packet 3)" title="Example Fragmented Packet (Packet 3)"> 745 <artwork><![CDATA[ 746 Packet 3: 747 748 0 1 2 3 749 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 750 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 751 |V=2|P|X| CC |M| PT | 1002 | 752 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 753 | 12345 | 754 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 755 | synchronization source (SSRC) identifier | 756 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 757 | contributing source (CSRC) identifiers | 758 | ... | 759 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 760 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 761 | Ident | 3 | 0 | 0| 762 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 763 | length | vorbis data .. 764 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 765 .. vorbis data | 766 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 767 ]]></artwork> 768 </figure> 769 770 <t> 771 This is the last Vorbis fragment payload. The Fragment type is set to 3 and the 772 packet count remains set to 0. As in the previous payloads, the timestamp remains 773 set to the first payload timestamp in the sequence and the sequence number has 774 been incremented. 775 </t> 776 </section> 777 778 <section anchor="Packet Loss" title="Packet Loss"> 779 780 <t> 781 As there is no error correction within the Vorbis stream, packet loss will 782 result in a loss of signal. Packet loss is more of an issue for fragmented 783 Vorbis packets as the client will have to cope with the handling of the 784 Fragment Type. In case of loss of fragments, the client MUST discard all the 785 remaining Vorbis fragments and decode the incomplete packet. If we use the 786 fragmented Vorbis packet example above and the first RTP payload is lost, the 787 client MUST detect that the next RTP payload has the packet count field set 788 to 0 and the Fragment type 2 and MUST drop it. 789 The next RTP payload, which is the final fragmented packet, MUST be dropped 790 in the same manner. 791 If the missing RTP payload is the last, the two fragments received will be 792 kept and the incomplete Vorbis packet decoded. 793 </t> 794 795 <t> 796 Loss of any of the Configuration fragment will result in the loss of the full 797 Configuration packet with the result detailed in the <xref target="Loss of Configuration Headers">Loss of Configuration Headers</xref> section. 798 </t> 799 800 </section> 801 </section> 802 <section anchor="IANA Considerations" title="IANA Considerations"> 803 804 <list style="hanging"> 805 <t hangText="Type name:"> audio </t> 806 807 <t hangText="Subtype name:"> vorbis </t> 808 809 <t hangText="Required parameters:"> 810 811 <list style="hanging"> 812 <t hangText="rate:"> indicates the RTP timestamp clock rate as described in <xref target="RFC3551">RTP Profile for Audio and Video Conferences with Minimal Control</xref>. 813 </t> 814 815 <t hangText="channels:"> indicates the number of audio channels as described in <xref target="RFC3551">RTP Profile for Audio and Video Conferences with Minimal Control</xref>. 816 </t> 817 818 819 <t hangText="configuration:"> the <xref target="RFC4648">base64</xref> representation of the <xref target="Packed Headers">Packed Headers</xref>. 820 </t> 821 </list> 822 </t> 823 824 <t hangText="Encoding considerations:"> 825 <vspace blankLines="1" /> 826 This media type is framed and contains binary data. 827 </t> 828 829 <t hangText="Security considerations:"> 830 <vspace blankLines="1" /> 831 See Section 10 of RFC 5215.</t> 832 833 <t hangText="Interoperability considerations:"> 834 <vspace blankLines="1" /> 835 None</t> 836 837 <t hangText="Published specification:"> 838 <vspace blankLines="1" /> 839 RFC 5215 840 <vspace blankLines="1" /> 841 Ogg Vorbis I specification: Codec setup and packet decode. Available from the Xiph website, http://xiph.org/ 842 </t> 843 844 845 <t hangText="Applications which use this media type:"> 846 <vspace blankLines="1"/> 847 Audio streaming and conferencing tools </t> 848 849 <t hangText="Additional information:"> 850 <vspace blankLines="1" /> 851 None </t> 852 853 <t hangText="Person & email address to contact for further information:"> 854 <vspace blankLines="1" /> 855 Luca Barbato: <lu_zero (a] gentoo.org><br/> 856 <vspace blankLines="0" /> 857 IETF Audio/Video Transport Working Group 858 859 </t> 860 861 <t hangText="Intended usage:"> 862 <vspace blankLines="1" /> 863 COMMON</t> 864 865 <t hangText="Restriction on usage:"> 866 <vspace blankLines="1" /> 867 This media type depends on RTP framing, hence is only defined for transfer via <xref target="RFC3550">RTP</xref>.</t> 868 869 <t hangText="Author:"> 870 <vspace blankLines="1"/>Luca Barbato</t> 871 872 <t hangText="Change controller:"> 873 <vspace blankLines="1"/>IETF AVT Working Group delegated from the IESG</t> 874 </list> 875 876 <section anchor="Packed Headers IANA Considerations" title="Packed Headers IANA Considerations"> 877 878 <t> 879 The following IANA considerations refers to the split configuration <xref target="Packed Headers">Packed Headers</xref> used within RFC 5215. 880 </t> 881 882 <list style="hanging"> 883 <t hangText="Type name:"> audio </t> 884 885 <t hangText="Subtype name:"> vorbis-config </t> 886 887 <t hangText="Required parameters:"> 888 <vspace blankLines="1" /> 889 None 890 </t> 891 892 <t hangText="Optional parameters:"> 893 <vspace blankLines="1" /> 894 None 895 </t> 896 897 <t hangText="Encoding considerations:"> 898 <vspace blankLines="1" /> 899 This media type contains binary data. 900 </t> 901 902 <t hangText="Security considerations:"> 903 <vspace blankLines="1" /> 904 See Section 10 of RFC 5215. 905 </t> 906 907 <t hangText="Interoperability considerations:"> 908 <vspace blankLines="1" /> 909 None 910 </t> 911 912 <t hangText="Published specification:"> 913 <vspace blankLines="1" /> 914 RFC 5215 915 </t> 916 917 <t hangText="Applications which use this media type:"> 918 <vspace blankLines="1" /> 919 Vorbis encoded audio, configuration data 920 </t> 921 922 <t hangText="Additional information:"> 923 <vspace blankLines="1" /> 924 None 925 </t> 926 927 <t hangText="Person & email address to contact for further information:"> 928 <vspace blankLines="1" /> 929 Luca Barbato: <lu_zero (a] gentoo.org> 930 <vspace blankLines="0" /> 931 IETF Audio/Video Transport Working Group 932 </t> 933 934 <t hangText="Intended usage:"> 935 COMMON 936 </t> 937 938 <t hangText="Restriction on usage:"> 939 <vspace blankLines="1" /> 940 This media type doesn't depend on the transport. 941 </t> 942 943 <t hangText="Author:"> 944 <vspace blankLines="1" /> 945 Luca Barbato</t> 946 947 <t hangText="Change controller:"> 948 <vspace blankLines="1" /> 949 IETF AVT Working Group delegated from the IESG</t> 950 </list> 951 952 </section> 953 954 </section> 955 956 <section anchor="SDP related considerations" title="SDP Related Considerations"> 957 <t> 958 The following paragraphs define the mapping of the parameters described in the IANA considerations section and their usage in the <xref target="RFC3264">Offer/Answer Model</xref>. In order to be forward compatible, the implementation MUST ignore unknown parameters. 959 </t> 960 961 <section anchor="Mapping Media Type Parameters into SDP" title="Mapping Media Type Parameters into SDP"> 962 963 <t> 964 The information carried in the Media Type specification has a 965 specific mapping to fields in the <xref target="RFC4566">Session Description 966 Protocol (SDP)</xref>, which is commonly used to describe RTP sessions. 967 When SDP is used to specify sessions, the mapping are as follows: 968 </t> 969 970 <list style="symbols"> 971 972 <t>The type name ("audio") goes in SDP "m=" as the media name.</t> 973 974 <t>The subtype name ("vorbis") goes in SDP "a=rtpmap" as the encoding name.</t> 975 976 <t>The parameter "rate" also goes in "a=rtpmap" as the clock rate.</t> 977 978 <t>The parameter "channels" also goes in "a=rtpmap" as the channel count.</t> 979 980 <t>The mandated parameters "configuration" MUST be included in the SDP 981 "a=fmtp" attribute.</t> 982 983 </list> 984 985 <t> 986 If the stream comprises chained Vorbis files and all of them are known in 987 advance, the Configuration Packet for each file SHOULD be passed to the client 988 using the configuration attribute. 989 </t> 990 991 <t> 992 The port value is specified by the server application bound to the address 993 specified in the c= line. The channel count value specified in the rtpmap 994 attribute SHOULD match the current Vorbis stream or should be considered the maximum 995 number of channels to be expected. The timestamp clock rate MUST be a multiple 996 of the sample rate; a different payload number MUST be used if the clock rate 997 changes. The Configuration payload delivers the exact information, thus the 998 SDP information SHOULD be considered a hint. 999 An example is found below. 1000 </t> 1001 1002 <section anchor="SDP Example" title="SDP Example"> 1003 <t>The following example shows a basic SDP single stream. The first 1004 configuration packet is inside the SDP; other configurations could be 1005 fetched at any time from the URIs provided. The following 1006 <xref target="RFC4648">base64</xref> configuration string is folded in this 1007 example due to RFC line length limitations.</t> 1008 1009 1010 <list style="empty"> 1011 <t>c=IN IP4 192.0.2.1</t> 1012 <t>m=audio RTP/AVP 98</t> 1013 <t>a=rtpmap:98 vorbis/44100/2</t> 1014 <t>a=fmtp:98 configuration=AAAAAZ2f4g9NAh4aAXZvcmJpcwA...;</t> 1015 </list> 1016 </section> 1017 1018 <t> 1019 Note that the payload format (encoding) names are commonly shown in uppercase. 1020 Media Type subtypes are commonly shown in lowercase. These names are 1021 case-insensitive in both places. Similarly, parameter names are 1022 case-insensitive both in Media Type types and in the default mapping to the SDP 1023 a=fmtp attribute. The a=fmtp line is a single line, even if it is shown as multiple lines in this document for clarity. 1024 </t> 1025 1026 </section> 1027 1028 <section anchor="Usage with the SDP Offer/Answer Mode" title="Usage with the SDP Offer/Answer Model"> 1029 1030 <t> 1031 There are no negotiable parameters. All of them are declarative. 1032 </t> 1033 1034 </section> 1035 1036 </section> 1037 <section anchor="Congestion Control" title="Congestion Control"> 1038 <t> 1039 The general congestion control considerations for transporting RTP 1040 data apply to Vorbis audio over RTP as well. See the RTP specification 1041 <xref target="RFC3550" /> and any applicable RTP profile (e.g., <xref target="RFC3551" />). 1042 Audio data can be encoded using a range of different bit rates, so 1043 it is possible to adapt network bandwidth by adjusting the encoder 1044 bit rate in real time or by having multiple copies of content encoded 1045 at different bit rates. 1046 </t> 1047 </section> 1048 <section anchor="Example" title="Example"> 1049 1050 <t> 1051 The following example shows a common usage pattern that MAY be applied in 1052 such a situation. The main scope of this section is to explain better usage 1053 of the transmission vectors. 1054 </t> 1055 1056 <section anchor="Stream Radio" title="Stream Radio"> 1057 1058 <t>This is one of the most common situations: there is one single server streaming 1059 content in multicast, and the clients may start a session at a random time. The 1060 content itself could be a mix of a live stream (as the webjockey's voice) 1061 and stored streams (as the music she plays).</t> 1062 1063 <t>In this situation, we don't know in advance how many codebooks we will use. 1064 The clients can join anytime and users expect to start listening to the content 1065 in a short time.</t> 1066 1067 <t>Upon joining, the client will receive the current Configuration necessary to 1068 decode the current stream inside the SDP so that the decoding will start 1069 immediately after.</t> 1070 1071 <t>When the streamed content changes, the new Configuration is sent in-band 1072 before the actual stream, and the Configuration that has to be sent inside 1073 the SDP is updated. Since the in-band method is unreliable, an out-of-band 1074 fallback is provided.</t> 1075 1076 <t>The client may choose to fetch the Configuration from the alternate source 1077 as soon as it discovers a Configuration packet got lost in-band, or use 1078 <xref target="RFC3611">selective retransmission</xref> if the server supports 1079 this feature.</t> 1080 1081 <t>A server-side optimization would be to keep a hash list of the 1082 Configurations per session, which avoids packing all of them and sending the same 1083 Configuration with different Ident tags.</t> 1084 1085 <t>A client-side optimization would be to keep a tag list of the Configurations 1086 per session and not process configuration packets that are already known.</t> 1087 1088 </section> 1089 </section> 1090 1091 <section anchor="Security Considerations" title="Security Considerations"> 1092 <t> 1093 RTP packets using this payload format are subject to the security 1094 considerations discussed in the 1095 <xref target="RFC3550">RTP specification</xref>, the 1096 <xref target="RFC4648">base64 specification</xref>, and the 1097 <xref target="RFC3986">URI Generic syntax specification</xref>. 1098 Among other considerations, this implies that the confidentiality of the 1099 media stream is achieved by using encryption. Because the data compression used 1100 with this payload format is applied end-to-end, encryption may be performed on 1101 the compressed data. 1102 </t> 1103 1104 </section> 1105 <section title="Copying Conditions"> 1106 <t>The authors agree to grant third parties the irrevocable right to copy, 1107 use, and distribute the work, with or without modification, in any medium, 1108 without royalty, provided that, unless separate permission is granted, 1109 redistributed modified works do not contain misleading author, version, 1110 name of work, or endorsement information.</t> 1111 </section> 1112 <section anchor="Acknowledgments" title="Acknowledgments"> 1113 1114 <t> 1115 This document is a continuation of the following documents: 1116 </t><t> 1117 Moffitt, J., "RTP Payload Format for Vorbis Encoded Audio", February 2001. 1118 </t><t> 1119 Kerr, R., "RTP Payload Format for Vorbis Encoded Audio", December 2004. 1120 </t><t> 1121 The Media Type declaration is a continuation of the following 1122 document:</t><t> 1123 Short, B., "The audio/rtp-vorbis MIME Type", January 2008. 1124 </t> 1125 1126 <t> 1127 Thanks to the AVT, Vorbis Communities / Xiph.Org Foundation including Steve Casner, 1128 Aaron Colwell, Ross Finlayson, Fluendo, Ramon Garcia, Pascal Hennequin, Ralph 1129 Giles, Tor-Einar Jarnbjo, Colin Law, John Lazzaro, Jack Moffitt, Christopher 1130 Montgomery, Colin Perkins, Barry Short, Mike Smith, Phil Kerr, Michael Sparks, 1131 Magnus Westerlund, David Barrett, Silvia Pfeiffer, Stefan Ehmann, Gianni Ceccarelli and Alessandro Salvatori. Thanks to the LScube Group, in particular Federico 1132 Ridolfo, Francesco Varano, Giampaolo Mancini, Dario Gallucci, and Juan Carlos De Martin. 1133 </t> 1134 1135 </section> 1136 1137 </middle> 1138 1139 <back> 1140 1141 <references title="Normative References"> 1142 1143 <?rfc include="reference.RFC.2119" ?> 1144 <?rfc include="reference.RFC.3550" ?> 1145 <?rfc include="reference.RFC.3551" ?> 1146 <?rfc include="reference.RFC.3986" ?> 1147 <?rfc include="reference.RFC.4566" ?> 1148 <?rfc include="reference.RFC.1191" ?> 1149 <?rfc include="reference.RFC.1981" ?> 1150 <?rfc include="reference.RFC.3264" ?> 1151 <?rfc include="reference.RFC.4648" ?> 1152 1153 <reference anchor="VORBIS-SPEC-REF"> 1154 <front> 1155 <title>Ogg Vorbis I specification: Codec setup and packet decode. Available from the Xiph website, http://xiph.org/vorbis/doc/Vorbis_I_spec.html</title> 1156 </front> 1157 </reference> 1158 1159 </references> 1160 1161 <references title="Informative References"> 1162 1163 <?rfc include="reference.RFC.3533" ?> 1164 1165 <reference anchor="LIBVORBIS"> 1166 <front> 1167 <title>libvorbis: Available from the dedicated website, http://vorbis.com/</title> 1168 </front> 1169 </reference> 1170 1171 <?rfc include="reference.RFC.3611" ?> 1172 <?rfc include="reference.RFC.4588" ?> 1173 1174 </references> 1175 </back> 1176 </rfc> 1177