Streaming media network transmission must meet the needs of high bandwidth, low transmission latency, support for multicast mode, reliable error recovery and channel synchronization (especially video and audio stream synchronization ). RTP/RTCP is an application layer protocol based on multicast and the most widely used protocol for streaming media transmission.
The real-time transport protocol RTP (Realtime Transport Protocol) works during one-to-one or one-to-many transmission. Its purpose is to provide time information and implement stream synchronization. Typical RTP applications are built on UDP, but can also work on TCP or ATM protocols. RTP itself only guarantees the transmission of real-time data. It does not provide a reliable transmission mechanism for transmitting data packets in sequence, nor provides traffic control or congestion control. It relies on RTCP to provide these services.
Real-time transmission control protocol RTCP (Realtime Transport Control Protocol): manages the exchange of control information between transmission quality in the current application process. During the RTP session, each participant periodically transmits the RTCP packet, which contains statistics such as the number of sent packets and the number of lost packets. Therefore, the server can use this information to dynamically change the transmission rate or even the payload type. RTP and RTCP can be used together to optimize transmission efficiency with effective feedback and minimal overhead. Therefore, RTP is especially suitable for transmitting real-time online data.
For the most authoritative RTP/RTCP content, refer to the rfc3550 documentation. enthusiastic netizens translate the content into a Chinese version for your convenience. Click to download it.
The client sends an RTCP package to the server every 4-5 seconds, indicating that the client is in normal state and the server can continue to send the package. If the server does not receive the Cycler report sent by the client within 2 minutes, if the client is closed, the server will cut off the RTP connection.