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