This documentation describes how RTCP packets should be processed in *mediasoup*.
This documentation describes how RTCP packets should be processed in *mediasoup*.
Being a SFU, some received RTCP packets must be just routed to its intended destination, others must be locally consumed, and other must be ignored.
Being a SFU, some received RTCP packets must be just routed to its intended destination, others must be locally consumed, and others must be ignored.
This document also describes which RTCP packets must be locally generated by *mediasoup*.
This document also describes which RTCP packets must be locally generated by *mediasoup*.
*mediasoup* will not forward feedback information from a remote RTP receiver that could incur in the remote sender modifying the transmition rate in a way that it would affect the reception quality for the overall participants in a room. Ie: limiting the remote RTP sender transmition rate.
In order to get the best media quality from the remote RTP senders, *mediasoup* will focus on generating locally the reception information (RR, XR), so the remote RTP senders can adjust their transmission rate according to it.
### Sender Reports
*mediasoup* will locally generate the Sender Reports of the streams it transmits. At the same time, it will consume the Sender Reports received from every remote RTP senders.
### Receiver Reports
*mediasoup* will locally generate the Receiver Reports of the streams it receivers. At the same time, it will consume the Receiver Reports from every remote RTP receivers.
The combination of Sender and Receiver Reports will be used to determine the quality of each link. Information that will be available at the JavaScript API level in order to determine the quality of each participant in the room.
### SDES
SDES information will be relayed from the remote RTP sender to the corresponding remote RTP receivers.
### BYE
BYE information will be relayed from the remote RTP sender to the corresponding remote RTP receivers.
### APP
App information will be relayed from the remote RTP sender to the corresponding remote RTP receivers.
### XR
The same logic is applied as to Receiver Reports.
## RTP Feedback
### NACK
NACK requests are locally consumed. The solicited RTP packets are re-sent to the remote RTP receiver sending the request.
### TMMBR / TMMBN
```
RFC 5104:
A receiver, translator, or mixer uses the Temporary Maximum Media
Stream Bit Rate Request (TMMBR, "timber") to request a sender to
limit the maximum bit rate for a media stream (see section 2.2) to,
or below, the provided value.
```
As for now, we will not limit the bit rate for media streams, as we are relying on locally generated reception reports (RR, XR) to make the remote RTP senders adjust their transmition rates given such values.
### RTCP-SR-REQ
This information is to be bypassed from the remote RTP receiver to the corresponding remote RTP sender.
```
RFC 6051:
This memo outlines how RTP sessions are synchronised, and discusses
how rapidly such synchronisation can occur. We show that most RTP
sessions can be synchronised immediately, but that the use of video
switching multipoint conference units (MCUs) or large source-specific
multicast (SSM) groups can greatly increase the synchronisation
delay. This increase in delay can be unacceptable to some
applications that use layered and/or multi-description codecs.
```
### RAMS
Applicable on multicast sessions.
### TLLEI
For now it can be just ignored. In future it could be useful when *mediasoup* generates **NACK** request, in order to ackonwledge remote RTP receivers about it and avoid them sending such requests, avoiding the so called "feedback storm" or "NACK storm".
```
RFC 6642:
The RTCP TPLR message can be used by the intermediaries to
inform the receiver that the sender of the RTCP TPLR has received
reports that the indicated packets were lost and ask the receiver not
to send feedback to it regarding these packets.
```
### RTCP-ECN-FB
For now it can be just ignored.
### PAUSE-RESUME
Locally consume the pause-resume requests from remote RTP receivers in order to disable and enable the transmission for them independently. Applicable also in simulcast envirnments.
## PS Feedback
### PLI
This information is to be bypassed from the remote RTP receiver to the corresponding RTP sender.
Also to be locally sent when a new participant joins the conference for a fast rendering by the rest of participants.
### SLI
This information is to be bypassed from the remote RTP receiver to the corresponding RTP sender.
### RPSI
This information is to be bypassed from the remote RTP receiver to the corresponding RTP sender.
### FIR
This information is to be bypassed from the remote RTP receiver to the corresponding RTP sender.
Also to be locally sent when a new participant joins the conference for a fast rendering by the rest of participants.
### TSTR/TSTN
This information is to be ignored since it would affect the transmition rate of the remote RTP sender, affecting thus the overall participants of the room.
```
RFC 5104:
The Temporal-Spatial Trade-off Request (TSTR) instructs the video
encoder to change its trade-off between temporal and spatial
resolution. Index values from 0 to 31 indicate monotonically a
desire for higher frame rate.
```
### VBCM
This information is to be ignored since different remote RTP receivers will potentially send different feedback for the same media stream.
### PSLEI
Same applicability as **TLLEI**.
For now it can be just ignored. In future it could be useful when *mediasoup* generates PLI or FIR request, in order to ackonwledge remote RTP receivers about it and avoid them sending such requests, avoiding the so called "feedback storm".
### AFB
Application information will be relayed from the remote RTP receiver to the corresponding remote RTP sender.
### REMB (for now a subtype of AFB)
In future, this information is to be consumed by the local RTP Senders in order to adapt their transmission rate to the availability of the remote RTP receivers.
## Mediasoup internal behaviour for each type of RTCP