draft-ietf-avt-rtp-speex-05-tmp.txt 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288
  1. AVT G. Herlein
  2. Internet-Draft
  3. Intended status: Standards Track J. Valin
  4. Expires: August 19, 2008 CSIRO
  5. A. Heggestad
  6. Creytiv.com
  7. A. Moizard
  8. Antisip
  9. February 16, 2008
  10. RTP Payload Format for the Speex Codec
  11. draft-ietf-avt-rtp-speex-05
  12. Status of this Memo
  13. By submitting this Internet-Draft, each author represents that any
  14. applicable patent or other IPR claims of which he or she is aware
  15. have been or will be disclosed, and any of which he or she becomes
  16. aware will be disclosed, in accordance with Section 6 of BCP 79.
  17. Internet-Drafts are working documents of the Internet Engineering
  18. Task Force (IETF), its areas, and its working groups. Note that
  19. other groups may also distribute working documents as Internet-
  20. Drafts.
  21. Internet-Drafts are draft documents valid for a maximum of six months
  22. and may be updated, replaced, or obsoleted by other documents at any
  23. time. It is inappropriate to use Internet-Drafts as reference
  24. material or to cite them other than as "work in progress."
  25. The list of current Internet-Drafts can be accessed at
  26. http://www.ietf.org/ietf/1id-abstracts.txt.
  27. The list of Internet-Draft Shadow Directories can be accessed at
  28. http://www.ietf.org/shadow.html.
  29. This Internet-Draft will expire on August 19, 2008.
  30. Copyright Notice
  31. Copyright (C) The IETF Trust (2008).
  32. Herlein, et al. Expires August 19, 2008 [Page 1]
  33. Internet-Draft Speex February 2008
  34. Abstract
  35. Speex is an open-source voice codec suitable for use in Voice over IP
  36. (VoIP) type applications. This document describes the payload format
  37. for Speex generated bit streams within an RTP packet. Also included
  38. here are the necessary details for the use of Speex with the Session
  39. Description Protocol (SDP).
  40. Herlein, et al. Expires August 19, 2008 [Page 2]
  41. Internet-Draft Speex February 2008
  42. Editors Note
  43. All references to RFC XXXX are to be replaced by references to the
  44. RFC number of this memo, when published.
  45. Table of Contents
  46. 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
  47. 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
  48. 3. RTP usage for Speex . . . . . . . . . . . . . . . . . . . . . 6
  49. 3.1. RTP Speex Header Fields . . . . . . . . . . . . . . . . . 6
  50. 3.2. RTP payload format for Speex . . . . . . . . . . . . . . . 6
  51. 3.3. Speex payload . . . . . . . . . . . . . . . . . . . . . . 6
  52. 3.4. Example Speex packet . . . . . . . . . . . . . . . . . . . 7
  53. 3.5. Multiple Speex frames in a RTP packet . . . . . . . . . . 7
  54. 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
  55. 4.1. Media Type Registration . . . . . . . . . . . . . . . . . 9
  56. 4.1.1. Registration of media type audio/speex . . . . . . . . 9
  57. 5. SDP usage of Speex . . . . . . . . . . . . . . . . . . . . . . 12
  58. 5.1. Example supporting all modes, prefer mode 4 . . . . . . . 15
  59. 5.2. Example supporting only mode 3 and 5 . . . . . . . . . . . 15
  60. 5.3. Example with Variable Bit Rate and Comfort Noise . . . . . 15
  61. 5.4. Example with Voice Activity Detection . . . . . . . . . . 15
  62. 5.5. Example with Multiple sampling rates . . . . . . . . . . . 15
  63. 5.6. Example with ptime and Multiple Speex frames . . . . . . . 16
  64. 5.7. Example with Complete Offer/Answer exchange . . . . . . . 16
  65. 6. Implementation Guidelines . . . . . . . . . . . . . . . . . . 17
  66. 7. Security Considerations . . . . . . . . . . . . . . . . . . . 18
  67. 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 19
  68. 9. Copying conditions . . . . . . . . . . . . . . . . . . . . . . 20
  69. 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21
  70. 10.1. Normative References . . . . . . . . . . . . . . . . . . . 21
  71. 10.2. Informative References . . . . . . . . . . . . . . . . . . 21
  72. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 22
  73. Intellectual Property and Copyright Statements . . . . . . . . . . 23
  74. Herlein, et al. Expires August 19, 2008 [Page 3]
  75. Internet-Draft Speex February 2008
  76. 1. Introduction
  77. Speex is based on the CELP [CELP] encoding technique with support for
  78. either narrowband (nominal 8kHz), wideband (nominal 16kHz) or ultra-
  79. wideband (nominal 32kHz). The main characteristics can be summarized
  80. as follows:
  81. o Free software/open-source
  82. o Integration of wideband and narrowband in the same bit-stream
  83. o Wide range of bit-rates available
  84. o Dynamic bit-rate switching and variable bit-rate (VBR)
  85. o Voice Activity Detection (VAD, integrated with VBR)
  86. o Variable complexity
  87. The Speex codec supports a wide range of bit-rates from 2.15 kbit/s
  88. to 44 kbit/s. In some cases however, it may not be possible for an
  89. implementation to include support for all rates (e.g. because of
  90. bandwidth, RAM or CPU constraints). In those cases, to be compliant
  91. with this specification, implementations MUST support at least
  92. narrowband (8 kHz) encoding and decoding at 8 kbit/s bit-rate
  93. (narrowband mode 3). Support for narrowband at 15 kbit/s (narrowband
  94. mode 5) is RECOMMENDED and support for wideband at 27.8 kbit/s
  95. (wideband mode 8) is also RECOMMENDED. The sampling rate MUST be 8,
  96. 16 or 32 kHz.
  97. Herlein, et al. Expires August 19, 2008 [Page 4]
  98. Internet-Draft Speex February 2008
  99. 2. Terminology
  100. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  101. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  102. document are to be interpreted as described in RFC2119 [RFC2119] and
  103. indicate requirement levels for compliant RTP implementations.
  104. Herlein, et al. Expires August 19, 2008 [Page 5]
  105. Internet-Draft Speex February 2008
  106. 3. RTP usage for Speex
  107. 3.1. RTP Speex Header Fields
  108. The RTP header is defined in the RTP specification [RFC3550]. This
  109. section defines how fields in the RTP header are used.
  110. Payload Type (PT): The assignment of an RTP payload type for this
  111. packet format is outside the scope of this document; it is
  112. specified by the RTP profile under which this payload format is
  113. used, or signaled dynamically out-of-band (e.g., using SDP).
  114. Marker (M) bit: The M bit is set to one on the first packet sent
  115. after a silence period, during which packets have not been
  116. transmitted contiguously.
  117. Extension (X) bit: Defined by the RTP profile used.
  118. Timestamp: A 32-bit word that corresponds to the sampling instant
  119. for the first frame in the RTP packet.
  120. 3.2. RTP payload format for Speex
  121. The RTP payload for Speex has the format shown in Figure 1. No
  122. additional header fields specific to this payload format are
  123. required. For RTP based transportation of Speex encoded audio the
  124. standard RTP header [RFC3550] is followed by one or more payload data
  125. blocks. An optional padding terminator may also be used.
  126. 0 1 2 3
  127. 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
  128. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  129. | RTP Header |
  130. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  131. | one or more frames of Speex .... |
  132. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  133. | one or more frames of Speex .... | padding |
  134. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  135. Figure 1: RTP payload for Speex
  136. 3.3. Speex payload
  137. For the purposes of packetizing the bit stream in RTP, it is only
  138. necessary to consider the sequence of bits as output by the Speex
  139. encoder [speex_manual], and present the same sequence to the decoder.
  140. The payload format described here maintains this sequence.
  141. Herlein, et al. Expires August 19, 2008 [Page 6]
  142. Internet-Draft Speex February 2008
  143. A typical Speex frame, encoded at the maximum bitrate, is approx. 110
  144. octets and the total number of Speex frames SHOULD be kept less than
  145. the path MTU to prevent fragmentation. Speex frames MUST NOT be
  146. fragmented across multiple RTP packets,
  147. An RTP packet MAY contain Speex frames of the same bit rate or of
  148. varying bit rates, since the bit-rate for a frame is conveyed in band
  149. with the signal.
  150. The encoding and decoding algorithm can change the bit rate at any 20
  151. msec frame boundary, with the bit rate change notification provided
  152. in-band with the bit stream. Each frame contains both sampling rate
  153. (narrowband, wideband or ultra-wideband) and "mode" (bit-rate)
  154. information in the bit stream. No out-of-band notification is
  155. required for the decoder to process changes in the bit rate sent by
  156. the encoder.
  157. The sampling rate MUST be either 8000 Hz, 16000 Hz, or 32000 Hz.
  158. The RTP payload MUST be padded to provide an integer number of octets
  159. as the payload length. These padding bits are LSB aligned in network
  160. octet order and consist of a 0 followed by all ones (until the end of
  161. the octet). This padding is only required for the last frame in the
  162. packet, and only to ensure the packet contents ends on an octet
  163. boundary.
  164. 3.4. Example Speex packet
  165. In the example below we have a single Speex frame with 5 bits of
  166. padding to ensure the packet size falls on an octet boundary.
  167. 0 1 2 3
  168. 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
  169. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  170. | RTP Header |
  171. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  172. | ..speex data.. |
  173. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  174. | ..speex data.. |0 1 1 1 1|
  175. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  176. 3.5. Multiple Speex frames in a RTP packet
  177. Below is an example of two Speex frames contained within one RTP
  178. packet. The Speex frame length in this example fall on an octet
  179. boundary so there is no padding.
  180. The Speex decoder [speex_manual] can detect the bitrate from the
  181. Herlein, et al. Expires August 19, 2008 [Page 7]
  182. Internet-Draft Speex February 2008
  183. payload and is responsible for detecting the 20 msec boundaries
  184. between each frame.
  185. 0 1 2 3
  186. 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
  187. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  188. | RTP Header |
  189. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  190. | ..speex frame 1.. |
  191. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  192. | ..speex frame 1.. | ..speex frame 2.. |
  193. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  194. | ..speex frame 2.. |
  195. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  196. Herlein, et al. Expires August 19, 2008 [Page 8]
  197. Internet-Draft Speex February 2008
  198. 4. IANA Considerations
  199. This document defines the Speex media type.
  200. 4.1. Media Type Registration
  201. This section describes the media types and names associated with this
  202. payload format. The section registers the media types, as per
  203. RFC4288 [RFC4288]
  204. 4.1.1. Registration of media type audio/speex
  205. Media type name: audio
  206. Media subtype name: speex
  207. Required parameters:
  208. rate: RTP timestamp clock rate, which is equal to the sampling
  209. rate in Hz. The sampling rate MUST be either 8000, 16000, or
  210. 32000.
  211. Optional parameters:
  212. ptime: SHOULD be a multiple of 20 msec [RFC4566]
  213. maxptime: SHOULD be a multiple of 20 msec [RFC4566]
  214. vbr: variable bit rate - either 'on' 'off' or 'vad' (defaults to
  215. off). If on, variable bit rate is enabled. If off, disabled. If
  216. set to 'vad' then constant bit rate is used but silence will be
  217. encoded with special short frames to indicate a lack of voice for
  218. that period.
  219. cng: comfort noise generation - either 'on' or 'off'. If off then
  220. silence frames will be silent; if 'on' then those frames will be
  221. filled with comfort noise.
  222. mode: List supported Speex decoding modes. The valid modes are
  223. different for narrowband and wideband, and are defined as follows:
  224. * {1,2,3,4,5,6,7,8,any} for narrowband
  225. * {0,1,2,3,4,5,6,7,8,9,10,any} for wideband and ultra-wideband
  226. Several 'mode' parameters can be provided. In this case, the
  227. Herlein, et al. Expires August 19, 2008 [Page 9]
  228. Internet-Draft Speex February 2008
  229. remote party SHOULD configure its encoder using the first
  230. supported mode provided. When 'any' is used, the offerer
  231. indicates that it supports all decoding modes. If the 'mode'
  232. parameter is not provided, the mode value is considered to be
  233. equivalent to 'mode=3;mode=any' in narrowband and
  234. 'mode=8;mode=any' in wideband and ultra-wideband. Note that each
  235. Speex frame does contains the mode (or bit-rate) that should be
  236. used to decode it. Thus application MUST be able to decode any
  237. Speex frame unless the SDP clearly specify that some modes are not
  238. supported. (e.g., by not including 'mode=any')
  239. Encoding considerations:
  240. This media type is framed and binary, see section 4.8 in
  241. [RFC4288].
  242. Security considerations: See Section 6
  243. Interoperability considerations:
  244. None.
  245. Published specification:
  246. RFC XXXX [RFC Editor: please replace by the RFC number of this
  247. memo, when published]
  248. Applications which use this media type:
  249. Audio streaming and conferencing applications.
  250. Additional information: none
  251. Person and email address to contact for further information :
  252. Alfred E. Heggestad: aeh@db.org
  253. Intended usage: COMMON
  254. Restrictions on usage:
  255. This media type depends on RTP framing, and hence is only defined
  256. for transfer via RTP [RFC3550]. Transport within other framing
  257. protocols is not defined at this time.
  258. Author: Alfred E. Heggestad
  259. Change controller:
  260. Herlein, et al. Expires August 19, 2008 [Page 10]
  261. Internet-Draft Speex February 2008
  262. IETF Audio/Video Transport working group delegated from the IESG.
  263. Herlein, et al. Expires August 19, 2008 [Page 11]
  264. Internet-Draft Speex February 2008
  265. 5. SDP usage of Speex
  266. The information carried in the media type specification has a
  267. specific mapping to fields in the Session Description Protocol (SDP)
  268. [RFC4566], which is commonly used to describe RTP sessions. When SDP
  269. is used to specify sessions employing the Speex codec, the mapping is
  270. as follows:
  271. o The media type ("audio") goes in SDP "m=" as the media name.
  272. o The media subtype ("speex") goes in SDP "a=rtpmap" as the encoding
  273. name. The required parameter "rate" also goes in "a=rtpmap" as
  274. the clock rate.
  275. o The parameters "ptime" and "maxptime" go in the SDP "a=ptime" and
  276. "a=maxptime" attributes, respectively.
  277. o Any remaining parameters go in the SDP "a=fmtp" attribute by
  278. copying them directly from the media type string as a semicolon
  279. separated list of parameter=value pairs.
  280. The tables below include the equivalence between modes and bitrates
  281. for narrowband, wideband and ultra-wideband. Also, the corresponding
  282. "Speex quality" setting (see SPEEX_SET_QUALITY in The Speex Codec
  283. Manual [speex_manual]) is included as an indication.
  284. Herlein, et al. Expires August 19, 2008 [Page 12]
  285. Internet-Draft Speex February 2008
  286. +------+---------------+-------------+
  287. | mode | Speex quality | bitrate |
  288. +------+---------------+-------------+
  289. | 1 | 0 | 2.15 kbit/s |
  290. | | | |
  291. | 2 | 2 | 5.95 kbit/s |
  292. | | | |
  293. | 3 | 3 or 4 | 8.00 kbit/s |
  294. | | | |
  295. | 4 | 5 or 6 | 11.0 kbit/s |
  296. | | | |
  297. | 5 | 7 or 8 | 15.0 kbit/s |
  298. | | | |
  299. | 6 | 9 | 18.2 kbit/s |
  300. | | | |
  301. | 7 | 10 | 24.6 kbit/s |
  302. | | | |
  303. | 8 | 1 | 3.95 kbit/s |
  304. +------+---------------+-------------+
  305. Mode vs Bitrate table for narrowband
  306. Table 1
  307. Herlein, et al. Expires August 19, 2008 [Page 13]
  308. Internet-Draft Speex February 2008
  309. +------+---------------+------------------+------------------------+
  310. | mode | Speex quality | wideband bitrate | ultra wideband bitrate |
  311. +------+---------------+------------------+------------------------+
  312. | 0 | 0 | 3.95 kbit/s | 5.75 kbit/s |
  313. | | | | |
  314. | 1 | 1 | 5.75 kbit/s | 7.55 kbit/s |
  315. | | | | |
  316. | 2 | 2 | 7.75 kbit/s | 9.55 kbit/s |
  317. | | | | |
  318. | 3 | 3 | 9.80 kbit/s | 11.6 kbit/s |
  319. | | | | |
  320. | 4 | 4 | 12.8 kbit/s | 14.6 kbit/s |
  321. | | | | |
  322. | 5 | 5 | 16.8 kbit/s | 18.6 kbit/s |
  323. | | | | |
  324. | 6 | 6 | 20.6 kbit/s | 22.4 kbit/s |
  325. | | | | |
  326. | 7 | 7 | 23.8 kbit/s | 25.6 kbit/s |
  327. | | | | |
  328. | 8 | 8 | 27.8 kbit/s | 29.6 kbit/s |
  329. | | | | |
  330. | 9 | 9 | 34.2 kbit/s | 36.0 kbit/s |
  331. | | | | |
  332. | 10 | 10 | 42.2 kbit/s | 44.0 kbit/s |
  333. +------+---------------+------------------+------------------------+
  334. Mode vs Bitrate table for wideband and ultra-wideband
  335. Table 2
  336. The Speex parameters indicate the decoding capabilities of the agent,
  337. and what the agent prefers to receive.
  338. The Speex parameters in an SDP Offer/Answer exchange are completely
  339. orthogonal, and there is no relationship between the SDP Offer and
  340. the Answer.
  341. Several Speex specific parameters can be given in a single a=fmtp
  342. line provided that they are separated by a semi-colon:
  343. a=fmtp:97 mode=1;mode=any;vbr=on
  344. Some example SDP session descriptions utilizing Speex encodings
  345. follow.
  346. Herlein, et al. Expires August 19, 2008 [Page 14]
  347. Internet-Draft Speex February 2008
  348. 5.1. Example supporting all modes, prefer mode 4
  349. The offerer indicates that it wishes to receive a Speex stream at
  350. 8000Hz, and wishes to receive Speex 'mode 4'. It is important to
  351. understand that any other mode might still be sent by remote party:
  352. the device might have bandwidth limitation or might only be able to
  353. send 'mode=3'. Thus, application that support all decoding modes
  354. SHOULD include 'mode=any' as shown in the example below:
  355. m=audio 8088 RTP/AVP 97
  356. a=rtpmap:97 speex/8000
  357. a=fmtp:97 mode=4;mode=any
  358. 5.2. Example supporting only mode 3 and 5
  359. The offerer indicates the mode he wishes to receive (Speex 'mode 3').
  360. This offer indicates mode 3 and mode 5 are supported and that no
  361. other modes are supported. The remote party MUST NOT configure its
  362. encoder using another Speex mode.
  363. m=audio 8088 RTP/AVP 97
  364. a=rtmap:97 speex/8000
  365. a=fmtp:97 mode=3;mode=5
  366. 5.3. Example with Variable Bit Rate and Comfort Noise
  367. The offerer indicates that it wishes to receive variable bit rate
  368. frames with comfort noise:
  369. m=audio 8088 RTP/AVP 97
  370. a=rtmap:97 speex/8000
  371. a=fmtp:97 vbr=on;cng=on
  372. 5.4. Example with Voice Activity Detection
  373. The offerer indicates that it wishes to use silence suppression. In
  374. this case vbr=vad parameter will be used:
  375. m=audio 8088 RTP/AVP 97
  376. a=rtmap:97 speex/8000
  377. a=fmtp:97 vbr=vad
  378. 5.5. Example with Multiple sampling rates
  379. The offerer indicates that it wishes to receive Speex audio at 16000
  380. Hz with mode 10 (42.2 kbit/s), alternatively Speex audio at 8000 Hz
  381. with mode 7 (24.6 kbit/s). The offerer supports decoding all modes.
  382. Herlein, et al. Expires August 19, 2008 [Page 15]
  383. Internet-Draft Speex February 2008
  384. m=audio 8088 RTP/AVP 97 98
  385. a=rtmap:97 speex/16000
  386. a=fmtp:97 mode=10;mode=any
  387. a=rtmap:98 speex/8000
  388. a=fmtp:98 mode=7;mode=any
  389. 5.6. Example with ptime and Multiple Speex frames
  390. The "ptime" attribute is used to denote the packetization interval
  391. (ie, how many milliseconds of audio is encoded in a single RTP
  392. packet). Since Speex uses 20 msec frames, ptime values of multiples
  393. of 20 denote multiple Speex frames per packet. Values of ptime which
  394. are not multiples of 20 MUST be rounded up to the first multiple of
  395. 20 above the ptime value.
  396. In the example below the ptime value is set to 40, indicating that
  397. there are 2 frames in each packet.
  398. m=audio 8088 RTP/AVP 97
  399. a=rtpmap:97 speex/8000
  400. a=ptime:40
  401. Note that the ptime parameter applies to all payloads listed in the
  402. media line and is not used as part of an a=fmtp directive.
  403. Care must be taken when setting the value of ptime so that the RTP
  404. packet size does not exceed the path MTU.
  405. 5.7. Example with Complete Offer/Answer exchange
  406. The offerer indicates that it wishes to receive Speex audio at 16000
  407. Hz, alternatively Speex audio at 8000 Hz. The offerer does support
  408. ALL modes because no mode is specified.
  409. m=audio 8088 RTP/AVP 97 98
  410. a=rtmap:97 speex/16000
  411. a=rtmap:98 speex/8000
  412. The answerer indicates that it wishes to receive Speex audio at 8000
  413. Hz, which is the only sampling rate it supports. The answerer does
  414. support ALL modes because no mode is specified.
  415. m=audio 8088 RTP/AVP 99
  416. a=rtmap:99 speex/8000
  417. Herlein, et al. Expires August 19, 2008 [Page 16]
  418. Internet-Draft Speex February 2008
  419. 6. Implementation Guidelines
  420. Implementations that supports Speex are responsible for correctly
  421. decoding incoming Speex frames.
  422. Each Speex frame does contains all needed informations to decode
  423. itself. In particular, the 'mode' and 'ptime' values proposed in the
  424. SDP contents MUST NOT be used for decoding: those values are not
  425. needed to properly decode a RTP Speex stream.
  426. Herlein, et al. Expires August 19, 2008 [Page 17]
  427. Internet-Draft Speex February 2008
  428. 7. Security Considerations
  429. RTP packets using the payload format defined in this specification
  430. are subject to the security considerations discussed in the RTP
  431. specification [RFC3550], and any appropriate RTP profile. This
  432. implies that confidentiality of the media streams is achieved by
  433. encryption. Because the data compression used with this payload
  434. format is applied end-to-end, encryption may be performed after
  435. compression so there is no conflict between the two operations.
  436. A potential denial-of-service threat exists for data encodings using
  437. compression techniques that have non-uniform receiver-end
  438. computational load. The attacker can inject pathological datagrams
  439. into the stream which are complex to decode and cause the receiver to
  440. be overloaded. However, this encoding does not exhibit any
  441. significant non-uniformity.
  442. As with any IP-based protocol, in some circumstances a receiver may
  443. be overloaded simply by the receipt of too many packets, either
  444. desired or undesired. Network-layer authentication may be used to
  445. discard packets from undesired sources, but the processing cost of
  446. the authentication itself may be too high.
  447. Herlein, et al. Expires August 19, 2008 [Page 18]
  448. Internet-Draft Speex February 2008
  449. 8. Acknowledgements
  450. The authors would like to thank Equivalence Pty Ltd of Australia for
  451. their assistance in attempting to standardize the use of Speex in
  452. H.323 applications, and for implementing Speex in their open source
  453. OpenH323 stack. The authors would also like to thank Brian C. Wiles
  454. <brian@streamcomm.com> of StreamComm for his assistance in developing
  455. the proposed standard for Speex use in H.323 applications.
  456. The authors would also like to thank the following members of the
  457. Speex and AVT communities for their input: Ross Finlayson, Federico
  458. Montesino Pouzols, Henning Schulzrinne, Magnus Westerlund, Colin
  459. Perkins, Ivo Emanuel Goncalves.
  460. Thanks to former authors of this document; Simon Morlat, Roger
  461. Hardiman, Phil Kerr.
  462. Herlein, et al. Expires August 19, 2008 [Page 19]
  463. Internet-Draft Speex February 2008
  464. 9. Copying conditions
  465. The authors agree to grant third parties the irrevocable right to
  466. copy, use and distribute the work, with or without modification, in
  467. any medium, without royalty, provided that, unless separate
  468. permission is granted, redistributed modified works do not contain
  469. misleading author, version, name of work, or endorsement information.
  470. Herlein, et al. Expires August 19, 2008 [Page 20]
  471. Internet-Draft Speex February 2008
  472. 10. References
  473. 10.1. Normative References
  474. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  475. Requirement Levels", BCP 14, RFC 2119, March 1997.
  476. [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V.
  477. Jacobson, "RTP: A Transport Protocol for Real-Time
  478. Applications", STD 64, RFC 3550, July 2003.
  479. [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
  480. Description Protocol", RFC 4566, July 2006.
  481. 10.2. Informative References
  482. [CELP] "CELP, U.S. Federal Standard 1016.", National Technical
  483. Information Service (NTIS) website http://www.ntis.gov/.
  484. [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and
  485. Registration Procedures", BCP 13, RFC 4288, December 2005.
  486. [speex_manual]
  487. Valin, J., "The Speex Codec Manual", Speex
  488. website http://www.speex.org/docs/.
  489. Herlein, et al. Expires August 19, 2008 [Page 21]
  490. Internet-Draft Speex February 2008
  491. Authors' Addresses
  492. Greg Herlein
  493. 2034 Filbert Street
  494. San Francisco, California 94123
  495. United States
  496. Email: gherlein@herlein.com
  497. Jean-Marc Valin
  498. CSIRO
  499. PO Box 76
  500. Epping, NSW 1710
  501. Australia
  502. Email: jean-marc.valin@usherbrooke.ca
  503. Alfred E. Heggestad
  504. Creytiv.com
  505. Biskop J. Nilssonsgt. 20a
  506. Oslo 0659
  507. Norway
  508. Email: aeh@db.org
  509. Aymeric Moizard
  510. Antisip
  511. 4 Quai Perrache
  512. Lyon 69002
  513. France
  514. Email: jack@atosc.org
  515. Herlein, et al. Expires August 19, 2008 [Page 22]
  516. Internet-Draft Speex February 2008
  517. Full Copyright Statement
  518. Copyright (C) The IETF Trust (2008).
  519. This document is subject to the rights, licenses and restrictions
  520. contained in BCP 78, and except as set forth therein, the authors
  521. retain all their rights.
  522. This document and the information contained herein are provided on an
  523. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  524. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
  525. THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
  526. OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
  527. THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  528. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  529. Intellectual Property
  530. The IETF takes no position regarding the validity or scope of any
  531. Intellectual Property Rights or other rights that might be claimed to
  532. pertain to the implementation or use of the technology described in
  533. this document or the extent to which any license under such rights
  534. might or might not be available; nor does it represent that it has
  535. made any independent effort to identify any such rights. Information
  536. on the procedures with respect to rights in RFC documents can be
  537. found in BCP 78 and BCP 79.
  538. Copies of IPR disclosures made to the IETF Secretariat and any
  539. assurances of licenses to be made available, or the result of an
  540. attempt made to obtain a general license or permission for the use of
  541. such proprietary rights by implementers or users of this
  542. specification can be obtained from the IETF on-line IPR repository at
  543. http://www.ietf.org/ipr.
  544. The IETF invites any interested party to bring to its attention any
  545. copyrights, patents or patent applications, or other proprietary
  546. rights that may cover technology that may be required to implement
  547. this standard. Please address the information to the IETF at
  548. ietf-ipr@ietf.org.
  549. Acknowledgment
  550. Funding for the RFC Editor function is provided by the IETF
  551. Administrative Support Activity (IASA).
  552. Herlein, et al. Expires August 19, 2008 [Page 23]