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