Video Transmission protocol Summary, bit rate __ Video protocol

Source: Internet
Author: User

Video image transmission has the following characteristics: 1 requirements for small transmission delay, high real-time, 2 transmission flow, requiring high transmission efficiency; 3 allow transmission errors or data loss on certain programs. According to the above characteristics, it is more ideal to use UDP protocol to transmit video relative to TCP protocol.

UDP is the abbreviation of User Datagram protocol, the Chinese name is a Subscriber datagram protocol, and is a connectionless transport layer protocol in the OSI Reference Model. It is an unreliable communication protocol to send data directly to the receiver without first establishing a connection with the other before formal communication. It is because the UDP protocol does not care about the network data transmission a series of States, makes the UDP protocol in the data transmission process saves the massive network condition confirmation and the data confirmation system resource consumption, greatly enhances the UDP protocol the transmission efficiency, the transmission speed is fast. TCP (Transport Controlprotocol) protocol is a connection-oriented transport protocol, the communication needs to establish a connection, transmission delay is large, TCP recognition and retransmission mechanism, flow control mechanism can ensure reliable data transmission, but the processing process is complex and inefficient, for audio and video streaming , frequent acknowledgement and retransmission cannot guarantee the real-time transmission of data, so it is relatively unsuitable for the transmission of video images.


Summed up in a simple sentence: RTSP initiated/terminated streaming media, RTP transmission stream Media data, RTCP control of RTP, synchronization.
The reason for this is a bit confusing, because the CTC standard does not have RTCP requirements, so in the standard RTSP code does not see the relevant part. In the private RTSP code, the control, synchronization, etc., are implemented in the RTP header for extended definitions.
In addition, RFC3550 can be seen as a RFC1889 upgrade document, only to see RFC3550.
RTP: Real-time Transfer Protocol (real-time transport Protocol)

RTP/RTCP is the protocol that actually transmits data
RTP Transmission of audio/video data, if the play,server is sent to the client side, if the record, can be sent by the client to the server
The RTP protocol consists of two closely related components: RTP data Protocol and RTP control Protocol (i.e. RTCP)

RTSP: Live Streaming Protocol (real time streaming protocol,rtsp)

RTSP request mainly has describe,setup,play,pause,teardown,options, as the name implies can know to play the role of dialogue and control
During the RTSP dialog, Setup can determine which ports rtp/rtcp uses, and Play/pause/teardown can start or stop RTP delivery, etc.

RTCP:

RTP/RTCP is the protocol that actually transmits data
RTCP includes sender and receiver, which are used for audio/video synchronization and other purposes, and are a control protocol

The following is an overview of each protocol:
First, RTP data protocol
The RTP data protocol is responsible for the packet of streaming media data and the real-time transmission of the media stream. Each RTP datagram consists of two parts of the head (header) and load (Payload), where the first 12 bytes of the head are fixed and the payload can be audio or video data. The header format of the RTP datagram is shown in Figure 1:



Some of the more important fields and their significance are as follows:

The Regulatory Commission (CC): Represents the number of identification for the CSRC. The CSRC logo, immediately following the RTP fixed head, is used to represent the source of the RTP datagram, which allows multiple data sources to be present in the same session, which can be merged into a single data source through the RTP mixer. For example, you could generate a list of the lists of the regulators to represent a conference call that combines the speech data of all speakers into a RTP data source through a RTP mixer.

Load Type (PT): Indicates the RTP load format, including the encoding algorithm used, sampling frequency, bearer channel and so on. For example, type 2 indicates that the RTP packet contains speech data encoded using the ITU g.721 algorithm, with a sampling frequency of 8000Hz and mono.

Serial number: Used to provide a way for the receiver to detect data loss, but how to handle lost data is an application's own business, and the RTP protocol itself is not responsible for retransmission of data.

Timestamp: The sample time of the first byte in the load is recorded, and the receiver can timestamp to determine whether the arrival of the data is affected by the delay jitter, but how to compensate for the delay jitter is the application's own business.

It is easy to see from the format of RTP datagram that it contains the type, format, serial number, time stamp and additional data of the transmission media, which provides the basis for streaming media transmission in real time. The RTP protocol is designed to provide end-to-end transport services for real-time data (such as interactive audio and video), so there is no concept of connectivity in RTP, which can be built on the underlying connection-oriented or connectionless transport protocol, and RTP does not rely on special network address formats, Only the underlying transport protocol support Group frames (Framing) and segments (segmentation) is sufficient, and RTP itself does not provide any reliability mechanisms, which are guaranteed by the transport protocol or the application itself. In typical applications, RTP is generally implemented as part of an application on the transport Protocol, as shown in Figure 2:

Second, RTCP Control protocol
The RTCP control protocol needs to be used in conjunction with the RTP data protocol, which uses two ports at the same time when the application initiates a RTP session, respectively, for both RTP and RTCP. RTP itself does not provide a reliable guarantee for the sequential transmission of packets, nor does it provide flow control and congestion control, which is done by RTCP. Usually RTCP will use the same distribution mechanism as RTP, periodically send control information to all members of the session, the application receives the data, obtains the relevant data of the session participant, and the network condition, the packet loss probability and other feedback information, It can control the quality of the service or diagnose the network condition.

The functions of the RTCP protocol are implemented through different RTCP datagrams, which are mainly as follows:

SR: The sender side reports that the sender is the application or terminal that emits the RTP datagram, and the sender can also be the receiving end.

RR: The receiving end reports that the receiver is an application or terminal that only receives but does not send RTP datagrams.

SDEs: Source Description, the main function is as a session member of the identity information of the carrier, such as user name, mail address, telephone number, in addition to the session members to communicate the control information function.

BYE: Notify departure, the main function is to indicate that one or several sources are no longer valid, that is, notify the other members of the session themselves will exit the session.

App: defined by the application itself, solves the RTCP extensibility problem and provides a lot of flexibility for the implementation of the Protocol.

The RTCP datagram carries the necessary information of service quality monitoring, can adjust the service quality dynamically, and can control the network congestion effectively. Because the RTCP datagram is multicast, all members of the session can understand the current situation of other participants through the control information returned by the RTCP datagram.
In a typical application scenario, an application that sends a streaming stream will periodically generate a send-side report SR, which contains synchronization information between different media streams, and a count of datagrams and bytes that have been sent, based on which the receiver can estimate the actual data transfer rate (RTCP). On the other hand, the receiving end sends a receive-side report RR to all known senders, which contains important information such as the maximum serial number of the received datagram, the number of lost datagrams, delay jitter, and time stamp, which can be used to estimate the round-trip delay based on this information, The transmission rate can be adjusted dynamically according to the loss probability and delay jitter of the datagram to improve the network congestion condition, or adjust the service quality of the application smoothly according to the network condition.

Iii. RTSP Real-time Streaming protocol
As an application layer protocol, RTSP provides an extensible framework that makes it possible to control and demand real-time streaming media data. In general, RTSP is a streaming media representation protocol that is used primarily to control the sending of data with real-time characteristics, but it does not transmit data itself, but must rely on some services provided by the underlying transport protocol. RTSP can provide streaming media such as playback, pause, fast-forward and so on, it is responsible for defining specific control messages, operating methods, status codes, in addition to the interaction between RTP (RFC2326).

RTSP in the formulation of more reference to the http/1.1 protocol, and even many descriptions and http/1.1 exactly the same. RTSP's deliberate use of syntax and operations similar to http/1.1 is largely intended to be compatible with the existing Web infrastructure, which is why the http/1.1 extension mechanism can be introduced directly into RTSP.
A collection of media streams controlled by RTSP can be defined by a presentation description (presentation Description), which refers to a collection of one or more media streams that the streaming media server provides to the client, and the description contains information about each media stream in the such as data encoding/decoding algorithm, network address, the content of the media stream.
Although the RTSP server also uses identifiers to differentiate each class of connection sessions (session), the RTSP connection is not bound to a transport layer connection (such as TCP), which means that during the entire RTSP connection, RTSP users can turn on or off multiple reliable transport connections to the RTSP server to issue RTSP requests. In addition, RTSP connections can be based on connectionless transport protocols such as UDP.

The RTSP protocol currently supports the following operations:

Retrieving media: Allows a user to submit a presentation description to the media server via HTTP or other means. If the representation is multicast, the description contains the multicast address and port number for the media stream, and if the representation is unicast, only the destination address should be provided for security in the presentation description.

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.