webrtcjitterrtcpsfu

How to merge a RTCP Receive Report in a SFU?


If I have a SFU that transfer a media track to 10 clients and now I receive from all the 10 clients a RTCP.RR packet (receiver report). What should I send to the sender of the media track.

Should I forward all 10 receiver reports to the sender? Should I merge it? If I should merge it then how should I do it? When should I send it?

The receiver reports for a single media track has the follow 7 fields. see RFC 3550

What I think:

But how long should I wait after a Sender Report that all 10 clients send it receiver report? For example if the packet of the receiver report from one client was lost?


Solution

  • SFUs route packets but terminate RTCP. The receiver report should report what your SFU receives, not what the receivers receive, these are two distinct things.

    There is one exception which is the fraction loss value. This drives the opus FEC percentage (see this old post from the slack folks]) so should be the maximum of what each receiver reports. For simulcast videoit should be the minimum loss on the higher spatial layers and the maximum on the lowest as this may drive the encoder behavior similar to how it is done for Opus (depending on the BWE mechanism this may happen via that instead of the fraction loss and the target bitrate)

    One consequence of this is in particular the RTCP round trip time which is calculated based on the timestamp and DSLR field. It will not describe E2E delay but the RTCP one between the client and the SFU. One might argue that you can take the longest receive side latency and therefore get an upper bound for the E2E latency though.

    https://datatracker.ietf.org/doc/rfc7667/ provides a great overview of the topic.