idnits 2.17.1 draft-ietf-rtcweb-audio-11.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 date (April 21, 2016) is 2924 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) == Outdated reference: A later version (-12) exists of draft-ietf-rtcweb-security-08 == Outdated reference: A later version (-20) exists of draft-ietf-rtcweb-security-arch-11 == Outdated reference: A later version (-26) exists of draft-ietf-rtcweb-rtp-usage-25 == Outdated reference: A later version (-06) exists of draft-ietf-rtcweb-audio-codecs-for-interop-05 Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). 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: October 23, 2016 Plantronics 6 April 21, 2016 8 WebRTC Audio Codec and Processing Requirements 9 draft-ietf-rtcweb-audio-11 11 Abstract 13 This document outlines the audio codec and processing requirements 14 for WebRTC endpoints. 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 October 23, 2016. 33 Copyright Notice 35 Copyright (c) 2016 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 . . . . . . . . . . . . . . . . . . . . . . . . . 4 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 . . . . . . . . . . . . . . . . . . . . . . 6 59 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 60 10.1. Normative References . . . . . . . . . . . . . . . . . . 6 61 10.2. Informative References . . . . . . . . . . . . . . . . . 7 62 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 64 1. Introduction 66 An integral part of the success and adoption of the Web Real Time 67 Communications (WebRTC) will be the voice and video interoperability 68 between WebRTC applications. This specification will outline the 69 audio processing and codec requirements for WebRTC endpoints. 71 2. Terminology 73 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 74 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 75 "OPTIONAL" in this document are to be interpreted as described in RFC 76 2119 [RFC2119]. 78 3. Codec Requirements 80 To ensure a baseline level of interoperability between WebRTC 81 endpoints, a minimum set of required codecs are specified below. If 82 other suitable audio codecs are available for the WebRTC endpoint to 83 use, it is RECOMMENDED that they are also be included in the offer in 84 order to maximize the possibility to establish the session without 85 the need for audio transcoding. 87 WebRTC endpoints are REQUIRED to implement the following audio 88 codecs: 90 o Opus [RFC6716] with the payload format specified in [RFC7587]. 92 o G.711 PCMA and PCMU with the payload format specified in section 93 4.5.14 of [RFC3551]. 95 o [RFC3389] comfort noise (CN). WebRTC endpoints MUST support 96 RFC3389 CN for streams encoded with G.711 or any other supported 97 codec that does not provide its own CN. Since Opus provides its 98 own CN mechanism, the use of RFC3389 CN with Opus is NOT 99 RECOMMENDED. Use of DTX/CN by senders is OPTIONAL. 101 o The audio/telephone-event media format as specified in [RFC4733]. 102 The endpoints MAY send DTMF events at any time and SHOULD suppress 103 in-band DTMF tones, if any. DTMF events generated by a WebRTC 104 endpoint MUST have a duration of no more than 8000 ms and no less 105 than 40 ms. The recommended default duration is 100 ms for each 106 tone. The gap between events MUST be no less than 30 ms; the 107 recommended default gap duration is 70 ms. WebRTC endpoints are 108 not required to do anything with RFC 4733 tones sent to them, 109 except gracefully drop them. There is currently no API to inform 110 JavaScript about the received DTMF or other RFC 4733 tones. 111 WebRTC endpoints are REQUIRED to be able to generate and consume 112 the following events: 114 +------------+--------------------------------+-----------+ 115 |Event Code | Event Name | Reference | 116 +------------+--------------------------------+-----------+ 117 | 0 | DTMF digit "0" | RFC4733 | 118 | 1 | DTMF digit "1" | RFC4733 | 119 | 2 | DTMF digit "2" | RFC4733 | 120 | 3 | DTMF digit "3" | RFC4733 | 121 | 4 | DTMF digit "4" | RFC4733 | 122 | 5 | DTMF digit "5" | RFC4733 | 123 | 6 | DTMF digit "6" | RFC4733 | 124 | 7 | DTMF digit "7" | RFC4733 | 125 | 8 | DTMF digit "8" | RFC4733 | 126 | 9 | DTMF digit "9" | RFC4733 | 127 | 10 | DTMF digit "*" | RFC4733 | 128 | 11 | DTMF digit "#" | RFC4733 | 129 | 12 | DTMF digit "A" | RFC4733 | 130 | 13 | DTMF digit "B" | RFC4733 | 131 | 14 | DTMF digit "C" | RFC4733 | 132 | 15 | DTMF digit "D" | RFC4733 | 133 +------------+--------------------------------+-----------+ 135 For all cases where the endpoint is able to process audio at a 136 sampling rate higher than 8 kHz, it is RECOMMENDED that Opus be 137 offered before PCMA/PCMU. For Opus, all modes MUST be supported on 138 the decoder side. The choice of encoder-side modes is left to the 139 implementer. Endpoints MAY use the offer/answer mechanism to signal 140 a preference for a particular mode or ptime. 142 For additional information on implementing codecs other than the 143 mandatory-to-implement codecs listed above, refer to 144 [I-D.ietf-rtcweb-audio-codecs-for-interop]. 146 4. Audio Level 148 It is desirable to standardize the "on the wire" audio level for 149 speech transmission to avoid users having to manually adjust the 150 playback and to facilitate mixing in conferencing applications. It 151 is also desirable to be consistent with ITU-T recommendations G.169 152 and G.115, which recommend an active audio level of -19 dBm0. 153 However, unlike G.169 and G.115, the audio for WebRTC is not 154 constrained to have a passband specified by G.712 and can in fact be 155 sampled at any sampling rate from 8 kHz to 48 kHz and up. For this 156 reason, the level SHOULD be normalized by only considering 157 frequencies above 300 Hz, regardless of the sampling rate used. The 158 level SHOULD also be adapted to avoid clipping, either by lowering 159 the gain to a level below -19 dBm0, or through the use of a 160 compressor. 162 Assuming 16-bit PCM with a value of +/-32767, -19 dBm0 corresponds to 163 a root mean square (RMS) level of 2600. Only active speech should be 164 considered in the RMS calculation. If the endpoint has control over 165 the entire audio capture path, as is typically the case for a regular 166 phone, then it is RECOMMENDED that the gain be adjusted in such a way 167 that active speech have a level of 2600 (-19 dBm0) for an average 168 speaker. If the endpoint does not have control over the entire audio 169 capture, as is typically the case for a software endpoint, then the 170 endpoint SHOULD use automatic gain control (AGC) to dynamically 171 adjust the level to 2600 (-19 dBm0) +/- 6 dB. For music or desktop 172 sharing applications, the level SHOULD NOT be automatically adjusted 173 and the endpoint SHOULD allow the user to set the gain manually. 175 The RECOMMENDED filter for normalizing the signal energy is a second- 176 order Butterworth filter with a 300 Hz cutoff frequency. 178 It is common for the audio output on some devices to be "calibrated" 179 for playing back pre-recorded "commercial" music, which is typically 180 around 12 dB louder than the level recommended in this section. 181 Because of this, endpoints MAY increase the gain before playback. 183 5. Acoustic Echo Cancellation (AEC) 185 It is plausible that the dominant near to mid-term WebRTC usage model 186 will be people using the interactive audio and video capabilities to 187 communicate with each other via web browsers running on a notebook 188 computer that has built-in microphone and speakers. The notebook-as- 189 communication-device paradigm presents challenging echo cancellation 190 problems, the specific remedy of which will not be mandated here. 191 However, while no specific algorithm or standard will be required by 192 WebRTC-compatible endpoints, echo cancellation will improve the user 193 experience and should be implemented by the endpoint device. 195 WebRTC endpoints SHOULD include an AEC or some other form of echo 196 control. On general purpose platforms (e.g. PC), it is common for 197 the audio capture ADC and the audio playback DAC to use different 198 clocks. In these cases, such as when a webcam is used for capture 199 and a separate soundcard is used for playback, the sampling rates are 200 likely to differ slightly. Endpoint AECs SHOULD be robust to such 201 conditions, unless they are shipped along with hardware that 202 guarantees capture and playback to be sampled from the same clock. 204 Endpoints SHOULD allow the entire AEC and/or the non-linear 205 processing (NLP) to be turned off for applications, such as music, 206 that do not behave well with the spectral attenuation methods 207 typically used in NLPs. Similarly, endpoints SHOULD have the ability 208 to detect the presence of a headset and disable echo cancellation. 210 For some applications where the remote endpoint may not have an echo 211 canceller, the local endpoint MAY include a far-end echo canceller, 212 but if that is the case, it SHOULD be disabled by default. 214 6. Legacy VoIP Interoperability 216 The codec requirements above will ensure, at a minimum, voice 217 interoperability capabilities between WebRTC endpoints and legacy 218 phone systems that support G.711. 220 7. IANA Considerations 222 This document makes no request of IANA. 224 Note to RFC Editor: this section may be removed on publication as an 225 RFC. 227 8. Security Considerations 229 For security considerations regarding the codecs themselves please 230 refer their specifications, including [RFC6716], [RFC7587], 231 [RFC3551], [RFC3389], and [RFC4733]. Likewise, consult the RTP base 232 specification for RTP-based security considerations. WebRTC security 233 is further discussed in [I-D.ietf-rtcweb-security] and 234 [I-D.ietf-rtcweb-security-arch] and [I-D.ietf-rtcweb-rtp-usage]. 236 Implementers should consider whether the use of variable bitrate is 237 appropriate for their application based on [RFC6562]. Encryption and 238 authentication issues are beyond the scope of this document. 240 9. Acknowledgements 242 This draft incorporates ideas and text from various other drafts. In 243 particular we would like to acknowledge, and say thanks for, work we 244 incorporated from Harald Alvestrand and Cullen Jennings. 246 10. References 248 10.1. Normative References 250 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 251 Requirement Levels", BCP 14, RFC 2119, 252 DOI 10.17487/RFC2119, March 1997, 253 . 255 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 256 Video Conferences with Minimal Control", STD 65, RFC 3551, 257 DOI 10.17487/RFC3551, July 2003, 258 . 260 [RFC3389] Zopf, R., "Real-time Transport Protocol (RTP) Payload for 261 Comfort Noise (CN)", RFC 3389, DOI 10.17487/RFC3389, 262 September 2002, . 264 [RFC4733] Schulzrinne, H. and T. Taylor, "RTP Payload for DTMF 265 Digits, Telephony Tones, and Telephony Signals", RFC 4733, 266 DOI 10.17487/RFC4733, December 2006, 267 . 269 [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the 270 Opus Audio Codec", RFC 6716, DOI 10.17487/RFC6716, 271 September 2012, . 273 [RFC6562] Perkins, C. and JM. Valin, "Guidelines for the Use of 274 Variable Bit Rate Audio with Secure RTP", RFC 6562, 275 DOI 10.17487/RFC6562, March 2012, 276 . 278 [RFC7587] Spittka, J., Vos, K., and JM. Valin, "RTP Payload Format 279 for the Opus Speech and Audio Codec", RFC 7587, 280 DOI 10.17487/RFC7587, June 2015, 281 . 283 10.2. Informative References 285 [I-D.ietf-rtcweb-security] 286 Rescorla, E., "Security Considerations for WebRTC", draft- 287 ietf-rtcweb-security-08 (work in progress), February 2015. 289 [I-D.ietf-rtcweb-security-arch] 290 Rescorla, E., "WebRTC Security Architecture", draft-ietf- 291 rtcweb-security-arch-11 (work in progress), March 2015. 293 [I-D.ietf-rtcweb-rtp-usage] 294 Perkins, C., Westerlund, M., and J. Ott, "Web Real-Time 295 Communication (WebRTC): Media Transport and Use of RTP", 296 draft-ietf-rtcweb-rtp-usage-25 (work in progress), June 297 2015. 299 [I-D.ietf-rtcweb-audio-codecs-for-interop] 300 Proust, S., "Additional WebRTC audio codecs for 301 interoperability.", draft-ietf-rtcweb-audio-codecs-for- 302 interop-05 (work in progress), February 2016. 304 Authors' Addresses 306 Jean-Marc Valin 307 Mozilla 308 331 E. Evelyn Avenue 309 Mountain View, CA 94041 310 USA 312 Email: jmvalin@jmvalin.ca 314 Cary Bran 315 Plantronics 316 345 Encinial Street 317 Santa Cruz, CA 95060 318 USA 320 Phone: +1 206 661-2398 321 Email: cary.bran@plantronics.com