RTP/RTSP/RTCP protocol Detailed

Source: Internet
Author: User
Tags time interval

Last time I talked about the XMPP protocol, this encounters another protocol, RTP. xmpp:http://blog.csdn.net/shinichr/article/details/23832157

Concept:

RTP English name is real-time Stream Protocol, as the name implies a very high real-time protocol. This protocol is similar to the HTTP protocol, which is plain text to send the message, the difference is that RTP is stateful, HTTP is stateless. How do you understand that? After the HTTP protocol is sent, the connection is disconnected, and the next one is not dependent on the last time, and the RTP protocol needs to know what state it is now and what message it can send ...

RTP is used to provide end-to-end real-time transmission services for many multimedia data, such as voice, image, fax, etc., which need real-time transmission. RTP provides time information and stream synchronization for the upper-end real-time transmission of the Internet, but it does not guarantee the quality of service and the quality of service is provided by RTCP.

Rtp:real-time Transport Protocol, real-time transmission protocol, generally used for the transmission of multimedia data.

The RTCP:RTP control Protocol, real-time transmission protocol, with RTP for data transmission monitoring, control functions.

Rtsp:real Time streaming Protocol, live streaming protocol for multimedia data flow control, such as playback, pause, etc.

RTP/RTCP can be used for video conferencing, video broadcasting, and other high-level protocols, as opposed to the underlying transport layer, and RTSP,SIP.

Why should they be paired with these protocols? RTP is located on the Transport layer (usually UDP), under the application, real-time voice, video data after the analog-to-digital conversion and compression encoding processing, the RTP package is first sent to the RTP data unit, the RTP data unit is encapsulated as a UDP datagram, and then submitted down to the IP encapsulation as IP packets. So RTP is not guaranteed to transmit successfully,

How can that be guaranteed? will use the RTCP.

The RTCP message contains packet loss statistics and network congestion information, which the server can use to dynamically change the transmission rate and even change the type of the payload. The RTCP message is also encapsulated as a UDP datagram for transmission.


applications for RTP:

RTP is used to transmit real-time data in a unicast or multicast network.

1: Simple multicast audio conferencing. Language communication is implemented through a multicast address and a pair of ports, one for the audio data RTP, and one for the control package RTCP

2: Audio Video conferencing. The two media will be transferred separately in different RTP sessions, which will need to be based on the timing information in the RTCP package (Network Time Protocol)

3: Translator or mixer:

Once I do not know how to realize the bottom of the broadcast, I do not know how you see the RTP so far after the thinking.

There are two main ways of transmitting audio and video information on the Internet: one is download, the other is streaming.

In the case of download, we all know that it is going to be finished before it can be played. This is obviously not the right thing to do in a video conference. Streaming is the key technology to realize streaming media.

You can use streaming to download and watch streaming programs while downloading. Because the Internet is based on packet transmission, it is a piece of the pass. So the delivery of the package will have you to first, or I arrived first situation.

In order to reduce delay and recovery packet timing, on the sending side, we need to compress the data as much as possible, at the receiving end, in order to restore the timing, we need a buffer. The data packet timing can be recovered by sorting the buffered data.

Put the ordered data into the playback buffer, why do you want a play buffer it. This is because, if the network is not ideal (our country's speed, there is no need to paste the data), we get a sorted packet time interval is not equal. If there is no playback buffer, the playback will have a time delay jitter. Using the play buffer, when the playback is started, it takes dozens of seconds to fill the buffer first, which can effectively eliminate the delay jitter and realize the smooth playback of the streaming media without losing real time.


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.