Basic RTP, RTCP, and RTSP knowledge

Source: Internet
Author: User

Streaming media refers to the continuous time-based media transmitted using stream technology in the network. It features that the entire file does not need to be downloaded before playback, but is played by downloading and playing, it is the technical basis for video conferences, IP phones, and other applications. RTP is a standard protocol and Key Technology for Real-Time Streaming Media transmission. This article describes how to program Real-Time Streaming Media Using jrtplib in Linux.

1. Introduction to streaming media
With the increasing popularity of the Internet, the data transmitted over the network is no longer limited to text and graphics, but gradually transitioned to multimedia formats such as sound and video. Currently, when transmitting audio/video (audio/video, A/V) and other multimedia files over the network, there are basically two options: Download and stream transmission. Generally, A/V files occupy a large amount of storage space. It may take several minutes or even hours to download files in a network with limited bandwidth, therefore, this processing method has a high latency. For streaming transmission, audio, video, animation, and other multimedia files will be sent continuously and in real time by a dedicated Streaming Media Server, so that you do not have to wait until all the files have been downloaded, it takes only a few seconds to start the delay. When the multimedia data is played on the client, the remaining part of the file will continue to be downloaded from the Streaming Media Server.
Streaming is a new concept that has emerged on the Internet in recent years. It is widely defined and is a general term for multimedia data transmission over the network. Streaming media has two meanings: Broadly speaking, streaming media refers to a series of techniques, methods, and protocols that allow audio and video to form a stable and continuous transmission stream and playback stream, that is, streaming media technology. In a narrow sense, streaming media is relative to the traditional download-playback method. It refers to a new method for obtaining audio, video, and other multimedia data from the Internet, it supports real-time transmission and real-time playback of multimedia data streams. By using streaming media technology, the server can send stable and continuous multimedia data streams to the client, and the client can play back the data at a stable rate while receiving the data, you don't have to wait until all the data has been downloaded before playback. Due to network bandwidth, computer processing capabilities, and protocol specifications, to download a large amount of audio and video data from the Internet, in terms of download time and storage space, it is unrealistic, and the emergence of streaming media technology is a good solution to this problem. Currently, there are two main methods to achieve streaming media transmission:
Streaming and realtime streaming are suitable for different applications.

Sequential stream transmission
Ordered stream transmission transmits data by means of sequential download. When downloading, you can play back multimedia data online. However, you can only view the downloaded data at a given time point. You cannot skip to the undownloaded data point, the download speed cannot be adjusted based on network conditions during transmission. Because the standard HTTP server can send this form of streaming media without the support of other special protocols, it is often called HTTP streaming transmission. Ordered stream transmission is suitable for high-quality multimedia clips, such as titles, credits, and advertisements.

Real-time stream transmission
Real-time stream transmission ensures that the media signal bandwidth can match the current network conditions, so that streaming media data is always transmitted in real time. Therefore, it is particularly suitable for on-site events. Real-time stream transmission supports random access, that is, users can view the content in front or back through fast forward or backward operations. Theoretically, real-time streaming media does not pause once it is played, but in fact it is still possible to pause periodically, especially when the network condition deteriorates. Different from Sequential stream transmission, real-time stream transmission requires a specific Streaming Media Server and supports specific network protocols.

RTP (Real-Time Transport Protocol) is a transmission protocol for multimedia data streams on the Internet. RTP is defined to work during one-to-one or one-to-many transmission. The purpose is to provide time information and implement stream synchronization. However, RTP usually uses UDP to transmit data. However, RTP can also work on other protocols such as TCP or ATM. When an application starts a RTP session, two ports are used: one for RTP and the other
RTCP. RTP itself does not provide a reliable transmission mechanism for Sequential transmission of data packets. It also does not provide traffic control or congestion control. It relies on RTCP to provide these services. Generally, the RTP algorithm is not implemented as an independent network layer. It is part of the application code. RTCP. RTCP (Real-Time Transport Control Protocol) and RTP provide traffic control and congestion control. During the RTP session, each participant periodically transmits the RTCP package. the RTCP package contains statistics such as the number of sent data packets and the number of lost data packets. therefore, the server can dynamically change the transmission rate or even the type of the payload. RTP and RTCP can be used together to optimize transmission efficiency with effective feedback and minimal overhead. Therefore, it is particularly suitable for transmitting real-time online data.

RTSP
Real-Time Streaming Protocol (RTSP) is proposed by Real Networks and Netscape. This Protocol defines how one-to-multiple applications can effectively transmit multimedia data over the LP network. RTSP is based on RTP and RTCP in architecture. It uses TCP or RTP for data transmission. HTTP compared with RTSP. HTTP sends HTML. RTP transmission is multimedia data. HTTP requests are sent by the client and the server responds. When RTSP is used, both the client and server can send requests, that is, RTSP can be bidirectional.

Differences:

RTP is a real-time transmission protocol, which is generally not processed as a separate application layer protocol; RTSP is a real-time stream transmission protocol, which is an application layer network protocol with the HTTP level, which is developed by RealMedia, used to transmit streaming media image files.  
  RTSP can be based on RTP, such as the common video stream transmission process: Video Compression file-> RTP package-> UDP-based RTSP network transmission; you can also not make RTP packets, direct transmission based on UDP, such as video compression files-> RTSP network transmission based on UDP.

Http://www.cnblogs.com/shelvenn/archive/2008/03/12/1101789.html

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.