Benny Prijono | ef010c5 | 2007-03-30 10:49:46 +0000 | [diff] [blame^] | 1 | |
| 2 | |
| 3 | AVT Working Group G. Herlein |
| 4 | Internet-Draft S. Morlat |
| 5 | Expires: July 2, 2005 J. Jean-Marc |
| 6 | R. Hardiman |
| 7 | P. Kerr |
| 8 | January 01, 2005 |
| 9 | |
| 10 | |
| 11 | draft-herlein-speex-rtp-profile-03 |
| 12 | RTP Payload Format for the Speex Codec |
| 13 | |
| 14 | Status of this Memo |
| 15 | |
| 16 | This document is an Internet-Draft and is subject to all provisions |
| 17 | of section 3 of RFC 3667. By submitting this Internet-Draft, each |
| 18 | author represents that any applicable patent or other IPR claims of |
| 19 | which he or she is aware have been or will be disclosed, and any of |
| 20 | which he or she become aware will be disclosed, in accordance with |
| 21 | RFC 3668. |
| 22 | |
| 23 | Internet-Drafts are working documents of the Internet Engineering |
| 24 | Task Force (IETF), its areas, and its working groups. Note that |
| 25 | other groups may also distribute working documents as |
| 26 | Internet-Drafts. |
| 27 | |
| 28 | Internet-Drafts are draft documents valid for a maximum of six months |
| 29 | and may be updated, replaced, or obsoleted by other documents at any |
| 30 | time. It is inappropriate to use Internet-Drafts as reference |
| 31 | material or to cite them other than as "work in progress." |
| 32 | |
| 33 | The list of current Internet-Drafts can be accessed at |
| 34 | http://www.ietf.org/ietf/1id-abstracts.txt. |
| 35 | |
| 36 | The list of Internet-Draft Shadow Directories can be accessed at |
| 37 | http://www.ietf.org/shadow.html. |
| 38 | |
| 39 | This Internet-Draft will expire on July 2, 2005. |
| 40 | |
| 41 | Copyright Notice |
| 42 | |
| 43 | Copyright (C) The Internet Society (2005). |
| 44 | |
| 45 | Abstract |
| 46 | |
| 47 | Speex is an open-source voice codec suitable for use in Voice over IP |
| 48 | (VoIP) type applications. This document describes the payload format |
| 49 | for Speex generated bit streams within an RTP packet. Also included |
| 50 | here are the necessary details for the use of Speex with the Session |
| 51 | Description Protocol (SDP) and a preliminary method of using Speex |
| 52 | |
| 53 | |
| 54 | |
| 55 | Herlein, et al. Expires July 2, 2005 [Page 1] |
| 56 | |
| 57 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 58 | |
| 59 | |
| 60 | within H.323 applications. |
| 61 | |
| 62 | Table of Contents |
| 63 | |
| 64 | 1. Conventions used in this document . . . . . . . . . . . . . 3 |
| 65 | 2. Overview of the Speex Codec . . . . . . . . . . . . . . . . 4 |
| 66 | 3. RTP payload format for Speex . . . . . . . . . . . . . . . . 5 |
| 67 | 4. RTP Header . . . . . . . . . . . . . . . . . . . . . . . . . 6 |
| 68 | 5. Speex payload . . . . . . . . . . . . . . . . . . . . . . . 8 |
| 69 | 6. Example Speex packet . . . . . . . . . . . . . . . . . . . . 9 |
| 70 | 7. Multiple Speex frames in a RTP packet . . . . . . . . . . . 10 |
| 71 | 8. MIME registration of Speex . . . . . . . . . . . . . . . . . 11 |
| 72 | 9. SDP usage of Speex . . . . . . . . . . . . . . . . . . . . . 12 |
| 73 | 10. ITU H.323/H.245 Use of Speex . . . . . . . . . . . . . . . . 15 |
| 74 | 11. NonStandardMessage format . . . . . . . . . . . . . . . . . 16 |
| 75 | 12. RTP Payload Types . . . . . . . . . . . . . . . . . . . . . 17 |
| 76 | 13. Security Considerations . . . . . . . . . . . . . . . . . . 18 |
| 77 | 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 19 |
| 78 | 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 |
| 79 | 15.1 Normative References . . . . . . . . . . . . . . . . . . . 20 |
| 80 | 15.2 Informative References . . . . . . . . . . . . . . . . . . 20 |
| 81 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 20 |
| 82 | Intellectual Property and Copyright Statements . . . . . . . 22 |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | Herlein, et al. Expires July 2, 2005 [Page 2] |
| 112 | |
| 113 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 114 | |
| 115 | |
| 116 | 1. Conventions used in this document |
| 117 | |
| 118 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
| 119 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
| 120 | document are to be interpreted as described in RFC 2119 [1]. |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | Herlein, et al. Expires July 2, 2005 [Page 3] |
| 168 | |
| 169 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 170 | |
| 171 | |
| 172 | 2. Overview of the Speex Codec |
| 173 | |
| 174 | Speex is based on the CELP [10] encoding technique with support for |
| 175 | either narrowband (nominal 8kHz), wideband (nominal 16kHz) or |
| 176 | ultra-wideband (nominal 32kHz), and (non-optimal) rates up to 48 kHz |
| 177 | sampling also available. The main characteristics can be summarized |
| 178 | as follows: |
| 179 | |
| 180 | o Free software/open-source |
| 181 | o Integration of wideband and narrowband in the same bit-stream |
| 182 | o Wide range of bit-rates available |
| 183 | o Dynamic bit-rate switching and variable bit-rate (VBR) |
| 184 | o Voice Activity Detection (VAD, integrated with VBR) |
| 185 | o Variable complexity |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | Herlein, et al. Expires July 2, 2005 [Page 4] |
| 224 | |
| 225 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 226 | |
| 227 | |
| 228 | 3. RTP payload format for Speex |
| 229 | |
| 230 | For RTP based transportation of Speex encoded audio the standard RTP |
| 231 | header [2] is followed by one or more payload data blocks. An |
| 232 | optional padding terminator may also be used. |
| 233 | |
| 234 | 0 1 2 3 |
| 235 | 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 |
| 236 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 237 | | RTP Header | |
| 238 | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
| 239 | | one or more frames of Speex .... | |
| 240 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 241 | | one or more frames of Speex .... | padding | |
| 242 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | Herlein, et al. Expires July 2, 2005 [Page 5] |
| 280 | |
| 281 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 282 | |
| 283 | |
| 284 | 4. RTP Header |
| 285 | |
| 286 | 0 1 2 3 |
| 287 | 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 |
| 288 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 289 | |V=2|P|X| CC |M| PT | sequence number | |
| 290 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 291 | | timestamp | |
| 292 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 293 | | synchronization source (SSRC) identifier | |
| 294 | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
| 295 | | contributing source (CSRC) identifiers | |
| 296 | | ... | |
| 297 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 298 | |
| 299 | The RTP header begins with an octet of fields (V, P, X, and CC) to |
| 300 | support specialized RTP uses (see [2] and [7] for details). For |
| 301 | Speex the following values are used. |
| 302 | |
| 303 | Version (V): 2 bits |
| 304 | |
| 305 | This field identifies the version of RTP. The version used by this |
| 306 | specification is two [2]. |
| 307 | |
| 308 | Padding (P): 1 bit |
| 309 | |
| 310 | If the padding bit is set, the packet contains one or more additional |
| 311 | padding octets at the end which are not part of the payload. P is |
| 312 | set if the total packet size is less than the MTU. |
| 313 | |
| 314 | Extension (X): 1 bit |
| 315 | |
| 316 | If the extension, X, bit is set, the fixed header MUST be followed by |
| 317 | exactly one header extension, with a format defined in Section 5.3.1. |
| 318 | of [2]. |
| 319 | |
| 320 | CSRC count (CC): 4 bits |
| 321 | |
| 322 | The CSRC count contains the number of CSRC identifiers. |
| 323 | |
| 324 | Marker (M): 1 bit |
| 325 | |
| 326 | The M bit indicates if the packet contains comfort noise. This field |
| 327 | is used in conjunction with the cng SDP attribute and is detailed |
| 328 | further in section 5 below. In normal usage this bit is set if the |
| 329 | packet contains comfort noise. |
| 330 | |
| 331 | Payload Type (PT): 7 bits |
| 332 | |
| 333 | |
| 334 | |
| 335 | Herlein, et al. Expires July 2, 2005 [Page 6] |
| 336 | |
| 337 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 338 | |
| 339 | |
| 340 | An RTP profile for a class of applications is expected to assign a |
| 341 | payload type for this format, or a dynamically allocated payload type |
| 342 | SHOULD be chosen which designates the payload as Speex. |
| 343 | |
| 344 | Sequence number: 16 bits |
| 345 | |
| 346 | The sequence number increments by one for each RTP data packet sent, |
| 347 | and may be used by the receiver to detect packet loss and to restore |
| 348 | packet sequence. This field is detailed further in [2]. |
| 349 | |
| 350 | Timestamp: 32 bits |
| 351 | |
| 352 | A timestamp representing the sampling time of the first sample of the |
| 353 | first Speex packet in the RTP packet. The clock frequency MUST be |
| 354 | set to the sample rate of the encoded audio data. Speex uses 20 msec |
| 355 | frames and a variable sampling rate clock. The RTP timestamp MUST be |
| 356 | in units of 1/X of a second where X is the sample rate used. Speex |
| 357 | uses a nominal 8kHz sampling rate for narrowband use, a nominal 16kHz |
| 358 | sampling rate for wideband use, and a nominal 32kHz sampling rate for |
| 359 | ultra-wideband use. |
| 360 | |
| 361 | SSRC/CSRC identifiers: |
| 362 | |
| 363 | These two fields, 32 bits each with one SSRC field and a maximum of |
| 364 | 16 CSRC fields, are as defined in [2]. |
| 365 | |
| 366 | |
| 367 | |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | Herlein, et al. Expires July 2, 2005 [Page 7] |
| 392 | |
| 393 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 394 | |
| 395 | |
| 396 | 5. Speex payload |
| 397 | |
| 398 | For the purposes of packetizing the bit stream in RTP, it is only |
| 399 | necessary to consider the sequence of bits as output by the Speex |
| 400 | encoder [9], and present the same sequence to the decoder. The |
| 401 | payload format described here maintains this sequence. |
| 402 | |
| 403 | A typical Speex frame, encoded at the maximum bitrate, is approx. |
| 404 | 110 octets and the total number of Speex frames SHOULD be kept less |
| 405 | than the path MTU to prevent fragmentation. Speex frames MUST NOT be |
| 406 | fragmented across multiple RTP packets, |
| 407 | |
| 408 | An RTP packet MAY contain Speex frames of the same bit rate or of |
| 409 | varying bit rates, since the bit-rate for a frame is conveyed in band |
| 410 | with the signal. |
| 411 | |
| 412 | The encoding and decoding algorithm can change the bit rate at any 20 |
| 413 | msec frame boundary, with the bit rate change notification provided |
| 414 | in-band with the bit stream. Each frame contains both "mode" |
| 415 | (narrowband, wideband or ultra-wideband) and "sub-mode" (bit-rate) |
| 416 | information in the bit stream. No out-of-band notification is |
| 417 | required for the decoder to process changes in the bit rate sent by |
| 418 | the encoder. |
| 419 | |
| 420 | It is RECOMMENDED that values of 8000, 16000 and 32000 be used for |
| 421 | normal internet telephony applications, though the sample rate is |
| 422 | supported at rates as low as 6000 Hz and as high as 48 kHz. |
| 423 | |
| 424 | The RTP payload MUST be padded to provide an integer number of octets |
| 425 | as the payload length. These padding bits are LSB aligned in network |
| 426 | octet order and consist of a 0 followed by all ones (until the end of |
| 427 | the octet). This padding is only required for the last frame in the |
| 428 | packet, and only to ensure the packet contents ends on an octet |
| 429 | boundary. |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | Herlein, et al. Expires July 2, 2005 [Page 8] |
| 448 | |
| 449 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 450 | |
| 451 | |
| 452 | 6. Example Speex packet |
| 453 | |
| 454 | In the example below we have a single Speex frame with 5 bits of |
| 455 | padding to ensure the packet size falls on an octet boundary. |
| 456 | |
| 457 | 0 1 2 3 |
| 458 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
| 459 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 460 | |V=2|P|X| CC |M| PT | sequence number | |
| 461 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 462 | | timestamp | |
| 463 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 464 | | synchronization source (SSRC) identifier | |
| 465 | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
| 466 | |
| 467 | 0 1 2 3 |
| 468 | 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 |
| 469 | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
| 470 | | contributing source (CSRC) identifiers | |
| 471 | | ... | |
| 472 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 473 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 474 | | ..speex data.. | |
| 475 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 476 | | ..speex data.. |0 1 1 1 1| |
| 477 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | Herlein, et al. Expires July 2, 2005 [Page 9] |
| 504 | |
| 505 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 506 | |
| 507 | |
| 508 | 7. Multiple Speex frames in a RTP packet |
| 509 | |
| 510 | Below is an example of two Speex frames contained within one RTP |
| 511 | packet. The Speex frame length in this example fall on an octet |
| 512 | boundary so there is no padding. |
| 513 | |
| 514 | Speex codecs [9] are able to detect the the bitrate from the payload |
| 515 | and are responsible for detecting the 20 msec boundaries between each |
| 516 | frame. |
| 517 | |
| 518 | 0 1 2 3 |
| 519 | 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 |
| 520 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 521 | |V=2|P|X| CC |M| PT | sequence number | |
| 522 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 523 | | timestamp | |
| 524 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 525 | | synchronization source (SSRC) identifier | |
| 526 | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
| 527 | | contributing source (CSRC) identifiers | |
| 528 | | ... | |
| 529 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 530 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 531 | | ..speex data.. | |
| 532 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 533 | | ..speex data.. | ..speex data.. | |
| 534 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 535 | | ..speex data.. | |
| 536 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | Herlein, et al. Expires July 2, 2005 [Page 10] |
| 560 | |
| 561 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 562 | |
| 563 | |
| 564 | 8. MIME registration of Speex |
| 565 | |
| 566 | Full definition of the MIME [3] type for Speex will be part of the |
| 567 | Ogg Vorbis MIME type definition application [8]. |
| 568 | |
| 569 | MIME media type name: audio |
| 570 | |
| 571 | MIME subtype: speex |
| 572 | |
| 573 | Optional parameters: |
| 574 | |
| 575 | Required parameters: to be included in the Ogg MIME specification. |
| 576 | |
| 577 | Encoding considerations: |
| 578 | |
| 579 | Security Considerations: |
| 580 | |
| 581 | See Section 6 of RFC 3047. |
| 582 | |
| 583 | Interoperability considerations: none |
| 584 | |
| 585 | Published specification: |
| 586 | |
| 587 | Applications which use this media type: |
| 588 | |
| 589 | Additional information: none |
| 590 | |
| 591 | Person & email address to contact for further information: |
| 592 | |
| 593 | Greg Herlein <gherlein@herlein.com> |
| 594 | Jean-Marc Valin <jean-marc.valin@hermes.usherb.ca> |
| 595 | |
| 596 | Intended usage: COMMON |
| 597 | |
| 598 | Author/Change controller: |
| 599 | |
| 600 | Author: Greg Herlein <gherlein@herlein.com> |
| 601 | Change controller: Greg Herlein <gherlein@herlein.com> |
| 602 | Change controller: IETF AVT Working Group |
| 603 | |
| 604 | This transport type signifies that the content is to be interpreted |
| 605 | according to this document if the contents are transmitted over RTP. |
| 606 | Should this transport type appear over a lossless streaming protocol |
| 607 | such as TCP, the content encapsulation should be interpreted as an |
| 608 | Ogg Stream in accordance with [8], with the exception that the |
| 609 | content of the Ogg Stream may be assumed to be Speex audio and Speex |
| 610 | audio only. |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | Herlein, et al. Expires July 2, 2005 [Page 11] |
| 616 | |
| 617 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 618 | |
| 619 | |
| 620 | 9. SDP usage of Speex |
| 621 | |
| 622 | When conveying information by SDP [4], the encoding name MUST be set |
| 623 | to "speex". An example of the media representation in SDP for |
| 624 | offering a single channel of Speex at 8000 samples per second might |
| 625 | be: |
| 626 | |
| 627 | m=audio 8088 RTP/AVP 97 |
| 628 | a=rtpmap:97 speex/8000 |
| 629 | |
| 630 | Note that the RTP payload type code of 97 is defined in this media |
| 631 | definition to be 'mapped' to the speex codec at an 8kHz sampling |
| 632 | frequency using the 'a=rtpmap' line. Any number from 96 to 127 could |
| 633 | have been chosen (the allowed range for dynamic types). |
| 634 | |
| 635 | The value of the sampling frequency is typically 8000 for narrow band |
| 636 | operation, 16000 for wide band operation, and 32000 for ultra-wide |
| 637 | band operation. |
| 638 | |
| 639 | If for some reason the offerer has bandwidth limitations, the client |
| 640 | may use the "b=" header, as explained in SDP [4]. The following |
| 641 | example illustrates the case where the offerer cannot receive more |
| 642 | than 10 kbit/s. |
| 643 | |
| 644 | m=audio 8088 RTP/AVP 97 |
| 645 | b=AS:10 |
| 646 | a=rtmap:97 speex/8000 |
| 647 | |
| 648 | In this case, if the remote part agrees, it should configure its |
| 649 | Speex encoder so that it does not use modes that produce more than 10 |
| 650 | kbit/s. Note that the "b=" constraint also applies on all payload |
| 651 | types that may be proposed in the media line ("m="). |
| 652 | |
| 653 | An other way to make recommendations to the remote Speex encoder is |
| 654 | to use its specific parameters via the a=fmtp: directive. The |
| 655 | following parameters are defined for use in this way: |
| 656 | |
| 657 | ptime: duration of each packet in milliseconds. |
| 658 | |
| 659 | sr: actual sample rate in Hz. |
| 660 | |
| 661 | ebw: encoding bandwidth - either 'narrow' or 'wide' or 'ultra' |
| 662 | (corresponds to nominal 8000, 16000, and 32000 Hz sampling rates). |
| 663 | |
| 664 | vbr: variable bit rate - either 'on' 'off' or 'vad' (defaults |
| 665 | to off). If on, variable bit rate is enabled. If off, disabled. |
| 666 | If set to 'vad' then constant bit rate is used but silence will be |
| 667 | encoded with special short frames to indicate a lack of voice for |
| 668 | |
| 669 | |
| 670 | |
| 671 | Herlein, et al. Expires July 2, 2005 [Page 12] |
| 672 | |
| 673 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 674 | |
| 675 | |
| 676 | that period. |
| 677 | |
| 678 | cng: comfort noise generation - either 'on' or 'off'. If off |
| 679 | then silence frames will be silent; if 'on' then those frames will |
| 680 | be filled with comfort noise. |
| 681 | |
| 682 | mode: Speex encoding mode. Can be {1,2,3,4,5,6,any} defaults to |
| 683 | 3 in narrowband, 6 in wide and ultra-wide. |
| 684 | |
| 685 | penh: use of perceptual enhancement. 1 indicates to the decoder |
| 686 | that perceptual enhancement is recommended, 0 indicates that it is |
| 687 | not. Defaults to on (1). |
| 688 | |
| 689 | |
| 690 | Examples: |
| 691 | |
| 692 | m=audio 8008 RTP/AVP 97 |
| 693 | a=rtpmap:97 speex/8000 |
| 694 | a=fmtp:97 mode=4 |
| 695 | |
| 696 | This examples illustrate an offerer that wishes to receive a Speex |
| 697 | stream at 8000Hz, but only using speex mode 3. |
| 698 | |
| 699 | The offerer may suggest to the remote decoder to activate its |
| 700 | perceptual enhancement filter like this: |
| 701 | |
| 702 | m=audio 8088 RTP/AVP 97 |
| 703 | a=rtmap:97 speex/8000 |
| 704 | a=fmtp:97 penh=1 |
| 705 | |
| 706 | Several Speex specific parameters can be given in a single a=fmtp |
| 707 | line provided that they are separated by a semi-colon: |
| 708 | |
| 709 | a=fmtp:97 mode=any;penh=1 |
| 710 | |
| 711 | The offerer may indicate that it wishes to send variable bit rate |
| 712 | frames with comfort noise: |
| 713 | |
| 714 | m=audio 8088 RTP/AVP 97 |
| 715 | a=rtmap:97 speex/8000 |
| 716 | a=fmtp:97 vbr=on;cng=on |
| 717 | |
| 718 | The "ptime" attribute is used to denote the packetization interval |
| 719 | (ie, how many milliseconds of audio is encoded in a single RTP |
| 720 | packet). Since Speex uses 20 msec frames, ptime values of multiples |
| 721 | of 20 denote multiple Speex frames per packet. Values of ptime which |
| 722 | are not multiples of 20 MUST be ignored and clients MUST use the |
| 723 | default value of 20 instead. |
| 724 | |
| 725 | |
| 726 | |
| 727 | Herlein, et al. Expires July 2, 2005 [Page 13] |
| 728 | |
| 729 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 730 | |
| 731 | |
| 732 | In the example below the ptime value is set to 40, indicating that |
| 733 | there are 2 frames in each packet. |
| 734 | |
| 735 | m=audio 8008 RTP/AVP 97 |
| 736 | a=rtpmap:97 speex/8000 |
| 737 | a=ptime:40 |
| 738 | |
| 739 | Note that the ptime parameter applies to all payloads listed in the |
| 740 | media line and is not used as part of an a=fmtp directive. |
| 741 | |
| 742 | Values of ptime not multiple of 20 msec are meaningless, so the |
| 743 | receiver of such ptime values MUST ignore them. If during the life |
| 744 | of an RTP session the ptime value changes, when there are multiple |
| 745 | Speex frames for example, the SDP value must also reflect the new |
| 746 | value. |
| 747 | |
| 748 | Care must be taken when setting the value of ptime so that the RTP |
| 749 | packet size does not exceed the path MTU. |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | Herlein, et al. Expires July 2, 2005 [Page 14] |
| 784 | |
| 785 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 786 | |
| 787 | |
| 788 | 10. ITU H.323/H.245 Use of Speex |
| 789 | |
| 790 | Application is underway to make Speex a standard ITU codec. However, |
| 791 | until that is finalized, Speex MAY be used in H.323 [5] by using a |
| 792 | non-standard codec block definition in the H.245 [6] codec capability |
| 793 | negotiations. |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | Herlein, et al. Expires July 2, 2005 [Page 15] |
| 840 | |
| 841 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 842 | |
| 843 | |
| 844 | 11. NonStandardMessage format |
| 845 | |
| 846 | For Speex use in H.245 [6] based systems, the fields in the |
| 847 | NonStandardMessage should be: |
| 848 | |
| 849 | t35CountryCode = Hex: B5 |
| 850 | t35Extension = Hex: 00 |
| 851 | manufacturerCode = Hex: 0026 |
| 852 | [Length of the Binary Sequence (8 bit number)] |
| 853 | [Binary Sequence consisting of an ASCII string, no NULL |
| 854 | terminator] |
| 855 | |
| 856 | The binary sequence is an ascii string merely for ease of use. The |
| 857 | string is not null terminated. The format of this string is |
| 858 | |
| 859 | speex [optional variables] |
| 860 | |
| 861 | The optional variables are identical to those used for the SDP a=fmtp |
| 862 | strings discussed in section 5 above. The string is built to be all |
| 863 | on one line, each key-value pair separated by a semi-colon. The |
| 864 | optional variables MAY be omitted, which causes the default values to |
| 865 | be assumed. They are: |
| 866 | |
| 867 | ebw=narrow;mode=3;vbr=off;cng=off;ptime=20;sr=8000;penh=no; |
| 868 | |
| 869 | The fifth octet of the block is the length of the binary sequence. |
| 870 | |
| 871 | NOTE: this method can result in the advertising of a large number of |
| 872 | Speex 'codecs' based on the number of variables possible. For most |
| 873 | VoIP applications, use of the default binary sequence of 'speex' is |
| 874 | RECOMMENDED to be used in addition to all other options. This |
| 875 | maximizes the chances that two H.323 based applications that support |
| 876 | Speex can find a mutual codec. |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | Herlein, et al. Expires July 2, 2005 [Page 16] |
| 896 | |
| 897 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 898 | |
| 899 | |
| 900 | 12. RTP Payload Types |
| 901 | |
| 902 | Dynamic payload type codes MUST be negotiated 'out-of-band' for the |
| 903 | assignment of a dynamic payload type from the range of 96-127. H.323 |
| 904 | applications MUST use the H.245 H2250LogicalChannelParameters |
| 905 | encoding to accomplish this. |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | Herlein, et al. Expires July 2, 2005 [Page 17] |
| 952 | |
| 953 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 954 | |
| 955 | |
| 956 | 13. Security Considerations |
| 957 | |
| 958 | RTP packets using the payload format defined in this specification |
| 959 | are subject to the security considerations discussed in the RTP |
| 960 | specification [2], and any appropriate RTP profile. This implies |
| 961 | that confidentiality of the media streams is achieved by encryption. |
| 962 | Because the data compression used with this payload format is applied |
| 963 | end-to-end, encryption may be performed after compression so there is |
| 964 | no conflict between the two operations. |
| 965 | |
| 966 | A potential denial-of-service threat exists for data encodings using |
| 967 | compression techniques that have non-uniform receiver-end |
| 968 | computational load. The attacker can inject pathological datagrams |
| 969 | into the stream which are complex to decode and cause the receiver to |
| 970 | be overloaded. However, this encoding does not exhibit any |
| 971 | significant non-uniformity. |
| 972 | |
| 973 | As with any IP-based protocol, in some circumstances a receiver may |
| 974 | be overloaded simply by the receipt of too many packets, either |
| 975 | desired or undesired. Network-layer authentication may be used to |
| 976 | discard packets from undesired sources, but the processing cost of |
| 977 | the authentication itself may be too high. |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 | |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | |
| 1006 | |
| 1007 | Herlein, et al. Expires July 2, 2005 [Page 18] |
| 1008 | |
| 1009 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 1010 | |
| 1011 | |
| 1012 | 14. Acknowledgments |
| 1013 | |
| 1014 | The authors would like to thank Equivalence Pty Ltd of Australia for |
| 1015 | their assistance in attempting to standardize the use of Speex in |
| 1016 | H.323 applications, and for implementing Speex in their open source |
| 1017 | OpenH323 stack. The authors would also like to thank Brian C. Wiles |
| 1018 | <brian@streamcomm.com> of StreamComm for his assistance in developing |
| 1019 | the proposed standard for Speex use in H.323 applications. |
| 1020 | |
| 1021 | The authors would also like to thank the following members of the |
| 1022 | Speex and AVT communities for their input: Ross Finlayson, Federico |
| 1023 | Montesino Pouzols, Henning Schulzrinne, Magnus Westerlund. |
| 1024 | |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 | |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | |
| 1052 | |
| 1053 | |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | Herlein, et al. Expires July 2, 2005 [Page 19] |
| 1064 | |
| 1065 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 1066 | |
| 1067 | |
| 1068 | 15. References |
| 1069 | |
| 1070 | 15.1 Normative References |
| 1071 | |
| 1072 | [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement |
| 1073 | Levels", RFC 2119. |
| 1074 | |
| 1075 | [2] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, |
| 1076 | "RTP: A Transport Protocol for real-time applications", RFC |
| 1077 | 3550. |
| 1078 | |
| 1079 | [3] "Multipurpose Internet Mail Extensions (MIME) Part One: Format |
| 1080 | of Internet Message Bodies", RFC 2045. |
| 1081 | |
| 1082 | [4] Jacobson, V. and M. Handley, "SDP: Session Description |
| 1083 | Protocol", RFC 2327. |
| 1084 | |
| 1085 | [5] "Packet-based Multimedia Communications Systems", ITU-T |
| 1086 | Recommendation H.323. |
| 1087 | |
| 1088 | [6] "Control of communications between Visual Telephone Systems and |
| 1089 | Terminal Equipment", ITU-T Recommendation H.245. |
| 1090 | |
| 1091 | [7] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and Video |
| 1092 | Conferences with Minimal Control.", RFC 3551. |
| 1093 | |
| 1094 | [8] Walleij, L., "The application/ogg Media Type", RFC 3534. |
| 1095 | |
| 1096 | 15.2 Informative References |
| 1097 | |
| 1098 | [9] "Speexenc/speexdec, reference command-line encoder/decoder", |
| 1099 | Speex website http://www.speex.org/. |
| 1100 | |
| 1101 | [10] "CELP, U.S. Federal Standard 1016.", National Technical |
| 1102 | Information Service (NTIS) website http://www.ntis.gov/. |
| 1103 | |
| 1104 | |
| 1105 | Authors' Addresses |
| 1106 | |
| 1107 | Greg Herlein |
| 1108 | 2034 Filbert Street |
| 1109 | San Francisco, California 94123 |
| 1110 | United States |
| 1111 | |
| 1112 | EMail: gherlein@herlein.com |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | Herlein, et al. Expires July 2, 2005 [Page 20] |
| 1120 | |
| 1121 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 1122 | |
| 1123 | |
| 1124 | Simon Morlat |
| 1125 | 35, av de Vizille App 42 |
| 1126 | Grenoble 38000 |
| 1127 | France |
| 1128 | |
| 1129 | EMail: simon.morlat@linphone.org |
| 1130 | |
| 1131 | |
| 1132 | Jean-Marc Valin |
| 1133 | Department of Electrical and Computer Engineering |
| 1134 | University of Sherbrooke |
| 1135 | 2500 blvd Universite |
| 1136 | Sherbrooke, Quebec J1K 2R1 |
| 1137 | Canada |
| 1138 | |
| 1139 | EMail: jean-marc.valin@hermes.usherb.ca |
| 1140 | |
| 1141 | |
| 1142 | Roger Hardiman |
| 1143 | 49 Nettleton Road |
| 1144 | Cheltenham, Gloucestershire GL51 6NR |
| 1145 | England |
| 1146 | |
| 1147 | EMail: roger@freebsd.org |
| 1148 | |
| 1149 | |
| 1150 | Phil Kerr |
| 1151 | England |
| 1152 | |
| 1153 | EMail: phil@plus24.com |
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | |
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | Herlein, et al. Expires July 2, 2005 [Page 21] |
| 1176 | |
| 1177 | Internet-Draft draft-herlein-speex-rtp-profile-03 January 2005 |
| 1178 | |
| 1179 | |
| 1180 | Intellectual Property Statement |
| 1181 | |
| 1182 | The IETF takes no position regarding the validity or scope of any |
| 1183 | Intellectual Property Rights or other rights that might be claimed to |
| 1184 | pertain to the implementation or use of the technology described in |
| 1185 | this document or the extent to which any license under such rights |
| 1186 | might or might not be available; nor does it represent that it has |
| 1187 | made any independent effort to identify any such rights. Information |
| 1188 | on the procedures with respect to rights in RFC documents can be |
| 1189 | found in BCP 78 and BCP 79. |
| 1190 | |
| 1191 | Copies of IPR disclosures made to the IETF Secretariat and any |
| 1192 | assurances of licenses to be made available, or the result of an |
| 1193 | attempt made to obtain a general license or permission for the use of |
| 1194 | such proprietary rights by implementers or users of this |
| 1195 | specification can be obtained from the IETF on-line IPR repository at |
| 1196 | http://www.ietf.org/ipr. |
| 1197 | |
| 1198 | The IETF invites any interested party to bring to its attention any |
| 1199 | copyrights, patents or patent applications, or other proprietary |
| 1200 | rights that may cover technology that may be required to implement |
| 1201 | this standard. Please address the information to the IETF at |
| 1202 | ietf-ipr@ietf.org. |
| 1203 | |
| 1204 | |
| 1205 | Disclaimer of Validity |
| 1206 | |
| 1207 | This document and the information contained herein are provided on an |
| 1208 | "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS |
| 1209 | OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET |
| 1210 | ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, |
| 1211 | INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE |
| 1212 | INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED |
| 1213 | WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. |
| 1214 | |
| 1215 | |
| 1216 | Copyright Statement |
| 1217 | |
| 1218 | Copyright (C) The Internet Society (2005). This document is subject |
| 1219 | to the rights, licenses and restrictions contained in BCP 78, and |
| 1220 | except as set forth therein, the authors retain all their rights. |
| 1221 | |
| 1222 | |
| 1223 | Acknowledgment |
| 1224 | |
| 1225 | Funding for the RFC Editor function is currently provided by the |
| 1226 | Internet Society. |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | Herlein, et al. Expires July 2, 2005 [Page 22] |
| 1232 | |