RFC 3389
Real-time Transport Protocol (RTP) Payload for Comfort Noise (CN)
RFC 3389 π Real-time Transport Protocol (RTP) Payload for Comfort Noise (CN)
okay bestie, let's get into this one π here's the title block tea:
- Network Working Group πΈ the group that put this together
- Request for Comments: 3389 π¦
- Author: R. Zopf π
- Organization: Lucent Technologies β¨
- Category: Standards Track π
- Date: September 2002 ποΈ
- Obsoletes / Updates: nothing is listed in the header π
Status of this Memo π
so this doc is an Internet standards track protocol for the whole Internet community, and it's literally asking for your thoughts and improvement ideas π¬ for where this protocol stands in standardization, check the current "Internet Official Protocol Standards" (STD 1) π and distribution of this memo is unlimited π
Copyright Notice Β©οΈ
Copyright (C) The Internet Society (2002). All Rights Reserved.
Abstract π
this doc describes a Real-time Transport Protocol (RTP) payload format for sending comfort noise (CN) π§ the CN payload type is mainly meant for audio codecs that don't have comfort noise built into the codec itself π ββοΈ like ITU-T Recommendations G.711, G.726, G.727, G.728, and G.722 π
1. Conventions Used in This Document π
okay this part is the key word rulebook π§ the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read the way RFC-2119 [7] explains them π₯
2. Introduction πΈ
okay so this doc describes a RTP [1] payload format for sending comfort noise πΆ the payload format is based on Appendix II of ITU-T Recommendation G.711 [8], which defines a comfort noise payload format (or bit-stream) for ITU-T G.711 [2] use in packet-based multimedia communication systems π
the payload format is generic π§ and it may also be used with other audio codecs that don't have built-in Discontinuous Transmission (DTX) capability, like ITU-T Recommendations G.726 [3], G.727 [4], G.728 [5], and G.722 [6] π¦ the payload format gives you a minimum interoperability spec for communicating comfort noise parameters π and the comfort noise analysis and synthesis, plus the Voice Activity Detection (VAD) and DTX algorithms, are unspecified and left up to each implementation π«Ά
but!! an example solution for G.711 has been tested and is described in the Appendix [8] β¨ it uses the VAD and DTX of G.729 Annex B [9] and a comfort noise generation algorithm (CNG) that's provided in the Appendix for information π
the comfort noise payload, also known as a Silence Insertion Descriptor (SID) frame, is a single octet describing the noise level and MAY contain spectral information in subsequent octets π an earlier version of the CN payload format only had the noise level byte and was defined in draft revisions of the RFC 1890 π°οΈ the extended payload format in this document should be backward compatible with the earlier version, assuming only the first byte is interpreted and any extra spectral information bytes are ignored π
3. CN Payload Definition π
the comfort noise payload has a description of the noise level and spectral information in the form of reflection coefficients for an all-pole model of the noise π§ including spectral information is OPTIONAL β¨ and the model order (number of coefficients) is left unspecified π¦ the encoder may pick an appropriate model order based on things like quality, complexity, expected environmental noise, and signal bandwidth π the model order isn't sent explicitly, since the receiver can work out the number of coefficients from the payload length π§ and the decoder may reduce the model order by setting higher order reflection coefficients to zero if it wants to, to cut complexity or for other reasons πΈ
3.1 Noise Level π
the magnitude of the noise level is packed into the least significant bits of the noise-level byte, with the most significant bit unused and always set to 0 π see Figure 1 below π the least significant bit of the noise level magnitude goes into the least significant bit of the byte π―
the noise level is written in -dBov, with values from 0 to 127 representing 0 to -127 dBov π dBov is the level relative to the overload of the system π (Note: being relative to the overload point of a system is especially handy for digital implementations, since you don't need to know the relative calibration of the analog circuitry π) for example, in a u-law system the reference is a square wave with values +/- 8031, and that square wave represents 0dBov π this translates into 6.18dBm0 β¨
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|0| level |
+-+-+-+-+-+-+-+-+
Figure 1: Noise Level Packing
3.2 Spectral Information π
the spectral info is sent using reflection coefficients [8] π§ each reflection coefficient can have values between -1 and 1, and it gets quantized uniformly using 8 bits π₯ the quantized value is represented by the 8 bit index N, where N=0..,254, and index N=255 is reserved for future use π each index N is packed into its own byte with the MSB first π«Ά you get the quantized value of each reflection coefficient, k_i, from its index with this formula:
k_i(N_i) = 258*(N_i-127) for N_i = 0...254; -1 < k_i < 1
-------------
32768
3.3 Payload Packing π¦
the first byte of the payload MUST contain the noise level, as shown in Figure 1 π the quantized reflection coefficients go in the subsequent bytes in ascending order, like in Figure 2, where M is the model order π the total payload length is M+1 bytes β¨ also, a 0th order model (so no spectral envelope info) just boils down to sending the energy level πΈ
Byte 1 2 3 ... M+1
+-----+-----+-----+-----+-----+
|level| N1 | N2 | ... | NM |
+-----+-----+-----+-----+-----+
Figure 2: CN Payload Packing Format
4. Usage of RTP π‘
the RTP header for the comfort noise packet SHOULD be built as if the comfort noise were an independent codec π so the RTP timestamp marks the beginning of the comfort noise period β° when this payload format is used under the RTP profile from RFC 1890 [10], a static payload type of 13 is assigned for an RTP timestamp clock rate of 8,000 Hz π¦ if you need other rates, they MUST be defined through dynamic payload types π the RTP packet SHOULD NOT have the marker bit set π«
each RTP packet with comfort noise MUST contain exactly one CN payload per channel π₯ this is required because the CN payload has a variable length π§ if multiple audio channels are used, each channel MUST use the same spectral model order 'M' π
5. Guidelines for Use π
an audio codec with DTX capabilities usually has VAD, DTX, and CNG algorithms π§ the VAD's whole job is to tell active voice segments apart from inactive ones in the input signal π during inactive voice segments, the CNG's role is to describe the ambient noise well while keeping the transmission rate low π a CN payload (or SID frame) with a description of the noise gets sent to the receiver to drive the CNG πΆ the DTX algorithm decides when a CN payload gets transmitted π― during active voice segments, packets from the voice codec are sent, marked in the RTP header by the static or dynamic payload type for that codec π at the start of an inactive voice segment (silence period), a CN packet goes out in the same RTP stream, marked with the CN payload type β¨ the CN packet update rate is left implementation specific π¦ for example, the CN packet might be sent periodically, or only when the background noise characteristics change significantly πΈ the CNG algorithm at the receiver uses the info in the CN payload to update its noise generation model, then makes an appropriate amount of comfort noise π§
the CN payload format gives you a minimum interoperability spec for communicating comfort noise parameters π the comfort noise analysis and synthesis, plus the VAD and DTX algorithms, are unspecified and left implementation-specific π«Ά but an example solution for G.711 has been tested and is described in Appendix II of ITU-T Recommendation G.711 [8] π it uses the VAD and DTX of G.729 Annex B [9] and a comfort noise generation algorithm (CNG), which is provided in the Appendix for information π§ more guidelines for use, like the factors that affect system performance when designing the VAD/DTX/CNG algorithms, are in the Appendix too π
5.1 Usage of SDP π
when you use the Session Description Protocol (SDP) [11] to specify RTP payload info, comfort noise is indicated by including a payload type for CN on the media description line π when using CN with the RTP/AVP profile [10] and a codec whose RTP timestamp clock rate is 8000 Hz, like G.711 (PCMU, static payload type 0), you can use the static payload type 13 for CN π¦
m=audio 49230 RTP/AVP 0 13
when using CN with a codec that has a different RTP timestamp clock rate, a dynamic payload type mapping (rtpmap attribute) is required π
this example shows CN used with the G.722.1 codec (see RFC 3047 [12]) π
m=audio 49230 RTP/AVP 101 102
a=rtpmap:101 G7221/16000
a=fmtp:121 bitrate=24000
a=rtpmap:102 CN/16000
leaving out a payload type for CN on the media description line means this comfort noise payload format will NOT be used π ββοΈ but it does NOT mean silence won't be suppressed π RTP allows discontinuous transmission (silence suppression) on any audio payload format π the receiver can detect silence suppression on the first packet after the silence, by seeing that the RTP timestamp isn't contiguous with the end of the interval covered by the previous packet, even though the RTP sequence number only went up by one π΅οΈββοΈ the RTP marker bit is also normally set on a packet like that β¨
7. Security Considerations π
okay bestie, security time π«Ά RTP packets that use the payload format from this spec are subject to the security considerations in the RTP spec [1]. so if you want your media streams to be confidential, you get that from encryption π and because the payload format is end-to-end, encryption MAY be done after encapsulation, and the two don't clash at all β¨
as this format carries background noise, there are no significant security, confidentiality, or authentication concerns π literally just vibes, no drama π§
8. References π
[1] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson,
"RTP: A Transport Protocol for Real-Time Applications", RFC
1889, January 1996.
[2] ITU Recommendation G.711 (11/88) - Pulse code modulation (PCM)
of voice frequencies.
[3] ITU Recommendation G.726 (12/90) - 40, 32, 24, 16 kbit/s
Adaptive Differential Pulse Code Modulation (ADPCM).
[4] ITU Recommendation G.727 (12/90) - 5-, 4-, 3- and 2-bits sample
embedded adaptive differential pulse code modulation (ADPCM).
[5] ITU Recommendation G.728 (09/92) - Coding of speech at 16
kbits/s using low-delay code excited linear prediction.
[6] ITU Recommendation G.722 (11/88) - 7 kHz audio-coding within 64
kbit/s.
[7] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[8] Appendix II to Recommendation G.711 (02/2000) - A comfort noise
payload definition for ITU-T G.711 use in packet-based
multimedia communication systems.
[9] Annex B (08/97) to Recommendation G.729 - C source code and test
vectors for implementation verification of the algorithm of the
G.729 silence compression scheme.
[10] Schulzrinne, H., "RTP Profile for Audio and Video Conferences
with Minimal Control", RFC 1890, January 1996.
[11] Handley, M. and V. Jacobson, "SDP: Session Description
Protocol", RFC 2327, April 1998.
[12] Luthi, P., "RTP Payload Format for ITU-T Recommendation
G.722.1", RFC 3047, January 2001.
9. Author's Address ποΈ
Robert Zopf
Lucent Technologies
INS Access VoIP Networks
2G-234A
101 Crawfords Corner Rd
Holmdel, NJ 07733-3030 US
Phone: 1-732-949-1667
Fax: 1-732-949-7016
EMail: zopf@lucent.com
10. Full Copyright Statement π
okay this part is the legal stuff, but it's still important so i'm keeping every word π
Copyright (C) The Internet Society (2002). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement π
Funding for the RFC Editor function is currently provided by the Internet Society. πΈ
π¦ where this page comes from
- ietf: rfc3389 2002-10
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms