idnits 2.17.1 draft-ietf-rtcweb-fec-02.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 (October 18, 2015) is 3106 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 Summary: 0 errors (**), 0 flaws (~~), 3 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 October 18, 2015 5 Expires: April 20, 2016 7 WebRTC Forward Error Correction Requirements 8 draft-ietf-rtcweb-fec-02 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 April 20, 2016. 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 . . . . . . . . . . . . . . . . . . . 6 65 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 66 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 67 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 68 12.1. Normative References . . . . . . . . . . . . . . . . . . 6 69 12.2. Informative References . . . . . . . . . . . . . . . . . 7 70 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7 71 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 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 Support for protecting multiple primary streams with a single FEC 185 stream is complicated by WebRTC's 1-m-line-per-stream policy, which 186 does not allow for a m-line dedicated specifically to FEC. 188 5.2. Negotiating Support 190 To offer support for a separate SSRC-multiplexed FEC stream, the 191 offerer MUST offer one of the formats described in 192 [I-D.ietf-payload-flexible-fec-scheme], Section 5.1, as well as a 193 ssrc-group with "FEC-FR" semantics as described in [RFC5956], 194 Section 4.3. 196 Use of FEC-only m-lines, and grouping using the SDP group mechanism, 197 is not currently defined for WebRTC, and SHOULD NOT be offered. 199 Answerers can reject the use of SSRC-multiplexed FEC, by not 200 including FEC payload types in the answer. 202 Answerers SHOULD reject any FEC-only m-lines, unless they 203 specifically know how to handle such a thing in a WebRTC context 204 (perhaps defined by a future version of the WebRTC specifications). 205 This ensures that implementations will not malfunction when said 206 future version of WebRTC enables offers of FEC-only m-lines. 208 6. FEC for Application Content 210 WebRTC also supports the ability to send generic application data, 211 and provides transport-level retransmission mechanisms that the 212 application can use to ensure that its data is delivered reliably. 214 Because the application can control exactly what data to send, it has 215 the ability to monitor packet statistics and perform its own 216 application-level FEC, if necessary. 218 As a result, this document makes no recommendations regarding FEC for 219 the underlying data transport. 221 7. Implementation Requirements 223 To support the functionality recommended above, implementations MUST 224 support the redundant encoding mechanism described in [RFC2198] and 225 the FEC mechanism described in [RFC5956] and 226 [I-D.ietf-payload-flexible-fec-scheme]. 228 Implementations MAY support additional FEC mechanisms if desired, 229 e.g. [RFC5109]. 231 8. Adaptive Use of FEC 233 Since use of FEC causes redundant data to be transmitted, this will 234 lead to less bandwidth available for the primary encoding, when in a 235 bandwidth-constrained environment. Given this, WebRTC 236 implementations SHOULD only transmit FEC data when network conditions 237 indicate that this is advisable (e.g. by monitoring transmit packet 238 loss data from RTCP Receiver Reports), or the application indicates 239 it is willing to pay a quality penalty to proactively avoid losses. 241 9. Security Considerations 243 This document makes recommendations regarding the use of FEC. 244 Generally, it should be noted that although applying redundancy is 245 often useful in protecting a stream against packet loss, if the loss 246 is caused by network congestion, the additional bandwidth used by the 247 redundant data may actually make the situation worse, and can lead to 248 significant degradation of the network. 250 Additional security considerations for each individual FEC mechanism 251 are enumerated in their respective documents. 253 10. IANA Considerations 255 This document requires no actions from IANA. 257 11. Acknowledgements 259 Several people provided significant input into this document, 260 including Jonathan Lennox, Giri Mandyam, Varun Singh, Tim Terriberry, 261 and Mo Zanaty. 263 12. References 265 12.1. Normative References 267 [I-D.ietf-payload-flexible-fec-scheme] 268 Singh, V., Begen, A., and M. Zanaty, "RTP Payload Format 269 for Non-Interleaved and Interleaved Parity Forward Error 270 Correction (FEC)", draft-ietf-payload-flexible-fec- 271 scheme-00 (work in progress), February 2015. 273 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 274 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 275 RFC2119, March 1997, 276 . 278 [RFC2198] Perkins, C., Kouvelas, I., Hodson, O., Hardman, V., 279 Handley, M., Bolot, J., Vega-Garcia, A., and S. Fosse- 280 Parisis, "RTP Payload for Redundant Audio Data", RFC 2198, 281 DOI 10.17487/RFC2198, September 1997, 282 . 284 [RFC5956] Begen, A., "Forward Error Correction Grouping Semantics in 285 the Session Description Protocol", RFC 5956, DOI 10.17487/ 286 RFC5956, September 2010, 287 . 289 12.2. Informative References 291 [I-D.ietf-payload-rtp-opus] 292 Spittka, J., Vos, K., and J. Valin, "RTP Payload Format 293 for the Opus Speech and Audio Codec", draft-ietf-payload- 294 rtp-opus-11 (work in progress), April 2015. 296 [RFC5109] Li, A., Ed., "RTP Payload Format for Generic Forward Error 297 Correction", RFC 5109, DOI 10.17487/RFC5109, December 298 2007, . 300 [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the 301 Opus Audio Codec", RFC 6716, DOI 10.17487/RFC6716, 302 September 2012, . 304 Appendix A. Change log 306 Changes in draft -02: 308 o Expanded discussion of FEC-only m-lines, and how they should be 309 handled in offers and answers. 311 Changes in draft -01: 313 o Tweaked abstract/intro text that was ambiguously normative. 315 o Removed text on FEC for Opus in CELT mode. 317 o Changed RFC 2198 recommendation for PCMU to be MAY instead of NOT 318 RECOMMENDED, based on list feedback. 320 o Explicitly called out application data as something not addressed 321 in this document. 323 o Updated flexible-fec reference. 325 Changes in draft -00: 327 o Initial version, from sidebar conversation at IETF 90. 329 Author's Address 331 Justin Uberti 332 Google 333 747 6th Ave S 334 Kirkland, WA 98033 335 USA 337 Email: justin@uberti.name