Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

flexible FEC for video #253

@robin-raymond

Description

@robin-raymond

Doesn't appear to be any way to describe flexible FEC in ORT specification...

https://tools.ietf.org/html/draft-ietf-rtcweb-fec-01#section-5.1

5.1.  Recommended Mechanism

   For video content, use of a separate FEC stream with the RTP payload
   format described in [I-D.ietf-payload-flexible-fec-scheme] is
   RECOMMENDED.  The receiver can demultiplex the incoming FEC stream by
   SSRC and correlate it with the primary stream via the ssrc-group
   mechanism.

   Note that this only allows the FEC stream to protect a single primary
   stream.  Support for protecting multiple primary streams with a
   single FEC stream is complicated by WebRTC's 1-m-line-per-stream
   policy and requires further study.

5.2.  Negotiating Support

   To offer support for a separate FEC stream, the offerer MUST offer
   one of the formats described in
   [I-D.ietf-payload-flexible-fec-scheme], Section 5.1, as well as a
   ssrc-group with "FEC-FR" semantics as described in [RFC5956],
   Section 4.3.

   Answerers can reject the use of FEC by not including FEC payloads in
   the answer.

https://tools.ietf.org/html/draft-ietf-payload-flexible-fec-scheme-00#section-5.1

5.  Payload Format Parameters

   This section provides the media subtype registration for the non-
   interleaved and interleaved parity FEC.  The parameters that are
   required to configure the FEC encoding and decoding operations are
   also defined in this section.

7.1.  Example SDP for 1-D Parity FEC Protection

   In this example, we have one source video stream (ssrc:1234) and one
   FEC repair stream (ssrc:2345).  We form one FEC group with the
   "a=ssrc-group:FEC-FR 1234 2345" line.  The source and repair streams
   are multiplexed on different SSRCs.  The repair window is set to 200
   ms.

        v=0
        o=ali 1122334455 1122334466 IN IP4 fec.example.com
        s=1-D Interleaved Parity FEC Example
        t=0 0
        m=video 30000 RTP/AVP 100 110
        c=IN IP4 233.252.0.1/127
        a=rtpmap:100 MP2T/90000
        a=rtpmap:110 interleaved-parityfec/90000
        a=fmtp:110 L:5; D:10; ToP:0; repair-window:200000
        a=ssrc:1234
        a=ssrc:2345
        a=ssrc-group:FEC-FR 1234 2345

7.2.  Example SDP for 2-D Parity FEC Protection

   In this example, we have one source video stream (ssrc:1234) and two
   FEC repair streams (ssrc:2345 and ssrc:3456).  We form one FEC group
   with the "a=ssrc-group:FEC-FR 1234 2345 3456" line.  The source and
   repair streams are multiplexed on different SSRCs.  The repair window
   is set to 200 ms.

        v=0
        o=ali 1122334455 1122334466 IN IP4 fec.example.com
        s=2-D Parity FEC Example
        t=0 0
        m=video 30000 RTP/AVP 100 110 111
        c=IN IP4 233.252.0.1/127
        a=rtpmap:100 MP2T/90000
        a=rtpmap:110 interleaved-parityfec/90000
        a=fmtp:110 L:5; D:10; ToP:2; repair-window:200000
        a=rtpmap:111 non-interleaved-parityfec/90000
        a=fmtp:111 L:5; D:10; ToP:2; repair-window:200000
        a=ssrc:1234
        a=ssrc:2345
        a=ssrc:3456
        a=ssrc-group:FEC-FR 1234 2345 3456

   Note that the sender might be generating two repair flows carrying
   non-interleaved and interleaved FEC packets, however the receiver
   might be interested only in the interleaved FEC packets.  The
   receiver can identify the repair flow carrying the desired repair
   data by checking the payload types associated with each repair flow
   described in the SDP description.

https://tools.ietf.org/html/rfc5956#section-4.3

[RFC5576] defines an SDP media-level attribute, called "ssrc-group",
   for grouping the RTP streams that are SSRC multiplexed and carried in
   the same RTP session.  The grouping is based on the Synchronization
   Source (SSRC) identifiers.  Since SSRC-multiplexed RTP streams are
   defined in the same "m" line, the "group" attribute cannot be used.

   This section specifies how FEC is applied to source and repair flows
   for SSRC-multiplexed streams using the "ssrc-group" attribute
   [RFC5576].  This section also specifies how the additivity of the
   repair flows is expressed for the SSRC-multiplexed streams.

   The semantics of "FEC-FR" for the "ssrc-group" attribute are the same
   as those defined for the "group" attribute, except that the SSRC
   identifiers are used to designate the FEC grouping associations:
   a=ssrc-group:FEC-FR *(SP ssrc-id) [RFC5576].

   The SSRC identifiers for the RTP streams that are carried in the same
   RTP session MUST be unique per [RFC3550].  However, the SSRC
   identifiers are not guaranteed to be unique among different RTP
   sessions.  Thus, the "ssrc-group" attribute MUST only be used at the
   media level [RFC5576].

   Let us consider the following scenario where there are two source
   flows (e.g., one video and one audio) and a single repair flow that
   protects only one of the source flows (e.g., video).  Suppose that
   all these flows are separate RTP streams that are SSRC multiplexed in
   the same RTP session.

                  SOURCE FLOWS             | FEC FRAMEWORK INSTANCE #1
                  S5: Source Flow |--------| R8: Repair Flow
                  S6: Source Flow

    Figure 4: Example scenario with one FEC Framework instance where a
         single repair flow protects only one of the source flows

   The following SDP describes the scenario sketched in Figure 4.

        v=0
        o=ali 1122334455 1122334466 IN IP4 fec.example.com
        s=FEC Grouping Semantics for SSRC Multiplexing
        t=0 0
        m=video 30000 RTP/AVP 100 101 110
        c=IN IP4 233.252.0.1/127
        a=rtpmap:100 JPEG/90000
        a=rtpmap:101 L16/32000/2
        a=rtpmap:110 1d-interleaved-parityfec/90000
        a=fmtp:110 L=5; D=10; repair-window=200000
        a=ssrc:1000 cname:fec@example.com
        a=ssrc:1010 cname:fec@example.com
        a=ssrc:2110 cname:fec@example.com
        a=ssrc-group:FEC-FR 1000 2110
        a=mid:Group1

   Note that in actual use, SSRC values, which are random 32-bit
   numbers, may be much larger than the ones shown in this example.
   Also, note that before receiving an RTP packet for each stream, the
   receiver cannot know which SSRC identifier is associated with which
   payload type.

   The additivity of the repair flows is handled in the same way as
   described in Section 4.2.  In other words, the repair flows that are
   included in an "a=ssrc-group" line MUST be additive.  Repair flows
   that are not additive MUST be indicated in separate "a=ssrc-group"
   lines.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions