2 <!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
5 <rfc ipr="full3667" docName="RTP Payload Format for Vorbis Encoded Audio">
8 <title>draft-kerr-avt-vorbis-rtp-04</title>
10 <author initials="P" surname="Kerr" fullname="Phil Kerr">
11 <organization>Xiph.Org</organization>
13 <email>phil@plus24.com</email>
14 <uri>http://www.xiph.org/</uri>
18 <date day="31" month="December" year="2004" />
21 <workgroup>AVT Working Group</workgroup>
22 <keyword>I-D</keyword>
24 <keyword>Internet-Draft</keyword>
25 <keyword>Vorbis</keyword>
26 <keyword>RTP</keyword>
29 <t>This document describes a RTP payload format for transporting
30 Vorbis encoded audio. It details the RTP encapsulation mechanism
31 for raw Vorbis data and details the delivery mechanisms for the
32 decoder probability model, referred to as a codebook, metadata
33 and other setup information.</t>
36 <note title="Editors Note">
38 All references to RFC XXXX are to be replaced by references to the RFC number of this memo, when published.
46 <section anchor="Introduction" title="Introduction">
48 Vorbis is a general purpose perceptual audio codec intended to allow
49 maximum encoder flexibility, thus allowing it to scale competitively
50 over an exceptionally wide range of bitrates. At the high
51 quality/bitrate end of the scale (CD or DAT rate stereo,
52 16/24 bits), it is in the same league as MPEG-2 and MPC. Similarly,
53 the 1.0 encoder can encode high-quality CD and DAT rate stereo at
54 below 48k bits/sec without resampling to a lower rate. Vorbis is
55 also intended for lower and higher sample rates (from 8kHz
56 telephony to 192kHz digital masters) and a range of channel
57 representations (monaural, polyphonic, stereo, quadraphonic, 5.1,
58 ambisonic, or up to 255 discrete channels).
60 Vorbis encoded audio is generally encapsulated within an Ogg format
61 bitstream <xref target="rfc3533"></xref>, which provides framing and synchronization. For the
62 purposes of RTP transport, this layer is unnecessary, and so raw
63 Vorbis packets are used in the payload.
66 <section anchor="Terminology" title="Terminology">
69 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
70 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
71 document are to be interpreted as described in RFC 2119 <xref target="rfc2119"></xref>.
77 <section anchor="Payload Format" title="Payload Format">
79 For RTP based transportation of Vorbis encoded audio the standard
80 RTP header is followed by a 5 octet payload header, then the payload
81 data. The payload headers are used to associate the Vorbis data with
82 its associated decoding codebooks as well as indicating if the following packet
83 contains fragmented Vorbis data and/or the the number of whole Vorbis
84 data frames. The payload data contains the raw Vorbis bitstream
88 <section anchor="RTP Header" title="RTP Header">
92 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
93 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
94 |V=2|P|X| CC |M| PT | sequence number |
95 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
97 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
98 | synchronization source (SSRC) identifier |
99 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
100 | contributing source (CSRC) identifiers |
102 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
106 The RTP header begins with an octet of fields (V, P, X, and CC) to
107 support specialized RTP uses (see <xref target="rfc3550"></xref> and <xref target="rfc3551"></xref> for details). For Vorbis RTP, the following values are used.
111 Version (V): 2 bits</t><t>
112 This field identifies the version of RTP. The version
113 used by this specification is two (2).
117 Padding (P): 1 bit</t><t>
118 Padding MAY be used with this payload format according to
119 section 5.1 of <xref target="rfc3550"></xref>.
123 Extension (X): 1 bit</t><t>
124 Always set to 0, as audio silence suppression is not used by
129 CSRC count (CC): 4 bits</t><t>
130 The CSRC count is used in accordance with <xref target="rfc3550"></xref>.
134 Marker (M): 1 bit</t><t>
135 Set to zero. Audio silence suppression not used. This conforms
136 to section 4.1 of <xref target="vorbis-spec-ref"></xref>.
140 Payload Type (PT): 7 bits</t><t>
141 An RTP profile for a class of applications is expected to assign
142 a payload type for this format, or a dynamically allocated
143 payload type SHOULD be chosen which designates the payload as
148 Sequence number: 16 bits</t><t>
149 The sequence number increments by one for each RTP data packet
150 sent, and may be used by the receiver to detect packet loss and
151 to restore packet sequence. This field is detailed further in
152 <xref target="rfc3550"></xref>.
156 Timestamp: 32 bits</t><t>
157 A timestamp representing the sampling time of the first sample of
158 the first Vorbis packet in the RTP packet. The clock frequency
159 MUST be set to the sample rate of the encoded audio data and is
160 conveyed out-of-band as a SDP attribute.
164 SSRC/CSRC identifiers: </t><t>
165 These two fields, 32 bits each with one SSRC field and a maximum
166 of 16 CSRC fields, are as defined in <xref target="rfc3550"></xref>.
171 <section anchor="Payload Header" title="Payload Header">
174 After the RTP Header section the following five octets are the Payload Header.
175 This header is split into a number of bitfields detailing the format
176 of the following Payload Data packets.
181 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
182 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
184 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
190 Codebook Ident: 32 bits</t><t>
191 This 32 bit field is used to associate the Vorbis data to a decoding Codebook.
192 It is created by making a CRC32 checksum of the codebook required to decode the
193 particular Vorbis audio stream.
197 Continuation (C): 1 bit</t><t>
198 Set to one if this is a continuation of a fragmented packet.
202 Fragmented (F): 1 bit</t><t>
203 Set to one if the payload contains complete packets or if it
204 contains the last fragment of a fragmented packet.
208 Payload Type (T): 2 bits</t><t>
209 This field sets the packet payload type. There are currently four type of packet payloads.
212 <vspace blankLines="1" />
214 <t> 0 = Raw Vorbis payload</t>
215 <t> 1 = Configuration payload</t>
216 <t> 2 = Codebook payload</t>
217 <t> 3 = Metadata payload</t>
221 The last 4 bits are the number of complete packets in this payload.
222 This provides for a maximum number of 15 Vorbis packets in the
223 payload. If the packet contains fragmented data the number of packets MUST be set to 0.
228 <section anchor="Payload Data" title="Payload Data">
231 Raw Vorbis packets are unbounded in length currently, although at some future
232 point there will likely be a practical limit placed on them.
233 Typical Vorbis packet sizes are from very small (2-3 bytes) to
234 quite large (8-12 kilobytes). The reference implementation <xref target="libvorbis"></xref>
235 typically produces packets less than ~800 bytes, except for the
236 codebook header packets which are ~4-12 kilobytes.
237 Within an RTP context the maximum Vorbis packet size, including the RTP and payload
238 headers, SHOULD be kept below the path MTU to avoid packet fragmentation.
242 Each Vorbis payload packet starts with a one octet length header,
243 which is used to represent the size of the following data payload, followed
244 by the raw Vorbis data.
248 For payloads which consist of multiple Vorbis packets the payload data
249 consists of the packet length followed by the packet data for each of
250 the Vorbis packets in the payload.
254 The Vorbis packet length header is the length of the Vorbis data
255 block only and does not count the length octet.
259 The payload packing of the Vorbis data packets SHOULD follow the
260 guidelines set-out in <xref target="rfc3551"></xref> where the oldest packet
261 occurs immediately after the RTP packet header.
265 Channel mapping of the audio is in accordance with BS. 775-1
271 <section anchor="Example RTP Packet" title="Example RTP Packet">
274 Here is an example RTP packet containing two Vorbis packets.
282 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
283 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
284 | 2 |0|0| 0 |0| PT | sequence number |
285 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
286 | timestamp (in sample rate units) |
287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
288 | synchronisation source (SSRC) identifier |
289 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
290 | contributing source (CSRC) identifiers |
292 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
301 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
302 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
304 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
305 |0|1| 0 | 2 pks | len | vorbis data ... |
306 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
307 .. ...vorbis data... ..
308 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
309 .. data | len | next vorbis packet data... |
310 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
317 <section anchor="Frame Packetizing" title="Frame Packetizing">
320 Each RTP packet contains either one complete Vorbis packet, one
321 Vorbis packet fragment, or an integer number of complete Vorbis
322 packets (up to a max of 15 packets, since the number of packets
323 is defined by a 4 bit value).
327 Any Vorbis data packet that is 256 octets or less SHOULD be bundled in the
328 RTP packet with as many Vorbis packets as will fit, up to a maximum
333 If a Vorbis packet is larger than 256 octets it MUST be
334 fragmented. A fragmented packet has a zero in the last four bits
335 of the payload header. Each fragment after the first will also set
336 the Continued (C) bit to one in the payload header. The RTP packet
337 containing the last fragment of the Vorbis packet will have the
338 Fragmented (F) bit set to one. To maintain the correct sequence
339 for fragmented packet reception the timestamp field of fragmented
340 packets MUST be the same as the first packet sent, with the sequence
341 number incremented as normal for the subsequent RTP packets. Path
342 MTU is detailed in <xref target="rfc1063"></xref> and <xref target="rfc1981"></xref>.
345 <section anchor="Example Fragmented Vorbis Packet" title="Example Fragmented Vorbis Packet">
348 Here is an example fragmented Vorbis packet split over three RTP
356 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
357 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
358 |V=2|P|X| CC |M| PT | 1000 |
359 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
361 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
362 | synchronization source (SSRC) identifier |
363 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
364 | contributing source (CSRC) identifiers |
366 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
367 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
369 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
370 |0|0| 0 | 0| len | vorbis data .. |
371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
373 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
377 In this packet the initial sequence number is 1000 and the
378 timestamp is xxxxx. The number of packets field is set to 0.
385 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
386 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
387 |V=2|P|X| CC |M| PT | 1001 |
388 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
390 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
391 | synchronization source (SSRC) identifier |
392 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
393 | contributing source (CSRC) identifiers |
395 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
396 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
398 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
399 |1|0| 0 | 0| len | vorbis data ... |
400 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
402 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
406 The C bit is set to 1 and the number of packets field is set to 0.
407 For large Vorbis fragments there can be several of these type of
408 payload packets. The maximum packet size SHOULD be no greater
409 than the path MTU, including all RTP and payload headers. The
410 sequence number has been incremented by one but the timestamp field
411 remains the same as the initial packet.
418 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
419 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
420 |V=2|P|X| CC |M| PT | 1002 |
421 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
423 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
424 | synchronization source (SSRC) identifier |
425 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
426 | contributing source (CSRC) identifiers |
428 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
431 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
432 |1|1| 0 | 0| len | vorbis data .. |
433 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
435 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
439 This is the last Vorbis fragment packet. The C and F bits are
440 set and the packet count remains set to 0. As in the previous
441 packets the timestamp remains set to the first packet in the
442 sequence and the sequence number has been incremented.
446 <section anchor="Packet Loss" title="Packet Loss">
449 As there is no error correction within the Vorbis stream, packet
450 loss will result in a loss of signal. Packet loss is more of an
451 issue for fragmented Vorbis packets as the client will have to
452 cope with the handling of the C and F flags. If we use the
453 fragmented Vorbis packet example above and the first packet is
454 lost the client SHOULD detect that the next packet has the packet
455 count field set to 0 and the C bit is set and MUST drop it. The
456 next packet, which is the final fragmented packet, SHOULD be dropped
457 in the same manner, or buffered. Feedback reports on lost and
458 dropped packets MUST be sent back via RTCP.
465 <section anchor="Configuration Headers" title="Configuration Headers">
468 Unlike other mainstream audio codecs Vorbis has no statically
469 configured probability model, instead it packs all entropy decoding
470 configuration, VQ and Huffman models into a self-contained codebook.
471 This codebook block also requires additional identification
472 information detailing the number of audio channels, bitrates and
473 other information used to initialise the Vorbis stream.
477 To decode a Vorbis stream three configuration header blocks are
478 needed. The first header indicates the sample and bitrates, the
479 number of channels and the version of the Vorbis encoder used.
480 The second header contains the decoders probability model, or
481 codebook and the third header details stream metadata.
485 As the RTP stream may change certain configuration data mid-session
486 there are two different methods for delivering this configuration
487 data to a client, in-band and SDP which is
488 detailed below. SDP delivery is used to set-up an initial
489 state for the client application and in-band is used to change state
490 during the session. The changes may be due to different metadata
491 or codebooks as well as different bitrates of the stream.
495 Out of the two delivery vectors the use of an SDP attribute to indicate an URI
496 where the configuration and codebook data can be obtained is preferred
497 as they can be fetched reliably using TCP. The in-band codebook delivery SHOULD
498 only be used in situations where the link between the client is unidirectional or if
499 the SDP-based information is not available.
503 Synchronizing the configuration and codebook headers to the RTP stream is
504 critical. The 32 bit Codebook Ident field is used to indicate when a change in the stream has
505 taken place. The client application MUST have in advance the correct configuration and codebook
506 headers and if the client detects a change in the Ident value and does not have this information
507 it MUST NOT decode the raw Vorbis data.
510 <section anchor="In-band Header Transmission" title="In-band Header Transmission">
513 The three header data blocks are sent in-band with the packet type bits set to
514 match the payload type. Normally the codebook and configuration
515 headers are sent once per session if the stream is an encoding of live audio, as typically
516 the encoder state will not change, but the encoder state can change at the boundary
517 of chained Vorbis audio files. Metadata can be sent at the start as well as any time during
518 the life of the session. Clients MUST be capable of dealing with periodic re-transmission of the
519 configuration headers.
523 A Vorbis configuration header is indicated with the payload type field set to 1.
524 The Vorbis version MUST be set to zero to comply with
525 this document. The fields Sample Rate, Bitrate Maximum/Nominal/
526 Minimum and Num Audio Channels are set in accordance with <xref target="vorbis-spec-ref"></xref> with
527 the bsz fields above referring to the blocksize parameters. The
528 framing bit is not used for RTP transportation and so applications
529 constructing Vorbis files MUST take care to set this if required.
534 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
535 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
536 |V=2|P|X| CC |M| PT | xxxx |
537 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
539 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
540 | synchronization source (SSRC) identifier |
541 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
542 | contributing source (CSRC) identifiers |
544 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
547 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
548 |0|1| 2 | 1| bsz 0 | bsz 1 | Num Audio Channels |
549 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
551 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
552 | Audio Sample Rate |
553 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
555 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
557 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
559 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
563 If the payload type field is set to 2, this indicates the packet contains codebook data.
567 The configuration information detailed below MUST be completely
568 intact, as a client can not decode a stream with an incomplete
569 or corrupted codebook set.
573 A 16 bit codebook length field precedes the codebook datablock. The length field
574 allows for codebooks to be up to 64K in size. Packet fragmentation,
575 as per the Vorbis data, MUST be performed if the codebooks size exceeds
576 path MTU. The Codebook Ident field MUST be set to match the associated codebook
577 needed to decode the Vorbis stream.
581 The Codebook Ident is the CRC32 checksum of the codebook and
582 is used to detect a corrupted codebook as well as
583 associating it with its Vorbis data stream. This Ident value
584 MUST NOT be set to the value of the current stream if this header is
585 being sent before the boundary of the chained file has been reached.
586 If a checksum failure is detected then this is considered to
587 be a failure and MUST be reported to the client application.
592 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
593 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
594 |V=2|P|X| CC |M| PT | xxxx |
595 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
597 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
598 | synchronization source (SSRC) identifier |
599 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
600 | contributing source (CSRC) identifiers |
602 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
603 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
605 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
606 |0|1| 2 | 1| Codebook Length |
607 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
608 | length | Codebook ..
609 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
611 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
616 With the payload type flag set to 3, this indicates that the packet contain the
617 comment metadata, such as artist name, track title and so on. These
618 metadata messages are not intended to be fully descriptive but to
619 offer basic track/song information. This message MUST be sent at
620 the start of the stream, together with the setup and codebook
621 headers, even if it contains no information. During a session the
622 metadata associated with the stream may change from that specified
623 at the start, e.g. a live concert broadcast changing acts/scenes, so
624 clients MUST have the ability to receive header blocks. Details
625 on the format of the comments can be found in the Vorbis
626 documentation <xref target="v-comment"></xref>.
630 1) [vendor_length] = read an unsigned integer of 32 bits
631 2) [vendor_string] = read a UTF-8 vector as [vendor_length] octets
632 3) [user_comment_list_length] = read an unsigned integer of 32 bits
633 4) iterate [user_comment_list_length] times {
635 5) [length] = read an unsigned integer of 32 bits
636 6) this iteration's user comment = read a UTF-8 vector as [length] octets
640 7) [framing_bit] = read a single bit as boolean
641 8) if ( [framing_bit] unset or end of packet ) then ERROR
646 The format for the data takes the form of a 32 bit codec vendors
647 name length field followed by the name encoded in UTF-8. The next 32
648 bit field denotes the number of user comments. Each of the user comments
649 is prefixed by a 32 bit length field followed by the comment text.
654 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
655 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
656 |V=2|P|X| CC |M| PT | xxxx |
657 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
659 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
660 | synchronization source (SSRC) identifier |
661 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
662 | contributing source (CSRC) identifiers |
664 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
667 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
668 |0|1| 3 | 1| Vendor string length |
669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
670 | length | Vendor string ..
671 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
672 | User comments list length |
673 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
674 .. User comment length / User comment |
675 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
680 <section anchor="Session Description for Vorbis RTP Streams" title="Session Description for Vorbis RTP Streams">
682 Session description information concerning the Vorbis stream
683 SHOULD be provided if possible and MUST be in accordance with <xref target="rfc2327"></xref>.
687 If the stream comprises chained Vorbis files the configuration and codebook headers for each
688 file SHOULD be packaged together and passed to the client using the headers attribute.
692 Below is an outline of the mandatory SDP attributes.
695 <vspace blankLines="1" />
698 <t>m=audio RTP/AVP 98</t>
699 <t>a=rtpmap:98 VORBIS/44100/2</t>
700 <t>a=fmtp:98 header=<URI of configuration header> </t>
704 The Vorbis configuration specified in the header attribute MUST contain
705 all of the configuration data and codebooks needed for the life of the session.
709 The port value is specified by the server application bound to
710 the address specified in the c attribute. The bitrate value
711 and channels specified in the m attribute MUST match the Vorbis
717 <section anchor="Codebook Caching" title="Codebook Caching">
720 Codebook caching allows clients that have previously connected to a
721 stream to re-use the associated codebooks and configuration data.
722 When a client receives a codebook it may store it locally and can
723 compare the CRC32 key with that of the new stream and begin decoding
724 before it has received any of the headers.
731 <section anchor="IANA Considerations" title="IANA Considerations">
734 MIME media type name: audio
741 Required Parameters:</t><t>
742 header indicates the URI of the decoding configuration headers.
746 Optional Parameters: </t><t>
751 Encoding considerations:</t><t>
752 This type is only defined for transfer via RTP as specified
757 Security Considerations:</t><t>
758 See Section 6 of RFC 3047.
762 Interoperability considerations: none
766 Published specification:</t>
767 <t>See the Vorbis documentation <xref target="vorbis-spec-ref"></xref> for details.</t>
770 Applications which use this media type:</t><t>
771 Audio streaming and conferencing tools
775 Additional information: none
779 Person & email address to contact for further information:</t><t>
780 Phil Kerr: <phil@plus24.com>
784 Intended usage: COMMON
788 Author/Change controller:</t><t>
790 Change controller: IETF AVT Working Group
795 <section anchor="Congestion Control" title="Congestion Control">
798 Vorbis clients SHOULD send regular receiver reports detailing
799 congestion. A mechanism for dynamically downgrading the stream,
800 known as bitrate peeling, will allow for a graceful backing off
801 of the stream bitrate. This feature is not available at present
802 so an alternative would be to redirect the client to a lower
803 bitrate stream if one is available.
808 <section anchor="Security Considerations" title="Security Considerations">
810 RTP packets using this payload format are subject to the security
811 considerations discussed in the RTP specification <xref target="rfc3550"></xref>. This implies
812 that the confidentiality of the media stream is achieved by using
813 encryption. Because the data compression used with this payload
814 format is applied end-to-end, encryption may be performed on the
815 compressed data. Where the size of a data block is set care MUST
816 be taken to prevent buffer overflows in the client applications.
821 <section anchor="Acknowledgments" title="Acknowledgments">
824 This document is a continuation of draft-moffitt-vorbis-rtp-00.txt.
825 The MIME type section is a continuation of draft-short-avt-rtp-
830 Thanks to the AVT, Ogg Vorbis Communities / Xiph.org including
831 Steve Casner, Aaron Colwell, Ross Finlayson, Ramon Garcia, Pascal Hennequin, Ralph Giles,
832 Tor-Einar Jarnbjo, Colin Law, John Lazzaro, Jack Moffitt, Christopher Montgomery,
833 Colin Perkins, Barry Short, Mike Smith, Magnus Westerlund.
842 <references title="Normative References">
844 <reference anchor="rfc3533">
846 <title>The Ogg Encapsulation Format Version 0</title>
847 <author initials="S." surname="Pfeiffer" fullname="Silvia Pfeiffer"></author>
849 <seriesInfo name="RFC" value="3533" />
852 <reference anchor="rfc2119">
854 <title>Key words for use in RFCs to Indicate Requirement Levels </title>
855 <author initials="S." surname="Bradner" fullname="Scott Bradner"></author>
857 <seriesInfo name="RFC" value="2119" />
860 <reference anchor="rfc3550">
862 <title>RTP: A Transport Protocol for real-time applications</title>
863 <author initials="H." surname="Schulzrinne" fullname=""></author>
864 <author initials="S." surname="Casner" fullname=""></author>
865 <author initials="R." surname="Frederick" fullname=""></author>
866 <author initials="V." surname="Jacobson" fullname=""></author>
868 <seriesInfo name="RFC" value="3550" />
871 <reference anchor="rfc3551">
873 <title>RTP Profile for Audio and Video Conferences with Minimal Control.</title>
874 <author initials="H." surname="Schulzrinne" fullname=""></author>
875 <author initials="S." surname="Casner" fullname=""></author>
877 <date month="July" year="2003" />
878 <seriesInfo name="RFC" value="3551" />
881 <reference anchor="rfc2327">
883 <title>SDP: Session Description Protocol</title>
884 <author initials="M." surname="Handley" fullname="Mark Handley"></author>
885 <author initials="V." surname="Jacobson" fullname="Van Jacobson"></author>
887 <seriesInfo name="RFC" value="2327" />
890 <reference anchor="rfc1063">
892 <title>Path MTU Discovery</title>
893 <author initials="J." surname="Mogul et al." fullname="J. Mogul et al."></author>
895 <seriesInfo name="RFC" value="1063" />
898 <reference anchor="rfc1981">
900 <title>Path MTU Discovery for IP version 6</title>
901 <author initials="J." surname="McCann et al." fullname="J. McCann et al."></author>
903 <seriesInfo name="RFC" value="1981" />
907 <references title="Informative References">
908 <reference anchor="libvorbis">
910 <title>libvorbis: Available from the Xiph website, http://www.xiph.org</title>
914 <reference anchor="vorbis-spec-ref">
916 <title>Ogg Vorbis I spec: Codec setup and packet decode. http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-ref.html</title>
920 <reference anchor="v-comment">
922 <title>Ogg Vorbis I spec: Comment field and header specification. http://www.xiph.org/ogg/vorbis/doc/v-comment.html</title>