RTSP Streaming Media Protocol

Source: Internet
Author: User
Tags iso 8601 rfc
This document details a standard Internet path protocol in the Internet transmission protocol, and further discussions and suggestions are required for improvement. Please refer to the correct standard Internet Protocol Agreement for standardized declarations and information related to this agreement. There is no limit to distributing this memorandum.

Abstract:
Real Time Streaming Media Protocol or RTSP is a tool for controlling real-time data transmission at the application layer. RTSP provides an extensible framework that enables controllable and on-demand transmission of real-time data, such as audio and video files. The source data can include on-site data feedback and stored files. This Protocol consciously Controls Multiple Data, transmits meetings, and provides an alternative transmission channel, such as UDP and multi-point transmission UDP,
And TCP, and a transfer mechanism based on RTP (rfc1889.
Directory content: (omitted ).

1. Introduction
1.1 Purpose
Real-Time Streaming Media transmission protocol is simple to establish and control, or several time synchronization, continuous media streams, such as audio and video. he is not representative of the transfer of continuous streams, although the staggered controlled continuous media streams are possible (see Chapter 10.12 ). in addition, RTSP provides network remote control for multimedia services.

The settings of the controlled stream are defined by an introduction description. This memo is not used to introduce the format defined for the image.

There is no RTSP connection concept here: as a replacement, maintenance of a server, a conference labeled by the verified person. An RTSP meeting will never be connected to a transport layer connection, for example, a TCP connection. In an RTSP meeting, an RTSP client can enable and disable many reliable uploaders and connect them to the server that sends the RTSP request. In this case, the client can use a connectionless transport protocol, such as UDP.

RTP can be used in the RTSP control flow, but the RTSP operation does not rely on the transmission mechanism of the normally transmitted continuous media. This Protocol is intentionally similar to HTTP/1.1 in operation. Therefore, the HTTP extension mechanism can be added to the RTSP to the maximum extent. However, many important differences between RTSP and HTTP are:
* RTSP introduces many new modes and has a different protocol identifier.
* An RTSP server needs to run normally in almost all locations by default.
* Both the RTSP server and the client must be able to send requests.
* Data is transmitted through different local protocols.
* RTSP is defined in ISO 10646 better than ISO 8859-1, so that it is consistent with the current HTML internationalization effort.
* Requires that the URI always include the absolute URI. Because backward compatibility is a huge mistake in history, HTTP/1.1 can only pass the required absolute path and put the host name on the unlinked title bar.
This makes the "VM" simpler. In this case, a single host with one IP Address can serve several file trees.

This agreement supports the following operations:
Retrieve media information from the Media Server:
The client can require an image to be described through HTTP or other modes. If an image is transmitted over multiple points, the image description contains the address and port used to transmit continuous media. If the image can only pass through unicast, the client must provide it to the target file for security.

Invitation to the Conference Media Server:
A Media Server can be invited to an existing meeting to play back the image and record all or part of the media file. This mode is useful for distributed teaching software. Click the remote control button to view several parts of the meeting.

Append an image to the media:
Especially for existing images, it is useful if the server can tell the client that supplementary media can be used.

In HTTP/1.1 [2], RTSP requests can be through proxy, channel, and cache.

1.2 requirements
Keywords in these documents are "required", "must not", "required", "yes", "no", "should", and "no ", "recommended", "yes", and "selectable" are described in rfc2119.

1.3 terms
Some terms are used in HTTP/1.1. I will not list them here.
Overall control:
Multi-stream control uses a simple timeline through the server. For audio/video feedback, you can use a client to send a simple start or pause command to control the video/audio feedback.
Discussion:
A multi-part, multi-media image. The multi-representation is greater than or equal to one.
Client:
The client requests continuous media data from the server.
Connection:
The Transport Layer virtual line between two programs for communication purposes.
Container file:
It can contain multimedia files. When files containing images are opened. The RTSP server can provide overall control over these files, although the concept of container files is not embedded in the Protocol.
Continuous Media:
Data is the real-time relationship between the data source and the connection. That is to say, there must be a continuous link between the receiver and the data source. The most common example of continuous media is audio and animated video. The connected media can work interactively. They are closely related to the source and receiver in real time. Or stream form. This relationship is not so strict.
Entity:
It is used to transmit information as a valid load of a request or response. An object contains information in the header and content in the object. These are described in Chapter 8.
Media initialization:
Special initialization of Multimedia Digital codec, including clock rate and color table. Any independent transmitter information request is implemented through the replay of the media stream in the media initialization setting phase of the client.
Media parameters:
A specific parameter of a media type can be changed before or during stream replay.
Media Server:
If the server replays one or more media streams, the images in different media streams can come from different media servers. A Media Server can be placed on the same or different hosts as the call network server.
Media Server detour:
Redirect a media client to a different media server.
Stream:
A simple media instance, such as an audio stream or a simple white shift or shared application group, when RTP is used, A stream consists of the created RTP and RTCP In the RTP cycle, which is the same as the definition of the DSM-CC stream.
Message:
The basic unit of RTSP communication. It consists of the structured sequence of the Eight-bit matching syntax defined in Chapter 15 and is transferred through a connection or connectionless protocol.
Participants:
A meeting Member. A participant can be a machine, such as a media record or replay server.
Statement:
A set of one or more streams are used as full media feedback, and the following statements are used to deliver them to the client. In most cases in the RTSP context, this indicates the main control of these streams, but it is not necessary.
Statement description:
A statement describes information about one or more media streams in a statement. For example, a set of connection codes, network addresses, and information. In addition, tetf protocols like SDP use on-site presentations as meetings. This statement can be in different formats, not just the arrangement of the SDP in the Conference description.
Response:
An RTSP response. If an HTTP response is acceptable, it can be clearly expressed.
Request;
An RTSP request. If an HTTP request is accepted, it can be clearly expressed.
RTSP meeting:
A complete RTSO processing. For example, watching a movie. A meeting is usually a transmission mechanism established by the client for a continuous media stream. A stream starts from playing or recording and stops the stream.
Transmitter initialization:
Discuss the transmitter information (port number, transmission protocol, etc.) between the client and the server.

1.4 Protocol attributes
RTSP has the following attributes:
Scalability:
The new mode and parameters can be easily added to the RTSP.
Easy to parse:
RTSP can be parsed by standard HTTP or mime.
Security:
RTSP also uses the network security mechanism. All HTTP verification mechanisms, such as the basic (RFC 2068 [Chapter 2, 11]) and classification, can be used directly, or the transmitter or network layer security mechanisms can be reused.
Transmission independence:
RTSP can use User Datagram Protocol (RFC 768), reliable transmission protocol (RDP, RFC 1151, not widely used), or reliable stream protocol, such as TCP, as a reliable execution application layer.
Multi-server capability:
Each media stream can be transmitted from different servers during playback. Different media servers on the client automatically create several concurrent control meetings. Media Synchronization is performed at the transport layer.
Record Device Control:
This protocol can control both video recording and playback, or select a mode.
Separation of flow control and start of the meeting:
Traffic control is separated from a conference Media Server. The only requirement is that the meeting start agreement can be provided and a new meeting identifier can be created. In special cases, STPS or h.233 can create a conference server.
Suitable for professional applications:
RTSP supports the precision of the framework layer. The time is marked by the SMPTE time to allow slight data editing.
Neutral playing types:
This Protocol does not enhance a special playback description or graph file format, as well as a type that can be used for transmission. However, the playback description must contain at least one RTSP connection.
Proxy and firewall friendliness:
This protocol should be easily grasped through both the application layer and the transport layer firewall. A firewall needs to establish the mode of opening a "hole" for UDP media streams.
HTTP friendliness:
After clarifying the concept of re-using HTTP by RTSP. In this way, the current infrastructure can be used again. This infrastructure includes labeling and content location pics. However, after controlling continuous media in most cases requires the server status, RTSP cannot be added to HTTP.
Allocate Server Control:
If the client can start a stream, it must be able to stop the stream. The server should not start the stream for the client, so that the client cannot stop the flow of the stream.
Transmission negotiation:
The client can negotiate the transmission method before handling continuous media streams.
Capability negotiation:
If the basic features are unavailable, the client must have some cleanup mechanism to determine which method is not implemented. This allows the client to present an appropriate user interface. For example, if the user interface is not allowed to find a location indicator, the user interface must be able to refuse to recognize the position indicator of the mobile taxi.

The early requirement in RTSP is the ability of multiple clients. However, it is determined that there is a better way to make this protocol easily scalable to multiple clients. Stream identifiers can be used by several control flows, so that "Remote Access" is possible. This Agreement does not cover approaches to client negotiation. This is delegated to "social agreements" and some other layer control mechanisms.

1.5rtsp Extension
If all media servers do not have the same functionality, it is necessary for media servers to support different sets of requirements. For example:
* In this way, the server may only be capable of replaying, without the need to support record requirements.
* If it only supports on-site events, the server may not be able to find location capabilities (absolute positioning ).
* Some servers do not support stream playback parameters or get_parameter and set_parameter.
The server should implement all the functions described in section 12th.
Not asking about the server is impossible to be the highest level as the creator of the playback description. This is similar to HTTP/1.1 [2]. In this case, the methods described in [h19.6] cannot be supported by all servers. RTSP can be extended in the 3 method, where tables are organized in the order of the supported variable sizes.
* To extend these modes to new parameters, as long as these parameters can be ignored by the container. (This is equivalent to adding the new parameter to the HTML signature .) If the mode extension is not supported, the client must provide a negative capability. A tag corresponding to the extension must also be added to the request: Failed (See Chapter 12.32 ).
* The new method can be added. If the recipient of the information does not understand the requirements, it uses error code 501 to respond (implement), and the sender should not try to use this method again. In addition, the client can use any method to query the methods supported by the server. The server should compile the methods it supports into a table as a public answer title.
* The new version of the agreement allows almost all aspects (except the location of the version number of the agreement) to be changed and can be defined.

1.6 overall operation
Every statement and media stream are identified near rtsp url. The attributes of all statements and media descriptions are defined by the statement description file. The format is the scope of the statement. The playback description file is obtained through the client using HTTP or something like email, and does not need to be placed on the Media Server.
For this purpose, it was assumed that the statement described more than one -- each containing the same timeline. Because the description is simple and pervasive, a statement description includes such a statement exactly. A statement can contain several media streams.
The statement description file contains the definition description of the media stream that constitutes the statement, including their encoding, language, and other parameters that enable the client to select the most appropriate combination of media.
In this statement, each media stream controlled by RTSP is identified by the rtsp url, where the special media stream points to the media server and the stream named on the server. Several media streams can be placed on different servers;
For example, audio and video streams are cut to pass through the server. The description also lists the transfer methods that can be performed by the server.
In addition to media parameters, the destination network address and port need to be determined. Several operations can also be identified:
Unicast:
The media uses the port number selected by the client to be sent to the source required by RTSP. As a choice, the media is transmitted in the same reliable stream as RTSP.
Multi-point selection, server selection address:
Select the address and port of the Media Server. This is a typical scenario of on-site or VOD Transmission.
Multi-point selection, client selection address:
If the server participates in an existing multi-point transfer meeting, multi-point transfer port, address, and password key meeting description, outside the scope of this description.
1.7 RTSP Regulations
RTSP can control the sent stream through an independent control channel through a separate protocol. For example, when RTSP data flows through UDP, It is controlled in a TCP connection. In this way, data can be transmitted even if the media does not receive the RTSP request. In addition, in its cycle, a single media stream can be controlled by requests continuously sent by RTSP on different TCP connections. Therefore, servers need to maintain the meeting form to combine RTSP requirements with the stream. This form conversion is described in Part.
However, the following defines the core role of stream resource allocation and usage on the server:
Create, play, video, pause, and close.
Creation:
Let the server allocate resources to the stream and start the RTSP meeting.
Playback and video recording;
The allocated stream is transmitted after creation.
Pause:
Temporarily suspend the stream on the server.
Close:
Obtain resources freely associated with streams. The RTSP meeting is stopped on the server.
The RTSP mode is attributed to the use of the Meeting identifier (section 12.37) to identify ongoing RTSP meetings. The server generates a meeting identifier as a response to the preparation requirements (section 10.4 ).

1.8 contact with other Protocols
RTSP has some duplicates in HTTP functions. It can also use the initial connection of the stream content to connect to HTTP, and complete the work through the web page. The current agreement indicates that you want to allow different transfer points between the network server that implements the RTSP and the Media Server. For example, the statement expression is obtained using HTTP or RTSP, which can reduce the workload of Web browsers and allow independent RTSP servers and HTTP-independent clients.
However, RTSP is fundamentally different from HTTP in data transmission over different protocols. HTTP is an asymmetric Protocol requested by the client and the server responds. In RTSP, the media client and Media Server are available
. In addition, there is no limit to the RTSP requirement: After the requirement is accepted, they can set parameters to continue to control the media stream for a long time.
Repeat HTTP functionality in at least two places: security and proxy. They need very similar conditions, so they are valuable in buffering, proxy and proof of ability to adapt to HTTP work.
When most real-time media use RTP like the transport protocol, RTSP is not bound to RTP.
The existence format of the RTSP assumption statement can be static or dynamic, and contains the attributes of several server streams.

2 International Agreements
Since definitions and syntaxes are similar to HTTP/1.1 in many places, it means that they are defined rather than copying part of it. For simplicity, the x.y section of [HX. Y] in HTTP/1.1 (RFC [2] 2068) is mentioned.
All specified mechanisms in this file can be described in prose and Extended Backus-Naur methods similar to methods in [h2.1. This will be described in detail in RFC 2234 [17], which is different from the "1 #" differentiation mark proposed in the RTSP statement.
In this record, we use alternate and small paragraphs to provide background and motivation. This is intended for readers who are not expressing a formula for understanding why their RTSP methods are formulated.

3. Protocol Parameters
Protocol Version 3.1
[H3.1] Use RTSP instead of HTTP.
3.2 RTSP URL
The "RTSP" and "rtspu" plans are used to access network resources through the RTSP protocol. This section defines the unique syntax and statements of rtsp url.
Rtsp_url = ("rtsp:" | "rtspu :")
"//" Host [":" port] [abs_path]
Host = <a legal Internet host domain name of IP Address
(In dotted decimal form), as defined by section 2.1 of RFC 1123/CITE {rfc1123}>
Port = * Digit
Abs_path is defined in [h3.2.1 ].
Fragment and question identifiers are useless at this time and need to be explained on the RTSP server.
The RTSP configuration requires instructions to be sent by reliable protocols (within the Internet and TCP). On the other hand, the rtspu identification protocol is untrusted (within the Internet and UDP ).
If the port is empty or is not given, port 554 is assumed. Resources identified by the syntax plan can monitor TCP connections on the server or control UDP packets on the host port through RTSP. The request connection for these resources is RTSP-URL.
In the URL, IP addresses should be disabled whenever possible.
Identifies the URL (RFC [20] 1738) Character Set and escape rule [h3.2] by presenting or circulating original media identifiers. The URL can refer to the stream or stream set, such as the description. Therefore, the requirements described in section 10th apply to all statements and individual flows within the scope of the statement. Some of the required methods can only be used to stream, not to make a statement, or vice versa.
Example: rtsp url rtsp: // media.example.com: 554/twister/audiotrack
Within the statement, different audio streams are wound together and a control signal is sent through the RTSP request, and a TCP connection is sent to port 554 of media.example.com.
You can also set the connection to rtsp: // media.example.com: 554/Twister.
Different things are wound together, which can be composed of audio or video.
This does not mean that there is a standard path to the reference stream in the URL. A description defines the hierarchical relationship between a stream and a URL. The expression description can be named for the stream "A. mov" and all the statements "B. mov. For the client, the Path Components of the rtsp url are not transparent. The server does not imply any special file system structure.
This weakening measure also allows the expression to simply replace the protocol with a URL using a non-RTSP media control protocol.
3.3 meeting identifier
The Conference identifier is not transparent to the RTSP and is encoded using the standard URI encoding method (I. e., LWS is extended by %. It can contain any eight-bit value. The meeting identifier must be globally unique. For H.323, the value of the Meeting identifier is used.
Conference-id = 1 * xchar
The meeting identifier is used to allow the RTSP meeting to obtain the multimedia meeting parameters that the Media Server participates in. Those meetings are created by protocols outside the scope of this description, such as H.323 or sip [12]. Instead of the transmission information provided by the RTSP customer, for example, it requests the Media Server to replace the value in the meeting report.
3.4 traffic identifier
The identifier is not transparent to strings of any length. The linear blank must be uri extension. A telephone identifier must be random and at least eight characters long to make it difficult to guess. (See Section 16)
Session-id = 1 * (alpha | digit | safe)
3.5 SMPTE relative time mark
An SMPTE relative time mark represents the time relative to the start time of the clip. The relative time mark is expressed as the time code of the precision of the SMPTE frame number Channel. The time code is in the format of hour: minute: Second; frame. Split frame, starting from the beginning of the clip. The default SMPTE format is "SMPTE 30-point", and the frame speed is 29.97 frames per second. Other SMPTE code may be supported (for example, "SMPTE 25") by using the available "SMPTE time. The "frame" field in the time value can be defined between 0 and 29. The loss of the first two frames per minute between 30 and 29.97 frames, except for the tenth minute. If the frame value is 0, it may be ignored. The sub-frame is an average of 1/100 of a frame.

SMPTE-range = SMPTE-type "=" SMPTE-time "-" [SMPTE-time]
SMPTE-type = "SMPTE" | "smpte-30-drop" | "smpte-25"
; Other timecodes may be added
SMPTE-time = 1*2 digit ":" 1*2 digit ":" 1*2 digit [":" 1*2 digit]
["." 1*2 digit]

For example:
SMPTE = 10: 12: 33: 20-
SMPTE = 10:07:33-
SMPTE = 10:07:00-10: 07: 33: 05.01
Smpte-25 = 10:07:00-10: 07: 33: 05.01
3.6 normal playback time
The normal playback time (NTS) indicates the absolute position of the stream that is related to the start of the performance. The left side of the number can be second or hour, minute, or second. The right side of the number can be used to determine the part of a second. The program's initial response should start in 0.0 seconds.
The negative value cannot be defined. A special number is defined as the current instant of an event. It may only be used for site events.
It is defined in DSM-CC: intuitively, It is the clock that contacts the audience and the program. It is often digitalized on VCR. When a normal approach is adopted, the apsaravideo protocol works in normal playback mode (analog 1) During fast forward, consumes in reverse mode, and is fixed at stopped time.
NLE-range = (NLE-time "-" [NLE-time]) | ("-" NLE-Time)
Treaty-time = "now" | treaty-sec | treaty-hhmmss
-Sec = 1 * digit ["." * digit]
Treaty-hhmmss = treaty-hh ":" treaty-mm ":" treaty-ss ["." * digit]
Treaty-HH = 1 * digit; any positive number
NMT-Mm = 1*2 digit; 0-59
Ns-ss = 1*2 digit; 0-59

For example:
Treaty = 123.45-125
Treaty = 12:05:35. 3-
Treaty = now-
The syntax is based on ISO 8601. The NMT-sec flag method is automatically optimized and consumed by the human NTP-hhmmss flag. The "now" constant allows the client to receive feedback from the site rather than reserve or delay the version. The absolute time and 0 times are not suitable for this situation.
3.7 absolute time
Absolute Time as ISO 8601 time slice is clear. The second feature of UTC can be used to indicate.
UTC-range = "Clock" "=" UTC-time "-" [UTC-time]
UTC-time = UTC-Date "T" UTC-time "Z"
UTC-date = 8 digit; <yyyymmdd>
UTC-time = 6 digit ["." fraction]; The example of November 8, 1996 and 2.25 UTC in 14h37 and 20:
19961108t143720. 25z
3.8 select a tag
The signature is used in these needs (section 12.32) and the proxy header file is required.
Syntax: Option-tag = 1 * xchar
The creator of any new RTSP should provide the opposite domain name (for example, "com. foo. "mynewfeature" is the name that the inventor can touch on "foo.com". He can choose to add a prefix or use the Internet-authorized digital assignment board (IANA ).
3.81 register a new selection tag with IANA
When registering a new RTSP selection tag, the following information should be provided:
* Name, and select any description. The name can be any length, but should be longer than 20 characters. The name does not need to include any space, control letter or period.
* Instructions on changes controlled by any choice (such as IETF, International Standardization Organization, International Telecommunication Union-T, other international standardization entities, associations, or some companies;
* If available, a reference for further description of long term documents, RFC, published paper, patent file archiving, technical reports, or the computer manual can be made into an electronic document;
* For any choice of the holder, contact the information (postal and email addresses;
.
 

Related Article

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.