idnits 2.17.1 draft-ietf-avt-rtp-ilbc-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The abstract seems to contain references ([1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: '3' is defined on line 417, but no explicit reference was found in the text == Unused Reference: '6' is defined on line 427, but no explicit reference was found in the text == Unused Reference: '8' is defined on line 433, but no explicit reference was found in the text == Unused Reference: '11' is defined on line 443, but no explicit reference was found in the text -- No information found for draft-ietf-avt-lbc-codec - is the name correct? -- Possible downref: Normative reference to a draft: ref. '1' ** Obsolete normative reference: RFC 1889 (ref. '4') (Obsoleted by RFC 3550) ** Obsolete normative reference: RFC 1890 (ref. '5') (Obsoleted by RFC 3551) ** Obsolete normative reference: RFC 2327 (ref. '7') (Obsoleted by RFC 4566) -- Possible downref: Non-RFC (?) normative reference: ref. '9' -- Possible downref: Non-RFC (?) normative reference: ref. '10' ** Obsolete normative reference: RFC 3267 (ref. '11') (Obsoleted by RFC 4867) Summary: 7 errors (**), 0 flaws (~~), 5 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Alan Duric 3 Soren Vang Andersen 4 Internet Draft 5 draft-ietf-avt-rtp-ilbc-02.txt Global IP Sound 6 June 30th, 2003 7 Expires: December 30th, 2003 9 RTP Payload Format for iLBC Speech 11 Status of this Memo 13 This document is an Internet-Draft and is in full conformance with 14 all provisions of Section 10 of RFC2026. 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 Internet- 19 Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six 22 months and may be updated, replaced, or obsoleted by other documents 23 at any time. It is inappropriate to use Internet-Drafts as 24 reference material or to cite them other than as "work in progress." 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 Abstract 33 This document describes the RTP payload format for the internet Low 34 Bit Rate Coder (iLBC) Speech [1] developed by Global IP Sound 35 (GIPS). Also, within the document there are included necessary 36 details for the use of iLBC with MIME and SDP. 38 Table of Contents 40 Status of this Memo................................................1 41 Abstract...........................................................1 42 Table of Contents..................................................1 43 1. INTRODUCTION....................................................2 44 2. BACKGROUND......................................................2 45 3. RTP PAYLOAD FORMAT..............................................3 46 3.1 Bitstream definition...........................................3 47 3.2 Multiple iLBC frames in a RTP packet...........................5 48 4. IANA CONSIDERATIONS.............................................6 49 4.1 Storage Mode...................................................6 50 4.2 MIME registration of iLBC......................................6 51 5. MAPPING TO SDP PARAMETERS.......................................8 52 6. SECURITY CONSIDERATIONS.........................................8 53 7. REFERENCES......................................................9 54 8. ACKNOWLEDGEMENTS...............................................10 55 9. AUTHOR'S ADDRESSES.............................................10 57 1. INTRODUCTION 59 This document describes how compressed iLBC speech as produced by 60 the iLBC codec [1] may be formatted for use as an RTP payload type. 61 Methods are provided to packetize the codec data frames into RTP 62 packets. The sender may send one or more codec data frames per 63 packet, depending on the application scenario or based on the 64 transport network condition, bandwidth restriction, delay 65 requirements and packet-loss tolerance. 67 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 68 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in 69 this document are to be interpreted as described in RFC 2119 [2]. 71 2. BACKGROUND 73 Global IP Sound (GIPS) has developed and defines a freeware speech 74 compression algorithm for use in IP based communications [1]. The 75 iLBC codec enables graceful speech quality degradation in the case 76 of lost frames, which occurs in connection with lost or delayed IP 77 packets. 79 Some of the applications for which this coder is suitable are: real 80 time communications such as telephony and videoconferencing, 81 streaming audio, archival and messaging. 83 The iLBC codec [1] is an algorithm that compresses each basic frame 84 (20 ms or 30 ms) of 8000 Hz, 16-bit sampled input speech, into 85 output frames with rate of 399 bits for 30 ms basic frame size and 86 303 bits for 20 ms basic frame size. 88 The codec has support for two basic frame lengths: 30 ms at 13.33 89 kbit/s and 20 ms at 15.2 kbit/s, using a block independent linear- 90 predictive coding (LPC) algorithm. When the codec operates at block 91 lengths of 20 ms, it produces 303 bits per block which SHOULD be 92 packetized in 38 bytes. Similarly, for block lengths of 30 ms it 93 produces 399 bits per block which SHOULD be packetized in 50 bytes. 94 The described algorithm results in a speech coding system with a 95 controlled response to packet losses similar to what is known from 96 pulse code modulation (PCM) with a packet loss concealment (PLC), 97 such as ITU-T G711 standard [10], which operates at a fixed bit rate 98 of 64 kbit/s. At the same time, the described algorithm enables 99 fixed bit rate coding with a quality-versus-bit rate tradeoff close 100 to what is known from code-excited linear prediction (CELP). 102 Cable Television Laboratories (CableLabs(R)) intends to adapt iLBC 103 as a PacketCable(TM) audio codec standard for VoIP over Cable 104 applications. 106 3. RTP PAYLOAD FORMAT 108 The iLBC codec uses 20 or 30 ms frames and a sampling rate clock of 109 8 kHz, so the RTP timestamp MUST be in units of 1/8000 of a second. 110 The RTP payload for iLBC has the format shown in the figure bellow. 111 No addition header specific to this payload format is required. 113 This format is intended for the situations where the sender and the 114 receiver send one or more codec data frames per packet. The RTP 115 packet looks as follows: 117 0 1 2 3 118 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 119 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 120 | RTP Header [4] | 121 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 122 | | 123 + one or more frames of iLBC [1] | 124 | | 125 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 127 The RTP header of the packetized encoded iLBC speech has the 128 expected values as described in [4]. The usage of M bit should be as 129 specified in the applicable RTP profile, for example, RFC 1890 [5], 130 where [5] specifies that if the sender does not suppress silence 131 (i.e., sends a frame on every frame interval), the M bit will always 132 be zero. When more then one codec data frame is present in a single 133 RTP packet, the timestamp is, as always, that of the oldest data 134 frame represented in the RTP packet. 136 The assignment of an RTP payload type for this new packet format is 137 outside the scope of this document, and will not be specified here. 138 It is expected that the RTP profile for a particular class of 139 applications will assign a payload type for this encoding, or if 140 that is not done, then a payload type in the dynamic range shall be 141 chosen by the sender. 143 3.1 Bitstream definition 145 The total number of bits used to describe one frame of 20 ms speech 146 is 303, which fits in 38 bytes and results in a bit rate of 15.20 147 kbit/s. For the case with a frame length of 30 ms speech the total 148 number of bits used is 399, which fits in 50 bytes and results in a 149 bit rate of 13.33 kbit/s. In the bitstream definition the bits are 150 distributed into three classes according to their bit error or loss 151 sensitivity. The most sensitive bits (class 1) are placed first in 152 the bitstream for each frame. The less sensitive bits (class 2) are 153 placed after the class 1 bits. The least sensitive bits (class 3) 154 are placed at the end of the bitstream for each frame. 156 Looking at the 20/30 ms frame length cases for each class: The class 157 1 bits occupy a total of 6/8 bytes (48/64 bits), the class 2 bits 158 occupy 8/12 bytes (64/96 bits), and the class 3 bits occupy 24/30 159 bytes (191/239 bits). This distribution of the bits enables the use 160 of uneven level protection (ULP). The detailed bit allocation is 161 shown in the table below. When a quantization index is distributed 162 between more classes the more significant bits belong to the lowest 163 class. 165 Bitstream structure: 167 ------------------------------------------------------------------+ 168 Parameter | Bits Class <1,2,3> | 169 | 20 ms frame | 30 ms frame | 170 ----------------------------------+---------------+---------------+ 171 Split 1 | 6 <6,0,0> | 6 <6,0,0> | 172 LSF 1 Split 2 | 7 <7,0,0> | 7 <7,0,0> | 173 LSF Split 3 | 7 <7,0,0> | 7 <7,0,0> | 174 ------------------+---------------+---------------+ 175 Split 1 | NA (Not Appl.)| 6 <6,0,0> | 176 LSF 2 Split 2 | NA | 7 <7,0,0> | 177 Split 3 | NA | 7 <7,0,0> | 178 ------------------+---------------+---------------+ 179 Sum | 20 <20,0,0> | 40 <40,0,0> | 180 ----------------------------------+---------------+---------------+ 181 Block Class. | 2 <2,0,0> | 3 <3,0,0> | 182 ----------------------------------+---------------+---------------+ 183 Position 22 sample segment | 1 <1,0,0> | 1 <1,0,0> | 184 ----------------------------------+---------------+---------------+ 185 Scale Factor State Coder | 6 <6,0,0> | 6 <6,0,0> | 186 ----------------------------------+---------------+---------------+ 187 Sample 0 | 3 <0,1,2> | 3 <0,1,2> | 188 Quantized Sample 1 | 3 <0,1,2> | 3 <0,1,2> | 189 Residual : | : : | : : | 190 State : | : : | : : | 191 Samples : | : : | : : | 192 Sample 56 | 3 <0,1,2> | 3 <0,1,2> | 193 Sample 57 | NA | 3 <0,1,2> | 194 ------------------+---------------+---------------+ 195 Sum | 171 <0,57,114>| 174 <0,58,116>| 196 ----------------------------------+---------------+---------------+ 197 Stage 1 | 7 <6,0,1> | 7 <4,2,1> | 198 CB for 22/23 Stage 2 | 7 <0,0,7> | 7 <0,0,7> | 199 sample block Stage 3 | 7 <0,0,7> | 7 <0,0,7> | 200 ------------------+---------------+---------------+ 201 Sum | 21 <6,0,15> | 21 <4,2,15> | 202 ----------------------------------+---------------+---------------+ 203 Stage 1 | 5 <2,0,3> | 5 <1,1,3> | 204 Gain for 22/23 Stage 2 | 4 <1,1,2> | 4 <1,1,2> | 205 sample block Stage 3 | 3 <0,0,3> | 3 <0,0,3> | 206 ------------------+---------------+---------------+ 207 Sum | 12 <3,1,8> | 12 <2,2,8> | 208 ----------------------------------+---------------+---------------+ 209 Stage 1 | 8 <7,0,1> | 8 <6,1,1> | 210 sub-block 1 Stage 2 | 7 <0,0,7> | 7 <0,0,7> | 211 Stage 3 | 7 <0,0,7> | 7 <0,0,7> | 212 ------------------+---------------+---------------+ 213 Stage 1 | 8 <0,0,8> | 8 <0,7,1> | 214 sub-block 2 Stage 2 | 8 <0,0,8> | 8 <0,0,8> | 215 Indices Stage 3 | 8 <0,0,8> | 8 <0,0,8> | 216 for CB ------------------+---------------+---------------+ 217 sub-blocks Stage 1 | NA | 8 <0,7,1> | 218 sub-block 3 Stage 2 | NA | 8 <0,0,8> | 219 Stage 3 | NA | 8 <0,0,8> | 220 ------------------+---------------+---------------+ 221 Stage 1 | NA | 8 <0,7,1> | 222 sub-block 4 Stage 2 | NA | 8 <0,0,8> | 223 Stage 3 | NA | 8 <0,0,8> | 224 ------------------+---------------+---------------+ 225 Sum | 46 <7,0,39> | 94 <6,22,66> | 226 ----------------------------------+---------------+---------------+ 227 Stage 1 | 5 <1,2,2> | 5 <1,2,2> | 228 sub-block 1 Stage 2 | 4 <1,1,2> | 4 <1,2,1> | 229 Stage 3 | 3 <0,0,3> | 3 <0,0,3> | 230 ------------------+---------------+---------------+ 231 Stage 1 | 5 <1,1,3> | 5 <0,2,3> | 232 sub-block 2 Stage 2 | 4 <0,2,2> | 4 <0,2,2> | 233 Stage 3 | 3 <0,0,3> | 3 <0,0,3> | 234 Gains for ------------------+---------------+---------------+ 235 sub-blocks Stage 1 | NA | 5 <0,1,4> | 236 sub-block 3 Stage 2 | NA | 4 <0,1,3> | 237 Stage 3 | NA | 3 <0,0,3> | 238 ------------------+---------------+---------------+ 239 Stage 1 | NA | 5 <0,1,4> | 240 sub-block 4 Stage 2 | NA | 4 <0,1,3> | 241 Stage 3 | NA | 3 <0,0,3> | 242 ------------------+---------------+---------------+ 243 Sum | 24 <3,6,15> | 48 <2,12,34> | 244 ------------------------------------------------------------------- 245 SUM 303 <48,64,191> 399 <64,96,239> 247 Table 3.1 The bitstream definition for iLBC. 249 When packetized into the payload the bits MUST be sorted as: All the 250 class 1 bits in the order (from top and down) as they were specified 251 in the table, all the class 2 bits (from top and down) and finally 252 all the class 3 bits in the same sequential order. 254 The last unused bit of the payload (for both 20 ms and 30 ms frame 255 size) SHOULD be set to zero. 257 3.2 Multiple iLBC frames in a RTP packet 259 More than one iLBC frame may be included in a single RTP packet by a 260 sender. 262 It is important to observe that senders have the following 263 additional restrictions: 265 SHOULD NOT include more iLBC frames in a single RTP packet than will 266 fit in the MTU of the RTP transport protocol. 268 Frames MUST NOT be split between RTP packets. 270 It is RECOMMENDED that the number of frames contained within an RTP 271 packet is consistent with the application. For example, in a 272 telephony and other real time applications where delay is important, 273 then the fewer frames per packet the lower the delay, whereas for a 274 bandwidth constrained links or delay insensitive streaming messaging 275 application, more then one or many frames per packet would be 276 acceptable. 278 Information describing the number of frames contained in an RTP 279 packet is not transmitted as part of the RTP payload. The way to 280 determine the number of iLBC frames is to count the total number of 281 octets within the RTP packet, and divide the octet count by the 282 number of expected octets per frame (32/50 per frame). 284 4. IANA CONSIDERATIONS 286 One new MIME sub-type as described in this section is to be 287 registered. 289 4.1 Storage Mode 291 The storage mode is used for storing speech frames (e.g. as a file 292 or e-mail attachment). 294 +------------------+ 295 | Header | 296 +------------------+ 297 | Speech frame 1 | 298 +------------------+ 299 : : 300 +------------------+ 301 | Speech frame n | 302 +------------------+ 304 The file begins with a header that includes only a magic number to 305 identify that it is an iLBC file. The magic number for iLBC file 306 MUST correspond to the ASCII character string "#!iLBC\n", or "0x23 307 0x21 0x69 0x4C 0x42 0x43 0x0A" in hexadecimal form. After the 308 header, follow the speech frames in consecutive order. 310 4.2 MIME registration of iLBC 312 MIME media type name: audio 314 MIME subtype: iLBC 315 Optional parameters: 317 This parameter applies to RTP transfer only. 319 maxptime:The maximum amount of media which can be 320 encapsulated in a payload packet, expressed 321 as time in milliseconds. The time is 322 calculated as the sum of the time the media 323 present in the packet represents. The time SHOULD be 324 a multiple of the frame size. If this parameter is 325 not present, the sender MAY encapsulate any number of 326 speech frames into one RTP packet. 328 Encoding considerations: 329 This type is defined for transfer via both RTP (RFC 330 1889) and stored-file methods as described in Section 331 4.1, of RFC XXXX. Audio data is binary data, and must 332 be encoded for non-binary transport; the Base64 333 encoding is suitable for Email. 335 Security considerations: 336 See Section 6 of RFC XXXX. 338 Public specification: 339 Please refer to RFC XXXX [1]. 341 Additional information: 342 The following applies to stored-file transfer 343 methods: 345 Magic number: 346 ASCII character string "#!iLBC\n" 347 (or 0x23 0x21 0x69 0x4C 0x42 0x43 0x0A in 348 hexadecimal) 350 File extensions: lbc, LBC 351 Macintosh file type code: none 352 Object identifier or OID: none 354 Person & email address to contact for further information: 355 alan.duric@globalipsound.com 357 Intended usage: COMMON. 358 It is expected that many VoIP applications will use 359 this type. 361 Author/Change controller: 362 alan.duric@globalipsound.com 363 IETF Audio/Video transport working group 364 5. MAPPING TO SDP PARAMETERS 366 Parameters are mapped to SDP [7] in a standard way. When conveying 367 information by SDP, the encoding name SHALL be "iLBC" (the same as 368 the MIME subtype). An example of the media representation in SDP for 369 describing iLBC might be: 371 m=audio 49120 RTP/AVP 97 372 a=rtpmap:97 iLBC/8000 374 If 20 ms frame size mode is used, remote iLBC encoder SHALL receive 375 "mode" parameter in the SDP "a=fmtp" attribute by copying them 376 directly from the MIME media type string as a semicolon separated 377 with parameter=value, where parameter is "mode", and values can be 378 0, 20 or 30 (where 0 stands for support of both frame size modes; 20 379 stands for preferred 20 ms frame size, etc.). An example of the 380 media representation in SDP for describing iLBC when 20 ms frame 381 size mode is used might be: 383 m=audio 49120 RTP/AVP 97 384 a=rtpmap:97 iLBC/8000 385 a=fmtp:97 mode=20 387 6. SECURITY CONSIDERATIONS 389 RTP packets using the payload format defined in this specification 390 are subject to the general security considerations discussed in [4] 391 and any appropriate profile (e.g. [5]). 393 As this format transports encoded speech, the main security issues 394 include confidentiality and authentication of the speech itself. The 395 payload format itself does not have any built-in security 396 mechanisms. Confidentiality of the media streams is achieved by 397 encryption, therefore external mechanisms, such as SRTP [9], MAY be 398 used for that purpose. The data compression used with this payload 399 format is applied end-to-end; hence encryption may be performed 400 after compression with no conflict between the two operations. 402 A potential denial-of-service threat exists for data encoding using 403 compression techniques that have non-uniform receiver-end 404 computational load. The attacker can inject pathological datagrams 405 into the stream which are complex to decode and cause the receiver 406 to become overloaded. However, the encodings covered in this 407 document do not exhibit any significant non-uniformity. 409 7. REFERENCES 411 [1] Andersen, et al., Internet Low Bit Rate Codec (iLBC)", draft- 412 ietf-avt-lbc-codec-02.txt, June 2003. 414 [2] S. Bradner, "Key words for use in RFCs to Indicate requirement 415 Levels", BCP 14, RFC 2119, March 1997. 417 [3] S. Bradner, "The Internet Standards Process -- Revision 3", BCP 418 9, RFC 2026, October 1996 420 [4] H. Schulzrinne, S. Casner, R. Frederick, and V. Jacobson, "RTP: 421 A Transport Protocol for Real-Time Applications", IETF RFC 1889, 422 January 1996. 424 [5] H. Schulzrinne, "RTP Profile for Audio and Video Conferences 425 with Minimal Control" IETF RFC 1890, January 1996. 427 [6] Handley & Perkins, "Guidelines for Writers of RTP Payload 428 Formats", BCP 36, RFC 2736, December 1999. 430 [7] M. Handley and V. Jacobson, "SDP: Session Description Protocol", 431 IETF RFC 2327, April 1998 433 [8] N. Freed and N. Borenstein, "Multipurpose Internet Mail 434 Extensions (MIME) Part One: Format of Internet Message Bodies", 435 IETF RFC 2045, November 1996. 437 [9] Baugher, et al., "The Secure Real Time Transport Protocol", IETF 438 Draft, May 2003. 440 [10] ITU-T Recommendation G.711, available online from the ITU 441 bookstore at http://www.itu.int. 443 [11] J. Sjoberg, M. Westerlund, A. Lakaniemi, Q. Xie, "RTP payload 444 format and file storage format for the Adaptive Multi-Rate (AMR) 445 and Adaptive Multi-Rate Wideband (AMR-WB) audio codecs", IETF RFC 446 3267, June 2002. 448 8. ACKNOWLEDGEMENTS 450 The authors wish to thank Henry Sinnreich, Patrik Faltstrom and Alan 451 Johnston for great support of the iLBC initiative and for their 452 valuable feedback and comments. 454 9. AUTHOR'S ADDRESSES 456 Alan Duric 457 Global IP Sound AB 458 Rosenlundsgatan 54 459 Stockholm, S-11863 460 Sweden 461 Phone: +46 8 54553040 462 Email: alan.duric@globalipsound.com 464 Soren Vang Andersen 465 Department of Communication Technology 466 Aalborg University 467 Fredrik Bajers Vej 7A 468 9200 Aalborg 469 Denmark 470 Phone: ++45 9 6358627 471 Email: sva@kom.auc.dk