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