RTSP protocol research and its implementation in a VOD

xiaoxiao2021-03-06  45

Zhang Lin Wang Furong With the development of computer networks and the continuous improvement of information diversification demand, the application of streaming media technology is increasingly popular, and the interactive VOD (Video On Demand) implemented by streaming media technology. On-demand technology has also been continuously developed. Streaming media technology is proposed to address multimedia information on medium and low bandwidth networks (with the focus of audio and audio information) transmission issues. With streaming media technology, it is possible to effectively break through the bandwidth "bottleneck" of the low bit rate to access the Internet mode. 1 streaming medium technology and RTSP protocol 1.1 streaming media technology flow media technology is a series of techniques, methods, and agreements of audio, video forming stable and continuous transport streams and back-discharge, only to refer to the difference Traditional playback technology for new technologies for publishing multimedia data streams on IP networks. The difference between streaming technology and traditional playback technology is that traditional playing technology is downloaded from the client from the server, and then played; streaming media technology uses streaming mode, the entire multimedia file through special compression method Divided into a compressed package, which is continuously transmitted by the video server, and the user can transmit the entire file download, while downloading the subsequent compression package while downloading the compression package that is transferred in front, while downloading the subsequent compression package, so that the startup latency is substantially Shorten, and the demand for system caching capacity is also greatly reduced. Streaming media refers to the media format that is played in the Internet in a streaming. Realization of streaming requires a suitable transmission protocol. Currently, protocols that support streaming media are mainly real-time transport protocol RTP (Real-Time Transport Protocol, a transport protocol for multimedia data streams on the Internet), real-time transmission control RTCP (Real-Time Transport Control Protocol, and RTP provides traffic control and congestion control), real-time flow protocol RTSP (Real-Time Streaming Protocol), reserved Resource Protocol RSVP (Resource Reserve Protocol). 1.2RTSP Protocol Real-Time Flow Protocol RTSP is proposed by Real Networks and NetScape, which defines how a multimedia data is transmitted efficiently through IP networks, usually does not send continuous streams. It can be said that the RTSP acts as a network remote control of the multimedia server and controls the transmission of real-time data. RTSP is the application level protocol, which can transmit RTSP via TCP or UDP. On the architecture, RTSP is located on RTP and RTCP. Use TCP or RTP to complete data transmission (RTP usually use UDP to transmit data), but RTSP operation is not dependent The transmission mechanism carrying continuous media. RTSP is similar to HTTP / 1.1 in syntax and operation, so the HTTP expansion mechanism can be added to RTSP. However, HTTP transmits HTML compared to RTSP, while RTP is transmitted by multimedia data; HTTP request is issued by the client, the server responds; when using RTSP, the client and server can issue a request, that is, RTSP can be bidirectional. In the RTSP protocol, each representation and the corresponding media stream are identified by an RTSP URL (Uniform Resource Locator), the entire representation and media characteristics are defined in a representation description file, which may include media encoding, RTSP URLs, target addresses, port numbers, and other related parameters. The user must first obtain the representative parameters from the media server before requesting a continuous media stream service to the media server.

You can use HTTP or other methods to get a description file, and this file is not necessary to save on the media server. All operations in the RTSP are done through the message response of the server and the client, including the request and answer two categories. The format of the request message is as follows: RTSP message = Request -Line CRLFCRLFCRLFCRLF Among the representation of the message header, Request -Line is a specific request command and related information, the format is as follows: RequestLine = Method SP Request-URL SP RTSP -Version, Method is a request command, and the request-url is the media representation address, and RTSP-VERSION is the protocol version number. Common request messages include: Describe, Setup, Get_Parameter, Set_Parameter, Options, Redirect, Play, Pause, Teardown, etc. Some of this may be sent by the customer to the server, or by the server to the client, two-way, such as get_Parameter, Options, etc. Some can only be transmitted in one direction, such as Describe can only be sent to the server by the customer. Detailed introduction can be referred to RFC2326. The format of the RTSP response message is as follows: RTSP Message = statusLine CRLFCRLFCRLFCRLF where statusline = RTSP -VERSION SP statuscode sp reason -phrase crlf, Statuscode is a 3-bit state code, indicating the host status, Reason-phrase is a text explanation corresponding to the status code. RTSP is operating the creation, initialization, VCR control, and removal operation of the media stream through the message response of the server and the client. 2RTSP Application In the VOD system, a VOD system for our design implementation uses the main mechanism from backup management and multi-server load sharing, and applies RTSP protocol to implement network remote playback management. Figure 1 shows the overall structure of the VOD system, where the primary server A also acts as a web server in addition to the function of playing a play server, and is responsible for the load balancing and other playback management functions of the server system; from the server B as the primary server A The backup server, like the play server, when the playback server is working properly, in the case where the primary server A cannot work, to ensure the stability of the entire system; play the server to run the video server program, send the on-demand customers to send it needs Multimedia data, which can meet the larger capacity of lower system costs, but also guarantee the stability and reliability of the entire system. Figure 1 VOD system Structure master A and programs running from server B include web server programs, video server programs, and database systems 3 large blocks. The web server sends multimedia data to the description file of multimedia data, the video server listening to the customer's on-demand requirements and makes the corresponding response, the database system stores detailed information for video data, such as the file name, file size, server address, etc., the server address, etc. On-demand records and other required information. Figure 2 The simplest on-demand flowchart Figure 2 depicts a normal simplest on-demand process. The client (such as the set-top box plus display) is first connected to the primary server A. Get the description file of the description of the desired video data via HTTP, and send the setup message according to the file name, the address is the primary player. A address. The main player A gets the setup message, querying the client's address in the database, and tells the client in the message of Setup Response, which is used to represent the URL of the user needs multimedia files.

转载请注明原文地址:https://www.9cbs.com/read-74464.html

New Post(0)