Welcome to mirror list, hosted at ThFree Co, Russian Federation.

draft-valin-celt-rtp-profile.xml « ietf « doc - github.com/mumble-voip/celt-0.7.0.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3caff4284346d3168ef6cfaaffe4e45b133316fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
112
113
114
115
116
117
118
119
120
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
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
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
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
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
<?xml version='1.0'?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<?rfc symrefs="yes" toc="yes" ?>

<rfc ipr="trust200902" docName="RTP Payload Format for the CELT Codec">

<front>
<title>draft-valin-celt-rtp-profile-02</title>



<author initials="J-M" surname="Valin" fullname="Jean-Marc Valin">
<organization>Octasic Semiconductor</organization>
<address>
<postal>
<street>4101, Molson Street, suite 300</street>
<city>Montreal</city>
<region>Quebec</region>
<code>H1Y 3L1</code>
<country>Canada</country>
</postal>
<email>jean-marc.valin@octasic.com</email>
</address>
</author>


<author initials="G" surname="Maxwell" fullname="Gregory Maxwell">
<organization>Juniper Networks</organization>
<address>
<postal>
<street>2251 Corporate Park Drive, Suite 100</street>
<city>Herndon</city>
<region>VA</region>
<code>20171-1817</code>
<country>USA</country>
</postal>
<email>gmaxwell@juniper.net</email>
</address>
</author>

<date day="13" month="July" year="2009" />

<area>General</area>
<workgroup>AVT Working Group</workgroup>
<keyword>I-D</keyword>

<keyword>Internet-Draft</keyword>
<keyword>CELT</keyword>
<keyword>RTP</keyword>
<abstract>
<t>
CELT is an open-source voice codec suitable for use in very low delay 
audio communication applications, including Voice over IP (VoIP).
This document describes the payload format for CELT generated bit 
streams within an RTP packet.  Also included here are the necessary 
details for the use of CELT with the Session Description Protocol 
(SDP). At the time of this writing, the CELT bit-stream has NOT
been finalized yet, and compatibility is usually broken with
every new release of the codec.
</t>
</abstract>
</front>

<middle>

<section anchor="Conventions used in this document" title="Conventions used in this document">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 <xref target="rfc2119"></xref>.
</t>
</section>

<section anchor="Overview of the CELT Codec" title="Overview of the CELT Codec">

<t>
CELT stands for "Constrained Energy Lapped Transform". It applies some of the CELP principles, but does everything in the frequency domain, which removes some of the limitations of CELP. CELT is suitable for both speech and music and currently features:
</t>

<t>
<list style="symbols">
<t>Ultra-low algorithmic delay (as low as 2 ms)</t>
<t>Full audio bandwidth (up to 20 kHz audio bandwidth)</t>
<t>Support for both voice and music</t>
<t>Stereo support</t>
<t>Packet loss concealment</t>
<t>Constant bitrates from under 32 kbps to 128 kbps and above</t>
<t>Free software/open-source</t>
</list>
</t>

</section>

<section anchor="RTP payload format for CELT" title="RTP payload format for CELT">

<t>
For RTP based transportation of CELT encoded audio the standard 
RTP header <xref target="rfc3550"></xref> is followed by one or more payload data blocks. 
An optional padding terminator may also be used.
</t>

<section anchor="RTP Header" title="RTP Header">

<t>
<figure>
<artwork><![CDATA[
     0                   1                   2                   3
     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |V=2|P|X|  CC   |M|     PT      |       sequence number         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           timestamp                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           synchronization source (SSRC) identifier            |
    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    |            contributing source (CSRC) identifiers             |
    |                              ...                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
</t>

<t>
The RTP header is defined in the RTP specification <xref target="rfc3550"></xref>.  This
   section defines how fields in the RTP header are used.
</t>

<t>Padding (P): 1 bit</t><t>
      If the padding bit is set, the packet contains one or more
      additional padding octets at the end which are not part of the
      payload.  The last octet of the padding contains a count of how
      many padding octets should be ignored, including itself.  Padding
      may be needed by some encryption algorithms with fixed block sizes
      or for carrying several RTP packets in a lower-layer protocol data
      unit.
</t>

<t>Extension (X): 1 bit</t><t>
      If the extension, X, bit is set, the fixed header MUST be 
      followed by exactly one header extension, with a format defined 
      in Section 5.3.1. of <xref target="rfc3550"></xref>. 
</t>

<t>Marker (M): 1 bit</t><t>
      The M bit MUST be set to zero in all packets. The receiver MUST
	  ignore the M bit.
</t>

<t>Payload Type (PT): 7 bits</t><t>
      Payload Type (PT): The assignment of an RTP payload type for this
      packet format is outside the scope of this document; it is
      specified by the RTP profile under which this payload format is
      used, or signaled dynamically out-of-band (e.g., using SDP).
</t>

<t>Timestamp: 32 bits</t><t>
      A timestamp representing the sampling time of the first sample of
      the first CELT frame in the RTP payload.  The clock frequency
      MUST be set to the sample rate of the encoded audio data and is 
	  conveyed out-of-band (e.g., as an SDP parameter).
</t>


</section>

<section anchor="celt--payload" title="CELT payload">

<t>
For the purposes of packetizing the bit stream in RTP, it is only
necessary to consider the sequence of bits as output by the CELT
encoder <xref target="celt-website"></xref>, and present the same 
sequence to the decoder.  The payload format described here maintains
this sequence.
</t>

<t>
A typical CELT frame, encoded at a high bitrate, is approx.
128 octets and the total size of the CELT frames SHOULD be kept
below the path MTU to prevent fragmentation. CELT frames MUST
NOT be split across multiple RTP packets,
</t>

<t>
An RTP packet MAY contain CELT frames of the same bit rate or of
varying bit rates, since the bitrate for the frames is explicitly 
conveyed in band with the signal. The encoding and decoding algorithm
can change the bit rate at any frame boundary, with the bit rate 
change notification provided in-band. No out-of-band notification
is required for the decoder to process changes in the bit rate 
sent by the encoder.
</t>

<t>
More than one frame may be encoded in the same RTP packet, and for
the decoder it is not possible to determine the compressed size (bit-rate) 
of each encoded frame. Thus the compressed size information MUST be explicitly
transmitted. There are two modes for conveying this information:
either the compressed size(s) are encoded for each frame at the
beginning of the RTP payload <xref target="multiple-frames"/>, or it is conveyed in the
signaling and then fixed for the duration of the session
(Low-Overhead Mode, <xref target="low-overhead"/>). Note that the compressed frame size
information must be present either way even if only single frames
are transmitted per RTP packet.
</t>

<t>
It is RECOMMENDED that sampling rates 32000, 44100, or 48000 Hz be used 
for most applications, unless a specific reason exists -- such as
requirements for a very specific packetization time. For example,
51200 Hz sampling may be useful to obtain a 5 ms packetization time
with 256-sample frames. For compatibility reasons, the sender and
receiver MUST support 48000 Hz sampling rate.
</t>

<t>
The CELT codec always produces an integer number of bytes and can 
produce any integer number of bytes, so no padding is ever required.
Bitrate adjustment SHOULD be used instead of padding.
</t>

</section>

<section anchor="multiple-frames" title="Multiple CELT frames in a RTP packet">

<t>
The bitrate used by CELT is implicitly determined by the size of the
compressed data. When more than one frame is encoded in the same packet,
it is not possible to determine the size of each encoded frame, so the
information MUST be explicitly encoded. If N frames are present in a
packet, N compressed frame sizes need to be encoded at the beginning of
the packet. Each size that is less than 255 bytes is encoded in one byte
(unsigned 8-bit integer). For sizes greater or equal to 255, a 0xff byte
is encoded, followed by the size-255. Multiple 0xff bytes are allowed if
there are more than 510 bytes transmitted. The length is always the size
of the CELT frame excluding the length byte itself. The payload MUST NOT
be padded, except in accordance with the padding bit definition in the
RTP header.
</t>

<t>
Below is an example of two CELT frames contained within one RTP 
packet.
</t>

<t><figure>
<artwork><![CDATA[
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |V=2|P|X|  CC   |M|     PT      |       sequence number         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           timestamp                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         synchronization source (SSRC) identifier              |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   |         contributing source (CSRC) identifiers                |
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | length frame 1| length frame 2|          CELT frame 1...      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         (frame 1)             |        CELT frame 2...        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          (frame 2)                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure></t>

<t>The following is an example of C code that interprets the length bytes:
</t>

<t><figure>
<artwork><![CDATA[
   int i, N, pos;
   int sizes[MAX_FRAMES][channels];
   unsigned int total_size;
   total_size=0;
   N = 0;
   pos = 0;
   while (total_size < payload_size) {
      for (i=0;i<channels;i++) {
         int s;
         int sum;
         sum = 0;
         do {
            s = payload[pos++];
            sum += s;
            total_size += s+1;
         } while (s == 255);
         sizes[N][i] = sum;
      }
      N++;
   }
]]></artwork>
</figure></t>

</section>

<section anchor="Multiple channels" title="Multiple channels">

<t>CELT supports both mono streams and stereo streams. If more than two channels are desired, it is possible to use transmit multiple streams in the same packet. In this case, the number of streams S and the pairing must be agreed with out-of-band negotiation such as SDP. Each stream can be either mono or stereo, depending on whether the channels are assumed to be correlated. For example, a 5.1 surround could have the front-left and front-right channels in a stereo stream, the rear-left and rear-right channels in a separate stereo stream, while the center and low-frequency channels would be in separate mono streams. In that example, the RTP packet would be:</t>

<t><figure>
<artwork><![CDATA[
    0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |V=2|P|X|  CC   |M|     PT      |       sequence number         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           timestamp                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         synchronization source (SSRC) identifier              |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   |         contributing source (CSRC) identifiers                |
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Front length |  rear length  | center length |  LFE length   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Front stereo                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                             ...                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ...      |        Rear stereo data...                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                             ...                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Center mono data...                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                             ...                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |      LFE mono data...         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                             ...                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure></t>

<t>In the case where streams for multiple channels are used with multiple frames of the same streams per packet, then all streams for a certain timestamp are encoded before all streams for the following timestamp. In the case of the 5.1 example above with two frames per packet, the number of compressed length fields would be S*N = 8.</t>

</section>

</section>

<section anchor="MIME registration of CELT" title="MIME registration of CELT">

<t>
Full definition of the MIME <xref target="rfc2045"></xref> type for CELT will be part of the Ogg
Vorbis MIME type definition application <xref target="rfc3534"></xref>.
</t>

<t>MIME media type name: audio</t>

<t>MIME subtype: celt</t>

<t>Optional parameters:</t>

<t>Required parameters: to be included in the Ogg MIME specification.</t>

<t>Encoding considerations:</t>

<t>Security Considerations:</t>
<t>See Section 6 of RFC 3047.</t>

<t>Interoperability considerations: none</t>

<t>Published specification:  </t>

<t>Applications which use this media type:</t>

<t>Additional information: none</t>

<t>Person &amp; email address to contact for further information:<vspace blankLines="1" />
<list style="empty">
<t>Jean-Marc Valin &lt;jean-marc.valin@octasic.com&gt;</t>
</list>
</t>

<t>Intended usage: COMMON</t>

<t>Author/Change controller:</t>

<t>
<list style="empty">
<t>Author:  Jean-Marc Valin &lt;jean-marc.valin@octasic.com&gt;</t>
<t>Change controller: Jean-Marc Valin &lt;jean-marc.valin@octasic.com&gt;</t>          
<t>Change controller: IETF AVT Working Group</t>
</list>
</t>

<t>
This transport type signifies that the content is to be interpreted
according to this document if the contents are transmitted over RTP. 
Should this transport type appear over a lossless streaming protocol
such as TCP, the content encapsulation should be interpreted as an 
Ogg Stream in accordance with <xref target="rfc3534"></xref>, with the exception that the
content of the Ogg Stream may be assumed to be CELT audio and 
CELT audio only.
</t>

</section>

<section anchor="SDP usage of CELT" title="SDP usage of CELT">

<t>
When conveying information by SDP <xref target="rfc4566"></xref>, the encoding name MUST be
set to "CELT". The sampling frequency is typically between 32000 and 48000 Hz.
Implementations MUST support 48000 Hz and SHOULD also support 44100 Hz.
</t>

<t>
The SDP parameters have the following interpretation with respect to CELT:
</t>

<t>
<list style="empty">
<t>ptime: The desired packetization time. The sender SHOULD choose a number of frames per packet that corresponds to the smallest packetization time greater or equal to the specified ptime for the selected frame size. The default is 20 ms as specified in <xref target="rfc3551"></xref></t>

<t>maxptime: The maximum packetization time desired. As specified in <xref target="rfc4566"></xref>, if the maximum is lower than the smallest packetization time determined from the chosen frame size (as described above), then that packtization time SHOULD be used despite the maxptime value. The default is "no maximum".</t>

</list>
</t>

<t>
CELT-specific parameters can be given via the "a=fmtp:" directive.
Several parameters can be given in a single a=fmtp line provided 
that they are separated by a semi-colon. The following parameters 
are defined for use in this way:
</t>

<t>
<list style="empty">
<t>bitrate: The desired bit-rate in kbit/s for the codec only (excluding
headers and the length bytes). The value MUST be rounded to an integer number
of bytes per frame. The round-to-nearest method is RECOMMENDED. The default
bit-rate value is 64 kbit/s per channel.</t>

<t>frame-size: The frame size is the duration of each frame in samples and has to be even. 
The default is 480.</t>

<t>mapping: Optional string describing the multi-channel mapping.</t>
</list>	
</t>

<t>
The selected frame-size values MUST be even. For quality and complexity 
reasons, they SHOULD also be divisible by 8 and have a prime factorization
which consists only of 2, 3, or 5 factors.
For example, powers-of-two and values such as 160, 320, 240, and 480 are
recommended. Implementations MUST support receiving and sending the default
value of 480. Implementations
SHOULD also support frame sizes of 256 and 512 since these are the ones that lead
to the lowest complexity. When frame sizes that are powers-of-two are supported,
they SHOULD be listed first in the offer and chosen over non-powers-of-two in the
answer.
</t>

<t>
Care must be taken when setting the value of ptime: and bitrate: so that the
RTP packet size does not exceed the path MTU.
</t>

<t>An example of the media representation in SDP for offering a single 
channel of CELT at 48000 samples per second might be:
</t>

<t>
<vspace blankLines="1" />
<list style="empty">
<t>m=audio 8088 RTP/AVP 97</t>
<t>a=rtpmap:97 CELT/48000/1</t>
</list>	
</t>

<t>
Note that the RTP payload type code of 97 is defined in this media
definition to be 'mapped' to the CELT codec at a 48 kHz sampling
frequency using the 'a=rtpmap' line.  Any number from 96 to 127
could have been chosen (the allowed range for dynamic types). If there
is more than one channel being encoded the rtpmap MUST specify the channel
count. When no channel count is included, the default is one channel.
</t>


<t>The following example demonstrates the use of the a=fmtp: parameters:</t>

<t>
<vspace blankLines="1" />
<list style="empty">
   	<t>m=audio 8008 RTP/AVP 97</t>
	<t>a=ptime: 25</t>
	<t>a=rtpmap:97 CELT/44100</t>
	<t>a=fmtp:97 frame-size=512;bitrate=48</t>
</list>	
</t>

<t>
This examples illustrate an offerer that wishes to receive a CELT stream at
44100 Hz, by packing two 512-sample frames in each packet (less than 25 ms)
at around 48 kbps (70 bytes per frame).
</t>

<section anchor="Multichannel Mapping" title="Multichannel Mapping">
<t>
When more than two channels are used, a mapping parameter MUST be provided.
The mapping parameter is defined as comma separated list of integers which specify the
number of channels contained in each CELT stream, OPTIONALLY followed by a '/' and a
comma separated list of channel identifiers, then OPTIONALLY another '/' and a string
which provides an application specific elaboration on any speaker-feed definitions.
The channels per stream entries MUST be either 1 or 2. The total number of
channels is indicated by the sum of the channels per stream entries. The sum
of the channel counts MUST be equal to the total number of channels.
</t>

<t>
Channel identifiers are short alphanumeric strings.
Each identifier MUST begin with a letter indicating the type of channel. 'A' MUST be
used to indicate an ambisonic channel, 'S' to indicate a speaker-feed channel, or 'O'
indicating other usage.
</t>

<t>
A channel identifier MAY be repeated, but the meaning of such repetition is application specific.
Applications SHOULD attempt to utilize channel identifiers such that mixing all identical identifiers
would produce a reasonable result.
</t>

<t>
Non-surround usage such as individual performer tracks, effect send, "order wire", or
other administrative channels may be given application specific identifiers
which MUST not conflict with the identifiers defined in this draft. These
identifiers SHOULD begin with S if it would be sensible to include them in a
mono-downmix, or O if it would be most sensible to exclude them from a
mono-downmix.
An example usage might be
mapping=2,1,2,1,1/SLguitar,SRguitar,OheadsetG,SLkeyboard,SRkeyboard,OheadsetK,SMbass,OheadsetB"
</t>

<t>
Ambisonic channels MUST follow the Furse-Malham naming and weighing
conventions for up to third order spherical<xref target="Ambisonic"></xref>.
Higher order ambisonic support is application defined but MUST NOT reuse any of WXYZRSTUVKLMNOPQ
for higher order components. For example, second order spherical ambisonics SHOULD use the
mapping "mapping=1,1,1,1,1,1,1,1,1/AW,AX,AY,AZ,AR,AS,AT,AU,AV". Any set of Ambisonic channels
MUST contain at least one "AW" channel.
</t>

<t>
Speaker-feed identifiers are named based on the intended speaker locations. "L", "R" for the left and
right speakers, respectively, in conventional stereo or the front left and right in 4, 5,
5.1, or 7.1 channel surround. "LR", "RR" for the left and right rear speakers in 4,5 or 5.1 channel surround. C" is used for a center channel, "MLFE" for a low frequency extension channel. "LS", "RS" for the side
channels in 7.1 channel surround. Additional speaker-feeds are application specific but should not
reuse the prior identifiers. 
For 5.1 surround in non-ambisonic form the mapping SHOULD be "mapping=2,2,1,1/L,R,LR,RR,C,MLFE/ITU-RBS.775-1".
When only one or two channels are used, the mapping parameter MAY be omitted, in which case the
default mapping is used. For one channel, the default is "mapping=1/C", while for two channels,
the default is "mapping=2/L,R".
</t>

<t> 
For example a stereo configuration might signal:  
<vspace blankLines="1" />
<list style="empty">
<t>m=audio 8008 RTP/AVP 97</t>
<t>a=ptime: 5</t>
<t>a=rtpmap:97 CELT/44100/2</t>
<t>a=fmtp:97 frame-size=256</t>
</list> 
Which specifies a single two-channel CELT stream according to the default
mapping.
</t>

</section>

<section anchor="low-overhead" title="Low-Overhead Mode">

<t>A low-overhead mode is defined to make more efficient use of bandwidth
when transmitting CELT frames. In that mode none of the length values need to be transmitted.
One the a=fmtp: parameter low-overhead: 
is defined and contains a single frame size, followed by a '/', followed by a comma-separated
list of the number of bytes per frame for each stream defined in the channel mapping. The number of frames per channel can thus be computed as the payload size divided by the sum of the bytes-per-frame values. 
The frame-size: parameter MUST not be specified and SHOULD be ignored if encountered
in an SDP offer or answer. The bitrate: parameter MUST also be
ignored since the low-overhead: parameter makes it redundant. When the low-overhead:
parameter is specified, the length of each frame MUST NOT be encoded in the payload and
the bit-rate MUST NOT be changed during the session.
</t>

<t>
For example a low-overhead 64 kbit/s mono stream could be signaled as:
<list style="empty">
<t>m=audio 8008 RTP/AVP 97</t>
<t>a=ptime: 5</t>
<t>a=rtpmap:97 CELT/48000/1</t>
<t>a=fmtp:97 low-overhead=256/43</t>
</list>

and a low-overhead 360 kbit/s 5.1 surround configuration could be signaled as:
<list style="empty">
<t>m=audio 8008 RTP/AVP 97</t>
<t>a=ptime: 5</t>
<t>a=rtpmap:97 CELT/48000/6</t>
<t>a=fmtp:97 low-overhead=256/86,86,43,25;mapping=2,2,1,1/L,R,LR,RR,C,MLFE/ITU-RBS.775-1</t>
</list>

In this last example, 4 bytes per packet would be saved. This corresponds to a 6 kbit/s
reduction in the overhead, although the 60 kbit/s overhead of the IP, UDP and RTP
headers is still present.
</t>

</section>

</section>

<section anchor="Congestion Control" title="Congestion Control">

<t>
CELT allows any bitrate, with a one byte per frame
resolution, without any signaling requirement or overhead.
Applications SHOULD utilize congestion control to regulate the transmitted bitrate. 
In some applications it may make sense to increase the packetization
interval rather than decreasing the codec bitrate. Congestion control
implementations should consider the users differential tolerance for high
latency and low quality. 
</t>
</section>

<section anchor="Security Considerations" title="Security Considerations">

<t>
RTP packets using the payload format defined in this specification
are subject to the security considerations discussed in the RTP
specification <xref target="rfc3550"></xref>, and in any applicable RTP profile.  The
main security considerations for the RTP packet carrying the RTP
payload format defined within this memo are confidentiality,
integrity and source authenticity.  Confidentiality is achieved by
encryption of the RTP payload.  Integrity of the RTP packets through
suitable cryptographic integrity protection mechanism.  Cryptographic
system may also allow the authentication of the source of the
payload.  A suitable security mechanism for this RTP payload format
should provide confidentiality, integrity protection and at least
source authentication capable of determining if an RTP packet is from
a member of the RTP session or not.
</t>

<t>
Note that the appropriate mechanism to provide security to RTP and
payloads following this memo may vary.  It is dependent on the
application, the transport, and the signalling protocol employed.
Therefore a single mechanism is not sufficient, although if suitable
the usage of SRTP <xref target="rfc3711"></xref> is recommended.  Other mechanism that may
be used are IPsec <xref target="rfc4301"></xref> and TLS <xref target="rfc5246"></xref> (RTP over TCP), but also other alternatives may exist.
</t>

<t>
This RTP payload format and its media decoder do not exhibit any
significant non-uniformity in the receiver-side computational
complexity for packet processing, and thus are unlikely to pose a
denial-of-service threat due to the receipt of pathological data.
Nor does the RTP payload format contain any active content.
</t>

<t>
Because this format supports VBR operation small amounts of information
about the transmitted audio may be leaked by a length preserving
cryptographic transport. Accordingly, when CELT is used inside a secure
transport the sender SHOULD restrict the use of VBR to congestion control purposes.
</t>

<t>
CELT implementations will typically exhibit tiny content-sensitive encoding
time variances. Since transmission is usually triggered by an accurate
hardware clock and the encoded data is typically transmitted as soon as
encoding is complete this variance may result in a small amount of
additional frame to frame jitter which could be measured by a third-party.
Encrypted implementations SHOULD transmit packets at fixed intervals to
avoid the possible information leak. 
</t>

</section> 

<section anchor="Acknowledgments" title="Acknowledgments">

<t>
The authors would also like to thank the following people for their input:
Timothy B. Terriberry, Ben Schwartz, Alexander Carot, Thorvald Natvig, 
Brian West, Steve Underwood, and Anthony Minessale.

</t>
</section> 

</middle>

<back>

<references title="Normative References">

<reference anchor="rfc2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels </title>
<author initials="S." surname="Bradner" fullname="Scott Bradner"><organization/></author>
</front>
<seriesInfo name="RFC" value="2119" />
</reference> 

<reference anchor="rfc3550">
<front>
<title>RTP: A Transport Protocol for real-time applications</title>
<author initials="H." surname="Schulzrinne" fullname=""><organization/></author>
<author initials="S." surname="Casner" fullname=""><organization/></author>
<author initials="R." surname="Frederick" fullname=""><organization/></author>
<author initials="V." surname="Jacobson" fullname=""><organization/></author>
</front>
<seriesInfo name="RFC" value="3550" />
</reference> 

<reference anchor="rfc2045">
<front>
<title>Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
<author initials="" surname="" fullname=""><organization/></author>
<date month="November" year="1998" />
</front>
<seriesInfo name="RFC" value="2045" />
</reference> 

<reference anchor="rfc4566">
<front>
<title>SDP: Session Description Protocol</title>
<author initials="M." surname="Handley" fullname=""><organization/></author>
<author initials="V." surname="Jacobson" fullname=""><organization/></author>
<author initials="C." surname="Perkins" fullname=""><organization/></author>
<date month="July" year="2006" />
</front>
<seriesInfo name="RFC" value="4566" />
</reference> 

<reference anchor="rfc3551">
<front>
<title>RTP Profile for Audio and Video Conferences with Minimal Control.</title>
<author initials="H." surname="Schulzrinne" fullname=""><organization/></author>
<author initials="S." surname="Casner" fullname=""><organization/></author>
<date month="July" year="2003" />
</front>
<seriesInfo name="RFC" value="3551" />
</reference> 

<reference anchor="rfc3534">
<front>
<title>The application/ogg Media Type</title>
<author initials="L." surname="Walleij" fullname=""><organization/></author>
<date month="May" year="2003" />
</front>
<seriesInfo name="RFC" value="3534" />
</reference> 

<reference anchor="rfc3711">
<front>
<title>The Secure Real-time Transport Protocol (SRTP)</title>
<author initials="M." surname="Baugher" fullname=""><organization/></author>
<author initials="D." surname="McGrew" fullname=""><organization/></author>
<author initials="M." surname="Naslund" fullname=""><organization/></author>
<author initials="E." surname="Carrara" fullname=""><organization/></author>
<author initials="K." surname="Norrman" fullname=""><organization/></author>
<date month="March" year="2004" />
</front>
<seriesInfo name="RFC" value="3711" />
</reference> 

<reference anchor="rfc4301">
<front>
<title>Security Architecture for the Internet Protocol</title>
<author initials="S." surname="Kent" fullname=""><organization/></author>
<author initials="K." surname="Seo" fullname=""><organization/></author>
<date month="December" year="2005" />
</front>
<seriesInfo name="RFC" value="4301" />
</reference> 

<reference anchor="rfc5246">
<front>
<title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
<author initials="T." surname="Dierks" fullname=""><organization/></author>
<author initials="E." surname="Rescorla" fullname=""><organization/></author>
<date month="August" year="2008" />
</front>
<seriesInfo name="RFC" value="5246" />
</reference> 


</references> 

<references title="Informative References">

<reference anchor="celt-website">
<front>
<title>The CELT ultra-low delay audio codec</title>
<author initials="" surname="Xiph.Org Foundation" fullname="Xiph.Org Foundation"><organization/></author>
</front>
<seriesInfo name="CELT website" value="http://www.celt-codec.org/" />
</reference> 

<reference anchor="Ambisonic">
<front>
<title>Higher order Ambisonic systems</title>
<author initials="D." surname="Malham" fullname="Dave
Malham"><organization/></author>
<date month="December" year="2003" />
</front>
<seriesInfo name="Paper"
value="http://www.york.ac.uk/inst/mustech/3d_audio/higher_order_ambisonics.pdf" />
</reference> 

</references> 

</back>
</rfc>