Analysis of RTP & amp; RTCP protocol

Source: Internet
Author: User

RTP (Real-time Transport Protocol) defines the standard packet format for sending videos and audios Based on the IP network. RTP and RTCP (RTP Control Protocol) work together. RTP carries media streams, while RTCP is used to monitor transmission statistics and Quality of Service (QoS) and assist in synchronization of multiple media streams. The RTP Port Number is an even number, and the RTCP port number is an odd number bigger than it. Www.2cto.com RTP is used for end-to-end, real-time stream data transmission. It provides jitter compensation and detects the arrival of disordered data. RTP supports transmission to multiple addresses through IP multicast. Real-time multimedia stream applications need timely information, so we can tolerate the loss of some packets. These missing packages can use suitable error hiding algorithms without being noticed. Most RTP implementations are based on UDP. In addition to RTP and RTCP, RTP specifications also include:
1. Optional signal protocols, such as H.323 and Session Initiation Protocol (SIP); 2. Optional media Description protocols, such as Session Description Protocol, SDP ). A session is created for each multimedia stream. A session includes an IP address and a pair of ports RTP and RTCP. RTP and RTCP usually use non-privileged UDP ports (1024 ~ 65535 ). Www.2cto.com RTCP collects media connection and information statistics, such as the number of bytes and packets transmitted, the number of lost packets, jitter, and the time delay of back-and-forth communication. Applications can use this information to control service quality parameters, perhaps by limiting the stream or using different decoding encoders.
RTCP itself does not provide stream encryption or authentication methods. These mechanisms can be implemented through the Secure Real-time transmission Protocol (SRTP. RTCP provides three basic functions for all RTP sessions:
1. collect statistics on the quality of media distribution during a session and send the data to the session media source and other session participants. If the session is executed on the multicast network, this allows non-intrusive monitoring of session quality. 2. Provide standard (canonical) terminal ID (CNAME) for all session participants ). Although the source ID of the RTP stream is expected to be unique, the instantaneous binding of the source ID (SSRC) to the terminal may change in a session. CNAME creates a unique ID for each application endpoint and is used for third-party monitoring. 3. The RTCP report is expected to be sent to all participants of the session, even for multicast sessions involving thousands of people. The traffic increases proportionally as the number of participants increases. Therefore, to avoid network congestion, the agreement must include session bandwidth management. This is done by dynamically controlling the frequency of report transmission. The bandwidth occupied by RTCP generally does not exceed 5% of the total session bandwidth. In addition, 25% of the RTCP bandwidth should be reserved for the on-demand media source so that new participants can receive the sender's cname id in a large meeting without delay. 4. Optional features: the supply of session control functions, because RTCP can easily reach all participants, but RTP itself cannot. Www.2cto.com RTCP has several different types of packages:
1. Sender Report (SR): the Sender of the activity in the meeting periodically sends the Report of the RTP packet sending and receiving statistics within a period of time. The SR includes an absolute timestamp (the number of seconds since midnight on January 1,), allowing the receiver to synchronize RTP messages. This is important for simultaneous transmission of video and audio because they use independent relative timestamps. 2. Receiver Report (RR): A Report on the service quality of passive participants to the sender and other recipients. 3. Source Description (SDES): used to send a CNAME item to the session participant. It can also be used to provide additional information, such as the name, email address, and phone number of the owner or source controller. 4. End of participation (BYE): The Source sends a BYE message to close the stream. It allows the terminal to declare to leave a meeting. Although other sources can detect the absence of a source, this is a direct statement. It is also useful for media mixing. 5. Application-specific Message (APP): supports Application-related extension of RTCP. By yourtommy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.