"Reprint" IP real-time Transmission protocol RTP/RTCP detailed

Source: Internet
Author: User

Http://www.chinaitlab.com/cisco/RIP/832426.html

1. Introduction

At present, the realization of real-time voice, video communication and application in IP network has become a mainstream technology and development direction of network application, this paper introduces the standard protocol RTP for real-time voice and video data transmission in IP protocol family (real-time Transport Protocol) and RTCP (RTP Control ptotocol) are the main features.

2. Introduction of RTP/RTCP protocol

RTP is defined by the IETF (www.ietf.org) in RFC 3550 and 3551.

RTP is defined as a transport protocol for transmitting real-time data, such as audio, video, analog data, and it is more focused on the real-time of data transmission than the traditional transport-layer protocol, which provides services including sequence number, time stamp, Transmission control and so on.

RTP is typically used in conjunction with the Auxiliary Control Protocol RTCP, RTP is responsible for the transmission of real-time data, and RTCP is responsible for out-of-band management of RTP communications and sessions (such as traffic control, congestion control, session source management, etc.).

3. RTP/RTCP protocol Hierarchy and encapsulation

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.

RTP packets contain only RTP data, and control is provided by another companion protocol, RTCP. RTP selects an unused even UDP port number between port numbers 1025 through 65535, while RTCP in the same session uses the next odd UDP port number.

RTP typically works with RTCP, which sends RTCP messages during the RTP session for each participant cycle. 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.

4. RTP/RTCP protocol Header information

Version (V): 2 bits

Indicates the RTP version number. The version number specified in the initial version of the Protocol 0,rfc3550 is 2.

Padding (P): 1 bit

If the bit is set, additional additional information is included at the end of the packet, and the last byte of the additional information represents the length of the extra additional information (including the byte itself). This field exists because some encryption mechanisms require a fixed-length block of data, or in order to transfer multiple RTP packets in a single underlying protocol data unit.

Extension (X): 1 bit

If the bit is set, there is an extension header after the fixed head, which is defined in RFC3550 5.3.1.

CSRC count (CC): 4 bits

The number of CSRC tags that exist after the head is fixed.

Marker (M): 1 bit

The function of this bit depends on the definition of the profile. Profile can change the length of the bit, but keep the marker and payload type Total length constant (8 bit altogether).

Payload Type (PT): 7 bits

The type of information that is tagged with the RTP packet, the standard type is listed in RFC3551. If the receiver does not recognize the type, the packet must be ignored.

Sequence Number:16 bits

Serial number, after each RTP packet is sent, the serial number is added 1, and the receiver can rearrange the packet order based on the serial number.

Timestamp:32 bits

Time stamp. Reflects the sampling time of the first byte in the packet carried by the RTP packet.

Ssrc:32 bits

The data source identity. Each data stream should have a different ssrc in the course of an RTP session.

CSRC list:0 to the items, each source identifies

The contribution data source identification. Only valid when there is mixer. such as a voice stream that combines multichannel voice streams into a single channel, the SSRC of each channel is listed here.

5. RTCP Agreement

The RTCP protocol processor is defined by five types of messages:

Rr:receiver Report

Sr:sender Report

Sdes:source description Items.

Bye:indicates end of participation.

App:application Specific functions

They perform the functions of receiving, analyzing, generating, and transmitting control messages.

RTCP can be said to be a traffic control protocol, which provides:

1) SR Sender Report Group: Used to make the sending end cycle report to all receivers in multicast mode. The content includes:

The ssrc of the RTP stream, the timestamp of the newly produced RTP packet in the RTP stream, and the absolute clock time (or wall time: wall), the number of packets that the RTP stream contains, and the number of bytes that the RTP stream contains.

Absolute clock time is necessary. Because RTP requires that one stream be used per media. With absolute clock time, graphics and sound can be synchronized.

2) RR recipient reporting Group: Used to make the receiving end periodically reporting to all points in a multicast manner. Content includes

The SSRC of the received RTP stream, the packet loss rate of the RTP stream, the ordinal of the last RTP packet in the RTP stream, the jitter of the packet arrival time interval, and so on.

There are two purposes of sending RR groupings. First, you can make all the receiving and sending sides understand the status of the current network.

Second, you can make all the sites that send RTCP packets adaptively adjust the rate at which they send RTCP packets, RTCP packet traffic does not exceed 5% of the traffic in the network packet, and the receiving end Packet report packet traffic should be less than 75% of all RTCP packet traffic.

3) SDEs Source Description Group: Gives a description of the participants in the session, including the participant's canonical name (CNAME)

4) Bye group: closes a data stream.

5) App grouping: The application can define a new grouping type.

6. Real-Time Streaming protocol RTSP protocol

1) RTSP protocol

The RTSP (Real time streaming Protocol) protocol defines how to efficiently transmit multimedia data over an IP network, which is a client-to-server multimedia description protocol, as described in RFC2326.

RTSP is an application-layer protocol that is very similar to HTTP. Each publication and media file is also defined as RTSP UPL. The publication of media files is written in a file called a media release, which is explained later. The descriptions in this file include Encoders, languages, RTSP ULS, addresses, port numbers with several other parameters. This release file can be obtained in the form of a client via email or HTTP.

2) features of the RTSP protocol:

RTSP is an application-layer protocol designed to fully stream services with RTP and RSVP.

RTSP has a lot of flexibility and can be used on a variety of operating systems, allowing clients to interact with different vendors ' service platforms.

RTSP is architecture-based on RTP and RTCP, and it uses RTP to complete data transfer. It transfers streaming media data to the client over a network that can be controlled.

RTSP maintains a fixed connection between the user's computer and the transport Flow Service server for the viewer to communicate with the unicast (Unicast) server and also allows two-way communication, where viewers can communicate with the streaming media server.

Provides actions such as pause, fast forward, reverse, jump, etc. in the form of "VCR". The resource object for the operation can be a live stream or a storage fragment.

RTSP is also provided with the option of transmitting channels such as UDP or multipoint UDP or TCP.

7. Resource Reservation Protocol RSVP

1) RSVP Protocol:

RSVP (resorce reservation Protocol) Resource Reservation protocol is not a routing protocol, but a signaling protocol in an IP network, which is combined with the routing protocol to achieve the quality of service (QoS) control of the network transport. RSVP was proposed to support integrated Internet services. This is a technology to solve the QoS (quality of Service) problem in IP communication, which is used to guarantee the end-to-end transmission bandwidth of the point.

2) How the RSVP protocol works:

RSVP uses control datagrams, which include information that needs to be checked by the router (and sometimes needs to be updated) when transmitting to a specific address, parsing the upper data content when the router needs to decide whether to check the contents of the datagram. The cost of this analysis is not small. Now, the network terminal uses it to apply for resources to the network, in this signal "application" contains the following information: The type of business? User type? What time is it? How much bandwidth is needed? Other reference information? After receiving the above-class information, the network will assign a priority code to the connection according to the actual situation, when the user uses the priority code for information transmission, the network does not need to re-analyze and discriminate the business, and from another point of view, using RSVP can reduce the delay of the information processing to a certain extent. Improve the efficiency of network nodes and improve the quality of service (QoS) of information transmission. Real-time applications use RSVP in order to maintain the necessary resources in the transmission path to ensure that requests are guaranteed to arrive.

RSVP is a profound step forward for the IP router to provide better quality of service. Traditionally, IP routers are only responsible for packet forwarding and know the address of neighboring routers through routing protocols. RSVP, like the signaling protocol for a circuit-switched system, negotiates each node (IP router) that it passes through for a data flow, negotiating this data stream with the endpoint to provide quality assurance.

8. Concluding remarks

In the previous we discussed some four protocols related to real-time data transfer:

1) RTP is a real-time data transfer Protocol. It provides a time-mark, serial number, and other methods to guarantee the processing time in real-time data transmission; It relies on rvsp to ensure the quality of service standards.

2) RTCP is the control part of RTP and is used to ensure service quality and member management.

3) RTSP is to start and guide streaming media data from the streaming media server. It can also be called "online Video recorder Control Protocol". It is to provide remote control, the specific data transmission is to RTP.

4) RSVP is a resource reservation protocol on the Internet, which uses RSVP to reserve a subset of network resources (that is, bandwidth) to provide QoS to some extent for streaming media transmission. Like a TCP postback and a sliding window.

"Reprint" IP real-time Transmission protocol RTP/RTCP detailed

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.