draft-ietf-rtcweb-fec-00.txt   draft-ietf-rtcweb-fec-01.txt 
Network Working Group J. Uberti Network Working Group J. Uberti
Internet-Draft Google Internet-Draft Google
Intended status: Standards Track February 5, 2015 Intended status: Standards Track March 5, 2015
Expires: August 9, 2015 Expires: September 6, 2015
WebRTC Forward Error Correction Requirements WebRTC Forward Error Correction Requirements
draft-ietf-rtcweb-fec-00 draft-ietf-rtcweb-fec-01
Abstract Abstract
This document makes recommendations for how Forward Error Correction This document provides information and requirements for how Forward
(FEC) should be used by WebRTC applications. Error Correction (FEC) should be used by WebRTC applications.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 9, 2015. This Internet-Draft will expire on September 6, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 19 skipping to change at page 2, line 19
3. Types of FEC . . . . . . . . . . . . . . . . . . . . . . . . 2 3. Types of FEC . . . . . . . . . . . . . . . . . . . . . . . . 2
3.1. Separate FEC Stream . . . . . . . . . . . . . . . . . . . 3 3.1. Separate FEC Stream . . . . . . . . . . . . . . . . . . . 3
3.2. Redundant Encoding . . . . . . . . . . . . . . . . . . . 3 3.2. Redundant Encoding . . . . . . . . . . . . . . . . . . . 3
3.3. Codec-Specific In-band FEC . . . . . . . . . . . . . . . 3 3.3. Codec-Specific In-band FEC . . . . . . . . . . . . . . . 3
4. FEC for Audio Content . . . . . . . . . . . . . . . . . . . . 3 4. FEC for Audio Content . . . . . . . . . . . . . . . . . . . . 3
4.1. Recommended Mechanism . . . . . . . . . . . . . . . . . . 3 4.1. Recommended Mechanism . . . . . . . . . . . . . . . . . . 3
4.2. Negotiating Support . . . . . . . . . . . . . . . . . . . 4 4.2. Negotiating Support . . . . . . . . . . . . . . . . . . . 4
5. FEC for Video Content . . . . . . . . . . . . . . . . . . . . 4 5. FEC for Video Content . . . . . . . . . . . . . . . . . . . . 4
5.1. Recommended Mechanism . . . . . . . . . . . . . . . . . . 4 5.1. Recommended Mechanism . . . . . . . . . . . . . . . . . . 4
5.2. Negotiating Support . . . . . . . . . . . . . . . . . . . 5 5.2. Negotiating Support . . . . . . . . . . . . . . . . . . . 5
6. Implementation Requirements . . . . . . . . . . . . . . . . . 5 6. FEC for Application Content . . . . . . . . . . . . . . . . . 5
7. Adaptive Use of FEC . . . . . . . . . . . . . . . . . . . . . 5 7. Implementation Requirements . . . . . . . . . . . . . . . . . 5
8. Security Considerations . . . . . . . . . . . . . . . . . . . 5 8. Adaptive Use of FEC . . . . . . . . . . . . . . . . . . . . . 5
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 9. Security Considerations . . . . . . . . . . . . . . . . . . . 5
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6
11.1. Normative References . . . . . . . . . . . . . . . . . . 6 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 6
11.2. Informative References . . . . . . . . . . . . . . . . . 6 12.1. Normative References . . . . . . . . . . . . . . . . . . 6
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 6 12.2. Informative References . . . . . . . . . . . . . . . . . 6
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction 1. Introduction
In situations where packet loss is high, or media quality must be In situations where packet loss is high, or perfect media quality is
perfect, Forward Error Correction (FEC) can be used to proactively essential, Forward Error Correction (FEC) can be used to proactively
recover from packet losses. This document describes what FEC recover from packet losses. This specification provides guidance on
mechanisms should be used by WebRTC client implementations. which FEC mechanisms to use, and how to use them, for WebRTC client
implementations.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
3. Types of FEC 3. Types of FEC
By its name, FEC describes the sending of redundant information in an By its name, FEC describes the sending of redundant information in an
skipping to change at page 3, line 16 skipping to change at page 3, line 16
This approach, as described in [RFC5956], Section 4.3, sends FEC This approach, as described in [RFC5956], Section 4.3, sends FEC
packets as an independent SSRC-multiplexed stream, with its own SSRC packets as an independent SSRC-multiplexed stream, with its own SSRC
and payload type. While by far the most flexible, each FEC packet and payload type. While by far the most flexible, each FEC packet
will have its own IP+UDP+RTP+FEC header, leading to additional will have its own IP+UDP+RTP+FEC header, leading to additional
overhead of the FEC stream. overhead of the FEC stream.
3.2. Redundant Encoding 3.2. Redundant Encoding
This approach, as descibed in [RFC2198], allows for redundant data to This approach, as descibed in [RFC2198], allows for redundant data to
be piggybacked on an existing primary encoding in a single packet. be piggybacked on an existing primary encoding, all in a single
This redundant data may be an exact copy of a previous packet, or for packet. This redundant data may be an exact copy of a previous
codecs that support variable-bitrate encodings, possibly a smaller, packet, or for codecs that support variable-bitrate encodings,
lower-quality representation. Since there is only a single set of possibly a smaller, lower-quality representation. In certain cases,
packet headers, this allows for a very efficient representation of the redundant data could include multiple prior packets.
primary + redundant data. However, this savings is only realized
when the two encodings both fit into a single packet (i.e. less than Since there is only a single set of packet headers, this approach
a MTU). This approach is also only applicable to audio content. allows for a very efficient representation of primary + redundant
data. However, this savings is only realized when the data all fits
into a single packet (i.e. the size is less than a MTU). As a
result, this approach is generally not useful for video content.
3.3. Codec-Specific In-band FEC 3.3. Codec-Specific In-band FEC
Some audio codecs, notably Opus [RFC6716], support their own in-band Some audio codecs, notably Opus [RFC6716], support their own in-band
FEC mechanism, where FEC data is included in the codec payload. In FEC mechanism, where FEC data is included in the codec payload. In
the case of Opus specifically, packets deemed as important are re- the case of Opus specifically, packets deemed as important are re-
encoded at a lower bitrate and added to the subsequent packet, encoded at a lower bitrate and added to the subsequent packet,
allowing partial recovery of a lost packet. See [RFC6716], allowing partial recovery of a lost packet. See [RFC6716],
Section 2.1.7 for details. Section 2.1.7 for details.
4. FEC for Audio Content 4. FEC for Audio Content
The following section provides guidance on how to best use FEC for The following section provides guidance on how to best use FEC for
transmitting audio data. As indicated in Section 7 below, FEC should transmitting audio data. As indicated in Section 8 below, FEC should
only be activated if network conditions warrant it, or upon explicit only be activated if network conditions warrant it, or upon explicit
application request. application request.
4.1. Recommended Mechanism 4.1. Recommended Mechanism
When using the Opus codec in its default (hybrid) mode, use of the When using the Opus codec in its default (hybrid) mode, use of the
built-in Opus FEC mechanism is RECOMMENDED. This provides reasonable built-in Opus FEC mechanism is RECOMMENDED. This provides reasonable
protection of the audio stream against typical losses, with moderate protection of the audio stream against typical losses, with minimal
overhead. [TODO: add stats] Note though that this mechanism only overhead. [TODO: add stats]
protects the SILK layer of the Opus codec; the CELT portion is not
protected. This is not an issue when Opus is running in hybrid mode,
as the lower frequencies will still be able to be recovered, with
minimal quality impact.
When using Opus in CELT mode, or other variable-bitrate codecs, use When using variable-bitrate codecs without an internal FEC, use of
of [RFC2198] redundant encoding with a lower-fidelity version of the [RFC2198] redundant encoding with a lower-fidelity version of
previous packet is RECOMMENDED. When using Opus specifically, the previous packet(s) is RECOMMENDED. This provides reasonable
lower-fidelity version can simply be a truncated version of the protection of the payload with moderate overhead.
previous Opus packet. [TODO: decide exact truncated size] This
provides reasonable protection of the payload with minimal overhead.
When using constant-bitrate codecs, e.g. PCMU, use of [RFC2198] When using constant-bitrate codecs, e.g. PCMU, use of [RFC2198]
redundant encoding is NOT RECOMMENDED, as this will result in a redundant encoding MAY be used, but note that this will result in a
potentially significant bitrate increase. Furthermore, suddenly potentially significant bitrate increase, and that suddenly
increasing the bitrate to deal with packet losses may actually make increasing bitrate to deal with losses from congestion may actually
things worse. make things worse.
Because of the lower packet rate of audio encodings, usually a single Because of the lower packet rate of audio encodings, usually a single
packet per frame, use of a separate FEC stream comes with a higher packet per frame, use of a separate FEC stream comes with a higher
overhead than other mechanisms, and therefore is NOT RECOMMENDED. overhead than other mechanisms, and therefore is NOT RECOMMENDED.
4.2. Negotiating Support 4.2. Negotiating Support
Support for redundant encoding can be indicated by offering "red" as Support for redundant encoding can be indicated by offering "red" as
a supported payload type in the offer. Answerers can reject the use a supported payload type in the offer. Answerers can reject the use
of redundant encoding by not including "red" as a supported payload of redundant encoding by not including "red" as a supported payload
skipping to change at page 4, line 38 skipping to change at page 4, line 33
Support for codec-specific FEC mechanisms are typically indicated via Support for codec-specific FEC mechanisms are typically indicated via
"a=fmtp" parameters. For Opus specifically, this is controlled by "a=fmtp" parameters. For Opus specifically, this is controlled by
the "useinbandfec=1" parameter, as specified in the "useinbandfec=1" parameter, as specified in
[I-D.ietf-payload-rtp-opus]. These parameters are declarative and [I-D.ietf-payload-rtp-opus]. These parameters are declarative and
can be negotiated separately for either media direction. can be negotiated separately for either media direction.
5. FEC for Video Content 5. FEC for Video Content
The following section provides guidance on how to best use FEC for The following section provides guidance on how to best use FEC for
transmitting video data. As indicated in Section 7 below, FEC should transmitting video data. As indicated in Section 8 below, FEC should
only be activated if network conditions warrant it, or upon explicit only be activated if network conditions warrant it, or upon explicit
application request. application request.
5.1. Recommended Mechanism 5.1. Recommended Mechanism
For video content, use of a separate FEC stream with the RTP payload For video content, use of a separate FEC stream with the RTP payload
format described in [I-D.singh-payload-rtp-1d2d-parity-scheme] is format described in [I-D.ietf-payload-flexible-fec-scheme] is
RECOMMENDED. The receiver can demultiplex the incoming FEC stream by RECOMMENDED. The receiver can demultiplex the incoming FEC stream by
SSRC and correlate it with the primary stream via the ssrc-group SSRC and correlate it with the primary stream via the ssrc-group
mechanism. mechanism.
Note that this only allows the FEC stream to protect a single primary Note that this only allows the FEC stream to protect a single primary
stream. Support for protecting multiple primary streams with a stream. Support for protecting multiple primary streams with a
single FEC stream is complicated by WebRTC's 1-m-line-per-stream single FEC stream is complicated by WebRTC's 1-m-line-per-stream
policy and requires further study. policy and requires further study.
5.2. Negotiating Support 5.2. Negotiating Support
To offer support for a separate FEC stream, the offerer MUST offer To offer support for a separate FEC stream, the offerer MUST offer
one of the formats described in one of the formats described in
[I-D.singh-payload-rtp-1d2d-parity-scheme], Section 5.1, as well as a [I-D.ietf-payload-flexible-fec-scheme], Section 5.1, as well as a
ssrc-group with "FEC-FR" semantics as described in [RFC5956], ssrc-group with "FEC-FR" semantics as described in [RFC5956],
Section 4.3. Section 4.3.
Answerers can reject the use of FEC by not including FEC payloads in Answerers can reject the use of FEC by not including FEC payloads in
the answer. the answer.
6. Implementation Requirements 6. FEC for Application Content
While WebRTC also supports the ability to send generic application
data, the fact that the application can control exactly what data to
send allows it to monitor packet statistics and perform its own FEC
when necessary.
As a result, this document makes no recommendations regarding FEC for
the underlying data transport.
7. Implementation Requirements
To support the functionality recommended above, implementations MUST To support the functionality recommended above, implementations MUST
support the redundant encoding mechanism described in [RFC2198] and support the redundant encoding mechanism described in [RFC2198] and
the FEC mechanism described in [RFC5956] and the FEC mechanism described in [RFC5956] and
[I-D.singh-payload-rtp-1d2d-parity-scheme]. [I-D.ietf-payload-flexible-fec-scheme].
Implementations MAY support additional FEC mechanisms if desired, Implementations MAY support additional FEC mechanisms if desired,
e.g. [RFC5109]. e.g. [RFC5109].
7. Adaptive Use of FEC 8. Adaptive Use of FEC
Since use of FEC causes redundant data to be transmitted, this will Since use of FEC causes redundant data to be transmitted, this will
lead to less bandwidth available for the primary encoding, when in a lead to less bandwidth available for the primary encoding, when in a
bandwidth-constrained environment. Given this, WebRTC bandwidth-constrained environment. Given this, WebRTC
implementations SHOULD only transmit FEC data when network conditions implementations SHOULD only transmit FEC data when network conditions
indicate that this is advisable (e.g. by monitoring transmit packet indicate that this is advisable (e.g. by monitoring transmit packet
loss data from RTCP Receiver Reports), or the application indicates loss data from RTCP Receiver Reports), or the application indicates
it is willing to pay a quality penalty to proactively avoid losses. it is willing to pay a quality penalty to proactively avoid losses.
8. Security Considerations 9. Security Considerations
TODO This document makes recommendations regarding which FEC mechanisms to
use. The security considerations for each individual mechanism are
enumerated in their respective documents.
9. IANA Considerations 10. IANA Considerations
This document requires no actions from IANA. This document requires no actions from IANA.
10. Acknowledgements 11. Acknowledgements
Several people provided significant input into this document, Several people provided significant input into this document,
including Jonathan Lennox, Giri Mandyam, Varun Singh, Tim Terriberry, including Jonathan Lennox, Giri Mandyam, Varun Singh, Tim Terriberry,
and Mo Zanaty. and Mo Zanaty.
11. References 12. References
11.1. Normative References 12.1. Normative References
[I-D.singh-payload-rtp-1d2d-parity-scheme] [I-D.ietf-payload-flexible-fec-scheme]
Singh, V., Begen, A., and M. Zanaty, "RTP Payload Format Singh, V., Begen, A., and M. Zanaty, "RTP Payload Format
for Non-Interleaved and Interleaved Parity Forward Error for Non-Interleaved and Interleaved Parity Forward Error
Correction (FEC)", draft-singh-payload-rtp-1d2d-parity- Correction (FEC)", draft-ietf-payload-flexible-fec-
scheme-00 (work in progress), October 2014. scheme-00 (work in progress), February 2015.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2198] Perkins, C., Kouvelas, I., Hodson, O., Hardman, V., [RFC2198] Perkins, C., Kouvelas, I., Hodson, O., Hardman, V.,
Handley, M., Bolot, J., Vega-Garcia, A., and S. Fosse- Handley, M., Bolot, J., Vega-Garcia, A., and S. Fosse-
Parisis, "RTP Payload for Redundant Audio Data", RFC 2198, Parisis, "RTP Payload for Redundant Audio Data", RFC 2198,
September 1997. September 1997.
[RFC5956] Begen, A., "Forward Error Correction Grouping Semantics in [RFC5956] Begen, A., "Forward Error Correction Grouping Semantics in
the Session Description Protocol", RFC 5956, September the Session Description Protocol", RFC 5956, September
2010. 2010.
11.2. Informative References 12.2. Informative References
[I-D.ietf-payload-rtp-opus] [I-D.ietf-payload-rtp-opus]
Spittka, J., Vos, K., and J. Valin, "RTP Payload Format Spittka, J., Vos, K., and J. Valin, "RTP Payload Format
for Opus Speech and Audio Codec", draft-ietf-payload-rtp- for the Opus Speech and Audio Codec", draft-ietf-payload-
opus-07 (work in progress), January 2015. rtp-opus-08 (work in progress), February 2015.
[RFC5109] Li, A., "RTP Payload Format for Generic Forward Error [RFC5109] Li, A., "RTP Payload Format for Generic Forward Error
Correction", RFC 5109, December 2007. Correction", RFC 5109, December 2007.
[RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the
Opus Audio Codec", RFC 6716, September 2012. Opus Audio Codec", RFC 6716, September 2012.
Appendix A. Change log Appendix A. Change log
Changes in draft -01:
o Tweaked abstract/intro text that was ambiguously normative.
o Removed text on FEC for Opus in CELT mode.
o Changed RFC 2198 recommendation for PCMU to be MAY instead of NOT
RECOMMENDED, based on list feedback.
o Explicitly called out application data as something not addressed
in this document.
o Updated flexible-fec reference.
Changes in draft -00: Changes in draft -00:
o Initial version, from sidebar conversation at IETF 90. o Initial version, from sidebar conversation at IETF 90.
Author's Address Author's Address
Justin Uberti Justin Uberti
Google Google
747 6th Ave S 747 6th Ave S
Kirkland, WA 98033 Kirkland, WA 98033
USA USA
Email: justin@uberti.name Email: justin@uberti.name
 End of changes. 29 change blocks. 
63 lines changed or deleted 89 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/