draft-herlein-speex-rtp-profile-03.txt 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
  1. AVT Working Group G. Herlein
  2. Internet-Draft S. Morlat
  3. Expires: July 2, 2005 J. Jean-Marc
  4. R. Hardiman
  5. P. Kerr
  6. January 01, 2005
  7. draft-herlein-speex-rtp-profile-03
  8. RTP Payload Format for the Speex Codec
  9. Status of this Memo
  10. This document is an Internet-Draft and is subject to all provisions
  11. of section 3 of RFC 3667. By submitting this Internet-Draft, each
  12. author represents that any applicable patent or other IPR claims of
  13. which he or she is aware have been or will be disclosed, and any of
  14. which he or she become aware will be disclosed, in accordance with
  15. RFC 3668.
  16. Internet-Drafts are working documents of the Internet Engineering
  17. Task Force (IETF), its areas, and its working groups. Note that
  18. other groups may also distribute working documents as
  19. Internet-Drafts.
  20. Internet-Drafts are draft documents valid for a maximum of six months
  21. and may be updated, replaced, or obsoleted by other documents at any
  22. time. It is inappropriate to use Internet-Drafts as reference
  23. material or to cite them other than as "work in progress."
  24. The list of current Internet-Drafts can be accessed at
  25. http://www.ietf.org/ietf/1id-abstracts.txt.
  26. The list of Internet-Draft Shadow Directories can be accessed at
  27. http://www.ietf.org/shadow.html.
  28. This Internet-Draft will expire on July 2, 2005.
  29. Copyright Notice
  30. Copyright (C) The Internet Society (2005).
  31. Abstract
  32. Speex is an open-source voice codec suitable for use in Voice over IP
  33. (VoIP) type applications. This document describes the payload format
  34. for Speex generated bit streams within an RTP packet. Also included
  35. here are the necessary details for the use of Speex with the Session
  36. Description Protocol (SDP) and a preliminary method of using Speex
  37. Herlein, et al. Expires July 2, 2005 [Page 1]
  38. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  39. within H.323 applications.
  40. Table of Contents
  41. 1. Conventions used in this document . . . . . . . . . . . . . 3
  42. 2. Overview of the Speex Codec . . . . . . . . . . . . . . . . 4
  43. 3. RTP payload format for Speex . . . . . . . . . . . . . . . . 5
  44. 4. RTP Header . . . . . . . . . . . . . . . . . . . . . . . . . 6
  45. 5. Speex payload . . . . . . . . . . . . . . . . . . . . . . . 8
  46. 6. Example Speex packet . . . . . . . . . . . . . . . . . . . . 9
  47. 7. Multiple Speex frames in a RTP packet . . . . . . . . . . . 10
  48. 8. MIME registration of Speex . . . . . . . . . . . . . . . . . 11
  49. 9. SDP usage of Speex . . . . . . . . . . . . . . . . . . . . . 12
  50. 10. ITU H.323/H.245 Use of Speex . . . . . . . . . . . . . . . . 15
  51. 11. NonStandardMessage format . . . . . . . . . . . . . . . . . 16
  52. 12. RTP Payload Types . . . . . . . . . . . . . . . . . . . . . 17
  53. 13. Security Considerations . . . . . . . . . . . . . . . . . . 18
  54. 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 19
  55. 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 20
  56. 15.1 Normative References . . . . . . . . . . . . . . . . . . . 20
  57. 15.2 Informative References . . . . . . . . . . . . . . . . . . 20
  58. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 20
  59. Intellectual Property and Copyright Statements . . . . . . . 22
  60. Herlein, et al. Expires July 2, 2005 [Page 2]
  61. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  62. 1. Conventions used in this document
  63. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  64. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  65. document are to be interpreted as described in RFC 2119 [1].
  66. Herlein, et al. Expires July 2, 2005 [Page 3]
  67. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  68. 2. Overview of the Speex Codec
  69. Speex is based on the CELP [10] encoding technique with support for
  70. either narrowband (nominal 8kHz), wideband (nominal 16kHz) or
  71. ultra-wideband (nominal 32kHz), and (non-optimal) rates up to 48 kHz
  72. sampling also available. The main characteristics can be summarized
  73. as follows:
  74. o Free software/open-source
  75. o Integration of wideband and narrowband in the same bit-stream
  76. o Wide range of bit-rates available
  77. o Dynamic bit-rate switching and variable bit-rate (VBR)
  78. o Voice Activity Detection (VAD, integrated with VBR)
  79. o Variable complexity
  80. Herlein, et al. Expires July 2, 2005 [Page 4]
  81. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  82. 3. RTP payload format for Speex
  83. For RTP based transportation of Speex encoded audio the standard RTP
  84. header [2] is followed by one or more payload data blocks. An
  85. optional padding terminator may also be used.
  86. 0 1 2 3
  87. 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
  88. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  89. | RTP Header |
  90. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  91. | one or more frames of Speex .... |
  92. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  93. | one or more frames of Speex .... | padding |
  94. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  95. Herlein, et al. Expires July 2, 2005 [Page 5]
  96. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  97. 4. RTP Header
  98. 0 1 2 3
  99. 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
  100. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  101. |V=2|P|X| CC |M| PT | sequence number |
  102. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  103. | timestamp |
  104. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  105. | synchronization source (SSRC) identifier |
  106. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  107. | contributing source (CSRC) identifiers |
  108. | ... |
  109. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  110. The RTP header begins with an octet of fields (V, P, X, and CC) to
  111. support specialized RTP uses (see [2] and [7] for details). For
  112. Speex the following values are used.
  113. Version (V): 2 bits
  114. This field identifies the version of RTP. The version used by this
  115. specification is two [2].
  116. Padding (P): 1 bit
  117. If the padding bit is set, the packet contains one or more additional
  118. padding octets at the end which are not part of the payload. P is
  119. set if the total packet size is less than the MTU.
  120. Extension (X): 1 bit
  121. If the extension, X, bit is set, the fixed header MUST be followed by
  122. exactly one header extension, with a format defined in Section 5.3.1.
  123. of [2].
  124. CSRC count (CC): 4 bits
  125. The CSRC count contains the number of CSRC identifiers.
  126. Marker (M): 1 bit
  127. The M bit indicates if the packet contains comfort noise. This field
  128. is used in conjunction with the cng SDP attribute and is detailed
  129. further in section 5 below. In normal usage this bit is set if the
  130. packet contains comfort noise.
  131. Payload Type (PT): 7 bits
  132. Herlein, et al. Expires July 2, 2005 [Page 6]
  133. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  134. An RTP profile for a class of applications is expected to assign a
  135. payload type for this format, or a dynamically allocated payload type
  136. SHOULD be chosen which designates the payload as Speex.
  137. Sequence number: 16 bits
  138. The sequence number increments by one for each RTP data packet sent,
  139. and may be used by the receiver to detect packet loss and to restore
  140. packet sequence. This field is detailed further in [2].
  141. Timestamp: 32 bits
  142. A timestamp representing the sampling time of the first sample of the
  143. first Speex packet in the RTP packet. The clock frequency MUST be
  144. set to the sample rate of the encoded audio data. Speex uses 20 msec
  145. frames and a variable sampling rate clock. The RTP timestamp MUST be
  146. in units of 1/X of a second where X is the sample rate used. Speex
  147. uses a nominal 8kHz sampling rate for narrowband use, a nominal 16kHz
  148. sampling rate for wideband use, and a nominal 32kHz sampling rate for
  149. ultra-wideband use.
  150. SSRC/CSRC identifiers:
  151. These two fields, 32 bits each with one SSRC field and a maximum of
  152. 16 CSRC fields, are as defined in [2].
  153. Herlein, et al. Expires July 2, 2005 [Page 7]
  154. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  155. 5. Speex payload
  156. For the purposes of packetizing the bit stream in RTP, it is only
  157. necessary to consider the sequence of bits as output by the Speex
  158. encoder [9], and present the same sequence to the decoder. The
  159. payload format described here maintains this sequence.
  160. A typical Speex frame, encoded at the maximum bitrate, is approx.
  161. 110 octets and the total number of Speex frames SHOULD be kept less
  162. than the path MTU to prevent fragmentation. Speex frames MUST NOT be
  163. fragmented across multiple RTP packets,
  164. An RTP packet MAY contain Speex frames of the same bit rate or of
  165. varying bit rates, since the bit-rate for a frame is conveyed in band
  166. with the signal.
  167. The encoding and decoding algorithm can change the bit rate at any 20
  168. msec frame boundary, with the bit rate change notification provided
  169. in-band with the bit stream. Each frame contains both "mode"
  170. (narrowband, wideband or ultra-wideband) and "sub-mode" (bit-rate)
  171. information in the bit stream. No out-of-band notification is
  172. required for the decoder to process changes in the bit rate sent by
  173. the encoder.
  174. It is RECOMMENDED that values of 8000, 16000 and 32000 be used for
  175. normal internet telephony applications, though the sample rate is
  176. supported at rates as low as 6000 Hz and as high as 48 kHz.
  177. The RTP payload MUST be padded to provide an integer number of octets
  178. as the payload length. These padding bits are LSB aligned in network
  179. octet order and consist of a 0 followed by all ones (until the end of
  180. the octet). This padding is only required for the last frame in the
  181. packet, and only to ensure the packet contents ends on an octet
  182. boundary.
  183. Herlein, et al. Expires July 2, 2005 [Page 8]
  184. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  185. 6. Example Speex packet
  186. In the example below we have a single Speex frame with 5 bits of
  187. padding to ensure the packet size falls on an octet boundary.
  188. 0 1 2 3
  189. 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
  190. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  191. |V=2|P|X| CC |M| PT | sequence number |
  192. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  193. | timestamp |
  194. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  195. | synchronization source (SSRC) identifier |
  196. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  197. 0 1 2 3
  198. 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
  199. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  200. | contributing source (CSRC) identifiers |
  201. | ... |
  202. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  203. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  204. | ..speex data.. |
  205. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  206. | ..speex data.. |0 1 1 1 1|
  207. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  208. Herlein, et al. Expires July 2, 2005 [Page 9]
  209. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  210. 7. Multiple Speex frames in a RTP packet
  211. Below is an example of two Speex frames contained within one RTP
  212. packet. The Speex frame length in this example fall on an octet
  213. boundary so there is no padding.
  214. Speex codecs [9] are able to detect the the bitrate from the payload
  215. and are responsible for detecting the 20 msec boundaries between each
  216. frame.
  217. 0 1 2 3
  218. 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
  219. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  220. |V=2|P|X| CC |M| PT | sequence number |
  221. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  222. | timestamp |
  223. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  224. | synchronization source (SSRC) identifier |
  225. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  226. | contributing source (CSRC) identifiers |
  227. | ... |
  228. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  229. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  230. | ..speex data.. |
  231. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  232. | ..speex data.. | ..speex data.. |
  233. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  234. | ..speex data.. |
  235. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  236. Herlein, et al. Expires July 2, 2005 [Page 10]
  237. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  238. 8. MIME registration of Speex
  239. Full definition of the MIME [3] type for Speex will be part of the
  240. Ogg Vorbis MIME type definition application [8].
  241. MIME media type name: audio
  242. MIME subtype: speex
  243. Optional parameters:
  244. Required parameters: to be included in the Ogg MIME specification.
  245. Encoding considerations:
  246. Security Considerations:
  247. See Section 6 of RFC 3047.
  248. Interoperability considerations: none
  249. Published specification:
  250. Applications which use this media type:
  251. Additional information: none
  252. Person & email address to contact for further information:
  253. Greg Herlein <gherlein@herlein.com>
  254. Jean-Marc Valin <jean-marc.valin@hermes.usherb.ca>
  255. Intended usage: COMMON
  256. Author/Change controller:
  257. Author: Greg Herlein <gherlein@herlein.com>
  258. Change controller: Greg Herlein <gherlein@herlein.com>
  259. Change controller: IETF AVT Working Group
  260. This transport type signifies that the content is to be interpreted
  261. according to this document if the contents are transmitted over RTP.
  262. Should this transport type appear over a lossless streaming protocol
  263. such as TCP, the content encapsulation should be interpreted as an
  264. Ogg Stream in accordance with [8], with the exception that the
  265. content of the Ogg Stream may be assumed to be Speex audio and Speex
  266. audio only.
  267. Herlein, et al. Expires July 2, 2005 [Page 11]
  268. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  269. 9. SDP usage of Speex
  270. When conveying information by SDP [4], the encoding name MUST be set
  271. to "speex". An example of the media representation in SDP for
  272. offering a single channel of Speex at 8000 samples per second might
  273. be:
  274. m=audio 8088 RTP/AVP 97
  275. a=rtpmap:97 speex/8000
  276. Note that the RTP payload type code of 97 is defined in this media
  277. definition to be 'mapped' to the speex codec at an 8kHz sampling
  278. frequency using the 'a=rtpmap' line. Any number from 96 to 127 could
  279. have been chosen (the allowed range for dynamic types).
  280. The value of the sampling frequency is typically 8000 for narrow band
  281. operation, 16000 for wide band operation, and 32000 for ultra-wide
  282. band operation.
  283. If for some reason the offerer has bandwidth limitations, the client
  284. may use the "b=" header, as explained in SDP [4]. The following
  285. example illustrates the case where the offerer cannot receive more
  286. than 10 kbit/s.
  287. m=audio 8088 RTP/AVP 97
  288. b=AS:10
  289. a=rtmap:97 speex/8000
  290. In this case, if the remote part agrees, it should configure its
  291. Speex encoder so that it does not use modes that produce more than 10
  292. kbit/s. Note that the "b=" constraint also applies on all payload
  293. types that may be proposed in the media line ("m=").
  294. An other way to make recommendations to the remote Speex encoder is
  295. to use its specific parameters via the a=fmtp: directive. The
  296. following parameters are defined for use in this way:
  297. ptime: duration of each packet in milliseconds.
  298. sr: actual sample rate in Hz.
  299. ebw: encoding bandwidth - either 'narrow' or 'wide' or 'ultra'
  300. (corresponds to nominal 8000, 16000, and 32000 Hz sampling rates).
  301. vbr: variable bit rate - either 'on' 'off' or 'vad' (defaults
  302. to off). If on, variable bit rate is enabled. If off, disabled.
  303. If set to 'vad' then constant bit rate is used but silence will be
  304. encoded with special short frames to indicate a lack of voice for
  305. Herlein, et al. Expires July 2, 2005 [Page 12]
  306. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  307. that period.
  308. cng: comfort noise generation - either 'on' or 'off'. If off
  309. then silence frames will be silent; if 'on' then those frames will
  310. be filled with comfort noise.
  311. mode: Speex encoding mode. Can be {1,2,3,4,5,6,any} defaults to
  312. 3 in narrowband, 6 in wide and ultra-wide.
  313. penh: use of perceptual enhancement. 1 indicates to the decoder
  314. that perceptual enhancement is recommended, 0 indicates that it is
  315. not. Defaults to on (1).
  316. Examples:
  317. m=audio 8008 RTP/AVP 97
  318. a=rtpmap:97 speex/8000
  319. a=fmtp:97 mode=4
  320. This examples illustrate an offerer that wishes to receive a Speex
  321. stream at 8000Hz, but only using speex mode 3.
  322. The offerer may suggest to the remote decoder to activate its
  323. perceptual enhancement filter like this:
  324. m=audio 8088 RTP/AVP 97
  325. a=rtmap:97 speex/8000
  326. a=fmtp:97 penh=1
  327. Several Speex specific parameters can be given in a single a=fmtp
  328. line provided that they are separated by a semi-colon:
  329. a=fmtp:97 mode=any;penh=1
  330. The offerer may indicate that it wishes to send variable bit rate
  331. frames with comfort noise:
  332. m=audio 8088 RTP/AVP 97
  333. a=rtmap:97 speex/8000
  334. a=fmtp:97 vbr=on;cng=on
  335. The "ptime" attribute is used to denote the packetization interval
  336. (ie, how many milliseconds of audio is encoded in a single RTP
  337. packet). Since Speex uses 20 msec frames, ptime values of multiples
  338. of 20 denote multiple Speex frames per packet. Values of ptime which
  339. are not multiples of 20 MUST be ignored and clients MUST use the
  340. default value of 20 instead.
  341. Herlein, et al. Expires July 2, 2005 [Page 13]
  342. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  343. In the example below the ptime value is set to 40, indicating that
  344. there are 2 frames in each packet.
  345. m=audio 8008 RTP/AVP 97
  346. a=rtpmap:97 speex/8000
  347. a=ptime:40
  348. Note that the ptime parameter applies to all payloads listed in the
  349. media line and is not used as part of an a=fmtp directive.
  350. Values of ptime not multiple of 20 msec are meaningless, so the
  351. receiver of such ptime values MUST ignore them. If during the life
  352. of an RTP session the ptime value changes, when there are multiple
  353. Speex frames for example, the SDP value must also reflect the new
  354. value.
  355. Care must be taken when setting the value of ptime so that the RTP
  356. packet size does not exceed the path MTU.
  357. Herlein, et al. Expires July 2, 2005 [Page 14]
  358. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  359. 10. ITU H.323/H.245 Use of Speex
  360. Application is underway to make Speex a standard ITU codec. However,
  361. until that is finalized, Speex MAY be used in H.323 [5] by using a
  362. non-standard codec block definition in the H.245 [6] codec capability
  363. negotiations.
  364. Herlein, et al. Expires July 2, 2005 [Page 15]
  365. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  366. 11. NonStandardMessage format
  367. For Speex use in H.245 [6] based systems, the fields in the
  368. NonStandardMessage should be:
  369. t35CountryCode = Hex: B5
  370. t35Extension = Hex: 00
  371. manufacturerCode = Hex: 0026
  372. [Length of the Binary Sequence (8 bit number)]
  373. [Binary Sequence consisting of an ASCII string, no NULL
  374. terminator]
  375. The binary sequence is an ascii string merely for ease of use. The
  376. string is not null terminated. The format of this string is
  377. speex [optional variables]
  378. The optional variables are identical to those used for the SDP a=fmtp
  379. strings discussed in section 5 above. The string is built to be all
  380. on one line, each key-value pair separated by a semi-colon. The
  381. optional variables MAY be omitted, which causes the default values to
  382. be assumed. They are:
  383. ebw=narrow;mode=3;vbr=off;cng=off;ptime=20;sr=8000;penh=no;
  384. The fifth octet of the block is the length of the binary sequence.
  385. NOTE: this method can result in the advertising of a large number of
  386. Speex 'codecs' based on the number of variables possible. For most
  387. VoIP applications, use of the default binary sequence of 'speex' is
  388. RECOMMENDED to be used in addition to all other options. This
  389. maximizes the chances that two H.323 based applications that support
  390. Speex can find a mutual codec.
  391. Herlein, et al. Expires July 2, 2005 [Page 16]
  392. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  393. 12. RTP Payload Types
  394. Dynamic payload type codes MUST be negotiated 'out-of-band' for the
  395. assignment of a dynamic payload type from the range of 96-127. H.323
  396. applications MUST use the H.245 H2250LogicalChannelParameters
  397. encoding to accomplish this.
  398. Herlein, et al. Expires July 2, 2005 [Page 17]
  399. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  400. 13. Security Considerations
  401. RTP packets using the payload format defined in this specification
  402. are subject to the security considerations discussed in the RTP
  403. specification [2], and any appropriate RTP profile. This implies
  404. that confidentiality of the media streams is achieved by encryption.
  405. Because the data compression used with this payload format is applied
  406. end-to-end, encryption may be performed after compression so there is
  407. no conflict between the two operations.
  408. A potential denial-of-service threat exists for data encodings using
  409. compression techniques that have non-uniform receiver-end
  410. computational load. The attacker can inject pathological datagrams
  411. into the stream which are complex to decode and cause the receiver to
  412. be overloaded. However, this encoding does not exhibit any
  413. significant non-uniformity.
  414. As with any IP-based protocol, in some circumstances a receiver may
  415. be overloaded simply by the receipt of too many packets, either
  416. desired or undesired. Network-layer authentication may be used to
  417. discard packets from undesired sources, but the processing cost of
  418. the authentication itself may be too high.
  419. Herlein, et al. Expires July 2, 2005 [Page 18]
  420. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  421. 14. Acknowledgments
  422. The authors would like to thank Equivalence Pty Ltd of Australia for
  423. their assistance in attempting to standardize the use of Speex in
  424. H.323 applications, and for implementing Speex in their open source
  425. OpenH323 stack. The authors would also like to thank Brian C. Wiles
  426. <brian@streamcomm.com> of StreamComm for his assistance in developing
  427. the proposed standard for Speex use in H.323 applications.
  428. The authors would also like to thank the following members of the
  429. Speex and AVT communities for their input: Ross Finlayson, Federico
  430. Montesino Pouzols, Henning Schulzrinne, Magnus Westerlund.
  431. Herlein, et al. Expires July 2, 2005 [Page 19]
  432. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  433. 15. References
  434. 15.1 Normative References
  435. [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
  436. Levels", RFC 2119.
  437. [2] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson,
  438. "RTP: A Transport Protocol for real-time applications", RFC
  439. 3550.
  440. [3] "Multipurpose Internet Mail Extensions (MIME) Part One: Format
  441. of Internet Message Bodies", RFC 2045.
  442. [4] Jacobson, V. and M. Handley, "SDP: Session Description
  443. Protocol", RFC 2327.
  444. [5] "Packet-based Multimedia Communications Systems", ITU-T
  445. Recommendation H.323.
  446. [6] "Control of communications between Visual Telephone Systems and
  447. Terminal Equipment", ITU-T Recommendation H.245.
  448. [7] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and Video
  449. Conferences with Minimal Control.", RFC 3551.
  450. [8] Walleij, L., "The application/ogg Media Type", RFC 3534.
  451. 15.2 Informative References
  452. [9] "Speexenc/speexdec, reference command-line encoder/decoder",
  453. Speex website http://www.speex.org/.
  454. [10] "CELP, U.S. Federal Standard 1016.", National Technical
  455. Information Service (NTIS) website http://www.ntis.gov/.
  456. Authors' Addresses
  457. Greg Herlein
  458. 2034 Filbert Street
  459. San Francisco, California 94123
  460. United States
  461. EMail: gherlein@herlein.com
  462. Herlein, et al. Expires July 2, 2005 [Page 20]
  463. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  464. Simon Morlat
  465. 35, av de Vizille App 42
  466. Grenoble 38000
  467. France
  468. EMail: simon.morlat@linphone.org
  469. Jean-Marc Valin
  470. Department of Electrical and Computer Engineering
  471. University of Sherbrooke
  472. 2500 blvd Universite
  473. Sherbrooke, Quebec J1K 2R1
  474. Canada
  475. EMail: jean-marc.valin@hermes.usherb.ca
  476. Roger Hardiman
  477. 49 Nettleton Road
  478. Cheltenham, Gloucestershire GL51 6NR
  479. England
  480. EMail: roger@freebsd.org
  481. Phil Kerr
  482. England
  483. EMail: phil@plus24.com
  484. Herlein, et al. Expires July 2, 2005 [Page 21]
  485. Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005
  486. Intellectual Property Statement
  487. The IETF takes no position regarding the validity or scope of any
  488. Intellectual Property Rights or other rights that might be claimed to
  489. pertain to the implementation or use of the technology described in
  490. this document or the extent to which any license under such rights
  491. might or might not be available; nor does it represent that it has
  492. made any independent effort to identify any such rights. Information
  493. on the procedures with respect to rights in RFC documents can be
  494. found in BCP 78 and BCP 79.
  495. Copies of IPR disclosures made to the IETF Secretariat and any
  496. assurances of licenses to be made available, or the result of an
  497. attempt made to obtain a general license or permission for the use of
  498. such proprietary rights by implementers or users of this
  499. specification can be obtained from the IETF on-line IPR repository at
  500. http://www.ietf.org/ipr.
  501. The IETF invites any interested party to bring to its attention any
  502. copyrights, patents or patent applications, or other proprietary
  503. rights that may cover technology that may be required to implement
  504. this standard. Please address the information to the IETF at
  505. ietf-ipr@ietf.org.
  506. Disclaimer of Validity
  507. This document and the information contained herein are provided on an
  508. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  509. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
  510. ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
  511. INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
  512. INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  513. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  514. Copyright Statement
  515. Copyright (C) The Internet Society (2005). This document is subject
  516. to the rights, licenses and restrictions contained in BCP 78, and
  517. except as set forth therein, the authors retain all their rights.
  518. Acknowledgment
  519. Funding for the RFC Editor function is currently provided by the
  520. Internet Society.
  521. Herlein, et al. Expires July 2, 2005 [Page 22]