idnits 2.17.1 draft-ietf-rtcweb-audio-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (September 5, 2014) is 3520 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'Opus-RTP' Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group JM. Valin 3 Internet-Draft Mozilla 4 Intended status: Standards Track C. Bran 5 Expires: March 9, 2015 Plantronics 6 September 5, 2014 8 WebRTC Audio Codec and Processing Requirements 9 draft-ietf-rtcweb-audio-06 11 Abstract 13 This document outlines the audio codec and processing requirements 14 for WebRTC client application and endpoint devices. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on March 9, 2015. 33 Copyright Notice 35 Copyright (c) 2014 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 52 3. Codec Requirements . . . . . . . . . . . . . . . . . . . . . 2 53 4. Audio Level . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 5. Acoustic Echo Cancellation (AEC) . . . . . . . . . . . . . . 4 55 6. Legacy VoIP Interoperability . . . . . . . . . . . . . . . . 5 56 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 57 8. Security Considerations . . . . . . . . . . . . . . . . . . . 5 58 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 59 10. Normative References . . . . . . . . . . . . . . . . . . . . 5 60 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 62 1. Introduction 64 An integral part of the success and adoption of the Web Real Time 65 Communications (WebRTC) will be the voice and video interoperability 66 between WebRTC applications. This specification will outline the 67 audio processing and codec requirements for WebRTC client 68 implementations. 70 2. Terminology 72 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 73 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 74 document are to be interpreted as described in RFC 2119 [RFC2119]. 76 3. Codec Requirements 78 To ensure a baseline level of interoperability between WebRTC 79 clients, a minimum set of required codecs are specified below. If 80 other suitable audio codecs are available for the browser to use, it 81 is RECOMMENDED that they are also be included in the offer in order 82 to maximize the possibility to establish the session without the need 83 for audio transcoding. 85 WebRTC clients are REQUIRED to implement the following audio codecs: 87 o Opus [RFC6716] with the payload format specified in [Opus-RTP]. 89 o G.711 PCMA and PCMU with the payload format specified in section 90 4.5.14 of [RFC3551]. 92 o [RFC3389] comfort noise (CN). Receivers MUST support RFC3389 CN 93 for streams encoded with G.711 or any other supported codec that 94 does not provide its own CN. Since Opus provides its own CN 95 mechanism, the use of RFC3389 CN with Opus is NOT RECOMMENDED. 96 Use of DTX/CN by senders is OPTIONAL. 98 o The audio/telephone-event media format as specified in [RFC4733]. 99 WebRTC clients are REQUIRED to be able to generate and consume the 100 following events: 102 +------------+--------------------------------+-----------+ 103 |Event Code | Event Name | Reference | 104 +------------+--------------------------------+-----------+ 105 | 0 | DTMF digit "0" | RFC4733 | 106 | 1 | DTMF digit "1" | RFC4733 | 107 | 2 | DTMF digit "2" | RFC4733 | 108 | 3 | DTMF digit "3" | RFC4733 | 109 | 4 | DTMF digit "4" | RFC4733 | 110 | 5 | DTMF digit "5" | RFC4733 | 111 | 6 | DTMF digit "6" | RFC4733 | 112 | 7 | DTMF digit "7" | RFC4733 | 113 | 8 | DTMF digit "8" | RFC4733 | 114 | 9 | DTMF digit "9" | RFC4733 | 115 | 10 | DTMF digit "*" | RFC4733 | 116 | 11 | DTMF digit "#" | RFC4733 | 117 +------------+--------------------------------+-----------+ 119 For all cases where the client is able to process audio at a sampling 120 rate higher than 8 kHz, it is RECOMMENDED that Opus be offered before 121 PCMA/PCMU. For Opus, all modes MUST be supported on the decoder 122 side. The choice of encoder-side modes is left to the implementer. 123 Clients MAY use the offer/answer mechanism to signal a preference for 124 a particular mode or ptime. 126 4. Audio Level 128 It is desirable to standardize the "on the wire" audio level for 129 speech transmission to avoid users having to manually adjust the 130 playback and to facilitate mixing in conferencing applications. It 131 is also desirable to be consistent with ITU-T recommendations G.169 132 and G.115, which recommend an active audio level of -19 dBm0. 133 However, unlike G.169 and G.115, the audio for WebRTC is not 134 constrained to have a passband specified by G.712 and can in fact be 135 sampled at any sampling rate from 8 kHz to 48 kHz and up. For this 136 reason, the level SHOULD be normalized by only considering 137 frequencies above 300 Hz, regardless of the sampling rate used. The 138 level SHOULD also be adapted to avoid clipping, either by lowering 139 the gain to a level below -19 dBm0, or through the use of a 140 compressor. 142 Assuming 16-bit PCM with a value of +/-32767, -19 dBm0 corresponds to 143 a root mean square (RMS) level of 2600. Only active speech should be 144 considered in the RMS calculation. If the client has control over 145 the entire audio capture path, as is typically the case for a regular 146 phone, then it is RECOMMENDED that the gain be adjusted in such a way 147 that active speech have a level of 2600 (-19 dBm0) for an average 148 speaker. If the client does not have control over the entire audio 149 capture, as is typically the case for a software client, then the 150 client SHOULD use automatic gain control (AGC) to dynamically adjust 151 the level to 2600 (-19 dBm0) +/- 6 dB. For music or desktop sharing 152 applications, the level SHOULD NOT be automatically adjusted and the 153 client SHOULD allow the user to set the gain manually. 155 The RECOMMENDED filter for normalizing the signal energy is a second- 156 order Butterworth filter with a 300 Hz cutoff frequency. 158 It is common for the audio output on some devices to be "calibrated" 159 for playing back pre-recorded "commercial" music, which is typically 160 around 12 dB louder than the level recommended in this section. 161 Because of this, clients MAY increase the gain before playback. 163 5. Acoustic Echo Cancellation (AEC) 165 It is plausible that the dominant near to mid-term WebRTC usage model 166 will be people using the interactive audio and video capabilities to 167 communicate with each other via web browsers running on a notebook 168 computer that has built-in microphone and speakers. The notebook-as- 169 communication-device paradigm presents challenging echo cancellation 170 problems, the specific remedy of which will not be mandated here. 171 However, while no specific algorithm or standard will be required by 172 WebRTC compatible clients, echo cancellation will improve the user 173 experience and should be implemented by the endpoint device. 175 WebRTC clients SHOULD include an AEC or some other form of echo 176 control and if that is not possible, the clients SHOULD ensure that 177 the speaker-to-microphone gain is below unity at all frequencies to 178 avoid instability when none of the client has echo control. For 179 clients that do not control the audio capture and playback hardware, 180 it is RECOMMENDED to support echo cancellation between devices 181 running at slightly different sampling rates, such as when a webcam 182 is used for microphone. 184 Clients SHOULD allow the entire AEC and/or the non-linear processing 185 (NLP) to be turned off for applications, such as music, that do not 186 behave well with the spectral attenuation methods typically used in 187 NLPs. Similarly, clients SHOULD have the ability to detect the 188 presence of a headset and disable echo cancellation. 190 For some applications where the remote client may not have an echo 191 canceller, the local client MAY include a far-end echo canceller, but 192 if that is the case, it SHOULD be disabled by default. 194 6. Legacy VoIP Interoperability 196 The codec requirements above will ensure, at a minimum, voice 197 interoperability capabilities between WebRTC client applications and 198 legacy phone systems. 200 7. IANA Considerations 202 This document makes no request of IANA. 204 Note to RFC Editor: this section may be removed on publication as an 205 RFC. 207 8. Security Considerations 209 Implementers should consider whether the use of VBR is appropriate 210 for their application based on [RFC6562]. Encryption and 211 authentication issues are beyond the scope of this document. 213 9. Acknowledgements 215 This draft incorporates ideas and text from various other drafts. In 216 particularly we would like to acknowledge, and say thanks for, work 217 we incorporated from Harald Alvestrand and Cullen Jennings. 219 10. Normative References 221 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 222 Requirement Levels", BCP 14, RFC 2119, March 1997. 224 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 225 Video Conferences with Minimal Control", STD 65, RFC 3551, 226 July 2003. 228 [RFC3389] Zopf, R., "Real-time Transport Protocol (RTP) Payload for 229 Comfort Noise (CN)", RFC 3389, September 2002. 231 [RFC4733] Schulzrinne, H. and T. Taylor, "RTP Payload for DTMF 232 Digits, Telephony Tones, and Telephony Signals", RFC 4733, 233 December 2006. 235 [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the 236 Opus Audio Codec", RFC 6716, September 2012. 238 [RFC6562] Perkins, C. and JM. Valin, "Guidelines for the Use of 239 Variable Bit Rate Audio with Secure RTP", RFC 6562, March 240 2012. 242 [Opus-RTP] 243 Spittka, J., Vos, K., and JM. Valin, "RTP Payload Format 244 for Opus Codec", August 2013. 246 Authors' Addresses 248 Jean-Marc Valin 249 Mozilla 250 331 E. Evelyn Avenue 251 Mountain View, CA 94041 252 USA 254 Email: jmvalin@jmvalin.ca 256 Cary Bran 257 Plantronics 258 345 Encinial Street 259 Santa Cruz, CA 95060 260 USA 262 Phone: +1 206 661-2398 263 Email: cary.bran@plantronics.com