Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/libvorbis-1.2.0/doc/draft-ietf-avt-rtp-vorbis-06.xml @ 16

Last change on this file since 16 was 16, checked in by landauf, 16 years ago

added libvorbis

File size: 52.7 KB
Line 
1<?xml version='1.0'?>
2<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
3<?rfc toc="yes" ?>
4<?rfc compact='yes'?>
5
6<rfc ipr="full3978" docName="RTP Payload Format for Vorbis Encoded Audio">
7
8<front>
9<title>draft-ietf-avt-rtp-vorbis-06</title>
10
11<author initials="L" surname="Barbato" fullname="Luca Barbato">
12<organization>Xiph.Org</organization>
13<address>
14<email>lu_zero@gentoo.org</email>
15<uri>http://www.xiph.org/</uri>
16</address>
17</author>
18
19<date day="25" month="Jun" year="2007" />
20
21<area>General</area>
22<workgroup>AVT Working Group</workgroup>
23<keyword>I-D</keyword>
24
25<keyword>Internet-Draft</keyword>
26<keyword>Vorbis</keyword>
27<keyword>RTP</keyword>
28
29<abstract>
30
31<t>
32This document describes an RTP payload format for transporting Vorbis encoded
33audio. It details the RTP encapsulation mechanism for raw Vorbis data and
34details the delivery mechanisms for the decoder probability model, referred to
35as a codebook and other setup information.
36</t>
37
38<t>
39Also included within this memo are media type registrations, and the details
40necessary for the use of Vorbis with the Session Description Protocol (SDP).
41</t>
42
43</abstract>
44
45<note title="Editors Note">
46<t>
47All references to RFC XXXX are to be replaced by references to the RFC number
48of this memo, when published.
49</t>
50</note>
51
52</front>
53
54<middle>
55
56<section anchor="Introduction" title="Introduction">
57
58<t>
59Vorbis is a general purpose perceptual audio codec intended to allow
60maximum encoder flexibility, thus allowing it to scale competitively
61over an exceptionally wide range of bitrates. At the high
62quality/bitrate end of the scale (CD or DAT rate stereo, 16/24 bits), it
63is in the same league as AAC.
64Vorbis is also intended for lower and higher sample rates (from
658kHz telephony to 192kHz digital masters) and a range of channel
66representations (monaural, polyphonic, stereo, quadraphonic, 5.1,
67ambisonic, or up to 255 discrete channels).
68</t>
69
70<t>
71Vorbis encoded audio is generally encapsulated within an Ogg format bitstream
72<xref target="rfc3533"></xref>, which provides framing and synchronization.
73For the purposes of RTP transport, this layer is unnecessary, and so raw Vorbis
74packets are used in the payload.
75</t>
76
77<section anchor="Terminology" title="Terminology">
78
79<t>
80The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
81in this document are to be interpreted as described in RFC 2119 <xref target="rfc2119"></xref>.
82</t>
83
84</section>
85</section>
86
87<section anchor="Payload Format" title="Payload Format">
88
89<t>
90For RTP based transport of Vorbis encoded audio the standard RTP header is
91followed by a 4 octets payload header, then the payload data. The payload
92headers are used to associate the Vorbis data with its associated decoding
93codebooks as well as indicating if the following packet contains fragmented
94Vorbis data and/or the number of whole Vorbis data frames. The payload data
95contains the raw Vorbis bitstream information. There are 3 types of Vorbis
96payload data, an RTP packet MUST contain just one of them at a time.
97</t>
98
99<section anchor="RTP Header" title="RTP Header">
100
101<t>
102The format of the RTP header is specified in <xref target="rfc3550"></xref>
103and shown in Figure <xref target="RTP Header Figure"/>.  This payload format
104uses the fields of the header in a manner consistent with that specification.
105</t>
106
107<t>
108<figure anchor="RTP Header Figure" title="RTP Header">
109<artwork><![CDATA[
110    0                   1                   2                   3
111    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
112   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
113   |V=2|P|X|  CC   |M|     PT      |       sequence number         |
114   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
115   |                           timestamp                           |
116   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
117   |           synchronization source (SSRC) identifier            |
118   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
119   |            contributing source (CSRC) identifiers             |
120   |                              ...                              |
121   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
122]]></artwork>
123</figure>
124</t>
125
126<t>
127The RTP header begins with an octet of fields (V, P, X, and CC) to support
128specialized RTP uses (see <xref target="rfc3550"></xref> and
129<xref target="rfc3551"></xref> for details). For Vorbis RTP, the following
130values are used.
131</t>
132
133<t>
134Version (V): 2 bits</t>
135<t>
136This field identifies the version of RTP. The version used by this
137specification is two (2).
138</t>
139
140<t>
141Padding (P): 1 bit</t>
142<t>
143Padding MAY be used with this payload format according to section 5.1 of
144<xref target="rfc3550"></xref>.
145</t>
146
147<t>
148Extension (X): 1 bit</t>
149<t>
150The Extension bit is used in accordance with <xref target="rfc3550"></xref>.
151</t>
152
153<t>
154CSRC count (CC): 4 bits</t>
155<t>
156The CSRC count is used in accordance with <xref target="rfc3550"></xref>.
157</t>
158
159<t>
160Marker (M): 1 bit</t>
161<t>
162Set to zero.  Audio silence suppression not used.  This conforms to section 4.1
163of <xref target="vorbis-spec-ref"></xref>.
164</t>
165
166<t>
167Payload Type (PT): 7 bits</t>
168<t>
169An RTP profile for a class of applications is expected to assign a payload type
170for this format, or a dynamically allocated payload type SHOULD be chosen which
171designates the payload as Vorbis.
172</t>
173
174<t>
175Sequence number: 16 bits</t>
176<t>
177The sequence number increments by one for each RTP data packet sent, and may be
178used by the receiver to detect packet loss and to restore packet sequence. This
179field is detailed further in <xref target="rfc3550"></xref>.
180</t>
181
182<t>
183Timestamp: 32 bits</t>
184<t>
185A timestamp representing the sampling time of the first sample of the first
186Vorbis packet in the RTP packet. The clock frequency MUST be set to the sample
187rate of the encoded audio data and is conveyed out-of-band (e.g. as a SDP parameter).
188</t>
189
190<t>
191SSRC/CSRC identifiers: </t>
192<t>
193These two fields, 32 bits each with one SSRC field and a maximum of 16 CSRC
194fields, are as defined in <xref target="rfc3550">
195</xref>
196</t>
197
198</section>
199
200<section anchor="Payload Header" title="Payload Header">
201
202<t>
203The 4 octets following the RTP Header section are the Payload Header. This
204header is split into a number of bitfields detailing the format of the
205following payload data packets.
206</t>
207
208<figure anchor="Payload Header Figure" title="Payload Header">
209<artwork><![CDATA[
210    0                   1                   2                   3
211    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
212   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
213   |                     Ident                     | F |VDT|# pkts.|
214   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
215]]></artwork>
216</figure>
217
218<t>
219Ident: 24 bits</t>
220<t>
221This 24 bit field is used to associate the Vorbis data to a decoding
222Configuration. It is stored as network byte order integer.
223</t>
224
225<t>
226Fragment type (F): 2 bits</t>
227<t>
228This field is set according to the following list
229</t>
230<vspace blankLines="1" />
231<list style="empty">
232<t>      0 = Not Fragmented</t>
233<t>      1 = Start Fragment</t>
234<t>      2 = Continuation Fragment</t>
235<t>      3 = End Fragment</t>
236</list>
237
238<t>
239Vorbis Data Type (VDT): 2 bits</t>
240<t>
241This field specifies the kind of Vorbis data stored in this RTP packet. There
242are currently three different types of Vorbis payloads. Each packet MUST contain only a single type of Vorbis payload (e.g. you MUST not aggregate configuration and comment payload in the same packet)
243</t>
244
245<vspace blankLines="1" />
246<list style="empty">
247<t>      0 = Raw Vorbis payload</t>
248<t>      1 = Vorbis Packed Configuration payload</t>
249<t>      2 = Legacy Vorbis Comment payload</t>
250<t>      3 = Reserved</t>
251</list>
252
253<t> The packets with a VDT of value 3 MUST be ignored </t>
254
255<t>
256The last 4 bits represent the number of complete packets in this payload. This
257provides for a maximum number of 15 Vorbis packets in the payload. If the
258packet contains fragmented data the number of packets MUST be set to 0.
259</t>
260
261</section>
262
263<section anchor="Payload Data" title="Payload Data">
264
265<t>
266Raw Vorbis packets are currently unbounded in length, application profiles will
267likely define a practical limit. Typical Vorbis packet sizes range from very
268small (2-3 bytes) to quite large (8-12 kilobytes). The reference implementation
269<xref target="libvorbis"></xref> typically produces packets less than ~800
270bytes, except for the setup header packets which are ~4-12 kilobytes. Within an
271RTP context, to avoid fragmentation, the Vorbis data packet size SHOULD be kept
272sufficiently small so that after adding the RTP and payload headers, the
273complete RTP packet is smaller than the path MTU.
274</t>
275
276<figure anchor="Payload Data Figure" title="Payload Data Header">
277<artwork><![CDATA[
278    0                   1                   2                   3
279    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
280   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
281   |            length             |       vorbis packet data     ..
282   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
283]]></artwork>
284</figure>
285
286<t>
287Each Vorbis payload packet starts with a two octet length header, which is used
288to represent the size in bytes of the following data payload, followed by the
289raw Vorbis data padded to the nearest byte boundary, as explained by the <xref target="vorbis-spec-ref">vorbis specification</xref>. The length value is stored
290as network byte order integer.
291</t>
292
293<t>
294For payloads which consist of multiple Vorbis packets the payload data consists
295of the packet length followed by the packet data for each of the Vorbis packets
296in the payload.
297</t>
298
299<t>
300The Vorbis packet length header is the length of the Vorbis data block only and
301does not count the length field.
302</t>
303
304<t>
305The payload packing of the Vorbis data packets MUST follow the guidelines
306set-out in <xref target="rfc3551"></xref> where the oldest packet occurs
307immediately after the RTP packet header. Subsequent packets, if any, MUST
308follow in temporal order.
309</t>
310
311<t>
312Channel mapping of the audio is in accordance with the
313<xref target="vorbis-spec-ref">Vorbis I Specification</xref>.
314</t>
315
316</section>
317
318<section anchor="Example RTP Packet" title="Example RTP Packet">
319
320<t>
321Here is an example RTP packet containing two Vorbis packets.
322</t>
323
324<t>
325RTP Packet Header:
326</t>
327
328<figure anchor="Example Raw Vorbis Packet" title="Example Raw Vorbis Packet">
329<artwork><![CDATA[
330    0                   1                   2                   3
331    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
332   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
333   | 2 |0|0|  0    |0|      PT     |       sequence number         |
334   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
335   |               timestamp (in sample rate units)                |
336   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
337   |           synchronisation source (SSRC) identifier            |
338   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
339   |            contributing source (CSRC) identifiers             |
340   |                              ...                              |
341   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
342   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
343   |                     Ident                     | 0 | 0 | 2 pks |
344   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
345   |            length             |          vorbis data         ..
346   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
347   ..                        vorbis data                           |
348   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
349   |            length             |   next vorbis packet data    ..
350   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
351   ..                        vorbis data                          ..
352   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
353   ..               vorbis data                    |
354   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
355]]></artwork>
356</figure>
357
358<t>
359The payload data section of the RTP packet begins with the 24 bit Ident field
360followed by the one octet bitfield header, which has the number of Vorbis
361frames set to 2.  Each of the Vorbis data frames is prefixed by the two octets
362length field. The Packet Type and Fragment Type are set to 0. The Configuration
363that will be used to decode the packets is the one indexed by the ident value.
364</t>
365
366</section>
367</section>
368
369
370
371<section anchor="Configuration Headers" title="Configuration Headers">
372
373<t>
374Unlike other mainstream audio codecs Vorbis has no statically
375configured probability model. Instead, it packs all entropy decoding
376configuration, Vector Quantization and Huffman models into a data block
377that must be transmitted to the decoder along with the compressed data.
378A decoder also requires information detailing the number of audio
379channels, bitrates and similar information to configure itself for a
380particular compressed data stream. These two blocks of information are
381often referred to collectively as the "codebooks" for a Vorbis stream,
382and are nominally included as special "header" packets at the start
383of the compressed data. In addition,
384the <xref target="vorbis-spec-ref">Vorbis I specification</xref>
385requires the presence of a comment header packet which gives simple
386metadata about the stream, but this information is not required for
387decoding the frame sequence.
388</t>
389
390<t>
391Thus these two codebook header packets must be received by the decoder before
392any audio data can be interpreted. These requirements pose problems in RTP,
393which is often used over unreliable transports.
394</t>
395
396<t>
397Since this information must be transmitted reliably and, as the RTP
398stream may change certain configuration data mid-session, there are
399different methods for delivering this configuration data to a
400client, both in-band and out-of-band which is detailed below. SDP
401delivery is typically used to set up an initial state for the client
402application. The changes may be due to different codebooks as well as
403different bitrates of the stream.
404</t>
405
406<t>
407The delivery vectors in use can be specified by an SDP attribute to indicate the
408method and the optional URI where the Vorbis
409<xref target="Packed Configuration">Packed Configuration</xref> Packets could
410be fetched. Different delivery methods MAY be advertised for the same session.
411The in-band Configuration delivery SHOULD be considered as baseline,
412out-of-band delivery methods that don't use RTP will not be described in this
413document. For non chained streams, the Configuration recommended delivery
414method is inline the <xref target="Packed Configuration">Packed Configuration</xref> in the SDP as explained in the <xref target="Mapping Media Type Parameters into SDP"> IANA considerations</xref>.
415</t>
416
417<t>
418The 24 bit Ident field is used to map which Configuration will be used to
419decode a packet. When the Ident field changes, it indicates that a change in
420the stream has taken place. The client application MUST have in advance the
421correct configuration and if the client detects a change in the Ident value and
422does not have this information it MUST NOT decode the raw Vorbis data
423associated until it fetches the correct Configuration.
424</t>
425
426<section anchor="In-band Header Transmission" title="In-band Header Transmission">
427
428<t>
429The <xref target="Packed Configuration">Packed Configuration</xref> Payload is
430sent in-band with the packet type bits set to match the Vorbis Data Type.
431Clients MUST be capable of dealing with fragmentation and periodic
432re-transmission of the configuration headers.
433</t>
434
435<section anchor="Packed Configuration" title="Packed Configuration">
436
437<t>
438A Vorbis Packed Configuration is indicated with the Vorbis Data Type field set
439to 1. Of the three headers defined in the
440<xref target="vorbis-spec-ref">Vorbis I specification</xref>, the
441identification and the setup MUST be packed as they are, while the comment header MAY be replaced with a dummy one. The packed configuration follows a generic way to store xiph codec configurations: The first field stores the number of the following packets minus one (count field), the next ones represent the size of the headers (length fields), the headers immediately follow the list of length fields. The size of the last header is implicit.
442The count and the length fields are encoded using the following logic: the data is in network order, every byte has the most significant bit used as flag and the following 7 used to store the value. The first N bit are to be taken, where N is number of bits representing the value modulo 7, and stored in the first byte.
443If there are more bits, the flag bit is set to 1 and the subsequent 7bit are stored in the following byte, if there are remaining bits set the flag to 1 and the same procedure is repeated. The ending byte has the flag bit set to 0. In order to decode it is enough to iterate over the bytes until the flag bit set to 0, for every byte the data is added to the accumulated value multiplied by 128.
444The headers are packed in the same order they are present in ogg: identification, comment, setup.</t>
445
446<figure anchor="Packed Configuration Figure" title="Packed Configuration Figure">
447<artwork><![CDATA[
448    0                   1                   2                   3
449    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
450   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
451   |V=2|P|X|  CC   |M|     PT      |             xxxx              |
452   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
453   |                             xxxxx                             |
454   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
455   |           synchronization source (SSRC) identifier            |
456   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
457   |            contributing source (CSRC) identifiers             |
458   |                              ...                              |
459   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
460   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
461   |                      Ident                    | 1 | 0 |      0|
462   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
463   |           length              | n. of headers |    length1    |
464   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
465   |    length2    |                  Identification              ..
466   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
467   ..                        Identification                       ..
468   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
469   ..                        Identification                       ..
470   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
471   ..                        Identification                       ..
472   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
473   ..               Identification                 |    Comment   ..
474   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
475   ..                            Comment                          ..
476   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
477   ..                            Comment                          ..
478   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
479   ..                            Comment                          ..
480   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
481   ..           Comment            |             Setup            ..
482   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
483   ..                            Setup                            ..
484   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
485   ..                            Setup                            ..
486   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
487]]></artwork>
488</figure>
489
490<t>The Ident field is set with the value that will be used by the Raw Payload
491Packets to address this Configuration. The Fragment type is set to 0 since the
492packet bears the full Packed configuration, the number of packet is set to 1.</t>
493</section>
494</section>
495
496<section anchor="Out of Band Transmission" title="Out of Band Transmission">
497
498<t>
499This section, as stated above, does not cover all the possible out-of-band
500delivery methods since they rely on different protocols and are linked to
501specific applications. The following packet definition SHOULD be used in
502out-of-band delivery and MUST be used when Configuration is inlined in the SDP.
503</t>
504
505<section anchor="Packed Headers" title="Packed Headers"> 
506
507<t>
508As mentioned above the RECOMMENDED delivery vector for Vorbis configuration
509data is via a retrieval method that can be performed using a reliable transport
510protocol. As the RTP headers are not required for this method of delivery the
511structure of the configuration data is slightly different. The packed header
512starts with a 32 bit (network ordered) count field which details the number of
513packed headers that are contained in the bundle. Next is the Packed header
514payload for each chained Vorbis stream.
515</t>
516
517<figure anchor="Packed Headers Overview Figure" title="Packed Headers Overview">
518<artwork><![CDATA[
519   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
520   |                     Number of packed headers                  |
521   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
522   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
523   |                          Packed header                        |
524   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
525   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
526   |                          Packed header                        |
527   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
528]]></artwork>
529</figure>
530
531<t>
532Since the Configuration Ident and the Identification Header are fixed length
533there is only a 2 byte length tag to define the length of the packed headers.
534</t>
535
536<figure anchor="Packed Headers Detail Figure" title="Packed Headers Detail">
537<artwork><![CDATA[
538    0                   1                   2                   3
539    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
540   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
541   |                   Ident                       |    length    ..
542   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
543   ..              | n. of headers |    length1    |    length2   ..
544   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
545   ..              |             Identification Header            ..
546   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
547   .................................................................
548   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
549   ..              |         Comment Header                       ..
550   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
551   .................................................................
552   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
553   ..                        Comment Header                        |
554   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
555   |                          Setup Header                        ..
556   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
557   .................................................................
558   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
559   ..                         Setup Header                         |
560   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
561]]></artwork>
562</figure>
563<t>
564The key difference between the in-band format and this one, is that there is no
565need for the payload header octet. In this figure the comment has a size bigger
566than 127 bytes.
567</t>
568</section>
569
570</section>
571
572<section anchor="Loss of Configuration Headers" title="Loss of Configuration Headers"> 
573
574<t>
575Unlike the loss of raw Vorbis payload data, loss of a configuration header can
576lead to a situation where it will not be possible to successfully decode the
577stream.
578</t>
579
580<t>
581Loss of Configuration Packet results in the halting of stream decoding.
582</t>
583
584</section>
585
586</section>
587
588<section anchor="Comment Headers" title="Comment Headers">
589
590<t>
591With the Vorbis Data Type flag set to 2, this indicates that the packet contain
592the comment metadata, such as artist name, track title and so on. These
593metadata messages are not intended to be fully descriptive but to offer basic
594track/song information. Clients MAY ignore it completely. The details on the
595format of the comments can be found in the <xref target="vorbis-spec-ref">Vorbis documentation</xref>.
596</t>
597<figure anchor="Comment Packet Figure" title="Comment Packet">
598<artwork><![CDATA[
599    0                   1                   2                   3
600    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
601   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
602   |V=2|P|X|  CC   |M|     PT      |             xxxx              |
603   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
604   |                             xxxxx                             |
605   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
606   |           synchronization source (SSRC) identifier            |
607   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
608   |            contributing source (CSRC) identifiers             |
609   |                              ...                              |
610   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
611   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
612   |                      Ident                    | 0 | 2 |      1|
613   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
614   |            length             |            Comment           ..
615   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
616   ..                           Comment                           ..
617   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
618   ..                           Comment                            |
619   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
620]]></artwork>
621</figure>
622
623<t>
624The 2 bytes length field is necessary since this packet could be fragmented.
625</t>
626
627</section>
628<section anchor="Frame Packetization" title="Frame Packetization">
629
630<t>
631Each RTP packet contains either one Vorbis packet fragment, or an integer
632number of complete Vorbis packets (up to a maximum of 15 packets, since the
633number of packets is defined by a 4 bit value).
634</t>
635
636<t>
637Any Vorbis data packet that is less than path MTU SHOULD be bundled in the RTP
638packet with as many Vorbis packets as will fit, up to a maximum of 15, except
639when such bundling would exceed an application's desired transmission latency.
640Path MTU is detailed in <xref target="rfc1191"></xref> and <xref target="rfc1981"></xref>.
641</t>
642
643<t>
644A fragmented packet has a zero in the last four bits of the payload header.
645The first fragment will set the Fragment type to 1. Each fragment after the
646first will set the Fragment type to 2 in the payload header.  The RTP packet
647containing the last fragment of the Vorbis packet will have the Fragment type
648set to 3.  To maintain the correct sequence for fragmented packet reception
649the timestamp field of fragmented packets MUST be the same as the first packet
650sent, with the sequence number incremented as normal for the subsequent RTP
651packets. The length field shows the fragment length.
652</t>
653
654<section anchor="Example Fragmented Vorbis Packet" title="Example Fragmented Vorbis Packet">
655
656<t>
657Here is an example fragmented Vorbis packet split over three RTP packets.
658Each packet contains the standard RTP headers as well as the 4 octets Vorbis
659headers.
660</t>
661
662<figure anchor="Example Fragmented Packet (Packet 1)" title="Example Fragmented Packet (Packet 1)">
663<artwork><![CDATA[
664   Packet 1:
665
666    0                   1                   2                   3
667    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
668   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
669   |V=2|P|X|  CC   |M|     PT      |           1000                |
670   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
671   |                            12345                              |
672   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
673   |           synchronization source (SSRC) identifier            |
674   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
675   |            contributing source (CSRC) identifiers             |
676   |                              ...                              |
677   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
678   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
679   |                       Ident                   | 1 | 0 |      0|
680   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
681   |             length            |            vorbis data       ..
682   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
683   ..                        vorbis data                           |
684   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
685]]></artwork>
686</figure>
687
688<t>
689In this packet 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
690the payload is raw Vorbis data the VDT field is set to 0.
691</t>
692
693<figure anchor="Example Fragmented Packet (Packet 2)" title="Example Fragmented Packet (Packet 2)">
694<artwork><![CDATA[
695   Packet 2:
696
697    0                   1                   2                   3
698    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
699   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
700   |V=2|P|X|  CC   |M|     PT      |           1001                |
701   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
702   |                             12345                             |
703   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
704   |           synchronization source (SSRC) identifier            |
705   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
706   |            contributing source (CSRC) identifiers             |
707   |                              ...                              |
708   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
709   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
710   |                       Ident                   | 2 | 0 |      0|
711   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
712   |             length            |          vorbis data         ..
713   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
714   ..                        vorbis data                           |
715   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
716]]></artwork>
717</figure>
718
719<t>
720The Fragment type field is set to 2 and the number of packets field is set to 0.
721For large Vorbis fragments there can be several of these type of payload
722packets. The maximum packet size SHOULD be no greater than the path MTU,
723including all RTP and payload headers. The sequence number has been incremented
724by one but the timestamp field remains the same as the initial packet.
725</t>
726
727<figure anchor="Example Fragmented Packet (Packet 3)" title="Example Fragmented Packet (Packet 3)">
728<artwork><![CDATA[
729   Packet 3:
730
731    0                   1                   2                   3
732    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
733   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
734   |V=2|P|X|  CC   |M|     PT      |           1002                |
735   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
736   |                             12345                             |
737   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
738   |           synchronization source (SSRC) identifier            |
739   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
740   |            contributing source (CSRC) identifiers             |
741   |                              ...                              |
742   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
743   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
744   |                      Ident                    | 3 | 0 |      0|
745   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
746   |             length            |          vorbis data         ..
747   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
748   ..                        vorbis data                           |
749   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
750]]></artwork>
751</figure>
752
753<t>
754This is the last Vorbis fragment packet.  The Fragment type is set to 3 and the
755packet count remains set to 0. As in the previous packets the timestamp remains
756set to the first packet in the sequence and the sequence number has been
757incremented.
758</t>
759</section>
760
761<section anchor="Packet Loss" title="Packet Loss">
762
763<t>
764As there is no error correction within the Vorbis stream, packet loss will
765result in a loss of signal. Packet loss is more of an issue for fragmented
766Vorbis packets as the client will have to cope with the handling of the
767Fragment Type. In case of loss of fragments the client MUST discard all the
768remaining fragments and decode the incomplete packet. If we use the fragmented
769Vorbis packet example above and the first packet is lost the client MUST detect
770that the next packet has the packet count field set to 0 and the Fragment type
7712 and MUST drop it. The next packet, which is the final fragmented packet, MUST
772be dropped in the same manner. If the missing packet is the last, the received
773two fragments will be kept and the incomplete vorbis packet decoded.
774</t>
775
776<t>
777Loss of any of the Configuration fragment will result in the loss of the full
778Configuration packet with the result detailed in the <xref target="Loss of Configuration Headers">Loss of Configuration Headers</xref> section.
779</t>
780
781</section>
782</section>
783<section anchor="IANA Considerations" title="IANA Considerations"> 
784
785<vspace blankLines="1" />
786<list style="hanging">
787<t hangText="Type name:"> audio </t>
788<vspace blankLines="1" />
789
790<t hangText="Subtype name:"> vorbis </t>
791<vspace blankLines="1" />
792
793<t hangText="Required parameters:">
794
795<vspace blankLines="1" />
796
797<list style="hanging">
798<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>
799</t>
800<vspace blankLines="1" />
801
802<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>
803</t>
804
805<vspace blankLines="1" />
806
807<t hangText="delivery-method:"> indicates the delivery methods in use, the possible values are: inline, in_band, out_band, MAY be included multiple times
808</t>
809
810<vspace blankLines="1" />
811
812<t hangText="configuration:"> the <xref target="rfc3548">base64</xref> representation of the <xref target="Packed Headers">Packed Headers</xref>. It MUST follow the associated delivery-method parameter ("inline").
813</t>
814</list>
815</t>
816
817<vspace blankLines="1" />
818
819<t hangText="Optional parameters:">
820
821<vspace blankLines="1" />
822
823<list style="hanging">
824<t hangText="configuration-uri:"> the <xref target="rfc3986">URI</xref> of
825the configuration headers in case of out of band transmission.
826In the form of "protocol://path/to/resource/", depending on the specific
827method, a single configuration packet could be retrived by its Ident number, or
828multiple packets could be aggregated in a single stream.
829Such aggregates MAY be compressed using either
830<xref target="BZ2">bzip2</xref> or <xref target="rfc1952">gzip</xref>.
831A <xref target="FIPS180">sha1</xref> checksum MAY be provided for aggregates.
832In this latter case the URI will end with the aggregate name, followed by its
833compressed extension if applies, a "!" and the <xref target="rfc3548">base64</xref> representation of the sha1hash of the above mentioned compressed aggregated
834as in: "protocol://path/to/resource/aggregated.bz2!sha1hash".
835The trailing '/' discriminates which of two methods are in use.
836The configuration-uri MUST follow the associated delivery method parameter ("out_band").
837Non hierarchical protocols and protocols using for special purposes the '!' separator MAY point just to a resource aggregate using their specific syntax.
838</t>
839</list>
840</t>
841
842<vspace blankLines="1" />
843
844<t hangText="Encoding considerations:">
845<vspace blankLines="1" />
846This media type is framed and contains binary data.
847</t>
848
849<vspace blankLines="1" />
850
851<t hangText="Security considerations:">
852<vspace blankLines="1" />
853See Section 10 of RFC XXXX.</t>
854
855<vspace blankLines="1" />
856<t hangText="Interoperability considerations:">
857<vspace blankLines="1" />
858None</t>
859
860<vspace blankLines="1" />
861<t hangText="Published specification:">
862
863<vspace blankLines="1" />
864RFC XXXX [RFC Editor: please replace by the RFC number of  this memo, when published]
865<vspace blankLines="1" />
866Ogg Vorbis I specification:  Codec setup and packet decode. Available from the Xiph website, http://www.xiph.org
867</t>
868
869<vspace blankLines="1" />
870
871<t hangText="Applications which use this media type:">
872<vspace blankLines="1"/>
873Audio streaming and conferencing tools </t>
874
875<vspace blankLines="1" />
876
877<t hangText="Additional information:">
878<vspace blankLines="1" />
879None </t>
880
881<vspace blankLines="1" />
882
883<t hangText="Person &amp; email address to contact for further information:">
884
885<vspace blankLines="1" />
886
887Luca Barbato: &lt;lu_zero@gentoo.org&gt;<br/>
888IETF Audio/Video Transport Working Group
889
890</t>
891
892<vspace blankLines="1" />
893
894<t hangText="Intended usage:">
895<vspace blankLines="1" />
896COMMON</t>
897
898<vspace blankLines="1" />
899
900<t hangText="Restriction on usage:">
901<vspace blankLines="1" />
902This media type depends on RTP framing, and hence is only defined for transfer via <xref target="rfc3550">RTP</xref></t>
903
904<vspace blankLines="1" />
905
906<t hangText="Author:">
907<vspace blankLines="1"/>Luca Barbato</t>
908
909<vspace blankLines="1" />
910
911<t hangText="Change controller:">
912<vspace blankLines="1"/>IETF AVT Working Group delegated from the IESG</t>
913
914<vspace blankLines="1" />
915</list>
916
917<section anchor="Packed Headers IANA Considerations" title="Packed Headers IANA Considerations"> 
918
919<t>
920The following IANA considerations MUST only be applied to the packed headers.
921</t>
922
923<vspace blankLines="1" />
924
925<list style="hanging">
926<t hangText="Type name:"> audio </t>
927
928<vspace blankLines="1" />
929
930<t hangText="Subtype name:"> vorbis-config </t>
931
932<vspace blankLines="1" />
933
934<t hangText="Required parameters:">
935<vspace blankLines="1" />
936None
937</t>
938
939<vspace blankLines="1" />
940
941<t hangText="Optional parameters:">
942<vspace blankLines="1" />
943None
944</t>
945
946<vspace blankLines="1" />
947
948<t hangText="Encoding considerations:">
949<vspace blankLines="1" />
950This media type contains binary data.
951</t>
952
953<vspace blankLines="1" />
954
955<t hangText="Security considerations:">
956<vspace blankLines="1" />
957See Section 10 of RFC XXXX.
958</t>
959
960<vspace blankLines="1" />
961
962<t hangText="Interoperability considerations:">
963<vspace blankLines="1" />
964None
965</t>
966
967<vspace blankLines="1" />
968
969<t hangText="Published specification:">
970<vspace blankLines="1" />
971RFC XXXX [RFC Editor: please replace by the RFC number of  this memo,
972       when published]
973</t>
974
975<vspace blankLines="1" />
976
977<t hangText="Applications which use this media type:">
978<vspace blankLines="1" />
979Vorbis encoded audio, configuration data.
980</t>
981
982<vspace blankLines="1" />
983
984<t hangText="Additional information:"> 
985<vspace blankLines="1" />
986None
987</t>
988
989<vspace blankLines="1" />
990
991<t hangText="Person &amp; email address to contact for further information:">
992<vspace blankLines="1" />
993Luca Barbato: &lt;lu_zero@gentoo.org&gt;
994<vspace blankLines="0" />
995IETF Audio/Video Transport Working Group
996</t>
997
998<vspace blankLines="1" />
999
1000<t hangText="Intended usage:">
1001COMMON
1002</t>
1003
1004<vspace blankLines="1" />
1005
1006<t hangText="Restriction on usage:">
1007<vspace blankLines="1" />
1008This media type doesn't depend on the transport.
1009</t>
1010
1011<vspace blankLines="1" />
1012
1013<t hangText="Author:">
1014<vspace blankLines="1" />
1015Luca Barbato</t>
1016
1017<vspace blankLines="1" />
1018
1019<t hangText="Change controller:">
1020<vspace blankLines="1" />
1021IETF AVT Working Group delegated from the IESG</t>
1022</list>
1023
1024</section>
1025
1026</section>
1027
1028<section anchor="SDP related considerations" title="SDP related considerations">
1029<t>
1030The following paragraphs defines the mapping of the parameters described in the IANA considerations section and their usage in the <xref target="rfc3264">Offer/Answer Model</xref>.
1031</t>
1032
1033<section anchor="Mapping Media Type Parameters into SDP" title="Mapping Media Type Parameters into SDP"> 
1034
1035<t>
1036The information carried in the Media Type media type specification has a
1037specific mapping to fields in the <xref target="rfc4566">Session Description
1038Protocol (SDP)</xref>, which is commonly used to describe RTP sessions.
1039When SDP is used to specify sessions the mapping are as follows:
1040</t>
1041
1042<vspace blankLines="1" />
1043<list style="symbols">
1044
1045<t>The type name ("audio") goes in SDP "m=" as the media name.</t>
1046<vspace blankLines="1" />
1047
1048<t>The subtype name ("vorbis") goes in SDP "a=rtpmap" as the encoding name.</t>
1049<vspace blankLines="1" />
1050
1051<t>The parameter "rate" also goes in "a=rtpmap" as clock rate.</t>
1052<vspace blankLines="1" />
1053
1054<t>The parameter "channels" also goes in "a=rtpmap" as channel count.</t>
1055<vspace blankLines="1" />
1056
1057<t>The mandated parameters "delivery-method" and "configuration" MUST be
1058included in the SDP "a=fmtp" attribute.</t>
1059<vspace blankLines="1" />
1060
1061<t>The optional parameter "configuration-uri", when present, MUST be included
1062in the SDP "a=fmtp" attribute and MUST follow the delivery-method that applies.</t>
1063
1064</list>
1065
1066<t>
1067If the stream comprises chained Vorbis files and all of them are known in
1068advance, the Configuration Packet for each file SHOULD be passed to the client
1069using the configuration attribute.
1070</t>
1071
1072<t>
1073The URI specified in the configuration-uri attribute MUST point to a location
1074where all of the Configuration Packets needed for the life of the session
1075reside.
1076</t>
1077
1078<t>
1079The port value is specified by the server application bound to the address
1080specified in the c= line. The bitrate value and channels specified in the
1081rtpmap attribute MUST match the Vorbis sample rate value.  An example is found
1082below.
1083</t>
1084
1085<section anchor="SDP Example" title="SDP Example">
1086<t>The following example shows a basic SDP single stream. The first
1087configuration packet is inlined in the sdp, other configurations could be
1088fetched at any time from the first provided uri using or all the known
1089configuration could be downloaded using the second uri. The inline
1090<xref target="rfc3548">base64</xref> configuration string is omitted because of
1091the length.</t>
1092
1093<list style="empty">
1094<t>c=IN IP4 192.0.2.1</t>
1095<t>m=audio  RTP/AVP 98</t>
1096<t>a=rtpmap:98 vorbis/44100/2</t>
1097<t>a=fmtp:98 delivery-method=inline; configuration=base64string; delivery-method=out_band; configuration-uri=rtsp://path/to/the/resource; delivery-method=out_band; configuration-uri=http://another/path/to/resource/aggregate.bz2!8b6237eb5154a0ea12811a94e8e2697b3312bc6c;</t>
1098</list>
1099</section>
1100
1101
1102<t>
1103Note that the payload format (encoding) names are commonly shown in upper case.
1104Media Type subtypes are commonly shown in lower case. These names are
1105case-insensitive in both places.  Similarly, parameter names are
1106case-insensitive both in Media Type types and in the default mapping to the SDP
1107a=fmtp attribute. The exception regarding case sensitivity is the
1108configuration-uri URI which MUST be regarded as being case sensitive. The
1109a=fmtp line is a single line even if it is presented broken because of clarity.
1110</t>
1111
1112</section>
1113
1114<section anchor="Usage with the SDP Offer/Answer Mode" title="Usage with the SDP Offer/Answer Model">
1115
1116<t>
1117The only paramenter negotiable is the delivery method. All the others are
1118declarative: the offer, as described in <xref target="rfc3264">An Offer/Answer
1119Model Session Description Protocol</xref>, may contain a large number of
1120delivery methods per single fmtp attribute, the answerer MUST remove every
1121delivery-method and configuration-uri not supported. All the parameters MUST
1122not be altered on answer otherwise.
1123</t>
1124
1125</section>
1126
1127</section>
1128
1129<section anchor="Congestion Control" title="Congestion Control"> 
1130
1131<t>
1132Vorbis clients SHOULD send regular receiver reports detailing congestion. A
1133mechanism for dynamically downgrading the stream, known as bitrate peeling,
1134will allow for a graceful backing off of the stream bitrate. This feature is
1135not available at present so an alternative would be to redirect the client to
1136a lower bitrate stream if one is available.
1137</t>
1138
1139</section> 
1140
1141<section anchor="Examples" title="Examples">
1142
1143<t>
1144The following examples are common usage patterns that MAY be applied in such
1145situations, the main scope of this section is to explain better usage of the
1146transmission vectors.
1147</t>
1148
1149<section anchor="Stream Radio" title="Stream Radio">
1150
1151<t>This is one of the most common situation: one single server streaming
1152content in multicast, the clients may start a session at random time. The
1153content itself could be a mix of live stream, as the wj's voice, and stored
1154streams as the music she plays.</t>
1155
1156<t>In this situation we don't know in advance how many codebooks we will use.
1157The clients can join anytime and users expect to start listening to the content
1158in a short time.</t>
1159
1160<t>On join the client will receive the current Configuration necessary to
1161decode the current stream inlined in the SDP so that the decoding will start
1162immediately after.</t>
1163
1164<t>When the streamed content changes the new Configuration is sent in-band
1165before the actual stream, and the Configuration that has to be sent inline in
1166the SDP updated. Since the in-band method is unreliable, an out of band
1167fallback is provided.</t>
1168
1169<t>The client could choose to fetch the Configuration from the alternate source
1170as soon as it discovers a Configuration packet got lost in-band or use
1171<xref target="RFC3611">selective retransmission</xref>, if the server supports
1172the feature.</t>
1173
1174<t>A serverside optimization would be to keep an hash list of the
1175Configurations per session to avoid packing all of them and send the same
1176Configuration with different Ident tags</t>
1177
1178<t>A clientside optimization would be to keep a tag list of the Configurations
1179per session and don't process configuration packets already known.</t>
1180
1181</section>
1182</section>
1183
1184<section anchor="Security Considerations" title="Security Considerations"> 
1185<t>
1186RTP packets using this payload format are subject to the security
1187considerations discussed in the RTP specification
1188<xref target="rfc3550"></xref>.  This implies that the confidentiality of the
1189media stream is achieved by using encryption. Because the data compression used
1190with this payload format is applied end-to-end, encryption may be performed on
1191the compressed data. Additional care MAY be needed for delivery methods that
1192point to external resources, using secure protocols to fetch the configuration
1193payloads. Where the size of a data block is set, care MUST be taken to prevent
1194buffer overflows in the client applications.
1195</t>
1196
1197</section> 
1198
1199<section anchor="Acknowledgments" title="Acknowledgments"> 
1200
1201<t>
1202This document is a continuation of draft-moffitt-vorbis-rtp-00.txt and
1203draft-kerr-avt-vorbis-rtp-04.txt.  The Media Type type section is a
1204continuation of draft-short-avt-rtp-vorbis-mime-00.txt.
1205</t>
1206
1207<t>
1208Thanks to the AVT, Ogg Vorbis Communities / Xiph.org including Steve Casner,
1209Aaron Colwell, Ross Finlayson, Fluendo, Ramon Garcia, Pascal Hennequin, Ralph
1210Giles, Tor-Einar Jarnbjo, Colin Law, John Lazzaro, Jack Moffitt, Christopher
1211Montgomery,  Colin Perkins, Barry Short, Mike Smith, Phil Kerr, Michael Sparks,
1212Magnus Westerlund, David Barrett, Silvia Pfeiffer, Stefan Ehmann, Alessandro
1213Salvatori. Politecnico di Torino (LS)³/IMG Group in particular Federico
1214Ridolfo, Francesco Varano, Giampaolo Mancini, Dario Gallucci, Juan Carlos De Martin.
1215</t>
1216
1217</section> 
1218
1219</middle>
1220
1221<back>
1222
1223<references title="Normative References">
1224
1225<reference anchor="rfc2119">
1226<front>
1227<title>Key words for use in RFCs to Indicate Requirement Levels </title>
1228<author initials="S." surname="Bradner" fullname="Scott Bradner"></author>
1229</front>
1230<seriesInfo name="RFC" value="2119" />
1231</reference>   
1232
1233<reference anchor="rfc3550">
1234<front>
1235<title>RTP: A Transport Protocol for real-time applications</title>
1236<author initials="H." surname="Schulzrinne" fullname=""></author>
1237<author initials="S." surname="Casner" fullname=""></author>
1238<author initials="R." surname="Frederick" fullname=""></author>
1239<author initials="V." surname="Jacobson" fullname=""></author>
1240</front>
1241<seriesInfo name="RFC" value="3550" />
1242</reference> 
1243
1244<reference anchor="rfc3551">
1245<front>
1246<title>RTP Profile for Audio and Video Conferences with Minimal Control.</title>
1247<author initials="H." surname="Schulzrinne" fullname=""></author>
1248<author initials="S." surname="Casner" fullname=""></author>
1249</front>
1250<date month="July" year="2003" />
1251<seriesInfo name="RFC" value="3551" />
1252</reference> 
1253
1254<reference anchor='rfc3986'>
1255<front>
1256<title abbrev='URI Generic Syntax'>Uniform Resource Identifier (URI): Generic Syntax</title>
1257<author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
1258</author>
1259<author initials='R.' surname='Fielding' fullname='Roy T. Fielding'>
1260</author>
1261<author initials='L.' surname='Masinter' fullname='Larry Masinter'>
1262</author>
1263</front>
1264<date year='2005' month='January' />
1265<seriesInfo name='RFC' value='3986' />
1266</reference>
1267
1268<reference anchor='rfc4566'>
1269
1270<front>
1271<title>SDP: Session Description Protocol</title>
1272<author initials='M.' surname='Handley' fullname='M. Handley'>
1273<organization /></author>
1274<author initials='V.' surname='Jacobson' fullname='V. Jacobson'>
1275<organization /></author>
1276<author initials='C.' surname='Perkins' fullname='C. Perkins'>
1277<organization /></author>
1278<date year='2006' month='July' />
1279</front>
1280
1281<seriesInfo name='RFC' value='4566' />
1282<format type='TXT' octets='108820' target='ftp://ftp.isi.edu/in-notes/rfc4566.txt' />
1283</reference>
1284
1285<reference anchor='rfc1191'>
1286
1287<front>
1288<title>Path MTU discovery</title>
1289<author initials='J.' surname='Mogul' fullname='Jeffrey Mogul'>
1290<organization>Digital Equipment Corporation (DEC) , Western Research Laboratory</organization>
1291<address>
1292<email>mogul@decwrl.dec.com</email></address></author>
1293<author initials='S.' surname='Deering' fullname='Steve Deering'>
1294<organization>Xerox Palo Alto Research Center</organization>
1295<address>
1296<email>deering@xerox.com</email></address></author>
1297<date year='1990' day='1' month='November' />
1298</front>
1299
1300<seriesInfo name='RFC' value='1191' />
1301<format type='TXT' octets='47936' target='ftp://ftp.isi.edu/in-notes/rfc1191.txt' />
1302</reference>
1303
1304<reference anchor="rfc1981">
1305<front>
1306<title>Path MTU Discovery for IP version 6</title>
1307<author initials="J." surname="McCann et al." fullname="J. McCann et al."></author>
1308</front>
1309<seriesInfo name="RFC" value="1981" />
1310</reference>   
1311
1312<reference anchor="rfc3264">
1313<front>
1314<title>An Offer/Answer Model with Session Description Protocol (SDP)</title>
1315<author initials="J." surname="Rosenberg" fullname="Jonathan Rosenberg"></author>
1316<author initials="H." surname="Schulzrinne" fullname="Henning Schulzrinne"></author>
1317</front>
1318<seriesInfo name="RFC" value="3264" />
1319</reference>   
1320
1321<reference anchor="rfc3548">
1322<front>
1323<title>The Base16, Base32, and Base64 Data Encodings</title>
1324<author initials="S." surname="Josefsson" fullname="Simon Josefsson"></author>
1325</front>
1326<seriesInfo name="RFC" value="3548" />
1327</reference>
1328<reference anchor="FIPS180">
1329<front>
1330<title>Secure Hash Standard</title>
1331<author>
1332<organization>National Institute of Standards and Technology</organization>
1333</author>
1334<date month="May" year="1993"/>
1335</front>
1336</reference>
1337</references>
1338
1339<references title="Informative References">
1340
1341<reference anchor="rfc3533">
1342<front>
1343<title>The Ogg Encapsulation Format Version 0</title>
1344<author initials="S." surname="Pfeiffer" fullname="Silvia Pfeiffer"></author>
1345</front>
1346<seriesInfo name="RFC" value="3533" />
1347</reference>
1348
1349<reference anchor="libvorbis">
1350<front>
1351<title>libvorbis: Available from the Xiph website, http://www.xiph.org</title>
1352</front>
1353</reference>   
1354
1355<reference anchor="vorbis-spec-ref">
1356<front>
1357<title>Ogg Vorbis I specification:  Codec setup and packet decode.  Available from the Xiph website, http://www.xiph.org</title>
1358</front>
1359</reference>   
1360
1361<reference anchor="rfc1952">
1362<front>
1363<title>GZIP file format specification version 4.3</title>
1364<author initials="P" surname="Deutsch" fullname="L. Peter Deutsch"></author>
1365</front>
1366<seriesInfo name="RFC" value="1952" />
1367</reference>
1368
1369<reference anchor="RFC3611">
1370<front>
1371<title>RTP Control Protocol Extended Reports (RTCP XR)</title>
1372<author initials="T." surname="Friedman" fullname="T. Friedman" />
1373<author initials="R." surname="Caceres" fullname="R. Caceres" />
1374<author initials="A." surname="Clark" fullname="A. Clark" />
1375<date year="2003" month="November"/>
1376</front>
1377<seriesInfo name="RFC" value="3611"/>
1378</reference>
1379<reference anchor="BZ2">
1380<front>
1381
1382<title>libbz2 and bzip2</title>
1383<author initials="J" surname="Seward" fullname="Julian Seward" />
1384</front>
1385</reference>
1386</references>
1387</back>
1388</rfc>
Note: See TracBrowser for help on using the repository browser.