Introduction to RTP and RTCP protocol

Source: Internet
Author: User

1. Streaming (streaming media)

1.1 Streaming Media Concepts

Streaming media technology is the product of network technology and multimedia technology development to a certain stage. The term streaming media can be used to refer to streaming technology that transmits continuous-time base media on the Internet, or the continuous-time base media using streaming technology. There are two main ways to transmit audio, video and other multimedia information on the Internet at present: downloading and streaming transmission. With the download method, the user needs to download the entire media file before it can be played. Because of the limitation of network bandwidth, downloading often takes a long time, so this processing method is very delayed. And the key technology of streaming media is streaming transmission. Before transmission, the multimedia is preprocessed (reduced quality and efficient compression), and the caching system is used to ensure that the data is transmitted continuously and correctly. Using streaming mode, the user does not have to wait for the entire file to download, just a few seconds to a few 10 seconds to play and watch on the client. The remainder of the media file will continue downloading in the background. Compared with the simple way of downloading, this kind of streaming mode is not only shorten the startup delay greatly, but also reduce the demand of the system cache capacity. Another benefit of using streaming is that it makes it possible to transmit media data (such as live webcast, video conferencing, etc.) that are not known or sized in advance.

Up to now, there are three major streaming video formats used on the Internet: the RealNetworks Company's RealMedia, Apple's QuickTime, and Microsoft's Advanced streaming Format (ASF).

1.2 Protocols to support streaming media

A notable feature of multimedia applications is the large amount of data, and many applications require a high real-time performance. The traditional TCP protocol is a connection-oriented protocol, and its retransmission mechanism and congestion control mechanism are not suitable for real-time multimedia transmission. RTP is an application-type Transport layer protocol, which does not provide any guarantee of transmission reliability and traffic congestion control mechanism. RTP is located above UDP (User Datagram Protocol). Although UDP is not as reliable as TCP, and can not guarantee the service quality of real-time services, it needs RTCP real-time monitoring data transmission and service quality. However, because the transmission delay of UDP is lower than TCP, it can fit well with audio and video. Therefore, in practical applications, RTP/RTCP/UDP is used for audio/video media, while TCP is used for data and control signaling transmission. At present, the protocol that supports streaming media transmission mainly has real-time transmission protocol RTP (Real-time transport Protocol), real-time Transmission Control protocol RTCP Real-time transport and real-time streaming protocol RTSP (real-time streaming Protocol). These three types of protocols are briefly described below. The streaming media protocol stack is shown in Figure 1.

Figure 1 Streaming media protocol stack

2. Real-time Transport protocol RTP (Real-time transport Protocol):

RTP is a transport protocol for multimedia data streams on the Internet, published by the IETF (Internet Engineering Task Force) as a RFC1889. RTP is defined to work on a one-to-one or one-to-many transmission, with the purpose of providing time information and implementing streaming synchronization. The typical application of RTP is based on UDP, but it can also work on other protocols such as TCP or ATM. RTP itself only guarantees the transmission of real-time data and does not provide a reliable delivery mechanism for sequential packets delivery, nor does it provide flow control or congestion control, which relies on RTCP to provide these services.

2.1 RTP Working mechanism

A sharp problem that threatens multimedia data transmission is the unpredictable arrival time. But the transmission of streaming media requires the timely arrival of data for playback and playback. The RTP protocol provides a time tag, serial number, and other structures to control the banishment of timely data. In the concept of flow "time tag" is the most important information. The sending end sets the time label in the packet in accordance with the real-time sampling. Once the packet is received at the receiving end, it is restored to the original timely data according to the time label at the correct rate. Different media format properties are not the same. But RTP itself is not responsible for synchronization, RTP is only transport layer protocol, in order to simplify the transport layer processing, improve the efficiency of the layer. Move some Transport layer protocol functions (such as flow control) up to the application layer to complete. Synchronization is done by the application layer protocol. It does not have the complete function of Transport layer protocol, does not provide any mechanism to ensure real-time data transmission, does not support resource reservation, and does not guarantee service quality. RTP messages do not even include descriptions of length and message boundaries. At the same time, the data message and control message of RTP are adjacent to different ports, which greatly improves the flexibility of protocol and the simplicity of processing.

The RTP protocol and UDP both complete the Transport Layer protocol function. The UDP protocol only transmits packets, regardless of the chronological order in which packets are transmitted. The RTP Protocol data unit is hosted by a UDP packet. When a RTP packet is hosted, sometimes a frame of data is split into several packets with the same time tag, you can know that the time tag is not necessary. The multiplexing of UDP allows the RTP protocol to support explicit multicast delivery, which can meet the needs of multimedia sessions.

Although the RTP protocol is a transport layer protocol, it is not implemented as a separate layer in the OSI architecture. RTP is usually based on a specific application to provide services, RTP only provides a protocol framework, developers can be based on the specific requirements of the application of the agreement to expand fully.

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.