cleanup part II
[platform/upstream/libvorbis.git] / doc / draft-ietf-avt-vorbis-rtp-00.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-vorbis-rtp-00</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="20" month="February" 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 the document are the necessary details for the use of Vorbis with MIME and 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 MPEG-2 and MPC. 
58 Similarly, the version 1.1 reference encoder can encode high-quality CD 
59 and DAT rate stereo at below 48k bits/sec without resampling to a lower 
60 rate. Vorbis is also intended for lower and higher sample rates (from 
61 8kHz telephony to 192kHz digital masters) and a range of channel 
62 representations (monaural, polyphonic, stereo, quadraphonic, 5.1, 
63 ambisonic, or up to 255 discrete channels).
64 </t>
65
66 <t>
67 Vorbis encoded audio is generally encapsulated within an Ogg format bitstream <xref target="rfc3533"></xref>, which provides 
68 framing and synchronization.  For the purposes of RTP transport, this layer is unnecessary, and so raw Vorbis packets are used 
69 in the payload.
70 </t>
71
72 <section anchor="Terminology" title="Terminology">
73
74 <t>
75 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" 
76 in this document are to be interpreted as described in RFC 2119 <xref target="rfc2119"></xref>.
77 </t>
78
79 </section>
80 </section>
81
82 <section anchor="Payload Format" title="Payload Format">
83
84 <t>
85 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.
86 </t>
87
88 <section anchor="RTP Header" title="RTP Header">
89
90 <t>
91 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. 
92 </t>
93
94 <t>
95 <figure anchor="RTP Header Figure" title="RTP Header">
96 <artwork><![CDATA[
97     0                   1                   2                   3
98     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
99    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
100    |V=2|P|X|  CC   |M|     PT      |       sequence number         |
101    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
102    |                           timestamp                           |
103    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
104    |           synchronization source (SSRC) identifier            |
105    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
106    |            contributing source (CSRC) identifiers             |
107    |                              ...                              |
108    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
109 ]]></artwork>
110 </figure>
111 </t>
112
113 <t>
114 The RTP header begins with an octet of fields (V, P, X, and CC) to support specialized RTP uses (see <xref target="rfc3550">
115 </xref> and <xref target="rfc3551"></xref> for details). For Vorbis RTP, the following values are used.
116 </t>
117
118 <t>
119 Version (V): 2 bits</t>
120 <t>
121 This field identifies the version of RTP. The version used by this specification is two (2).
122 </t>
123
124 <t>
125 Padding (P): 1 bit</t>
126 <t>
127 Padding MAY be used with this payload format according to section 5.1 of <xref target="rfc3550"></xref>.  
128 </t>
129
130 <t>
131 Extension (X): 1 bit</t>
132 <t>
133 The Extension bit is used in accordance with <xref target="rfc3550"></xref>.
134 </t>
135
136 <t>
137 CSRC count (CC): 4 bits</t>
138 <t>
139 The CSRC count is used in accordance with <xref target="rfc3550"></xref>.
140 </t>
141
142 <t>
143 Marker (M): 1 bit</t>
144 <t>
145 Set to zero.  Audio silence suppression not used.  This conforms to section 4.1 of <xref target="vorbis-spec-ref"></xref>.
146 </t>
147
148 <t>
149 Payload Type (PT): 7 bits</t>
150 <t>
151 An RTP profile for a class of applications is expected to assign a payload type for this format, or a dynamically allocated 
152 payload type SHOULD be chosen which designates the payload as Vorbis.
153 </t>
154
155 <t>
156 Sequence number: 16 bits</t>
157 <t>
158 The sequence number increments by one for each RTP data packet sent, and may be used by the receiver to detect packet loss and
159 to restore packet sequence. This field is detailed further in <xref target="rfc3550"></xref>.
160 </t>
161
162 <t>
163 Timestamp: 32 bits</t>
164 <t>
165 A timestamp representing the sampling time of the first sample of the first Vorbis packet in the RTP packet.  The clock frequency 
166 MUST be set to the sample rate of the encoded audio data and is conveyed out-of-band as a SDP parameter.
167 </t>
168
169 <t>
170 SSRC/CSRC identifiers: </t>
171 <t>
172 These two fields, 32 bits each with one SSRC field and a maximum of 16 CSRC fields, are as defined in <xref target="rfc3550">
173 </xref>.  
174 </t>
175
176 </section>
177
178 <section anchor="Payload Header" title="Payload Header">
179
180 <t>
181 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.
182 </t>
183
184 <figure anchor="Payload Header Figure" title="Payload Header">
185 <artwork><![CDATA[
186     0                   1                   2                   3
187     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
188    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
189    |                     Ident                     | F |VDT|# pkts.|
190    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
191 ]]></artwork>
192 </figure>
193
194 <t>
195 Ident: 24 bits</t>
196 <t>
197 This 24 bit field is used to associate the Vorbis data to a decoding Configuration.
198 </t>
199
200 <t>
201 Fragment type (F): 2 bits</t>
202 <t>
203 This field is set according to the following list
204 </t>
205 <vspace blankLines="1" />
206 <list style="empty">
207 <t>      0 = Not Fragmented</t>
208 <t>      1 = Start Fragment</t>
209 <t>      2 = Continuation Fragment</t>
210 <t>      3 = End Fragment</t>
211 </list>
212
213 <t>
214 Vorbis Data Type (VDT): 2 bits</t>
215 <t>
216 This field sets the payload type for the Vorbis data in this RTP packet. There are currently three type of Vorbis payloads.
217 </t>
218
219 <vspace blankLines="1" />
220 <list style="empty">
221 <t>      0 = Raw Vorbis payload</t>
222 <t>      1 = Vorbis Packed Configuration payload</t>
223 <t>      2 = Legacy Vorbis Comment payload</t>
224 <t>      3 = Reserved</t>
225 </list>
226
227 <t> The packets with a TDT of value 3 MUST be ignored </t>
228
229 <t>
230 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.
231 </t>
232
233 </section>
234
235 <section anchor="Payload Data" title="Payload Data">
236
237 <t>
238 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.
239 </t>
240
241 <figure anchor="Payload Data Figure" title="Payload Data Header">
242 <artwork><![CDATA[
243     0                   1                   2                   3
244     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
245    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
246    |            length             |       vorbis packet data     ..
247    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
248 ]]></artwork>
249 </figure>
250
251 <t>
252 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.
253 </t>
254
255 <t>
256 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.
257 </t>
258
259 <t>
260 The Vorbis packet length header is the length of the Vorbis data block only and does not count the length field.
261 </t>
262
263 <t>
264 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.
265 </t>
266
267 <t>
268 Channel mapping of the audio is in accordance with the <xref target="vorbis-spec-ref">Vorbis I Specification</xref>.
269 </t>
270
271 </section>
272
273 <section anchor="Example RTP Packet" title="Example RTP Packet">
274
275 <t>
276 Here is an example RTP packet containing two Vorbis packets.
277 </t>
278
279 <t>
280 RTP Packet Header:
281 </t>
282
283 <figure anchor="Example Header Packet (RTP Headers)" title="Example Packet (RTP Headers)">
284 <artwork><![CDATA[
285     0                   1                   2                   3
286     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
287    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
288    | 2 |0|0|  0    |0|      PT     |       sequence number         |
289    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
290    |               timestamp (in sample rate units)                |
291    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
292    |           synchronisation source (SSRC) identifier            |
293    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
294    |            contributing source (CSRC) identifiers             |
295    |                              ...                              |
296    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
297 ]]></artwork>
298 </figure>
299
300 <t>
301 Payload Data:
302 </t>
303
304 <figure anchor="Example Packet (Payload Data)" title="Example Packet (Payload Data)">
305 <artwork><![CDATA[
306     0                   1                   2                   3
307     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
308    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
309    |                     Ident                     | 0 | 0 | 2 pks |
310    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
311    |             length            |          vorbis data         ..
312    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
313    ..                        vorbis data                           |
314    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
315    |            length             |   next vorbis packet data    ..
316    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
317    ..                        vorbis data                           |
318    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
319 ]]></artwork>
320 </figure>
321
322 <t>
323 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.
324 </t>
325
326 </section>
327 </section>
328
329
330
331 <section anchor="Configuration Headers" title="Configuration Headers">
332
333 <t>
334 Unlike other mainstream audio codecs Vorbis has no statically 
335 configured probability model. Instead, it packs all entropy decoding 
336 configuration, VQ and Huffman models into a data block that must be 
337 transmitted to the decoder along with the compressed data. A decoder 
338 also requires information detailing the number of audio 
339 channels, bitrates and similar information to configure itself for a 
340 particular compressed data stream. These two blocks of information are 
341 often referred to collectively as the "codebooks" for a Vorbis stream,
342 and are nominally included as special "header" packets at the start 
343 of the compressed data. In addition,
344 the <xref target="vorbis-spec-ref">Vorbis I specification</xref>
345 requires the presence of a comment header packet which gives simple
346 metadata about the stream, but this information is not required for 
347 decoding the frame sequence.
348 </t>
349
350 <t>
351 Thus these two codebook header packets must be received by the decoder
352 before any audio data can be interpreted.
353  These requirements pose problems in RTP,
354 which is often used over unreliable transports.
355 </t>
356
357 <t>
358 Since this information must be transmitted reliably and, as the RTP 
359 stream may change certain configuration data mid-session, there are 
360 different methods for delivering this configuration data to a 
361 client, both in-band and out-of-band which is detailed below. SDP 
362 delivery is used to set up an initial state for the client application. 
363 The changes may be due to different codebooks as well as different 
364 bitrates of the stream.
365 </t>
366
367 <t>
368 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.
369 </t>
370
371 <t>
372 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.
373 </t>
374
375 <section anchor="In-band Header Transmission" title="In-band Header Transmission">
376
377 <t>
378 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.
379 </t>
380
381 <section anchor="Packed Configuration" title="Packed Configuration">
382
383 <t>
384 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 provide a minimal size comment header to the decoder if required by the implementation.
385 </t>
386
387 <figure anchor="Packed Configuration Figure" title="Packed Configuration Figure">
388 <artwork><![CDATA[
389     0                   1                   2                   3
390     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
391    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
392    |V=2|P|X|  CC   |M|     PT      |             xxxx              |
393    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
394    |                             xxxxx                             |
395    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
396    |           synchronization source (SSRC) identifier            |
397    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
398    |            contributing source (CSRC) identifiers             |
399    |                              ...                              |
400    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
401    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
402    |                      Ident                    | 0 | 1 |      1|
403    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
404    |           length              |        Identification       ..
405    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
406    ..                        Identification                       ..
407    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
408    ..                        Identification                       ..
409    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
410    ..                        Identification                       ..
411    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
412    ..              |                       Setup                  ..
413    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
414    ..                            Setup                            ..
415    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
416    ..                            Setup                             |
417    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
418 ]]></artwork>
419 </figure>
420
421 <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>
422 </section>
423 </section>
424
425 <section anchor="Out of Band Transmission" title="Out of Band Transmission">
426
427
428 <t>
429 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.
430 </t>
431
432 <section anchor="Packed Headers" title="Packed Headers"> 
433
434 <t>
435 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.
436 </t>
437
438 <figure anchor="Packed Headers Overview Figure" title="Packed Headers Overview">
439 <artwork><![CDATA[
440    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
441    |                     Number of packed headers                  |
442    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
443    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
444    |                          Packed header                        |
445    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
446    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
447    |                          Packed header                        |
448    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
449 ]]></artwork>
450 </figure>
451
452 <t>
453 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.
454 </t>
455
456 <figure anchor="Packed Headers Detail Figure" title="Packed Headers Detail">
457 <artwork><![CDATA[
458     0                   1                   2                   3
459     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
460    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
461    |                   Ident                       |              ..
462    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
463    ..   length     |              Identification Header           ..
464    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
465    ..                    Identification Header                     |
466    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
467    |                          Setup Header                        ..
468    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
469    ..                         Setup Header                         |
470    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
471 ]]></artwork>
472 </figure>
473 <t>
474 The key difference between the in-band format and this one, is there is no need for the payload header octet.
475 </t>
476
477 <section anchor="Packed Headers IANA Considerations" title="Packed Headers IANA Considerations"> 
478
479 <t>
480 The following IANA considerations MUST only be applied to the packed headers.
481 </t>
482
483 <vspace blankLines="1" />
484
485 <list style="hanging">
486 <t hangText="MIME media type name:"> audio </t>
487
488 <vspace blankLines="1" />
489
490 <t hangText="MIME subtype:"> vorbis-config </t>
491
492 <vspace blankLines="1" />
493
494 <t hangText="Required Parameters:">
495 <vspace blankLines="1" />
496 None
497 </t>
498
499 <vspace blankLines="1" />
500
501 <t hangText="Optional Parameters:">
502 <vspace blankLines="1" />
503 None
504 </t>
505
506 <vspace blankLines="1" />
507
508 <t hangText="Encoding considerations:">
509 <vspace blankLines="1" />
510 This media type contains binary data.
511 </t>
512
513 <vspace blankLines="1" />
514
515 <t hangText="Security Considerations:">
516 <vspace blankLines="1" />
517 See Section 6 of RFC XXXX.
518 </t>
519
520 <vspace blankLines="1" />
521
522 <t hangText="Interoperability considerations:">
523 <vspace blankLines="1" />
524 None
525 </t>
526
527 <vspace blankLines="1" />
528
529 <t hangText="Published specification:">
530 <vspace blankLines="1" />
531 RFC XXXX [RFC Editor: please replace by the RFC number of  this memo,
532        when published]
533 </t>
534
535 <vspace blankLines="1" />
536
537 <t hangText="Applications which use this media type:">
538 <vspace blankLines="1" />
539 Vorbis encoded audio, configuration data.
540 </t>
541
542 <vspace blankLines="1" />
543
544 <t hangText="Additional information:"> 
545 <vspace blankLines="1" />
546 None
547 </t>
548
549 <vspace blankLines="1" />
550
551 <t hangText="Person &amp; email address to contact for further information:">
552 <vspace blankLines="1" />
553 Luca Barbato: &lt;lu_zero@gentoo.org&gt;
554 <vspace blankLines="0" />
555 IETF Audio/Video Transport Working Group
556 </t>
557
558 <vspace blankLines="1" />
559
560 <t hangText="Intended usage:">
561 COMMON
562 </t>
563
564 <vspace blankLines="1" />
565
566 <t hangText="Restriction on usage:">
567 <vspace blankLines="1" />
568 This media type doesn't depend on the transport.
569 </t>
570
571 <vspace blankLines="1" />
572
573 <t hangText="Author:">
574 <vspace blankLines="1" />
575 Luca Barbato</t>
576
577 <vspace blankLines="1" />
578
579 <t hangText="Change controller:">
580 <vspace blankLines="1" />
581 IETF AVT Working Group</t>
582 </list>
583
584 </section>
585 </section>
586
587 <!--
588 <section anchor="Well Known Configurations" title="Well Known Configurations">
589
590 <t>
591 Even if the Vorbis nature prevents the creation of everlasting profiles, some combination of codebooks, bitrate, channels and samplerate are quite common.
592 A client may have a list of well known configuration and MAY avoid fetching them already.
593 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.
594 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.
595 </t>
596
597 <t>
598 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.
599 </t>
600
601 <t>
602 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.
603 This method
604 </t>
605
606 </section>
607 -->
608 </section>
609
610 <section anchor="Loss of Configuration Headers" title="Loss of Configuration Headers"> 
611
612 <t>
613 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.
614 </t>
615
616 <t>
617 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.
618 </t>
619
620 </section>
621
622 <!-- <section anchor="Mapping between Configuration and Stream" title="Mapping between Configuration and Stream">
623
624 <t>
625 The mapping between the stream and the the configuration is explicit.
626 </t>
627
628 </section> -->
629
630
631 </section>
632
633 <section anchor="Comment Headers" title="Comment Headers">
634
635 <t>
636 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>.
637 </t>
638 <figure anchor="Comment Packet Figure" title="Comment Packet">
639 <artwork><![CDATA[
640     0                   1                   2                   3
641     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
642    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
643    |V=2|P|X|  CC   |M|     PT      |             xxxx              |
644    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
645    |                             xxxxx                             |
646    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
647    |           synchronization source (SSRC) identifier            |
648    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
649    |            contributing source (CSRC) identifiers             |
650    |                              ...                              |
651    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
652    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
653    |                      Ident                    | 0 | 2 |      1|
654    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
655    |            length             |            Comment           ..
656    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
657    ..                           Comment                           ..
658    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
659    ..                           Comment                            |
660    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
661 ]]></artwork>
662 </figure>
663
664 <t>The 2 bytes length field is necessary since this packet could be fragmented.</t>
665
666 </section>
667 <section anchor="Frame Packetization" title="Frame Packetization">
668
669 <t>
670 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).
671 </t>
672
673 <t>
674 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>.
675 </t>
676
677 <t>
678 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.
679 </t>
680
681 <section anchor="Example Fragmented Vorbis Packet" title="Example Fragmented Vorbis Packet">
682
683 <t>
684 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.
685 </t>
686
687 <figure anchor="Example Fragmented Packet (Packet 1)" title="Example Fragmented Packet (Packet 1)">
688 <artwork><![CDATA[
689    Packet 1:
690
691     0                   1                   2                   3
692     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
693    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
694    |V=2|P|X|  CC   |M|     PT      |           1000                |
695    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
696    |                             xxxxx                             |
697    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
698    |           synchronization source (SSRC) identifier            |
699    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
700    |            contributing source (CSRC) identifiers             |
701    |                              ...                              |
702    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
703    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
704    |                       Ident                   | 1 | 0 |      0|
705    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
706    |             length            |            vorbis data       ..
707    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
708    ..                        vorbis data                           |
709    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
710 ]]></artwork>
711 </figure>
712
713 <t>
714 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.
715 </t>
716
717 <figure anchor="Example Fragmented Packet (Packet 2)" title="Example Fragmented Packet (Packet 2)">
718 <artwork><![CDATA[
719    Packet 2:
720
721     0                   1                   2                   3
722     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
723    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
724    |V=2|P|X|  CC   |M|     PT      |           1001                |
725    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
726    |                             xxxxx                             |
727    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
728    |           synchronization source (SSRC) identifier            |
729    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
730    |            contributing source (CSRC) identifiers             |
731    |                              ...                              |
732    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
733    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
734    |                       Ident                   | 2 | 0 |      0|
735    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
736    |             length            |          vorbis data         ..
737    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
738    ..                        vorbis data                           |
739    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
740 ]]></artwork>
741 </figure>
742
743 <t>
744 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.
745 </t>
746
747 <figure anchor="Example Fragmented Packet (Packet 3)" title="Example Fragmented Packet (Packet 3)">
748 <artwork><![CDATA[
749    Packet 3:
750
751     0                   1                   2                   3
752     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
753    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
754    |V=2|P|X|  CC   |M|     PT      |           1002                |
755    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
756    |                             xxxxx                             |
757    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
758    |           synchronization source (SSRC) identifier            |
759    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
760    |            contributing source (CSRC) identifiers             |
761    |                              ...                              |
762    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
763    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
764    |                      Ident                    | 3 | 0 |      0|
765    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
766    |             length            |          vorbis data         ..
767    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
768    ..                        vorbis data                           |
769    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
770 ]]></artwork>
771 </figure>
772
773 <t>
774 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.
775 </t>
776 </section>
777
778 <section anchor="Packet Loss" title="Packet Loss">
779
780 <t>
781 As there is no error correction within the Vorbis stream, packet loss will 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.
782 </t>
783
784 <t>
785 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.
786 </t>
787
788 <t>
789 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.
790 </t>
791
792 </section>
793 </section>
794 <section anchor="IANA Considerations" title="IANA Considerations"> 
795
796 <vspace blankLines="1" />
797
798 <list style="hanging">
799 <t hangText="MIME media type name:"> audio </t>
800
801 <vspace blankLines="1" />
802
803 <t hangText="MIME subtype:"> vorbis </t>
804
805 <vspace blankLines="1" />
806
807 <t hangText="Required Parameters:">
808
809 <vspace blankLines="1" />
810
811 <list style="hanging">
812 <t hangText="delivery-method:"> indicates the delivery methods in use, the possible values are: inline, in_band, out_band/specific_name<vspace blankLines="0" />
813 Where "specific_name" is the name of the out of band delivery method.
814
815 </t>
816
817 <vspace blankLines="1" />
818
819 <t hangText="configuration:"> the <xref target="rfc3548">base16</xref> (hexadecimal) representation of the <xref target="Packed Headers">Packed Headers</xref>.
820 </t>
821 </list>
822 </t>
823
824 <vspace blankLines="1" />
825
826 <t hangText="Optional Parameters:">
827
828 <vspace blankLines="1" />
829
830 <list style="hanging">
831 <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 the single ident packet could be retrived by their number, or aggregated in a single stream, aggregates MAY be compressed using <xref target="BZ2">bzip2</xref> or <xref target="rfc1952">gzip</xref> and an <xref target="FIPS180">sha1</xref> checksum MAY be provided in the form of "protocol://path/to/resource/aggregated.bz2!sha1hash"</t>
832 </list>
833 </t>
834
835 <vspace blankLines="1" />
836
837 <t hangText="Encoding considerations:">
838 <vspace blankLines="1" />
839 This media type is framed and contains binary data.
840 </t>
841
842 <vspace blankLines="1" />
843
844 <t hangText="Security Considerations:">
845 <vspace blankLines="1" />
846 See Section 6 of RFC XXXX.</t>
847
848 <vspace blankLines="1" />
849
850 <t hangText="Interoperability considerations:">
851 <vspace blankLines="1" />
852 None</t>
853
854 <vspace blankLines="1" />
855
856 <t hangText="Published specification:">
857
858 <vspace blankLines="1" />
859
860 <t> RFC XXXX [RFC Editor: please replace by the RFC number of  this memo, when published]</t>
861 <vspace blankLines="1" />
862 <t>Ogg Vorbis I specification:  Codec setup and packet decode. Available from the Xiph website, http://www.xiph.org</t>
863
864 </t>
865
866 <vspace blankLines="1" />
867
868 <t hangText="Applications which use this media type:">
869 <vspace blankLines="1"/>
870 Audio streaming and conferencing tools </t>
871
872 <vspace blankLines="1" />
873
874 <t hangText="Additional information:">
875 <vspace blankLines="1" />
876 None </t>
877
878 <vspace blankLines="1" />
879
880 <t hangText="Person &amp; email address to contact for further information:">
881
882 <vspace blankLines="1" />
883
884 <t>Luca Barbato: &lt;lu_zero@gentoo.org&gt;</t>
885 <t>IETF Audio/Video Transport Working Group</t>
886
887 </t>
888
889 <vspace blankLines="1" />
890
891 <t hangText="Intended usage:">
892 <vspace blankLines="1" />
893 COMMON</t>
894
895 <vspace blankLines="1" />
896
897 <t hangText="Restriction on usage:">
898 <vspace blankLines="1" />
899 This media type depends on RTP framing, and hence is only defined for transfer via <xref target="rfc3550">RTP</xref></t>
900
901 <vspace blankLines="1" />
902
903 <t hangText="Author:">
904 <vspace blankLines="1"/>Luca Barbato</t>
905
906 <vspace blankLines="1" />
907
908 <t hangText="Change controller:"><vspace blankLines="1"/> IETF AVT Working Group</t>
909
910 <vspace blankLines="1" />
911
912 </list>
913
914 <section anchor="Mapping MIME Parameters into SDP" title="Mapping MIME Parameters into SDP"> 
915
916 <t>
917 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:
918 </t>
919
920 <vspace blankLines="1" />
921 <list style="symbols">
922
923 <t>The MIME type ("audio") goes in SDP "m=" as the media name.</t>
924 <vspace blankLines="1" />
925
926 <t>The MIME subtype ("vorbis") goes in SDP "a=rtpmap" as the encoding name.</t>
927 <vspace blankLines="1" />
928
929 <t>The parameter "rate" also goes in "a=rtpmap" as clock rate.</t>
930 <vspace blankLines="1" />
931
932 <t>The parameter "channels" also goes in "a=rtpmap" as channel count.</t>
933 <vspace blankLines="1" />
934
935 <t>The mandated parameters "delivery-method" and "configuration" MUST be included in the SDP "a=fmpt" attribute.</t>
936 <vspace blankLines="1" />
937
938 <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>
939
940 </list>
941
942 <t>
943 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.
944 </t>
945
946 <t>
947 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.
948 </t>
949
950 <t>
951 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.
952 </t>
953
954 <section anchor="SDP Example" title="SDP Example">
955 <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>
956
957 <list style="empty">
958 <t>c=IN IP4 192.0.0.1</t>
959 <t>m=audio  RTP/AVP 98</t>
960 <t>a=rtpmap:98 vorbis/44100/2</t>
961 <t>a=delivery:out_band/http</t>
962 <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!sha1hash;</t>
963 </list>
964 </section>
965
966
967 <t>
968 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.
969 </t>
970
971 </section>
972
973 <section anchor="Usage with the SDP Offer/Answer Mode" title="Usage with the SDP Offer/Answer Model">
974
975 <t>
976 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.
977 </t>
978
979 </section>
980
981 </section>
982
983 <section anchor="Congestion Control" title="Congestion Control"> 
984
985 <t>
986 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.
987 </t>
988
989 <t>
990 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.
991 </t>
992
993 </section> 
994
995 <section anchor="Examples" title="Examples">
996
997 <t>
998 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.
999 </t>
1000
1001 <section anchor="Stream Radio" title="Stream Radio">
1002
1003 <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>
1004
1005 <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>
1006
1007 <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>
1008
1009 <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>
1010
1011 <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>
1012
1013 <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>
1014
1015 <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>
1016
1017 </section>
1018 </section>
1019
1020 <section anchor="Security Considerations" title="Security Considerations"> 
1021 <t>
1022 RTP packets using this payload format are subject to the security considerations discussed in the RTP specification 
1023 <xref target="rfc3550"></xref>.  This implies that the confidentiality of the media stream is achieved by using
1024 encryption.  Because the data compression used with this payload format is applied end-to-end, encryption may be performed on the 
1025 compressed data.  Where the size of a data block is set care MUST be taken to prevent buffer overflows in the client applications.
1026 </t>
1027
1028 </section> 
1029
1030 <section anchor="Acknowledgments" title="Acknowledgments"> 
1031
1032 <t>
1033 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.
1034 </t>
1035
1036 <t>
1037 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.
1038 </t>
1039
1040 </section> 
1041
1042 </middle>
1043
1044 <back>
1045
1046 <references title="Normative References">
1047
1048 <reference anchor="rfc3533">
1049 <front>
1050 <title>The Ogg Encapsulation Format Version 0</title>
1051 <author initials="S." surname="Pfeiffer" fullname="Silvia Pfeiffer"></author>
1052 </front>
1053 <seriesInfo name="RFC" value="3533" />
1054 </reference>
1055
1056 <reference anchor="rfc2119">
1057 <front>
1058 <title>Key words for use in RFCs to Indicate Requirement Levels </title>
1059 <author initials="S." surname="Bradner" fullname="Scott Bradner"></author>
1060 </front>
1061 <seriesInfo name="RFC" value="2119" />
1062 </reference>   
1063
1064 <reference anchor="rfc3550">
1065 <front>
1066 <title>RTP: A Transport Protocol for real-time applications</title>
1067 <author initials="H." surname="Schulzrinne" fullname=""></author>
1068 <author initials="S." surname="Casner" fullname=""></author>
1069 <author initials="R." surname="Frederick" fullname=""></author>
1070 <author initials="V." surname="Jacobson" fullname=""></author>
1071 </front>
1072 <seriesInfo name="RFC" value="3550" />
1073 </reference> 
1074
1075 <reference anchor="rfc3551">
1076 <front>
1077 <title>RTP Profile for Audio and Video Conferences with Minimal Control.</title>
1078 <author initials="H." surname="Schulzrinne" fullname=""></author>
1079 <author initials="S." surname="Casner" fullname=""></author>
1080 </front>
1081 <date month="July" year="2003" />
1082 <seriesInfo name="RFC" value="3551" />
1083 </reference> 
1084   
1085 <reference anchor="rfc2327">
1086 <front>
1087 <title>SDP: Session Description Protocol</title>
1088 <author initials="M." surname="Handley" fullname="Mark Handley"></author>
1089 <author initials="V." surname="Jacobson" fullname="Van Jacobson"></author>
1090 </front>
1091 <seriesInfo name="RFC" value="2327" />
1092 </reference>   
1093
1094 <reference anchor="rfc1063">
1095 <front>
1096 <title>Path MTU Discovery</title>
1097 <author initials="J." surname="Mogul et al." fullname="J. Mogul et al."></author>
1098 </front>
1099 <seriesInfo name="RFC" value="1063" />
1100 </reference>   
1101
1102 <reference anchor="rfc1981">
1103 <front>
1104 <title>Path MTU Discovery for IP version 6</title>
1105 <author initials="J." surname="McCann et al." fullname="J. McCann et al."></author>
1106 </front>
1107 <seriesInfo name="RFC" value="1981" />
1108 </reference>   
1109
1110 <reference anchor="rfc3264">
1111 <front>
1112 <title>An Offer/Answer Model with Session Description Protocol (SDP)</title>
1113 <author initials="J." surname="Rosenberg" fullname="Jonathan Rosenberg"></author>
1114 <author initials="H." surname="Schulzrinne" fullname="Henning Schulzrinne"></author>
1115 </front>
1116 <seriesInfo name="RFC" value="3264" />
1117 </reference>   
1118
1119 <reference anchor="rfc3548">
1120 <front>
1121 <title>The Base16, Base32, and Base64 Data Encodings</title>
1122 <author initials="S." surname="Josefsson" fullname="Simon Josefsson"></author>
1123 </front>
1124 <seriesInfo name="RFC" value="3548" />
1125 </reference>   
1126
1127 <reference anchor="rtcp-feedback">
1128 <front>
1129 <title>Extended RTP Profile for RTCP-based Feedback (RTP/AVPF)</title>
1130 <author initials="J." surname="Ott" fullname="Joerg Ott"></author>
1131 <author initials="S." surname="Wenger" fullname="Stephan Wenger"></author>
1132 <author initials="N." surname="Sato" fullname="Noriyuki Sato"></author>
1133 <author initials="C." surname="Burmeister" fullname="Carsten Burmeister"></author>
1134 <author initials="J." surname="Rey" fullname="Jose Rey"></author>
1135 </front>
1136 <seriesInfo name="Internet Draft" value="(draft-ietf-avt-rtcp-feedback-11: Work in progress)" />
1137 </reference>   
1138
1139 <reference anchor="rfc1952">
1140 <front>
1141 <title>GZIP file format specification version 4.3</title>
1142 <author initials="P" surname="Deutsch" fullname="L. Peter Deutsch"></author>
1143 </front>
1144 <seriesInfo name="RFC" value="1952" />
1145 </reference>
1146
1147 <reference anchor="FIPS180">
1148 <front>
1149 <title>Secure Hash Standard</title>
1150 <author>
1151 <organization>National Institute of Standards and Technology</organization>
1152 </author>
1153 <date month="May" year="1993"/>
1154 </front>
1155 </reference>
1156
1157 <reference anchor="BZ2">
1158 <front>
1159 <title>libbz2 and bzip2</title>
1160 <author initials="J" surname="Seward" fullname="Julian Seward" />
1161 </front>
1162 </reference>
1163
1164
1165 </references>
1166
1167 <references title="Informative References">
1168 <reference anchor="libvorbis">
1169 <front>
1170 <title>libvorbis: Available from the Xiph website, http://www.xiph.org</title>
1171 </front>
1172 </reference>   
1173
1174 <reference anchor="vorbis-spec-ref">
1175 <front>
1176 <title>Ogg Vorbis I specification:  Codec setup and packet decode.  Available from the Xiph website, http://www.xiph.org</title>
1177 </front>
1178 </reference>   
1179   
1180 <reference anchor="v-comment">
1181 <front>
1182 <title>Ogg Vorbis I specification:  Comment field and header specification.  Available from the Xiph website, 
1183 http://www.xiph.org</title>
1184 </front>
1185 </reference>   
1186 <reference anchor="RFC3611">
1187 <front>
1188 <title>RTP Control Protocol Extended Reports (RTCP XR)</title>
1189 <author initials="T." surname="Friedman" fullname="T. Friedman" />
1190 <author initials="R." surname="Caceres" fullname="R. Caceres" />
1191 <author initials="A." surname="Clark" fullname="A. Clark" />
1192 <date year="2003" month="November"/>
1193 </front>
1194 <seriesInfo name="RFC" value="3611"/>
1195 </reference>
1196 </references>
1197 </back>
1198 </rfc>