idnits 2.17.1 draft-ietf-rtcweb-fec-01.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 (March 5, 2015) is 3330 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 (-20) exists of draft-ietf-payload-flexible-fec-scheme-00 == Outdated reference: A later version (-11) exists of draft-ietf-payload-rtp-opus-08 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Uberti 3 Internet-Draft Google 4 Intended status: Standards Track March 5, 2015 5 Expires: September 6, 2015 7 WebRTC Forward Error Correction Requirements 8 draft-ietf-rtcweb-fec-01 10 Abstract 12 This document provides information and requirements for how Forward 13 Error Correction (FEC) should be used by WebRTC applications. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at http://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on September 6, 2015. 32 Copyright Notice 34 Copyright (c) 2015 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (http://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 51 3. Types of FEC . . . . . . . . . . . . . . . . . . . . . . . . 2 52 3.1. Separate FEC Stream . . . . . . . . . . . . . . . . . . . 3 53 3.2. Redundant Encoding . . . . . . . . . . . . . . . . . . . 3 54 3.3. Codec-Specific In-band FEC . . . . . . . . . . . . . . . 3 55 4. FEC for Audio Content . . . . . . . . . . . . . . . . . . . . 3 56 4.1. Recommended Mechanism . . . . . . . . . . . . . . . . . . 3 57 4.2. Negotiating Support . . . . . . . . . . . . . . . . . . . 4 58 5. FEC for Video Content . . . . . . . . . . . . . . . . . . . . 4 59 5.1. Recommended Mechanism . . . . . . . . . . . . . . . . . . 4 60 5.2. Negotiating Support . . . . . . . . . . . . . . . . . . . 5 61 6. FEC for Application Content . . . . . . . . . . . . . . . . . 5 62 7. Implementation Requirements . . . . . . . . . . . . . . . . . 5 63 8. Adaptive Use of FEC . . . . . . . . . . . . . . . . . . . . . 5 64 9. Security Considerations . . . . . . . . . . . . . . . . . . . 5 65 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 66 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 67 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 68 12.1. Normative References . . . . . . . . . . . . . . . . . . 6 69 12.2. Informative References . . . . . . . . . . . . . . . . . 6 70 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7 71 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 73 1. Introduction 75 In situations where packet loss is high, or perfect media quality is 76 essential, Forward Error Correction (FEC) can be used to proactively 77 recover from packet losses. This specification provides guidance on 78 which FEC mechanisms to use, and how to use them, for WebRTC client 79 implementations. 81 2. Terminology 83 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 84 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 85 document are to be interpreted as described in [RFC2119]. 87 3. Types of FEC 89 By its name, FEC describes the sending of redundant information in an 90 outgoing packet stream so that information can still be recovered 91 even in the face of packet loss. There are multiple ways in which 92 this can be accomplished; this section enumerates the various 93 mechanisms and describes their tradeoffs. 95 3.1. Separate FEC Stream 97 This approach, as described in [RFC5956], Section 4.3, sends FEC 98 packets as an independent SSRC-multiplexed stream, with its own SSRC 99 and payload type. While by far the most flexible, each FEC packet 100 will have its own IP+UDP+RTP+FEC header, leading to additional 101 overhead of the FEC stream. 103 3.2. Redundant Encoding 105 This approach, as descibed in [RFC2198], allows for redundant data to 106 be piggybacked on an existing primary encoding, all in a single 107 packet. This redundant data may be an exact copy of a previous 108 packet, or for codecs that support variable-bitrate encodings, 109 possibly a smaller, lower-quality representation. In certain cases, 110 the redundant data could include multiple prior packets. 112 Since there is only a single set of packet headers, this approach 113 allows for a very efficient representation of primary + redundant 114 data. However, this savings is only realized when the data all fits 115 into a single packet (i.e. the size is less than a MTU). As a 116 result, this approach is generally not useful for video content. 118 3.3. Codec-Specific In-band FEC 120 Some audio codecs, notably Opus [RFC6716], support their own in-band 121 FEC mechanism, where FEC data is included in the codec payload. In 122 the case of Opus specifically, packets deemed as important are re- 123 encoded at a lower bitrate and added to the subsequent packet, 124 allowing partial recovery of a lost packet. See [RFC6716], 125 Section 2.1.7 for details. 127 4. FEC for Audio Content 129 The following section provides guidance on how to best use FEC for 130 transmitting audio data. As indicated in Section 8 below, FEC should 131 only be activated if network conditions warrant it, or upon explicit 132 application request. 134 4.1. Recommended Mechanism 136 When using the Opus codec in its default (hybrid) mode, use of the 137 built-in Opus FEC mechanism is RECOMMENDED. This provides reasonable 138 protection of the audio stream against typical losses, with minimal 139 overhead. [TODO: add stats] 141 When using variable-bitrate codecs without an internal FEC, use of 142 [RFC2198] redundant encoding with a lower-fidelity version of 143 previous packet(s) is RECOMMENDED. This provides reasonable 144 protection of the payload with moderate overhead. 146 When using constant-bitrate codecs, e.g. PCMU, use of [RFC2198] 147 redundant encoding MAY be used, but note that this will result in a 148 potentially significant bitrate increase, and that suddenly 149 increasing bitrate to deal with losses from congestion may actually 150 make things worse. 152 Because of the lower packet rate of audio encodings, usually a single 153 packet per frame, use of a separate FEC stream comes with a higher 154 overhead than other mechanisms, and therefore is NOT RECOMMENDED. 156 4.2. Negotiating Support 158 Support for redundant encoding can be indicated by offering "red" as 159 a supported payload type in the offer. Answerers can reject the use 160 of redundant encoding by not including "red" as a supported payload 161 type in the answer. 163 Support for codec-specific FEC mechanisms are typically indicated via 164 "a=fmtp" parameters. For Opus specifically, this is controlled by 165 the "useinbandfec=1" parameter, as specified in 166 [I-D.ietf-payload-rtp-opus]. These parameters are declarative and 167 can be negotiated separately for either media direction. 169 5. FEC for Video Content 171 The following section provides guidance on how to best use FEC for 172 transmitting video data. As indicated in Section 8 below, FEC should 173 only be activated if network conditions warrant it, or upon explicit 174 application request. 176 5.1. Recommended Mechanism 178 For video content, use of a separate FEC stream with the RTP payload 179 format described in [I-D.ietf-payload-flexible-fec-scheme] is 180 RECOMMENDED. The receiver can demultiplex the incoming FEC stream by 181 SSRC and correlate it with the primary stream via the ssrc-group 182 mechanism. 184 Note that this only allows the FEC stream to protect a single primary 185 stream. Support for protecting multiple primary streams with a 186 single FEC stream is complicated by WebRTC's 1-m-line-per-stream 187 policy and requires further study. 189 5.2. Negotiating Support 191 To offer support for a separate FEC stream, the offerer MUST offer 192 one of the formats described in 193 [I-D.ietf-payload-flexible-fec-scheme], Section 5.1, as well as a 194 ssrc-group with "FEC-FR" semantics as described in [RFC5956], 195 Section 4.3. 197 Answerers can reject the use of FEC by not including FEC payloads in 198 the answer. 200 6. FEC for Application Content 202 While WebRTC also supports the ability to send generic application 203 data, the fact that the application can control exactly what data to 204 send allows it to monitor packet statistics and perform its own FEC 205 when necessary. 207 As a result, this document makes no recommendations regarding FEC for 208 the underlying data transport. 210 7. Implementation Requirements 212 To support the functionality recommended above, implementations MUST 213 support the redundant encoding mechanism described in [RFC2198] and 214 the FEC mechanism described in [RFC5956] and 215 [I-D.ietf-payload-flexible-fec-scheme]. 217 Implementations MAY support additional FEC mechanisms if desired, 218 e.g. [RFC5109]. 220 8. Adaptive Use of FEC 222 Since use of FEC causes redundant data to be transmitted, this will 223 lead to less bandwidth available for the primary encoding, when in a 224 bandwidth-constrained environment. Given this, WebRTC 225 implementations SHOULD only transmit FEC data when network conditions 226 indicate that this is advisable (e.g. by monitoring transmit packet 227 loss data from RTCP Receiver Reports), or the application indicates 228 it is willing to pay a quality penalty to proactively avoid losses. 230 9. Security Considerations 232 This document makes recommendations regarding which FEC mechanisms to 233 use. The security considerations for each individual mechanism are 234 enumerated in their respective documents. 236 10. IANA Considerations 238 This document requires no actions from IANA. 240 11. Acknowledgements 242 Several people provided significant input into this document, 243 including Jonathan Lennox, Giri Mandyam, Varun Singh, Tim Terriberry, 244 and Mo Zanaty. 246 12. References 248 12.1. Normative References 250 [I-D.ietf-payload-flexible-fec-scheme] 251 Singh, V., Begen, A., and M. Zanaty, "RTP Payload Format 252 for Non-Interleaved and Interleaved Parity Forward Error 253 Correction (FEC)", draft-ietf-payload-flexible-fec- 254 scheme-00 (work in progress), February 2015. 256 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 257 Requirement Levels", BCP 14, RFC 2119, March 1997. 259 [RFC2198] Perkins, C., Kouvelas, I., Hodson, O., Hardman, V., 260 Handley, M., Bolot, J., Vega-Garcia, A., and S. Fosse- 261 Parisis, "RTP Payload for Redundant Audio Data", RFC 2198, 262 September 1997. 264 [RFC5956] Begen, A., "Forward Error Correction Grouping Semantics in 265 the Session Description Protocol", RFC 5956, September 266 2010. 268 12.2. Informative References 270 [I-D.ietf-payload-rtp-opus] 271 Spittka, J., Vos, K., and J. Valin, "RTP Payload Format 272 for the Opus Speech and Audio Codec", draft-ietf-payload- 273 rtp-opus-08 (work in progress), February 2015. 275 [RFC5109] Li, A., "RTP Payload Format for Generic Forward Error 276 Correction", RFC 5109, December 2007. 278 [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the 279 Opus Audio Codec", RFC 6716, September 2012. 281 Appendix A. Change log 283 Changes in draft -01: 285 o Tweaked abstract/intro text that was ambiguously normative. 287 o Removed text on FEC for Opus in CELT mode. 289 o Changed RFC 2198 recommendation for PCMU to be MAY instead of NOT 290 RECOMMENDED, based on list feedback. 292 o Explicitly called out application data as something not addressed 293 in this document. 295 o Updated flexible-fec reference. 297 Changes in draft -00: 299 o Initial version, from sidebar conversation at IETF 90. 301 Author's Address 303 Justin Uberti 304 Google 305 747 6th Ave S 306 Kirkland, WA 98033 307 USA 309 Email: justin@uberti.name