
RTCP (RTP Control Protocol)
協定A sister protocol to RTP that provides out-of-band control information and statistics.
What is RTCP?
The RTP Control Protocol (RTCP) works hand-in-hand with RTP. While RTP carries the actual media data (audio and video), RTCP carries control information and statistics about that media stream. It acts as a feedback mechanism between senders and receivers.
Key Functions
- Quality Reporting: RTCP packets contain receiver reports that detail packet loss, jitter, and round-trip time (RTT). The sender uses this data to adjust video quality (Adaptive Bitrate).
- Synchronization: RTCP Sender Reports map the RTP timestamps (relative time) to the wall-clock time (NTP timestamp), allowing audio and video streams to be synchronized perfectly (Lip-sync).
- Session Control: RTCP BYE packets indicate that a user has left the session.
RTCP Feedback Messages
In WebRTC, RTCP is also used for immediate feedback messages, such as:
- NACK (Negative Acknowledgement): "I missed a packet, please send it again."
- PLI (Picture Loss Indication): "I lost the whole frame, please send a new full keyframe."
Multiplexing
Modern WebRTC implementations typically use RTCP Mux, which means RTP and RTCP traffic are sent over the same port to simplify firewall traversal.