draft-ietf-avt-vorbis-rtp-00.txt 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401
  1. AVT Working Group P. Kerr
  2. Internet-Draft Xiph.Org
  3. Expires: August 1, 2005 January 31, 2005
  4. draft-ietf-avt-vorbis-rtp-00
  5. RTP Payload Format for Vorbis Encoded Audio
  6. Status of this Memo
  7. This document is an Internet-Draft and is subject to all provisions
  8. of section 3 of RFC 3667. By submitting this Internet-Draft, each
  9. author represents that any applicable patent or other IPR claims of
  10. which he or she is aware have been or will be disclosed, and any of
  11. which he or she become aware will be disclosed, in accordance with
  12. RFC 3668.
  13. Internet-Drafts are working documents of the Internet Engineering
  14. Task Force (IETF), its areas, and its working groups. Note that
  15. other groups may also distribute working documents as
  16. Internet-Drafts.
  17. Internet-Drafts are draft documents valid for a maximum of six months
  18. and may be updated, replaced, or obsoleted by other documents at any
  19. time. It is inappropriate to use Internet-Drafts as reference
  20. material or to cite them other than as "work in progress."
  21. The list of current Internet-Drafts can be accessed at
  22. http://www.ietf.org/ietf/1id-abstracts.txt.
  23. The list of Internet-Draft Shadow Directories can be accessed at
  24. http://www.ietf.org/shadow.html.
  25. This Internet-Draft will expire on August 1, 2005.
  26. Copyright Notice
  27. Copyright (C) The Internet Society (2005).
  28. Abstract
  29. This document describes an RTP payload format for transporting Vorbis
  30. encoded audio. It details the RTP encapsulation mechanism for raw
  31. Vorbis data and details the delivery mechanisms for the decoder
  32. probability model, referred to as a codebook, metadata and other
  33. setup information.
  34. Also included within the document are the necessary details for the
  35. use of Vorbis with MIME and Session Description Protocol (SDP).
  36. Kerr Expires August 1, 2005 [Page 1]
  37. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  38. Editors Note
  39. All references to RFC XXXX are to be replaced by references to the
  40. RFC number of this memo, when published.
  41. Table of Contents
  42. 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
  43. 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
  44. 2. Payload Format . . . . . . . . . . . . . . . . . . . . . . . . 3
  45. 2.1 RTP Header . . . . . . . . . . . . . . . . . . . . . . . . 3
  46. 2.2 Payload Header . . . . . . . . . . . . . . . . . . . . . . 5
  47. 2.3 Payload Data . . . . . . . . . . . . . . . . . . . . . . . 6
  48. 2.4 Example RTP Packet . . . . . . . . . . . . . . . . . . . . 7
  49. 3. Frame Packetizing . . . . . . . . . . . . . . . . . . . . . . 8
  50. 3.1 Example Fragmented Vorbis Packet . . . . . . . . . . . . . 8
  51. 3.2 Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 11
  52. 4. Configuration Headers . . . . . . . . . . . . . . . . . . . . 12
  53. 4.1 In-band Header Transmission . . . . . . . . . . . . . . . 12
  54. 4.1.1 Setup Header . . . . . . . . . . . . . . . . . . . . . 13
  55. 4.1.2 Codebook Header . . . . . . . . . . . . . . . . . . . 13
  56. 4.1.3 Metadata Header . . . . . . . . . . . . . . . . . . . 15
  57. 4.2 Packed Headers Delivery . . . . . . . . . . . . . . . . . 16
  58. 4.2.1 Packed Headers IANA Considerations . . . . . . . . . . 19
  59. 4.3 Codebook Caching . . . . . . . . . . . . . . . . . . . . . 20
  60. 4.4 Loss of Configuration Headers . . . . . . . . . . . . . . 20
  61. 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
  62. 5.1 Mapping MIME Parameters into SDP . . . . . . . . . . . . . 21
  63. 6. Congestion Control . . . . . . . . . . . . . . . . . . . . . . 22
  64. 7. Security Considerations . . . . . . . . . . . . . . . . . . . 23
  65. 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23
  66. 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23
  67. 9.1 Normative References . . . . . . . . . . . . . . . . . . . . 23
  68. 9.2 Informative References . . . . . . . . . . . . . . . . . . . 24
  69. Author's Address . . . . . . . . . . . . . . . . . . . . . . . 24
  70. Intellectual Property and Copyright Statements . . . . . . . . 25
  71. Kerr Expires August 1, 2005 [Page 2]
  72. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  73. 1. Introduction
  74. Vorbis is a general purpose perceptual audio codec intended to allow
  75. maximum encoder flexibility, thus allowing it to scale competitively
  76. over an exceptionally wide range of bitrates. At the high
  77. quality/bitrate end of the scale (CD or DAT rate stereo, 16/24 bits),
  78. it is in the same league as MPEG-2 and MPC. Similarly, the 1.0
  79. encoder can encode high-quality CD and DAT rate stereo at below 48k
  80. bits/sec without resampling to a lower rate. Vorbis is also intended
  81. for lower and higher sample rates (from 8kHz telephony to 192kHz
  82. digital masters) and a range of channel representations (monaural,
  83. polyphonic, stereo, quadraphonic, 5.1, ambisonic, or up to 255
  84. discrete channels).
  85. Vorbis encoded audio is generally encapsulated within an Ogg format
  86. bitstream [1], which provides framing and synchronization. For the
  87. purposes of RTP transport, this layer is unnecessary, and so raw
  88. Vorbis packets are used in the payload.
  89. 1.1 Terminology
  90. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  91. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  92. document are to be interpreted as described in RFC 2119 [2].
  93. 2. Payload Format
  94. For RTP based transportation of Vorbis encoded audio the standard RTP
  95. header is followed by a 5 octet payload header, then the payload
  96. data. The payload headers are used to associate the Vorbis data with
  97. its associated decoding codebooks as well as indicating if the
  98. following packet contains fragmented Vorbis data and/or the the
  99. number of whole Vorbis data frames. The payload data contains the
  100. raw Vorbis bitstream information.
  101. 2.1 RTP Header
  102. The format of the RTP header is specified in [3] and shown in Figure
  103. 1. This payload format uses the fields of the header in a manner
  104. consistent with that specification.
  105. Kerr Expires August 1, 2005 [Page 3]
  106. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  107. 0 1 2 3
  108. 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
  109. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  110. |V=2|P|X| CC |M| PT | sequence number |
  111. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  112. | timestamp |
  113. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  114. | synchronization source (SSRC) identifier |
  115. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  116. | contributing source (CSRC) identifiers |
  117. | ... |
  118. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  119. Figure 1: RTP Header
  120. The RTP header begins with an octet of fields (V, P, X, and CC) to
  121. support specialized RTP uses (see [3] and [4] for details). For
  122. Vorbis RTP, the following values are used.
  123. Version (V): 2 bits
  124. This field identifies the version of RTP. The version used by this
  125. specification is two (2).
  126. Padding (P): 1 bit
  127. Padding MAY be used with this payload format according to section 5.1
  128. of [3].
  129. Extension (X): 1 bit
  130. The Extension bit is used in accordance with [3].
  131. CSRC count (CC): 4 bits
  132. The CSRC count is used in accordance with [3].
  133. Marker (M): 1 bit
  134. Set to zero. Audio silence suppression not used. This conforms to
  135. section 4.1 of [11].
  136. Payload Type (PT): 7 bits
  137. An RTP profile for a class of applications is expected to assign a
  138. payload type for this format, or a dynamically allocated payload type
  139. SHOULD be chosen which designates the payload as Vorbis.
  140. Kerr Expires August 1, 2005 [Page 4]
  141. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  142. Sequence number: 16 bits
  143. The sequence number increments by one for each RTP data packet sent,
  144. and may be used by the receiver to detect packet loss and to restore
  145. packet sequence. This field is detailed further in [3].
  146. Timestamp: 32 bits
  147. A timestamp representing the sampling time of the first sample of the
  148. first Vorbis packet in the RTP packet. The clock frequency MUST be
  149. set to the sample rate of the encoded audio data and is conveyed
  150. out-of-band as a SDP attribute.
  151. SSRC/CSRC identifiers:
  152. These two fields, 32 bits each with one SSRC field and a maximum of
  153. 16 CSRC fields, are as defined in [3].
  154. 2.2 Payload Header
  155. After the RTP Header section the following five octets are the
  156. Payload Header. This header is split into a number of bitfields
  157. detailing the format of the following payload data packets.
  158. 0 1 2 3
  159. 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
  160. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  161. | Codebook Ident |
  162. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  163. |C|F|VDT|# pkts.|
  164. +-+-+-+-+-+-+-+-+
  165. Figure 2: Payload Header
  166. Codebook Ident: 32 bits
  167. This 32 bit field is used to associate the Vorbis data to a decoding
  168. Codebook. It is created by making a CRC32 checksum of the codebook
  169. required to decode the particular Vorbis audio stream.
  170. Continuation (C): 1 bit
  171. Set to one if this is a continuation of a fragmented packet.
  172. Fragmented (F): 1 bit
  173. Set to one if the payload contains complete packets or if it contains
  174. the last fragment of a fragmented packet.
  175. Kerr Expires August 1, 2005 [Page 5]
  176. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  177. Vorbis Data Type (VDT): 2 bits
  178. This field sets the packet payload type for the Vorbis data. There
  179. are currently four type of Vorbis payloads.
  180. 0 = Raw Vorbis payload
  181. 1 = Vorbis Setup payload
  182. 2 = Vorbis Codebook payload
  183. 3 = Vorbis Metadata payload
  184. The last 4 bits are the number of complete packets in this payload.
  185. This provides for a maximum number of 15 Vorbis packets in the
  186. payload. If the packet contains fragmented data the number of
  187. packets MUST be set to 0.
  188. 2.3 Payload Data
  189. Raw Vorbis packets are unbounded in length currently, although at
  190. some future point there will likely be a practical limit placed on
  191. them. Typical Vorbis packet sizes are from very small (2-3 bytes) to
  192. quite large (8-12 kilobytes). The reference implementation [10]
  193. typically produces packets less than ~800 bytes, except for the
  194. codebook header packets which are ~4-12 kilobytes. Within an RTP
  195. context the maximum Vorbis packet size, including the RTP and payload
  196. headers, SHOULD be kept below the path MTU to avoid packet
  197. fragmentation.
  198. 0 1 2 3
  199. 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
  200. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  201. | length | vorbis packet data ..
  202. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  203. Figure 3: Payload Data Header
  204. Each Vorbis payload packet starts with a two octet length header,
  205. which is used to represent the size of the following data payload,
  206. followed by the raw Vorbis data.
  207. For payloads which consist of multiple Vorbis packets the payload
  208. data consists of the packet length followed by the packet data for
  209. each of the Vorbis packets in the payload.
  210. The Vorbis packet length header is the length of the Vorbis data
  211. block only and does not count the length field.
  212. The payload packing of the Vorbis data packets SHOULD follow the
  213. guidelines set-out in [4] where the oldest packet occurs immediately
  214. Kerr Expires August 1, 2005 [Page 6]
  215. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  216. after the RTP packet header.
  217. Channel mapping of the audio is in accordance with BS. 775-1 ITU-R
  218. [13].
  219. 2.4 Example RTP Packet
  220. Here is an example RTP packet containing two Vorbis packets.
  221. RTP Packet Header:
  222. 0 1 2 3
  223. 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
  224. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  225. | 2 |0|0| 0 |0| PT | sequence number |
  226. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  227. | timestamp (in sample rate units) |
  228. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  229. | synchronisation source (SSRC) identifier |
  230. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  231. | contributing source (CSRC) identifiers |
  232. | ... |
  233. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  234. Figure 4: Example Packet (RTP Headers)
  235. Payload Data:
  236. 0 1 2 3
  237. 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
  238. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  239. | Codebook Ident |
  240. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  241. |0|1| 0 | 2 pks | length | vorbis data ..
  242. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  243. .. vorbis data |
  244. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  245. | length | next vorbis packet data ..
  246. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  247. .. vorbis data |
  248. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  249. Figure 5: Example Packet (Payload Data)
  250. The payload data section of the RTP packet starts with the 32 bit
  251. Codebook Ident field followed by the one octet configuration header,
  252. which has the number of Vorbis frames set to 2. Each of the Vorbis
  253. data frames is prefixed by the two octet length field.
  254. Kerr Expires August 1, 2005 [Page 7]
  255. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  256. 3. Frame Packetizing
  257. Each RTP packet contains either one complete Vorbis packet, one
  258. Vorbis packet fragment, or an integer number of complete Vorbis
  259. packets (up to a max of 15 packets, since the number of packets is
  260. defined by a 4 bit value).
  261. Any Vorbis data packet that is less than path MTU SHOULD be bundled
  262. in the RTP packet with as many Vorbis packets as will fit, up to a
  263. maximum of 15. Path MTU is detailed in [6] and [7].
  264. If a Vorbis packet is larger than 65535 octets it MUST be fragmented.
  265. A fragmented packet has a zero in the last four bits of the payload
  266. header. Each fragment after the first will also set the Continued
  267. (C) bit to one in the payload header. The RTP packet containing the
  268. last fragment of the Vorbis packet will have the Fragmented (F) bit
  269. set to one. To maintain the correct sequence for fragmented packet
  270. reception the timestamp field of fragmented packets MUST be the same
  271. as the first packet sent, with the sequence number incremented as
  272. normal for the subsequent RTP packets.
  273. 3.1 Example Fragmented Vorbis Packet
  274. Here is an example fragmented Vorbis packet split over three RTP
  275. packets. Each packet contains the standard RTP headers as well as
  276. the 5 octet Vorbis headers.
  277. Kerr Expires August 1, 2005 [Page 8]
  278. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  279. Packet 1:
  280. 0 1 2 3
  281. 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
  282. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  283. |V=2|P|X| CC |M| PT | 1000 |
  284. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  285. | xxxxx |
  286. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  287. | synchronization source (SSRC) identifier |
  288. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  289. | contributing source (CSRC) identifiers |
  290. | ... |
  291. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  292. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  293. | Codebook Ident |
  294. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  295. |0|0| 0 | 0| length | vorbis data ..
  296. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  297. .. vorbis data |
  298. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  299. Figure 6: Example Fragmented Packet (Packet 1)
  300. In this packet the initial sequence number is 1000 and the timestamp
  301. is xxxxx. The Continuation (C) bit is set to one, indicating it is
  302. not the continuation of a fragmented bit, and the Fragmentation (F)
  303. is set to 0 indicating it is a fragmented packet. The number of
  304. packets field is set to 0, and as the payload is raw Vorbis data the
  305. VDT field is set to 0.
  306. Kerr Expires August 1, 2005 [Page 9]
  307. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  308. Packet 2:
  309. 0 1 2 3
  310. 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
  311. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  312. |V=2|P|X| CC |M| PT | 1001 |
  313. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  314. | xxxxx |
  315. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  316. | synchronization source (SSRC) identifier |
  317. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  318. | contributing source (CSRC) identifiers |
  319. | ... |
  320. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  321. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  322. | Codebook Ident |
  323. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  324. |1|0| 0 | 0| length | vorbis data ..
  325. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  326. .. vorbis data |
  327. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  328. Figure 7: Example Fragmented Packet (Packet 2)
  329. The C bit is set to 1 and the number of packets field is set to 0.
  330. For large Vorbis fragments there can be several of these type of
  331. payload packets. The maximum packet size SHOULD be no greater than
  332. the path MTU, including all RTP and payload headers. The sequence
  333. number has been incremented by one but the timestamp field remains
  334. the same as the initial packet.
  335. Kerr Expires August 1, 2005 [Page 10]
  336. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  337. Packet 3:
  338. 0 1 2 3
  339. 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
  340. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  341. |V=2|P|X| CC |M| PT | 1002 |
  342. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  343. | xxxxx |
  344. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  345. | synchronization source (SSRC) identifier |
  346. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  347. | contributing source (CSRC) identifiers |
  348. | ... |
  349. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  350. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  351. | Codebook Ident |
  352. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  353. |1|1| 0 | 0| length | vorbis data ..
  354. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  355. .. vorbis data |
  356. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  357. Figure 8: Example Fragmented Packet (Packet 3)
  358. This is the last Vorbis fragment packet. The C and F bits are set
  359. and the packet count remains set to 0. As in the previous packets
  360. the timestamp remains set to the first packet in the sequence and the
  361. sequence number has been incremented.
  362. 3.2 Packet Loss
  363. As there is no error correction within the Vorbis stream, packet loss
  364. will result in a loss of signal. Packet loss is more of an issue for
  365. fragmented Vorbis packets as the client will have to cope with the
  366. handling of the C and F flags. If we use the fragmented Vorbis
  367. packet example above and the first packet is lost the client SHOULD
  368. detect that the next packet has the packet count field set to 0 and
  369. the C bit is set and MUST drop it. The next packet, which is the
  370. final fragmented packet, SHOULD be dropped in the same manner, or
  371. buffered. Feedback reports on lost and dropped packets MUST be sent
  372. back via RTCP.
  373. If a particular multicast session has a large number of participants
  374. care must be taken to prevent an RTCP feedback implosion, [9], in the
  375. event of packet loss from a large number of participants.
  376. Loss of any of the configuration headers, detailed below, is dealt
  377. with in the Loss of Configuration Headers Section later.
  378. Kerr Expires August 1, 2005 [Page 11]
  379. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  380. 4. Configuration Headers
  381. Unlike other mainstream audio codecs Vorbis has no statically
  382. configured probability model, instead it packs all entropy decoding
  383. configuration, VQ and Huffman models into a self-contained codebook.
  384. This codebook block also requires additional identification
  385. information detailing the number of audio channels, bitrates and
  386. other information used to initialise the Vorbis stream.
  387. To decode a Vorbis stream three configuration header blocks are
  388. needed. The first header indicates the sample and bitrates, the
  389. number of channels and the version of the Vorbis encoder used. The
  390. second header contains the decoders probability model, or codebook
  391. and the third header details stream metadata.
  392. As the RTP stream may change certain configuration data mid-session
  393. there are two different methods for delivering this configuration
  394. data to a client, in-band and SDP which is detailed below. SDP
  395. delivery is used to set-up an initial state for the client
  396. application and in-band is used to change state during the session.
  397. The changes may be due to different metadata or codebooks as well as
  398. different bitrates of the stream.
  399. Out of the two delivery vectors the use of an SDP attribute to
  400. indicate an URI where the configuration and codebook data can be
  401. obtained is preferred as they can be fetched reliably using TCP. The
  402. in-band codebook delivery SHOULD only be used in situations where the
  403. link between the client is unidirectional or if the SDP-based
  404. information is not available.
  405. Synchronizing the configuration and codebook headers to the RTP
  406. stream is critical. The 32 bit Codebook Ident field is used to
  407. indicate when a change in the stream has taken place. The client
  408. application MUST have in advance the correct configuration and
  409. codebook headers and if the client detects a change in the Ident
  410. value and does not have this information it MUST NOT decode the raw
  411. Vorbis data.
  412. 4.1 In-band Header Transmission
  413. The three header data blocks are sent in-band with the packet type
  414. bits set to match the payload type. Normally the codebook and
  415. configuration headers are sent once per session if the stream is an
  416. encoding of live audio, as typically the encoder state will not
  417. change, but the encoder state can change at the boundary of chained
  418. Vorbis audio files. Metadata can be sent at the start as well as any
  419. time during the life of the session. Clients MUST be capable of
  420. dealing with periodic re-transmission of the configuration headers.
  421. Kerr Expires August 1, 2005 [Page 12]
  422. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  423. 4.1.1 Setup Header
  424. A Vorbis Setup header is indicated with the payload type field set to
  425. 1. The Vorbis version MUST be set to zero to comply with this
  426. document. The fields Sample Rate, Bitrate Maximum/Nominal/Minimum
  427. and Num Audio Channels are set in accordance with [11] with the bsz
  428. fields above referring to the blocksize parameters. The framing bit
  429. is not used for RTP transportation and so applications constructing
  430. Vorbis files MUST take care to set this if required.
  431. 0 1 2 3
  432. 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
  433. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  434. |V=2|P|X| CC |M| PT | xxxx |
  435. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  436. | xxxxx |
  437. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  438. | synchronization source (SSRC) identifier |
  439. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  440. | contributing source (CSRC) identifiers |
  441. | ... |
  442. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  443. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  444. | Codebook Ident |
  445. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  446. |0|1| 2 | 1| bsz 0 | bsz 1 | Num Audio Channels |
  447. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  448. | Vorbis Version |
  449. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  450. | Audio Sample Rate |
  451. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  452. | Bitrate Maximum |
  453. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  454. | Bitrate Nominal |
  455. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  456. | Bitrate Minimum |
  457. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  458. Figure 9: Setup Header
  459. 4.1.2 Codebook Header
  460. If the payload type field is set to 2, this indicates the packet
  461. contains Codebook data.
  462. The configuration information detailed below MUST be completely
  463. intact, as a client can not decode a stream with an incomplete or
  464. Kerr Expires August 1, 2005 [Page 13]
  465. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  466. corrupted codebook set.
  467. A 16 bit codebook length field precedes the codebook datablock. The
  468. length field allows for codebooks to be up to 64K in size. Packet
  469. fragmentation, as per the Vorbis data, MUST be performed if the
  470. codebooks size exceeds path MTU. The Codebook Ident field MUST be
  471. set to match the associated codebook needed to decode the Vorbis
  472. stream.
  473. The Codebook Ident is the CRC32 checksum of the codebook and is used
  474. to detect a corrupted codebook as well as associating it with its
  475. Vorbis data stream. This Ident value MUST NOT be set to the value of
  476. the current stream if this header is being sent before the boundary
  477. of the chained file has been reached. If a checksum failure is
  478. detected then this is considered to be a failure and MUST be reported
  479. to the client application.
  480. 0 1 2 3
  481. 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
  482. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  483. |V=2|P|X| CC |M| PT | xxxx |
  484. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  485. | xxxxx |
  486. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  487. | synchronization source (SSRC) identifier |
  488. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  489. | contributing source (CSRC) identifiers |
  490. | ... |
  491. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  492. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  493. | Codebook Ident |
  494. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  495. |0|1| 2 | 1| Codebook Length |
  496. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  497. | length | Codebook ..
  498. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  499. .. Codebook |
  500. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  501. Figure 10: Codebook Header
  502. 4.1.2.1 Codebook CRC32 Generation
  503. In order for different implementations of Vorbis RTP clients and
  504. servers to interoperate with each other a common format for the
  505. production of the CRC32 hash is required. The polynomial is
  506. X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0.
  507. Kerr Expires August 1, 2005 [Page 14]
  508. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  509. The following C code function SHOULD be used by implementations, if
  510. not then the code responsible for generating the CRC32 value MUST use
  511. the polynomial function above.
  512. unsigned int crc32 (int length, unsigned char *crcdata)
  513. {
  514. int index, loop;
  515. unsigned int byte, crc, mask;
  516. index = 0;
  517. crc = 0xFFFFFFFF;
  518. while (index < length) {
  519. byte = crcdata [index];
  520. crc = crc ^ byte;
  521. for (loop = 7; loop >= 0; loop--) {
  522. mask = -(crc & 1);
  523. crc = (crc >> 1) ^ (0xEDB88320 & mask);
  524. }
  525. index++;
  526. }
  527. return ~crc;
  528. }
  529. 4.1.3 Metadata Header
  530. With the payload type flag set to 3, this indicates that the packet
  531. contain the comment metadata, such as artist name, track title and so
  532. on. These metadata messages are not intended to be fully descriptive
  533. but to offer basic track/song information. This message MUST be sent
  534. at the start of the stream, together with the setup and codebook
  535. headers, even if it contains no information. During a session the
  536. metadata associated with the stream may change from that specified at
  537. the start, e.g. a live concert broadcast changing acts/scenes, so
  538. clients MUST have the ability to receive Metadata header blocks.
  539. Details on the format of the comments can be found in the Vorbis
  540. documentation [12].
  541. The format for the data takes the form of a 32 bit codec vendors name
  542. length field followed by the name encoded in UTF-8. The next 32 bit
  543. field denotes the number of user comments. Each of the user comments
  544. is prefixed by a 32 bit length field followed by the comment text.
  545. Kerr Expires August 1, 2005 [Page 15]
  546. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  547. 0 1 2 3
  548. 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
  549. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  550. |V=2|P|X| CC |M| PT | xxxx |
  551. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  552. | xxxxx |
  553. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  554. | synchronization source (SSRC) identifier |
  555. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  556. | contributing source (CSRC) identifiers |
  557. | ... |
  558. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  559. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  560. | Codebook Ident |
  561. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  562. |0|1| 3 | 1| Vendor string length |
  563. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  564. | length | Vendor string ..
  565. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  566. | User comments list length |
  567. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  568. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  569. | User comment length |
  570. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  571. | User comment ..
  572. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  573. .. User comment |
  574. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  575. Figure 11: Metadata Header
  576. 4.2 Packed Headers Delivery
  577. As mentioned above the RECOMMENDED delivery vector for Vorbis
  578. configuration data is via an SDP attribute as this retrieval method
  579. can be performed using a reliable transport protocol.
  580. Kerr Expires August 1, 2005 [Page 16]
  581. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  582. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  583. | Number of packed headers |
  584. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  585. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  586. | Packed header |
  587. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  588. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  589. | Packed header |
  590. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  591. Figure 12: Packed Headers Overview
  592. As the RTP headers are not required for this method of delivery the
  593. structure of the configuration data is slightly different. The
  594. packed header starts with a 32 bit count field which details the
  595. number of packed headers that are contained in the bundle. Next is
  596. the packed header payload for each chained Vorbis file.
  597. 0 1 2 3
  598. 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
  599. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  600. | Header Length |
  601. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  602. | Codebook Ident |
  603. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  604. | Setup Header ..
  605. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  606. .. Setup Header |
  607. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  608. | Codebook Header ..
  609. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  610. .. Codebook Header |
  611. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  612. | Metadata Header ..
  613. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  614. .. Metadata Header |
  615. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  616. Figure 13: Packed Headers Detail
  617. The key difference between the in-band format is there is no need for
  618. the payload header octet and Codebook Ident field. Below are
  619. examples of the packed headers format.
  620. Kerr Expires August 1, 2005 [Page 17]
  621. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  622. 0 1 2 3
  623. 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
  624. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  625. |0|1| 2 | 1| bsz 0 | bsz 1 | Num Audio Channels |
  626. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  627. | Vorbis Version |
  628. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  629. | Audio Sample Rate |
  630. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  631. | Bitrate Maximum |
  632. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  633. | Bitrate Nominal |
  634. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  635. | Bitrate Minimum |
  636. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  637. Figure 14: Packed Setup Header
  638. The alignment of the packed Setup Header is slightly different from
  639. the RTP payload type as the payload header is not used.
  640. 0 1 2 3
  641. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  642. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  643. | Codebook Length |
  644. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  645. | Codebook ..
  646. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  647. .. Codebook |
  648. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  649. Figure 15: Packed Codebook Header
  650. The packed Codebook header also has a slightly different structure to
  651. that of the RTP payload type. The Codebook Ident field that is
  652. normally part of this structure is moved to the second field of the
  653. overall packed structure.
  654. Kerr Expires August 1, 2005 [Page 18]
  655. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  656. 0 1 2 3
  657. 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
  658. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  659. | Vendor string length |
  660. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  661. | Vendor string |
  662. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  663. | User comments list length |
  664. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  665. | User comment length / User comment ..
  666. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  667. Figure 16: Packed Metadata Header
  668. The packed Metadata header also as a slightly different structure to
  669. that of the RTP payload type with the payload header not being used.
  670. 4.2.1 Packed Headers IANA Considerations
  671. The following IANA considerations MUST only be applied to the packed
  672. headers.
  673. MIME media type name: audio
  674. MIME subtype: vorbis-config
  675. Required Parameters:
  676. None.
  677. Optional Parameters:
  678. None.
  679. Encoding considerations:
  680. This type is only defined for transfer via HTTP as specified in RFC
  681. XXXX.
  682. Security Considerations:
  683. See Section 6 of RFC 3047.
  684. Interoperability considerations: none
  685. Published specification:
  686. See RFC XXXX for details.
  687. Kerr Expires August 1, 2005 [Page 19]
  688. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  689. Applications which use this media type:
  690. Vorbis encoded audio, configuration data.
  691. Additional information: none
  692. Person & email address to contact for further information:
  693. Phil Kerr: <phil@plus24.com>
  694. Intended usage: COMMON
  695. Author/Change controller:
  696. Author: Phil Kerr
  697. Change controller: IETF AVT Working Group
  698. 4.3 Codebook Caching
  699. Codebook caching allows clients that have previously connected to a
  700. stream to re-use the associated codebooks and configuration data.
  701. When a client receives a codebook it may store it locally and can
  702. compare the CRC32 key with that of the new stream and begin decoding
  703. before it has received any of the headers.
  704. 4.4 Loss of Configuration Headers
  705. Unlike the loss of raw Vorbis payload data, loss of a configuration
  706. header can lead to a situation where it will not be possible to
  707. successfully decode the stream.
  708. Out of the three headers, loss of either the Codebook or Setup
  709. headers MUST result in the halting of stream decoding. Loss of the
  710. Metadata header SHOULD NOT be regarded as fatal for decoding. Loss
  711. of any of the headers SHOULD be reported to the client as well as a
  712. loss report sent via RTCP.
  713. 5. IANA Considerations
  714. MIME media type name: audio
  715. MIME subtype: vorbis
  716. Required Parameters:
  717. header indicates the URI of the decoding configuration headers.
  718. Kerr Expires August 1, 2005 [Page 20]
  719. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  720. Optional Parameters:
  721. None.
  722. Encoding considerations:
  723. This type is only defined for transfer via RTP as specified in RFC
  724. XXXX.
  725. Security Considerations:
  726. See Section 6 of RFC 3047.
  727. Interoperability considerations: none
  728. Published specification:
  729. See the Vorbis documentation [11] for details.
  730. Applications which use this media type:
  731. Audio streaming and conferencing tools
  732. Additional information: none
  733. Person & email address to contact for further information:
  734. Phil Kerr: <phil@plus24.com>
  735. Intended usage: COMMON
  736. Author/Change controller:
  737. Author: Phil Kerr
  738. Change controller: IETF AVT Working Group
  739. 5.1 Mapping MIME Parameters into SDP
  740. The information carried in the MIME media type specification has a
  741. specific mapping to fields in the Session Description Protocol (SDP)
  742. [5], which is commonly used to describe RTP sessions. When SDP is
  743. used to specify sessions the mapping are as follows:
  744. o The MIME type ("audio") goes in SDP "m=" as the media name.
  745. o The MIME subtype ("VORBIS") goes in SDP "a=rtpmap" as the encoding
  746. name.
  747. Kerr Expires August 1, 2005 [Page 21]
  748. o The parameter "rate" also goes in "a=rtpmap" as clock rate.
  749. o The parameter "channels" also goes in "a=rtpmap" as channel count.
  750. o The parameter "header" goes in the SDP "a=fmpt" attribute.
  751. If the stream comprises chained Vorbis files the configuration and
  752. codebook headers for each file SHOULD be packaged together and passed
  753. to the client using the headers attribute if all the files to be
  754. played are known in advance.
  755. The Vorbis configuration specified in the header attribute MUST
  756. contain all of the configuration data and codebooks needed for the
  757. life of the session.
  758. The port value is specified by the server application bound to the
  759. address specified in the c attribute. The bitrate value and channels
  760. specified in the rtpmap attribute MUST match the Vorbis sample rate
  761. value. An example is found below.
  762. c=IN IP4/6
  763. m=audio RTP/AVP 98
  764. a=rtpmap:98 VORBIS/44100/2
  765. a=fmtp:98 header=<URL of configuration header>
  766. Note that the payload format (encoding) names are commonly shown in
  767. upper case. MIME subtypes are commonly shown in lower case. These
  768. names are case-insensitive in both places. Similarly, parameter
  769. names are case-insensitive both in MIME types and in the default
  770. mapping to the SDP a=fmtp attribute. The exception regarding case
  771. sensitivity is the configuration header URL which MUST be regarded as
  772. being case sensitive.
  773. The answer to any offer, [8], MUST NOT change the URL specified in
  774. the header attribute.
  775. 6. Congestion Control
  776. Vorbis clients SHOULD send regular receiver reports detailing
  777. congestion. A mechanism for dynamically downgrading the stream,
  778. known as bitrate peeling, will allow for a graceful backing off of
  779. the stream bitrate. This feature is not available at present so an
  780. alternative would be to redirect the client to a lower bitrate stream
  781. if one is available.
  782. If a particular multicast session has a large number of participants
  783. care must be taken to prevent an RTCP feedback implosion, [9], in the
  784. event of congestion.
  785. Kerr Expires August 1, 2005 [Page 22]
  786. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  787. 7. Security Considerations
  788. RTP packets using this payload format are subject to the security
  789. considerations discussed in the RTP specification [3]. This implies
  790. that the confidentiality of the media stream is achieved by using
  791. encryption. Because the data compression used with this payload
  792. format is applied end-to-end, encryption may be performed on the
  793. compressed data. Where the size of a data block is set care MUST be
  794. taken to prevent buffer overflows in the client applications.
  795. 8. Acknowledgments
  796. This document is a continuation of draft-moffitt-vorbis-rtp-00.txt.
  797. The MIME type section is a continuation of
  798. draft-short-avt-rtp-vorbis-mime-00.txt
  799. Thanks to the AVT, Ogg Vorbis Communities / Xiph.org including Steve
  800. Casner, Aaron Colwell, Ross Finlayson, Fluendo, Ramon Garcia, Pascal
  801. Hennequin, Ralph Giles, Tor-Einar Jarnbjo, Colin Law, John Lazzaro,
  802. Jack Moffitt, Christopher Montgomery, Colin Perkins, Barry Short,
  803. Mike Smith, Michael Sparks, Magnus Westerlund.
  804. 9. References
  805. 9.1 Normative References
  806. [1] Pfeiffer, S., "The Ogg Encapsulation Format Version 0", RFC
  807. 3533.
  808. [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement
  809. Levels", RFC 2119.
  810. [3] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson,
  811. "RTP: A Transport Protocol for real-time applications", RFC
  812. 3550.
  813. [4] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and Video
  814. Conferences with Minimal Control.", RFC 3551.
  815. [5] Handley, M. and V. Jacobson, "SDP: Session Description
  816. Protocol", RFC 2327.
  817. [6] Mogul et al., J., "Path MTU Discovery", RFC 1063.
  818. [7] McCann et al., J., "Path MTU Discovery for IP version 6", RFC
  819. 1981.
  820. [8] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with
  821. Kerr Expires August 1, 2005 [Page 23]
  822. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  823. Session Description Protocol (SDP)", RFC 3264.
  824. [9] Ott, J., Wenger, S., Sato, N., Burmeister, C. and J. Rey,
  825. "Extended RTP Profile for RTCP-based Feedback (RTP/AVPF)",
  826. Internet Draft (draft-ietf-avt-rtcp-feedback-11: Work in
  827. progress).
  828. 9.2 Informative References
  829. [10] "libvorbis: Available from the Xiph website,
  830. http://www.xiph.org".
  831. [11] "Ogg Vorbis I specification: Codec setup and packet decode.
  832. Available from the Xiph website, http://www.xiph.org".
  833. [12] "Ogg Vorbis I specification: Comment field and header
  834. specification. Available from the Xiph website,
  835. http://www.xiph.org".
  836. [13] "ITU (1992-1994) ITU-R Recommendation BS. 775-1 Multi-channel
  837. stereophonic sound system with or without accompanying
  838. picture. International Telecommunications Union. Available
  839. from the ITU website, http://www.itu.int".
  840. Author's Address
  841. Phil Kerr
  842. Xiph.Org
  843. EMail: phil@plus24.com
  844. URI: http://www.xiph.org/
  845. Kerr Expires August 1, 2005 [Page 24]
  846. Internet-Draft draft-ietf-avt-vorbis-rtp-00 January 2005
  847. Intellectual Property Statement
  848. The IETF takes no position regarding the validity or scope of any
  849. Intellectual Property Rights or other rights that might be claimed to
  850. pertain to the implementation or use of the technology described in
  851. this document or the extent to which any license under such rights
  852. might or might not be available; nor does it represent that it has
  853. made any independent effort to identify any such rights. Information
  854. on the procedures with respect to rights in RFC documents can be
  855. found in BCP 78 and BCP 79.
  856. Copies of IPR disclosures made to the IETF Secretariat and any
  857. assurances of licenses to be made available, or the result of an
  858. attempt made to obtain a general license or permission for the use of
  859. such proprietary rights by implementers or users of this
  860. specification can be obtained from the IETF on-line IPR repository at
  861. http://www.ietf.org/ipr.
  862. The IETF invites any interested party to bring to its attention any
  863. copyrights, patents or patent applications, or other proprietary
  864. rights that may cover technology that may be required to implement
  865. this standard. Please address the information to the IETF at
  866. ietf-ipr@ietf.org.
  867. Disclaimer of Validity
  868. This document and the information contained herein are provided on an
  869. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  870. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
  871. ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
  872. INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
  873. INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  874. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  875. Copyright Statement
  876. Copyright (C) The Internet Society (2005). This document is subject
  877. to the rights, licenses and restrictions contained in BCP 78, and
  878. except as set forth therein, the authors retain all their rights.
  879. Acknowledgment
  880. Funding for the RFC Editor function is currently provided by the
  881. Internet Society.
  882. Kerr Expires August 1, 2005 [Page 25]