Network Working Group H. Schulzrinne Request for Comments: 2326 Columbia U. Category: Standards Track A. Rao Netscape R. Lanphier RealNetworks April 1998
Network Working Group H. Schulzrinne Request for Comments: 2326 Columbia U. Category: Standards Track A. Rao Netscape R. Lanphier RealNetworks April 1998
Real Time Streaming Protocol (RTSP)
实时流协议(RTSP)
Status of this Memo
本备忘录的状况
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。
Copyright Notice
版权公告
Copyright (C) The Internet Society (1998). All Rights Reserved.
版权所有(C)互联网协会(1998年)。版权所有。
Abstract
摘要
The Real Time Streaming Protocol, or RTSP, is an application-level protocol for control over the delivery of data with real-time properties. RTSP provides an extensible framework to enable controlled, on-demand delivery of real-time data, such as audio and video. Sources of data can include both live data feeds and stored clips. This protocol is intended to control multiple data delivery sessions, provide a means for choosing delivery channels such as UDP, multicast UDP and TCP, and provide a means for choosing delivery mechanisms based upon RTP (RFC 1889).
实时流协议(RTSP)是一种应用程序级协议,用于控制具有实时属性的数据传输。RTSP提供了一个可扩展的框架,以支持实时数据(如音频和视频)的受控按需交付。数据源可以包括实时数据源和存储的剪辑。该协议旨在控制多个数据传输会话,提供选择传输通道(如UDP、多播UDP和TCP)的方法,并提供基于RTP(RFC 1889)选择传输机制的方法。
Table of Contents
目录
* 1 Introduction ................................................. 5 + 1.1 Purpose ............................................... 5 + 1.2 Requirements .......................................... 6 + 1.3 Terminology ........................................... 6 + 1.4 Protocol Properties ................................... 9 + 1.5 Extending RTSP ........................................ 11 + 1.6 Overall Operation ..................................... 11 + 1.7 RTSP States ........................................... 12 + 1.8 Relationship with Other Protocols ..................... 13 * 2 Notational Conventions ....................................... 14 * 3 Protocol Parameters .......................................... 14 + 3.1 RTSP Version .......................................... 14
* 1 Introduction ................................................. 5 + 1.1 Purpose ............................................... 5 + 1.2 Requirements .......................................... 6 + 1.3 Terminology ........................................... 6 + 1.4 Protocol Properties ................................... 9 + 1.5 Extending RTSP ........................................ 11 + 1.6 Overall Operation ..................................... 11 + 1.7 RTSP States ........................................... 12 + 1.8 Relationship with Other Protocols ..................... 13 * 2 Notational Conventions ....................................... 14 * 3 Protocol Parameters .......................................... 14 + 3.1 RTSP Version .......................................... 14
+ 3.2 RTSP URL .............................................. 14 + 3.3 Conference Identifiers ................................ 16 + 3.4 Session Identifiers ................................... 16 + 3.5 SMPTE Relative Timestamps ............................. 16 + 3.6 Normal Play Time ...................................... 17 + 3.7 Absolute Time ......................................... 18 + 3.8 Option Tags ........................................... 18 o 3.8.1 Registering New Option Tags with IANA .......... 18 * 4 RTSP Message ................................................. 19 + 4.1 Message Types ......................................... 19 + 4.2 Message Headers ....................................... 19 + 4.3 Message Body .......................................... 19 + 4.4 Message Length ........................................ 20 * 5 General Header Fields ........................................ 20 * 6 Request ...................................................... 20 + 6.1 Request Line .......................................... 21 + 6.2 Request Header Fields ................................. 21 * 7 Response ..................................................... 22 + 7.1 Status-Line ........................................... 22 o 7.1.1 Status Code and Reason Phrase .................. 22 o 7.1.2 Response Header Fields ......................... 26 * 8 Entity ....................................................... 27 + 8.1 Entity Header Fields .................................. 27 + 8.2 Entity Body ........................................... 28 * 9 Connections .................................................. 28 + 9.1 Pipelining ............................................ 28 + 9.2 Reliability and Acknowledgements ...................... 28 * 10 Method Definitions .......................................... 29 + 10.1 OPTIONS .............................................. 30 + 10.2 DESCRIBE ............................................. 31 + 10.3 ANNOUNCE ............................................. 32 + 10.4 SETUP ................................................ 33 + 10.5 PLAY ................................................. 34 + 10.6 PAUSE ................................................ 36 + 10.7 TEARDOWN ............................................. 37 + 10.8 GET_PARAMETER ........................................ 37 + 10.9 SET_PARAMETER ........................................ 38 + 10.10 REDIRECT ............................................ 39 + 10.11 RECORD .............................................. 39 + 10.12 Embedded (Interleaved) Binary Data .................. 40 * 11 Status Code Definitions ..................................... 41 + 11.1 Success 2xx .......................................... 41 o 11.1.1 250 Low on Storage Space ...................... 41 + 11.2 Redirection 3xx ...................................... 41 + 11.3 Client Error 4xx ..................................... 42 o 11.3.1 405 Method Not Allowed ........................ 42 o 11.3.2 451 Parameter Not Understood .................. 42 o 11.3.3 452 Conference Not Found ...................... 42
+ 3.2 RTSP URL .............................................. 14 + 3.3 Conference Identifiers ................................ 16 + 3.4 Session Identifiers ................................... 16 + 3.5 SMPTE Relative Timestamps ............................. 16 + 3.6 Normal Play Time ...................................... 17 + 3.7 Absolute Time ......................................... 18 + 3.8 Option Tags ........................................... 18 o 3.8.1 Registering New Option Tags with IANA .......... 18 * 4 RTSP Message ................................................. 19 + 4.1 Message Types ......................................... 19 + 4.2 Message Headers ....................................... 19 + 4.3 Message Body .......................................... 19 + 4.4 Message Length ........................................ 20 * 5 General Header Fields ........................................ 20 * 6 Request ...................................................... 20 + 6.1 Request Line .......................................... 21 + 6.2 Request Header Fields ................................. 21 * 7 Response ..................................................... 22 + 7.1 Status-Line ........................................... 22 o 7.1.1 Status Code and Reason Phrase .................. 22 o 7.1.2 Response Header Fields ......................... 26 * 8 Entity ....................................................... 27 + 8.1 Entity Header Fields .................................. 27 + 8.2 Entity Body ........................................... 28 * 9 Connections .................................................. 28 + 9.1 Pipelining ............................................ 28 + 9.2 Reliability and Acknowledgements ...................... 28 * 10 Method Definitions .......................................... 29 + 10.1 OPTIONS .............................................. 30 + 10.2 DESCRIBE ............................................. 31 + 10.3 ANNOUNCE ............................................. 32 + 10.4 SETUP ................................................ 33 + 10.5 PLAY ................................................. 34 + 10.6 PAUSE ................................................ 36 + 10.7 TEARDOWN ............................................. 37 + 10.8 GET_PARAMETER ........................................ 37 + 10.9 SET_PARAMETER ........................................ 38 + 10.10 REDIRECT ............................................ 39 + 10.11 RECORD .............................................. 39 + 10.12 Embedded (Interleaved) Binary Data .................. 40 * 11 Status Code Definitions ..................................... 41 + 11.1 Success 2xx .......................................... 41 o 11.1.1 250 Low on Storage Space ...................... 41 + 11.2 Redirection 3xx ...................................... 41 + 11.3 Client Error 4xx ..................................... 42 o 11.3.1 405 Method Not Allowed ........................ 42 o 11.3.2 451 Parameter Not Understood .................. 42 o 11.3.3 452 Conference Not Found ...................... 42
o 11.3.4 453 Not Enough Bandwidth ...................... 42 o 11.3.5 454 Session Not Found ......................... 42 o 11.3.6 455 Method Not Valid in This State ............ 42 o 11.3.7 456 Header Field Not Valid for Resource ....... 42 o 11.3.8 457 Invalid Range ............................. 43 o 11.3.9 458 Parameter Is Read-Only .................... 43 o 11.3.10 459 Aggregate Operation Not Allowed .......... 43 o 11.3.11 460 Only Aggregate Operation Allowed ......... 43 o 11.3.12 461 Unsupported Transport .................... 43 o 11.3.13 462 Destination Unreachable .................. 43 o 11.3.14 551 Option not supported ..................... 43 * 12 Header Field Definitions .................................... 44 + 12.1 Accept ............................................... 46 + 12.2 Accept-Encoding ...................................... 46 + 12.3 Accept-Language ...................................... 46 + 12.4 Allow ................................................ 46 + 12.5 Authorization ........................................ 46 + 12.6 Bandwidth ............................................ 46 + 12.7 Blocksize ............................................ 47 + 12.8 Cache-Control ........................................ 47 + 12.9 Conference ........................................... 49 + 12.10 Connection .......................................... 49 + 12.11 Content-Base ........................................ 49 + 12.12 Content-Encoding .................................... 49 + 12.13 Content-Language .................................... 50 + 12.14 Content-Length ...................................... 50 + 12.15 Content-Location .................................... 50 + 12.16 Content-Type ........................................ 50 + 12.17 CSeq ................................................ 50 + 12.18 Date ................................................ 50 + 12.19 Expires ............................................. 50 + 12.20 From ................................................ 51 + 12.21 Host ................................................ 51 + 12.22 If-Match ............................................ 51 + 12.23 If-Modified-Since ................................... 52 + 12.24 Last-Modified........................................ 52 + 12.25 Location ............................................ 52 + 12.26 Proxy-Authenticate .................................. 52 + 12.27 Proxy-Require ....................................... 52 + 12.28 Public .............................................. 53 + 12.29 Range ............................................... 53 + 12.30 Referer ............................................. 54 + 12.31 Retry-After ......................................... 54 + 12.32 Require ............................................. 54 + 12.33 RTP-Info ............................................ 55 + 12.34 Scale ............................................... 56 + 12.35 Speed ............................................... 57 + 12.36 Server .............................................. 57
o 11.3.4 453 Not Enough Bandwidth ...................... 42 o 11.3.5 454 Session Not Found ......................... 42 o 11.3.6 455 Method Not Valid in This State ............ 42 o 11.3.7 456 Header Field Not Valid for Resource ....... 42 o 11.3.8 457 Invalid Range ............................. 43 o 11.3.9 458 Parameter Is Read-Only .................... 43 o 11.3.10 459 Aggregate Operation Not Allowed .......... 43 o 11.3.11 460 Only Aggregate Operation Allowed ......... 43 o 11.3.12 461 Unsupported Transport .................... 43 o 11.3.13 462 Destination Unreachable .................. 43 o 11.3.14 551 Option not supported ..................... 43 * 12 Header Field Definitions .................................... 44 + 12.1 Accept ............................................... 46 + 12.2 Accept-Encoding ...................................... 46 + 12.3 Accept-Language ...................................... 46 + 12.4 Allow ................................................ 46 + 12.5 Authorization ........................................ 46 + 12.6 Bandwidth ............................................ 46 + 12.7 Blocksize ............................................ 47 + 12.8 Cache-Control ........................................ 47 + 12.9 Conference ........................................... 49 + 12.10 Connection .......................................... 49 + 12.11 Content-Base ........................................ 49 + 12.12 Content-Encoding .................................... 49 + 12.13 Content-Language .................................... 50 + 12.14 Content-Length ...................................... 50 + 12.15 Content-Location .................................... 50 + 12.16 Content-Type ........................................ 50 + 12.17 CSeq ................................................ 50 + 12.18 Date ................................................ 50 + 12.19 Expires ............................................. 50 + 12.20 From ................................................ 51 + 12.21 Host ................................................ 51 + 12.22 If-Match ............................................ 51 + 12.23 If-Modified-Since ................................... 52 + 12.24 Last-Modified........................................ 52 + 12.25 Location ............................................ 52 + 12.26 Proxy-Authenticate .................................. 52 + 12.27 Proxy-Require ....................................... 52 + 12.28 Public .............................................. 53 + 12.29 Range ............................................... 53 + 12.30 Referer ............................................. 54 + 12.31 Retry-After ......................................... 54 + 12.32 Require ............................................. 54 + 12.33 RTP-Info ............................................ 55 + 12.34 Scale ............................................... 56 + 12.35 Speed ............................................... 57 + 12.36 Server .............................................. 57
+ 12.37 Session ............................................. 57 + 12.38 Timestamp ........................................... 58 + 12.39 Transport ........................................... 58 + 12.40 Unsupported ......................................... 62 + 12.41 User-Agent .......................................... 62 + 12.42 Vary ................................................ 62 + 12.43 Via ................................................. 62 + 12.44 WWW-Authenticate .................................... 62 * 13 Caching ..................................................... 62 * 14 Examples .................................................... 63 + 14.1 Media on Demand (Unicast) ............................ 63 + 14.2 Streaming of a Container file ........................ 65 + 14.3 Single Stream Container Files ........................ 67 + 14.4 Live Media Presentation Using Multicast .............. 69 + 14.5 Playing media into an existing session ............... 70 + 14.6 Recording ............................................ 71 * 15 Syntax ...................................................... 72 + 15.1 Base Syntax .......................................... 72 * 16 Security Considerations ..................................... 73 * A RTSP Protocol State Machines ................................. 76 + A.1 Client State Machine .................................. 76 + A.2 Server State Machine .................................. 77 * B Interaction with RTP ......................................... 79 * C Use of SDP for RTSP Session Descriptions ..................... 80 + C.1 Definitions ........................................... 80 o C.1.1 Control URL .................................... 80 o C.1.2 Media streams .................................. 81 o C.1.3 Payload type(s) ................................ 81 o C.1.4 Format-specific parameters ..................... 81 o C.1.5 Range of presentation .......................... 82 o C.1.6 Time of availability ........................... 82 o C.1.7 Connection Information ......................... 82 o C.1.8 Entity Tag ..................................... 82 + C.2 Aggregate Control Not Available ....................... 83 + C.3 Aggregate Control Available ........................... 83 * D Minimal RTSP implementation .................................. 85 + D.1 Client ................................................ 85 o D.1.1 Basic Playback ................................. 86 o D.1.2 Authentication-enabled ......................... 86 + D.2 Server ................................................ 86 o D.2.1 Basic Playback ................................. 87 o D.2.2 Authentication-enabled ......................... 87 * E Authors' Addresses ........................................... 88 * F Acknowledgements ............................................. 89 * References ..................................................... 90 * Full Copyright Statement ....................................... 92
+ 12.37 Session ............................................. 57 + 12.38 Timestamp ........................................... 58 + 12.39 Transport ........................................... 58 + 12.40 Unsupported ......................................... 62 + 12.41 User-Agent .......................................... 62 + 12.42 Vary ................................................ 62 + 12.43 Via ................................................. 62 + 12.44 WWW-Authenticate .................................... 62 * 13 Caching ..................................................... 62 * 14 Examples .................................................... 63 + 14.1 Media on Demand (Unicast) ............................ 63 + 14.2 Streaming of a Container file ........................ 65 + 14.3 Single Stream Container Files ........................ 67 + 14.4 Live Media Presentation Using Multicast .............. 69 + 14.5 Playing media into an existing session ............... 70 + 14.6 Recording ............................................ 71 * 15 Syntax ...................................................... 72 + 15.1 Base Syntax .......................................... 72 * 16 Security Considerations ..................................... 73 * A RTSP Protocol State Machines ................................. 76 + A.1 Client State Machine .................................. 76 + A.2 Server State Machine .................................. 77 * B Interaction with RTP ......................................... 79 * C Use of SDP for RTSP Session Descriptions ..................... 80 + C.1 Definitions ........................................... 80 o C.1.1 Control URL .................................... 80 o C.1.2 Media streams .................................. 81 o C.1.3 Payload type(s) ................................ 81 o C.1.4 Format-specific parameters ..................... 81 o C.1.5 Range of presentation .......................... 82 o C.1.6 Time of availability ........................... 82 o C.1.7 Connection Information ......................... 82 o C.1.8 Entity Tag ..................................... 82 + C.2 Aggregate Control Not Available ....................... 83 + C.3 Aggregate Control Available ........................... 83 * D Minimal RTSP implementation .................................. 85 + D.1 Client ................................................ 85 o D.1.1 Basic Playback ................................. 86 o D.1.2 Authentication-enabled ......................... 86 + D.2 Server ................................................ 86 o D.2.1 Basic Playback ................................. 87 o D.2.2 Authentication-enabled ......................... 87 * E Authors' Addresses ........................................... 88 * F Acknowledgements ............................................. 89 * References ..................................................... 90 * Full Copyright Statement ....................................... 92
1 Introduction
1导言
The Real-Time Streaming Protocol (RTSP) establishes and controls either a single or several time-synchronized streams of continuous media such as audio and video. It does not typically deliver the continuous streams itself, although interleaving of the continuous media stream with the control stream is possible (see Section 10.12). In other words, RTSP acts as a "network remote control" for multimedia servers.
实时流协议(RTSP)建立并控制音频和视频等连续媒体的单个或多个时间同步流。虽然连续媒体流与控制流可以交错,但它通常不传送连续流本身(见第10.12节)。换句话说,RTSP充当多媒体服务器的“网络远程控制”。
The set of streams to be controlled is defined by a presentation description. This memorandum does not define a format for a presentation description.
要控制的流集由表示描述定义。本备忘录未定义演示文稿描述的格式。
There is no notion of an RTSP connection; instead, a server maintains a session labeled by an identifier. An RTSP session is in no way tied to a transport-level connection such as a TCP connection. During an RTSP session, an RTSP client may open and close many reliable transport connections to the server to issue RTSP requests. Alternatively, it may use a connectionless transport protocol such as UDP.
没有RTSP连接的概念;相反,服务器维护由标识符标记的会话。RTSP会话绝不与传输级连接(如TCP连接)绑定。在RTSP会话期间,RTSP客户端可以打开和关闭到服务器的许多可靠传输连接,以发出RTSP请求。或者,它可以使用UDP等无连接传输协议。
The streams controlled by RTSP may use RTP [1], but the operation of RTSP does not depend on the transport mechanism used to carry continuous media. The protocol is intentionally similar in syntax and operation to HTTP/1.1 [2] so that extension mechanisms to HTTP can in most cases also be added to RTSP. However, RTSP differs in a number of important aspects from HTTP:
RTSP控制的流可以使用RTP[1],但RTSP的操作不取决于用于承载连续介质的传输机制。该协议有意在语法和操作上与HTTP/1.1[2]相似,因此在大多数情况下,HTTP的扩展机制也可以添加到RTSP中。但是,RTSP在许多重要方面与HTTP不同:
* RTSP introduces a number of new methods and has a different protocol identifier. * An RTSP server needs to maintain state by default in almost all cases, as opposed to the stateless nature of HTTP. * Both an RTSP server and client can issue requests. * Data is carried out-of-band by a different protocol. (There is an exception to this.) * RTSP is defined to use ISO 10646 (UTF-8) rather than ISO 8859-1, consistent with current HTML internationalization efforts [3]. * The Request-URI always contains the absolute URI. Because of backward compatibility with a historical blunder, HTTP/1.1 [2] carries only the absolute path in the request and puts the host name in a separate header field.
* RTSP引入了许多新方法,并具有不同的协议标识符。*RTSP服务器几乎在所有情况下都需要默认维护状态,这与HTTP的无状态性质相反。*RTSP服务器和客户端都可以发出请求。*数据通过不同的协议在带外执行。(有一个例外。)*RTSP被定义为使用ISO 10646(UTF-8)而不是ISO 8859-1,这与当前HTML国际化的努力一致[3].*请求URI始终包含绝对URI。由于向后兼容历史错误,HTTP/1.1[2]只在请求中携带绝对路径,并将主机名放在单独的头字段中。
This makes "virtual hosting" easier, where a single host with one IP address hosts several document trees.
这使得“虚拟主机”更容易,一个IP地址的主机可以托管多个文档树。
The protocol supports the following operations:
该协议支持以下操作:
Retrieval of media from media server: The client can request a presentation description via HTTP or some other method. If the presentation is being multicast, the presentation description contains the multicast addresses and ports to be used for the continuous media. If the presentation is to be sent only to the client via unicast, the client provides the destination for security reasons.
从媒体服务器检索媒体:客户端可以通过HTTP或其他方法请求演示文稿描述。如果演示文稿是多播的,则演示文稿描述包含用于连续媒体的多播地址和端口。如果演示文稿仅通过单播发送给客户端,出于安全原因,客户端将提供目的地。
Invitation of a media server to a conference: A media server can be "invited" to join an existing conference, either to play back media into the presentation or to record all or a subset of the media in a presentation. This mode is useful for distributed teaching applications. Several parties in the conference may take turns "pushing the remote control buttons."
邀请媒体服务器参加会议:可以“邀请”媒体服务器加入现有会议,将媒体播放到演示文稿中,或在演示文稿中录制媒体的全部或子集。这种模式对于分布式教学应用非常有用。会议的几方可以轮流“按下遥控按钮”
Addition of media to an existing presentation: Particularly for live presentations, it is useful if the server can tell the client about additional media becoming available.
将媒体添加到现有演示文稿中:特别是对于实时演示文稿,如果服务器可以告诉客户端其他媒体可用,这将非常有用。
RTSP requests may be handled by proxies, tunnels and caches as in HTTP/1.1 [2].
RTSP请求可以通过HTTP/1.1[2]中的代理、隧道和缓存进行处理。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [4].
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[4]中所述进行解释。
Some of the terminology has been adopted from HTTP/1.1 [2]. Terms not listed here are defined as in HTTP/1.1.
其中一些术语已从HTTP/1.1[2]中采用。此处未列出的术语在HTTP/1.1中定义。
Aggregate control: The control of the multiple streams using a single timeline by the server. For audio/video feeds, this means that the client may issue a single play or pause message to control both the audio and video feeds.
聚合控制:服务器使用单个时间轴控制多个流。对于音频/视频源,这意味着客户端可以发出单个播放或暂停消息来控制音频和视频源。
Conference: a multiparty, multimedia presentation, where "multi" implies greater than or equal to one.
会议:一种多方多媒体演示,其中“多”表示大于或等于一。
Client: The client requests continuous media data from the media server.
客户端:客户端从媒体服务器请求连续媒体数据。
Connection: A transport layer virtual circuit established between two programs for the purpose of communication.
连接:为通信目的在两个程序之间建立的传输层虚拟电路。
Container file: A file which may contain multiple media streams which often comprise a presentation when played together. RTSP servers may offer aggregate control on these files, though the concept of a container file is not embedded in the protocol.
容器文件:一种可能包含多个媒体流的文件,这些媒体流在一起播放时通常构成一个演示文稿。RTSP服务器可以对这些文件提供聚合控制,尽管协议中没有嵌入容器文件的概念。
Continuous media: Data where there is a timing relationship between source and sink; that is, the sink must reproduce the timing relationship that existed at the source. The most common examples of continuous media are audio and motion video. Continuous media can be real-time (interactive), where there is a "tight" timing relationship between source and sink, or streaming (playback), where the relationship is less strict.
连续介质:源和汇之间存在定时关系的数据;也就是说,接收器必须重现源处存在的定时关系。连续媒体最常见的例子是音频和动态视频。连续媒体可以是实时的(交互式的),在源和汇之间存在“紧密”的定时关系,也可以是流媒体(回放),在这种关系不太严格的情况下。
Entity: The information transferred as the payload of a request or response. An entity consists of metainformation in the form of entity-header fields and content in the form of an entity-body, as described in Section 8.
实体:作为请求或响应的有效负载传输的信息。实体由实体标题字段形式的元信息和实体正文形式的内容组成,如第8节所述。
Media initialization: Datatype/codec specific initialization. This includes such things as clockrates, color tables, etc. Any transport-independent information which is required by a client for playback of a media stream occurs in the media initialization phase of stream setup.
媒体初始化:特定于数据类型/编解码器的初始化。这包括诸如时钟速率、颜色表等。客户端回放媒体流所需的任何与传输无关的信息发生在流设置的媒体初始化阶段。
Media parameter: Parameter specific to a media type that may be changed before or during stream playback.
媒体参数:特定于媒体类型的参数,可在流播放之前或期间更改。
Media server: The server providing playback or recording services for one or more media streams. Different media streams within a presentation may originate from different media servers. A media server may reside on the same or a different host as the web server the presentation is invoked from.
媒体服务器:为一个或多个媒体流提供播放或录制服务的服务器。演示文稿中的不同媒体流可能来自不同的媒体服务器。媒体服务器可能与调用演示文稿的web服务器位于同一主机或不同主机上。
Media server indirection: Redirection of a media client to a different media server.
媒体服务器间接寻址:将媒体客户端重定向到其他媒体服务器。
(Media) stream: A single media instance, e.g., an audio stream or a video stream as well as a single whiteboard or shared application group. When using RTP, a stream consists of all RTP and RTCP packets created by a source within an RTP session. This is equivalent to the definition of a DSM-CC stream([5]).
(媒体)流:单个媒体实例,例如音频流或视频流以及单个白板或共享应用程序组。使用RTP时,流由源在RTP会话中创建的所有RTP和RTCP数据包组成。这相当于DSM-CC流的定义([5])。
Message: The basic unit of RTSP communication, consisting of a structured sequence of octets matching the syntax defined in Section 15 and transmitted via a connection or a connectionless protocol.
报文:RTSP通信的基本单元,由与第15节中定义的语法相匹配的八位字节的结构化序列组成,并通过连接或无连接协议传输。
Participant: Member of a conference. A participant may be a machine, e.g., a media record or playback server.
与会者:会议成员。参与者可以是机器,例如媒体记录或回放服务器。
Presentation: A set of one or more streams presented to the client as a complete media feed, using a presentation description as defined below. In most cases in the RTSP context, this implies aggregate control of those streams, but does not have to.
演示文稿:使用下面定义的演示文稿描述,将一组或多个流作为完整的媒体源呈现给客户端。在RTSP上下文中的大多数情况下,这意味着对这些流进行聚合控制,但不一定要这样做。
Presentation description: A presentation description contains information about one or more media streams within a presentation, such as the set of encodings, network addresses and information about the content. Other IETF protocols such as SDP (RFC 2327 [6]) use the term "session" for a live presentation. The presentation description may take several different formats, including but not limited to the session description format SDP.
演示文稿描述:演示文稿描述包含有关演示文稿中一个或多个媒体流的信息,例如编码集、网络地址和有关内容的信息。其他IETF协议,如SDP(RFC 2327[6])使用术语“会话”进行现场演示。表示描述可以采用几种不同的格式,包括但不限于会话描述格式SDP。
Response: An RTSP response. If an HTTP response is meant, that is indicated explicitly.
响应:RTSP响应。如果表示HTTP响应,则会显式指示。
Request: An RTSP request. If an HTTP request is meant, that is indicated explicitly.
请求:一个RTSP请求。如果是HTTP请求,则会显式指示。
RTSP session: A complete RTSP "transaction", e.g., the viewing of a movie. A session typically consists of a client setting up a transport mechanism for the continuous media stream (SETUP), starting the stream with PLAY or RECORD, and closing the
RTSP会话:完整的RTSP“事务”,例如观看电影。会话通常包括为连续媒体流(设置)设置传输机制的客户端、以播放或录制开始流以及关闭会话
stream with TEARDOWN.
泪流满面。
Transport initialization: The negotiation of transport information (e.g., port numbers, transport protocols) between the client and the server.
传输初始化:在客户端和服务器之间协商传输信息(例如,端口号、传输协议)。
RTSP has the following properties:
RTSP具有以下属性:
Extendable: New methods and parameters can be easily added to RTSP.
可扩展:新方法和参数可以轻松添加到RTSP。
Easy to parse: RTSP can be parsed by standard HTTP or MIME parsers.
易于解析:RTSP可以由标准HTTP或MIME解析器解析。
Secure: RTSP re-uses web security mechanisms. All HTTP authentication mechanisms such as basic (RFC 2068 [2, Section 11.1]) and digest authentication (RFC 2069 [8]) are directly applicable. One may also reuse transport or network layer security mechanisms.
安全:RTSP重新使用web安全机制。所有HTTP身份验证机制,如basic(RFC 2068[2,第11.1节])和摘要身份验证(RFC 2069[8]),都可以直接应用。还可以重用传输层或网络层安全机制。
Transport-independent: RTSP may use either an unreliable datagram protocol (UDP) (RFC 768 [9]), a reliable datagram protocol (RDP, RFC 1151, not widely used [10]) or a reliable stream protocol such as TCP (RFC 793 [11]) as it implements application-level reliability.
传输独立:RTSP在实现应用程序级可靠性时,可以使用不可靠数据报协议(UDP)(RFC 768[9])、可靠数据报协议(RDP,RFC 1151,未广泛使用[10])或可靠流协议,如TCP(RFC 793[11])。
Multi-server capable: Each media stream within a presentation can reside on a different server. The client automatically establishes several concurrent control sessions with the different media servers. Media synchronization is performed at the transport level.
支持多服务器:演示文稿中的每个媒体流都可以驻留在不同的服务器上。客户端自动与不同的媒体服务器建立多个并发控制会话。在传输级别执行媒体同步。
Control of recording devices: The protocol can control both recording and playback devices, as well as devices that can alternate between the two modes ("VCR").
记录设备的控制:该协议可以控制记录和回放设备,以及可以在两种模式(“VCR”)之间切换的设备。
Separation of stream control and conference initiation: Stream control is divorced from inviting a media server to a conference. The only requirement is that the conference initiation protocol either provides or can be used to create a unique conference identifier. In particular, SIP [12] or H.323 [13] may be used to invite a server to a conference.
流控制和会议发起分离:流控制与邀请媒体服务器参加会议分离。唯一的要求是会议发起协议提供或可用于创建唯一的会议标识符。具体地,SIP[12]或H.323[13]可用于邀请服务器参加会议。
Suitable for professional applications: RTSP supports frame-level accuracy through SMPTE time stamps to allow remote digital editing.
适用于专业应用:RTSP通过SMPTE时间戳支持帧级精度,允许远程数字编辑。
Presentation description neutral: The protocol does not impose a particular presentation description or metafile format and can convey the type of format to be used. However, the presentation description must contain at least one RTSP URI.
表示描述中性:协议不强制使用特定的表示描述或元文件格式,并且可以传递要使用的格式类型。但是,表示说明必须至少包含一个RTSP URI。
Proxy and firewall friendly: The protocol should be readily handled by both application and transport-layer (SOCKS [14]) firewalls. A firewall may need to understand the SETUP method to open a "hole" for the UDP media stream.
代理和防火墙友好:应用程序和传输层(SOCKS[14])防火墙都应能够轻松处理协议。防火墙可能需要了解为UDP媒体流打开“漏洞”的设置方法。
HTTP-friendly: Where sensible, RTSP reuses HTTP concepts, so that the existing infrastructure can be reused. This infrastructure includes PICS (Platform for Internet Content Selection [15,16]) for associating labels with content. However, RTSP does not just add methods to HTTP since the controlling continuous media requires server state in most cases.
HTTP友好:在合理的情况下,RTSP重用HTTP概念,以便重用现有的基础结构。该基础设施包括用于将标签与内容关联的PICS(互联网内容选择平台[15,16])。但是,RTSP并不仅仅向HTTP添加方法,因为在大多数情况下,控制连续介质需要服务器状态。
Appropriate server control: If a client can start a stream, it must be able to stop a stream. Servers should not start streaming to clients in such a way that clients cannot stop the stream.
适当的服务器控制:如果客户端可以启动流,那么它必须能够停止流。服务器不应以客户端无法停止流的方式开始向客户端传输流。
Transport negotiation: The client can negotiate the transport method prior to actually needing to process a continuous media stream.
传输协商:客户端可以在实际需要处理连续媒体流之前协商传输方法。
Capability negotiation: If basic features are disabled, there must be some clean mechanism for the client to determine which methods are not going to be implemented. This allows clients to present the appropriate user interface. For example, if seeking is not allowed, the user interface must be able to disallow moving a sliding position indicator.
能力协商:如果基本功能被禁用,则必须有一些干净的机制供客户端确定哪些方法将不被实现。这允许客户端呈现适当的用户界面。例如,如果不允许搜索,则用户界面必须能够禁止移动滑动位置指示器。
An earlier requirement in RTSP was multi-client capability. However, it was determined that a better approach was to make sure that the protocol is easily extensible to the multi-client scenario. Stream identifiers can be used by several control streams, so that "passing the remote" would be possible. The protocol would not address how several clients negotiate access; this is left to either a "social protocol" or some other floor
RTSP的早期需求是多客户端功能。但是,确定更好的方法是确保协议易于扩展到多客户端场景。流标识符可由多个控制流使用,因此“通过远程”是可能的。该协议不会解决多个客户端如何协商访问;这是留给“社交礼仪”或其他楼层的
control mechanism.
控制机制。
Since not all media servers have the same functionality, media servers by necessity will support different sets of requests. For example:
由于并非所有媒体服务器都具有相同的功能,因此媒体服务器必然会支持不同的请求集。例如:
* A server may only be capable of playback thus has no need to support the RECORD request. * A server may not be capable of seeking (absolute positioning) if it is to support live events only. * Some servers may not support setting stream parameters and thus not support GET_PARAMETER and SET_PARAMETER.
* 服务器可能只能播放,因此无需支持录制请求。*如果服务器仅支持实时事件,则可能无法查找(绝对定位)。*某些服务器可能不支持设置流参数,因此不支持GET_参数和SET_参数。
A server SHOULD implement all header fields described in Section 12.
服务器应该实现第12节中描述的所有头字段。
It is up to the creators of presentation descriptions not to ask the impossible of a server. This situation is similar in HTTP/1.1 [2], where the methods described in [H19.6] are not likely to be supported across all servers.
演示描述的创建者有责任不去问服务器的不可能。这种情况在HTTP/1.1[2]中类似,其中[H19.6]中描述的方法不可能在所有服务器上都得到支持。
RTSP can be extended in three ways, listed here in order of the magnitude of changes supported:
RTSP可以通过三种方式进行扩展,这里按支持的更改的大小顺序列出:
* Existing methods can be extended with new parameters, as long as these parameters can be safely ignored by the recipient. (This is equivalent to adding new parameters to an HTML tag.) If the client needs negative acknowledgement when a method extension is not supported, a tag corresponding to the extension may be added in the Require: field (see Section 12.32). * New methods can be added. If the recipient of the message does not understand the request, it responds with error code 501 (Not implemented) and the sender should not attempt to use this method again. A client may also use the OPTIONS method to inquire about methods supported by the server. The server SHOULD list the methods it supports using the Public response header. * A new version of the protocol can be defined, allowing almost all aspects (except the position of the protocol version number) to change.
* 只要收件人可以安全地忽略这些参数,就可以使用新参数扩展现有方法。(这相当于向HTML标记添加新参数。)如果客户端在不支持方法扩展时需要否定确认,则可以在Require:字段中添加与扩展对应的标记(参见第12.32节)。*可以添加新方法。如果消息的接收者不理解请求,它将以错误代码501(未实现)响应,发送者不应再次尝试使用此方法。客户端还可以使用OPTIONS方法查询服务器支持的方法。服务器应列出使用公共响应头支持的方法。*可以定义协议的新版本,允许几乎所有方面(协议版本号的位置除外)发生更改。
Each presentation and media stream may be identified by an RTSP URL. The overall presentation and the properties of the media the presentation is made up of are defined by a presentation description file, the format of which is outside the scope of this specification. The presentation description file may be obtained by the client using
每个表示和媒体流可以由RTSP URL标识。演示文稿的整体演示文稿和由其组成的媒体的属性由演示文稿描述文件定义,其格式不在本规范的范围内。客户可以通过以下方式获得演示文稿描述文件:
HTTP or other means such as email and may not necessarily be stored on the media server.
HTTP或其他方式,如电子邮件,不一定存储在媒体服务器上。
For the purposes of this specification, a presentation description is assumed to describe one or more presentations, each of which maintains a common time axis. For simplicity of exposition and without loss of generality, it is assumed that the presentation description contains exactly one such presentation. A presentation may contain several media streams.
出于本规范的目的,假设呈现描述描述一个或多个呈现,每个呈现都保持一个公共时间轴。为了说明的简单性和不丧失一般性,假设呈现描述正好包含一个这样的呈现。一个表示可以包含多个媒体流。
The presentation description file contains a description of the media streams making up the presentation, including their encodings, language, and other parameters that enable the client to choose the most appropriate combination of media. In this presentation description, each media stream that is individually controllable by RTSP is identified by an RTSP URL, which points to the media server handling that particular media stream and names the stream stored on that server. Several media streams can be located on different servers; for example, audio and video streams can be split across servers for load sharing. The description also enumerates which transport methods the server is capable of.
演示文稿描述文件包含构成演示文稿的媒体流的描述,包括其编码、语言和其他参数,这些参数使客户端能够选择最合适的媒体组合。在本演示说明中,RTSP单独控制的每个媒体流由RTSP URL标识,该URL指向处理该特定媒体流的媒体服务器,并命名存储在该服务器上的流。多个媒体流可以位于不同的服务器上;例如,音频和视频流可以跨服务器分割以实现负载共享。描述还列举了服务器能够使用的传输方法。
Besides the media parameters, the network destination address and port need to be determined. Several modes of operation can be distinguished:
除了媒体参数外,还需要确定网络目标地址和端口。可以区分几种操作模式:
Unicast: The media is transmitted to the source of the RTSP request, with the port number chosen by the client. Alternatively, the media is transmitted on the same reliable stream as RTSP.
单播:媒体传输到RTSP请求源,端口号由客户端选择。或者,媒体在与RTSP相同的可靠流上传输。
Multicast, server chooses address: The media server picks the multicast address and port. This is the typical case for a live or near-media-on-demand transmission.
多播,服务器选择地址:媒体服务器选择多播地址和端口。这是现场或近媒体点播传输的典型情况。
Multicast, client chooses address: If the server is to participate in an existing multicast conference, the multicast address, port and encryption key are given by the conference description, established by means outside the scope of this specification.
多播,客户端选择地址:如果服务器要参加现有的多播会议,则多播地址、端口和加密密钥由会议描述给出,通过本规范范围之外的方式建立。
RTSP controls a stream which may be sent via a separate protocol, independent of the control channel. For example, RTSP control may occur on a TCP connection while the data flows via UDP. Thus, data delivery continues even if no RTSP requests are received by the media
RTSP控制可通过独立于控制通道的单独协议发送的流。例如,当数据通过UDP流动时,RTSP控制可能发生在TCP连接上。因此,即使介质未接收到RTSP请求,数据传输仍将继续
server. Also, during its lifetime, a single media stream may be controlled by RTSP requests issued sequentially on different TCP connections. Therefore, the server needs to maintain "session state" to be able to correlate RTSP requests with a stream. The state transitions are described in Section A.
服务器此外,在其生命周期内,单个媒体流可能由在不同TCP连接上顺序发出的RTSP请求控制。因此,服务器需要维护“会话状态”,以便能够将RTSP请求与流关联起来。第A节描述了状态转换。
Many methods in RTSP do not contribute to state. However, the following play a central role in defining the allocation and usage of stream resources on the server: SETUP, PLAY, RECORD, PAUSE, and TEARDOWN.
RTSP中的许多方法对状态没有贡献。但是,以下内容在定义服务器上流资源的分配和使用时起着核心作用:设置、播放、录制、暂停和拆卸。
SETUP: Causes the server to allocate resources for a stream and start an RTSP session.
设置:使服务器为流分配资源并启动RTSP会话。
PLAY and RECORD: Starts data transmission on a stream allocated via SETUP.
播放和录制:在通过设置分配的流上开始数据传输。
PAUSE: Temporarily halts a stream without freeing server resources.
暂停:暂时停止流而不释放服务器资源。
TEARDOWN: Frees resources associated with the stream. The RTSP session ceases to exist on the server.
拆卸:释放与流关联的资源。服务器上不再存在RTSP会话。
RTSP methods that contribute to state use the Session header field (Section 12.37) to identify the RTSP session whose state is being manipulated. The server generates session identifiers in response to SETUP requests (Section 10.4).
有助于状态的RTSP方法使用会话头字段(第12.37节)来标识其状态正在被操纵的RTSP会话。服务器根据设置请求生成会话标识符(第10.4节)。
RTSP has some overlap in functionality with HTTP. It also may interact with HTTP in that the initial contact with streaming content is often to be made through a web page. The current protocol specification aims to allow different hand-off points between a web server and the media server implementing RTSP. For example, the presentation description can be retrieved using HTTP or RTSP, which reduces roundtrips in web-browser-based scenarios, yet also allows for standalone RTSP servers and clients which do not rely on HTTP at all.
RTSP在功能上与HTTP有些重叠。它还可以与HTTP交互,因为与流媒体内容的初始接触通常是通过网页进行的。当前的协议规范旨在允许web服务器和实现RTSP的媒体服务器之间存在不同的切换点。例如,可以使用HTTP或RTSP检索表示描述,这减少了基于web浏览器的场景中的往返,但也允许独立RTSP服务器和客户端完全不依赖HTTP。
However, RTSP differs fundamentally from HTTP in that data delivery takes place out-of-band in a different protocol. HTTP is an asymmetric protocol where the client issues requests and the server responds. In RTSP, both the media client and media server can issue requests. RTSP requests are also not stateless; they may set parameters and continue to control a media stream long after the
然而,RTSP与HTTP的根本不同之处在于,数据传输是在不同协议的带外进行的。HTTP是一种非对称协议,客户端发出请求,服务器响应。在RTSP中,媒体客户端和媒体服务器都可以发出请求。RTSP请求也不是无状态的;它们可以设置参数并在传输结束后很长时间内继续控制媒体流
request has been acknowledged.
请求已被确认。
Re-using HTTP functionality has advantages in at least two areas, namely security and proxies. The requirements are very similar, so having the ability to adopt HTTP work on caches, proxies and authentication is valuable.
重新使用HTTP功能至少在两个方面具有优势,即安全性和代理。需求非常相似,因此能够在缓存、代理和身份验证上采用HTTP工作是很有价值的。
While most real-time media will use RTP as a transport protocol, RTSP is not tied to RTP.
虽然大多数实时媒体将使用RTP作为传输协议,但RTSP并不与RTP绑定。
RTSP assumes the existence of a presentation description format that can express both static and temporal properties of a presentation containing several media streams.
RTSP假设存在一种表示描述格式,该格式可以表示包含多个媒体流的表示的静态和时间属性。
2 Notational Conventions
2符号公约
Since many of the definitions and syntax are identical to HTTP/1.1, this specification only points to the section where they are defined rather than copying it. For brevity, [HX.Y] is to be taken to refer to Section X.Y of the current HTTP/1.1 specification (RFC 2068 [2]).
由于许多定义和语法与HTTP/1.1相同,因此本规范只指向定义它们的部分,而不是复制它们。为简洁起见,[HX.Y]将参考当前HTTP/1.1规范(RFC 2068[2])的第X.Y节。
All the mechanisms specified in this document are described in both prose and an augmented Backus-Naur form (BNF) similar to that used in [H2.1]. It is described in detail in RFC 2234 [17], with the difference that this RTSP specification maintains the "1#" notation for comma-separated lists.
本文件中规定的所有机制均以散文和类似于[H2.1]中使用的增广巴科斯-诺尔形式(BNF)进行了描述。RFC 2234[17]对此进行了详细描述,不同之处在于该RTSP规范为逗号分隔的列表保留了“1#”符号。
In this memo, we use indented and smaller-type paragraphs to provide background and motivation. This is intended to give readers who were not involved with the formulation of the specification an understanding of why things are the way that they are in RTSP.
在这份备忘录中,我们使用缩进和小字体段落来提供背景和动机。这是为了让未参与规范制定的读者理解RTSP中的情况为何如此。
3 Protocol Parameters
3协议参数
[H3.1] applies, with HTTP replaced by RTSP.
[H3.1]适用,HTTP替换为RTSP。
The "rtsp" and "rtspu" schemes are used to refer to network resources via the RTSP protocol. This section defines the scheme-specific syntax and semantics for RTSP URLs.
“rtsp”和“rtspu”方案用于通过rtsp协议引用网络资源。本节定义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
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
of RFC 1123 \cite{rfc1123}> port = *DIGIT
abs_path is defined in [H3.2.1].
[H3.2.1]中定义了abs_路径。
Note that fragment and query identifiers do not have a well-defined meaning at this time, with the interpretation left to the RTSP server.
请注意,片段标识符和查询标识符此时没有定义良好的含义,解释权留给RTSP服务器。
The scheme rtsp requires that commands are issued via a reliable protocol (within the Internet, TCP), while the scheme rtspu identifies an unreliable protocol (within the Internet, UDP).
方案rtsp要求通过可靠协议(在互联网内,TCP)发出命令,而方案rtspu则识别不可靠协议(在互联网内,UDP)。
If the port is empty or not given, port 554 is assumed. The semantics are that the identified resource can be controlled by RTSP at the server listening for TCP (scheme "rtsp") connections or UDP (scheme "rtspu") packets on that port of host, and the Request-URI for the resource is rtsp_URL.
如果端口为空或未给定,则假定端口554。语义是,所标识的资源可以由服务器上的RTSP控制,该服务器在主机端口上侦听TCP(方案“RTSP”)连接或UDP(方案“rtspu”)数据包,并且资源的请求URI为RTSP_URL。
The use of IP addresses in URLs SHOULD be avoided whenever possible (see RFC 1924 [19]).
应尽可能避免在URL中使用IP地址(见RFC 1924[19])。
A presentation or a stream is identified by a textual media identifier, using the character set and escape conventions [H3.2] of URLs (RFC 1738 [20]). URLs may refer to a stream or an aggregate of streams, i.e., a presentation. Accordingly, requests described in Section 10 can apply to either the whole presentation or an individual stream within the presentation. Note that some request methods can only be applied to streams, not presentations and vice versa.
使用URL的字符集和转义约定[H3.2](RFC 1738[20]),通过文本媒体标识符来标识表示或流。URL可以指流或流的集合,即表示。因此,第10节中描述的请求可以应用于整个演示或演示中的单个流。请注意,某些请求方法只能应用于流,而不能应用于演示文稿,反之亦然。
For example, the RTSP URL: rtsp://media.example.com:554/twister/audiotrack
For example, the RTSP URL: rtsp://media.example.com:554/twister/audiotrack
identifies the audio stream within the presentation "twister", which can be controlled via RTSP requests issued over a TCP connection to port 554 of host media.example.com.
标识演示文稿“twister”中的音频流,该音频流可通过TCP连接到host media.example.com的端口554发出的RTSP请求进行控制。
Also, the RTSP URL: rtsp://media.example.com:554/twister
Also, the RTSP URL: rtsp://media.example.com:554/twister
identifies the presentation "twister", which may be composed of audio and video streams.
标识可能由音频和视频流组成的演示文稿“twister”。
This does not imply a standard way to reference streams in URLs. The presentation description defines the hierarchical relationships in the presentation and the URLs for the individual streams. A presentation description may name a stream "a.mov" and the whole presentation "b.mov".
这并不意味着在URL中引用流的标准方法。演示文稿描述定义了演示文稿中的层次关系以及各个流的URL。演示文稿描述可以将流命名为“A.mov”,将整个演示文稿命名为“b.mov”。
The path components of the RTSP URL are opaque to the client and do not imply any particular file system structure for the server.
RTSP URL的路径组件对客户端来说是不透明的,并不意味着服务器有任何特定的文件系统结构。
This decoupling also allows presentation descriptions to be used with non-RTSP media control protocols simply by replacing the scheme in the URL.
这种解耦还允许通过替换URL中的方案,将表示描述与非RTSP媒体控制协议一起使用。
Conference identifiers are opaque to RTSP and are encoded using standard URI encoding methods (i.e., LWS is escaped with %). They can contain any octet value. The conference identifier MUST be globally unique. For H.323, the conferenceID value is to be used.
会议标识符对于RTSP是不透明的,并且使用标准URI编码方法进行编码(即,LWS用%转义)。它们可以包含任何八位组值。会议标识符必须是全局唯一的。对于H.323,将使用conferenceID值。
conference-id = 1*xchar
conference-id = 1*xchar
Conference identifiers are used to allow RTSP sessions to obtain parameters from multimedia conferences the media server is participating in. These conferences are created by protocols outside the scope of this specification, e.g., H.323 [13] or SIP [12]. Instead of the RTSP client explicitly providing transport information, for example, it asks the media server to use the values in the conference description instead.
会议标识符用于允许RTSP会话从媒体服务器参与的多媒体会议中获取参数。这些会议由本规范范围之外的协议创建,例如H.323[13]或SIP[12]。例如,RTSP客户端不显式提供传输信息,而是要求媒体服务器使用会议描述中的值。
Session identifiers are opaque strings of arbitrary length. Linear white space must be URL-escaped. A session identifier MUST be chosen randomly and MUST be at least eight octets long to make guessing it more difficult. (See Section 16.)
会话标识符是任意长度的不透明字符串。必须对线性空白进行URL转义。会话标识符必须随机选择,并且必须至少有八个八位字节长,以增加猜测的难度。(见第16节。)
session-id = 1*( ALPHA | DIGIT | safe )
session-id = 1*( ALPHA | DIGIT | safe )
A SMPTE relative timestamp expresses time relative to the start of the clip. Relative timestamps are expressed as SMPTE time codes for frame-level access accuracy. The time code has the format hours:minutes:seconds:frames.subframes, with the origin at the start of the clip. The default smpte format is "SMPTE 30 drop" format, with frame rate is 29.97 frames per second. Other SMPTE codes MAY be supported (such as "SMPTE 25") through the use of alternative use of "smpte time". For the "frames" field in the time value can assume the values 0 through 29. The difference between 30 and 29.97 frames per second is handled by dropping the first two frame indices (values 00 and 01) of every minute, except every tenth minute. If the frame value is zero, it may be omitted. Subframes are measured in one-hundredth of a frame.
SMPTE相对时间戳表示相对于剪辑开始的时间。相对时间戳表示为SMPTE时间码,用于帧级访问精度。时间代码的格式为小时:分钟:秒:帧。子帧,原点位于片段的开头。默认smpte格式为“smpte 30 drop”格式,帧速率为每秒29.97帧。通过使用“SMPTE时间”的替代用法,可以支持其他SMPTE代码(例如“SMPTE 25”)。对于时间值中的“帧”字段,可以采用0到29的值。每秒30帧和29.97帧之间的差异是通过每分钟(每十分钟除外)删除前两个帧索引(值00和01)来处理的。如果帧值为零,则可以忽略它。子帧以帧的百分之一进行测量。
smpte-range = smpte-type "=" smpte-time "-" [ smpte-time ] smpte-type = "smpte" | "smpte-30-drop" | "smpte-25" ; other timecodes may be added smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT [ ":" 1*2DIGIT ] [ "." 1*2DIGIT ]
smpte-range = smpte-type "=" smpte-time "-" [ smpte-time ] smpte-type = "smpte" | "smpte-30-drop" | "smpte-25" ; other timecodes may be added smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT [ ":" 1*2DIGIT ] [ "." 1*2DIGIT ]
Examples: 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
Examples: 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
Normal play time (NPT) indicates the stream absolute position relative to the beginning of the presentation. The timestamp consists of a decimal fraction. The part left of the decimal may be expressed in either seconds or hours, minutes, and seconds. The part right of the decimal point measures fractions of a second.
正常播放时间(NPT)表示相对于演示开始的流绝对位置。时间戳由小数部分组成。小数点左边的部分可以用秒或小时、分钟和秒表示。小数点右边的部分是一秒的分数。
The beginning of a presentation corresponds to 0.0 seconds. Negative values are not defined. The special constant now is defined as the current instant of a live event. It may be used only for live events.
演示文稿的开头对应于0.0秒。未定义负值。特殊常数现在定义为实时事件的当前瞬间。它只能用于现场活动。
NPT is defined as in DSM-CC: "Intuitively, NPT is the clock the viewer associates with a program. It is often digitally displayed on a VCR. NPT advances normally when in normal play mode (scale = 1), advances at a faster rate when in fast scan forward (high positive scale ratio), decrements when in scan reverse (high negative scale ratio) and is fixed in pause mode. NPT is (logically) equivalent to SMPTE time codes." [5]
NPT的定义如DSM-CC中所述:“直观地说,NPT是观众与程序关联的时钟。它通常在VCR上以数字方式显示。NPT在正常播放模式下正常前进(比例=1),在快速向前扫描时以更快的速度前进(高正比例),在反向扫描时递减(高负比例)并在暂停模式下固定。NPT(逻辑上)等同于SMPTE时间码。“[5]
npt-range = ( npt-time "-" [ npt-time ] ) | ( "-" npt-time ) npt-time = "now" | npt-sec | npt-hhmmss npt-sec = 1*DIGIT [ "." *DIGIT ] npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ] npt-hh = 1*DIGIT ; any positive number npt-mm = 1*2DIGIT ; 0-59 npt-ss = 1*2DIGIT ; 0-59
npt-range = ( npt-time "-" [ npt-time ] ) | ( "-" npt-time ) npt-time = "now" | npt-sec | npt-hhmmss npt-sec = 1*DIGIT [ "." *DIGIT ] npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ] npt-hh = 1*DIGIT ; any positive number npt-mm = 1*2DIGIT ; 0-59 npt-ss = 1*2DIGIT ; 0-59
Examples: npt=123.45-125 npt=12:05:35.3- npt=now-
Examples: npt=123.45-125 npt=12:05:35.3- npt=now-
The syntax conforms to ISO 8601. The npt-sec notation is optimized for automatic generation, the ntp-hhmmss notation for consumption by human readers. The "now" constant allows clients to request to
语法符合ISO8601。npt sec表示法为自动生成而优化,ntp hhmmss表示法为人类读者使用而优化。“now”常量允许客户端请求
receive the live feed rather than the stored or time-delayed version. This is needed since neither absolute time nor zero time are appropriate for this case.
接收实时提要,而不是存储或延迟的版本。这是必要的,因为绝对时间和零时间都不适合这种情况。
Absolute time is expressed as ISO 8601 timestamps, using UTC (GMT). Fractions of a second may be indicated.
绝对时间用UTC(GMT)表示为ISO 8601时间戳。可以指示秒的分数。
utc-range = "clock" "=" utc-time "-" [ utc-time ] utc-time = utc-date "T" utc-time "Z" utc-date = 8DIGIT ; < YYYYMMDD > utc-time = 6DIGIT [ "." fraction ] ; < HHMMSS.fraction >
utc-range = "clock" "=" utc-time "-" [ utc-time ] utc-time = utc-date "T" utc-time "Z" utc-date = 8DIGIT ; < YYYYMMDD > utc-time = 6DIGIT [ "." fraction ] ; < HHMMSS.fraction >
Example for November 8, 1996 at 14h37 and 20 and a quarter seconds UTC:
例如,1996年11月8日在协调世界时14时37分和20分之一秒时:
19961108T143720.25Z
19961108T143720.25Z
Option tags are unique identifiers used to designate new options in RTSP. These tags are used in Require (Section 12.32) and Proxy-Require (Section 12.27) header fields.
选项标记是用于在RTSP中指定新选项的唯一标识符。这些标记用于Require(第12.32节)和Proxy Require(第12.27节)标题字段。
Syntax:
语法:
option-tag = 1*xchar
option-tag = 1*xchar
The creator of a new RTSP option should either prefix the option with a reverse domain name (e.g., "com.foo.mynewfeature" is an apt name for a feature whose inventor can be reached at "foo.com"), or register the new option with the Internet Assigned Numbers Authority (IANA).
新RTSP选项的创建者应在该选项前面加上反向域名(例如,“com.foo.mynewfeature”是一个合适的名称,其发明者可以通过“foo.com”联系到该功能),或者向互联网分配号码管理局(IANA)注册新选项。
When registering a new RTSP option, the following information should be provided:
注册新RTSP选项时,应提供以下信息:
* Name and description of option. The name may be of any length, but SHOULD be no more than twenty characters long. The name MUST not contain any spaces, control characters or periods. * Indication of who has change control over the option (for example, IETF, ISO, ITU-T, other international standardization bodies, a consortium or a particular company or group of companies);
* 选项的名称和说明。名称可以是任意长度,但长度不得超过二十个字符。名称不得包含任何空格、控制字符或句点。*说明谁对该方案具有变更控制权(例如,IETF、ISO、ITU-T、其他国际标准化机构、联合体或特定公司或公司集团);
* A reference to a further description, if available, for example (in order of preference) an RFC, a published paper, a patent filing, a technical report, documented source code or a computer manual; * For proprietary options, contact information (postal and email address);
* 进一步说明的参考,如有,例如(按优先顺序)RFC、已发表论文、专利申请、技术报告、记录的源代码或计算机手册;*对于专有选项,联系信息(邮政和电子邮件地址);
4 RTSP Message
4 RTSP消息
RTSP is a text-based protocol and uses the ISO 10646 character set in UTF-8 encoding (RFC 2279 [21]). Lines are terminated by CRLF, but receivers should be prepared to also interpret CR and LF by themselves as line terminators.
RTSP是一种基于文本的协议,在UTF-8编码(RFC 2279[21])中使用ISO10646字符集。线路由CRLF端接,但接收机也应准备将CR和LF本身解释为线路端接器。
Text-based protocols make it easier to add optional parameters in a self-describing manner. Since the number of parameters and the frequency of commands is low, processing efficiency is not a concern. Text-based protocols, if done carefully, also allow easy implementation of research prototypes in scripting languages such as Tcl, Visual Basic and Perl.
基于文本的协议使以自描述方式添加可选参数变得更容易。由于参数数量和命令频率较低,因此处理效率不受关注。基于文本的协议,如果做得仔细的话,也允许在脚本语言(如Tcl、Visual Basic和Perl)中轻松实现研究原型。
The 10646 character set avoids tricky character set switching, but is invisible to the application as long as US-ASCII is being used. This is also the encoding used for RTCP. ISO 8859-1 translates directly into Unicode with a high-order octet of zero. ISO 8859-1 characters with the most-significant bit set are represented as 1100001x 10xxxxxx. (See RFC 2279 [21])
10646字符集避免了复杂的字符集切换,但只要使用US-ASCII,应用程序就看不到它。这也是用于RTCP的编码。ISO 8859-1直接转换为Unicode,高阶八位字节为零。具有最高有效位集的ISO 8859-1字符表示为1100001x 10xxxxxx。(见RFC 2279[21])
RTSP messages can be carried over any lower-layer transport protocol that is 8-bit clean.
RTSP消息可以通过任何8位干净的低层传输协议传输。
Requests contain methods, the object the method is operating upon and parameters to further describe the method. Methods are idempotent, unless otherwise noted. Methods are also designed to require little or no state maintenance at the media server.
请求包含方法、方法所操作的对象以及进一步描述方法的参数。方法是幂等的,除非另有说明。方法还被设计为只需要很少或不需要在媒体服务器上进行状态维护。
See [H4.1]
见[H4.1]
See [H4.2]
见[H4.2]
See [H4.3]
见[H4.3]
When a message body is included with a message, the length of that body is determined by one of the following (in order of precedence):
当消息正文包含在消息中时,该正文的长度由以下内容之一决定(按优先顺序排列):
1. Any response message which MUST NOT include a message body (such as the 1xx, 204, and 304 responses) is always terminated by the first empty line after the header fields, regardless of the entity-header fields present in the message. (Note: An empty line consists of only CRLF.)
1. 任何不得包含消息正文的响应消息(如1xx、204和304响应)始终由头字段后的第一个空行终止,而不管消息中存在的实体头字段。(注意:空行仅由CRLF组成。)
2. If a Content-Length header field (section 12.14) is present, its value in bytes represents the length of the message-body. If this header field is not present, a value of zero is assumed.
2. 如果存在内容长度标头字段(第12.14节),则其字节值表示消息正文的长度。如果此标题字段不存在,则假定值为零。
3. By the server closing the connection. (Closing the connection cannot be used to indicate the end of a request body, since that would leave no possibility for the server to send back a response.)
3. 由服务器关闭连接。(关闭连接不能用于指示请求正文的结束,因为这将使服务器无法发回响应。)
Note that RTSP does not (at present) support the HTTP/1.1 "chunked" transfer coding(see [H3.6]) and requires the presence of the Content-Length header field.
请注意,RTSP(目前)不支持HTTP/1.1“分块”传输编码(请参见[H3.6]),并且需要存在内容长度头字段。
Given the moderate length of presentation descriptions returned, the server should always be able to determine its length, even if it is generated dynamically, making the chunked transfer encoding unnecessary. Even though Content-Length must be present if there is any entity body, the rules ensure reasonable behavior even if the length is not given explicitly.
给定返回的表示描述的中等长度,服务器应该始终能够确定其长度,即使它是动态生成的,这使得分块传输编码变得不必要。即使存在任何实体体,内容长度也必须存在,但即使没有明确给出长度,规则也确保了合理的行为。
5 General Header Fields
5一般标题字段
See [H4.5], except that Pragma, Transfer-Encoding and Upgrade headers are not defined:
请参见[H4.5],除了未定义Pragma、传输编码和升级标头外:
general-header = Cache-Control ; Section 12.8 | Connection ; Section 12.10 | Date ; Section 12.18 | Via ; Section 12.43
general-header = Cache-Control ; Section 12.8 | Connection ; Section 12.10 | Date ; Section 12.18 | Via ; Section 12.43
6 Request
6请求
A request message from a client to a server or vice versa includes, within the first line of that message, the method to be applied to the resource, the identifier of the resource, and the protocol version in use.
从客户端到服务器或从客户端到服务器的请求消息在该消息的第一行中包括要应用于资源的方法、资源的标识符以及正在使用的协议版本。
Request = Request-Line ; Section 6.1 *( general-header ; Section 5 | request-header ; Section 6.2 | entity-header ) ; Section 8.1 CRLF [ message-body ] ; Section 4.3
请求=请求行;第6.1节*(一般标题;第5节|请求标题;第6.2节|实体标题);第8.1节CRLF[报文正文];第4.3节
Request-Line = Method SP Request-URI SP RTSP-Version CRLF
请求行=方法SP请求URI SP RTSP版本CRLF
Method = "DESCRIBE" ; Section 10.2 | "ANNOUNCE" ; Section 10.3 | "GET_PARAMETER" ; Section 10.8 | "OPTIONS" ; Section 10.1 | "PAUSE" ; Section 10.6 | "PLAY" ; Section 10.5 | "RECORD" ; Section 10.11 | "REDIRECT" ; Section 10.10 | "SETUP" ; Section 10.4 | "SET_PARAMETER" ; Section 10.9 | "TEARDOWN" ; Section 10.7 | extension-method
Method = "DESCRIBE" ; Section 10.2 | "ANNOUNCE" ; Section 10.3 | "GET_PARAMETER" ; Section 10.8 | "OPTIONS" ; Section 10.1 | "PAUSE" ; Section 10.6 | "PLAY" ; Section 10.5 | "RECORD" ; Section 10.11 | "REDIRECT" ; Section 10.10 | "SETUP" ; Section 10.4 | "SET_PARAMETER" ; Section 10.9 | "TEARDOWN" ; Section 10.7 | extension-method
extension-method = token
extension-method = token
Request-URI = "*" | absolute_URI
请求URI=“*”|绝对URI
RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT
RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT
request-header = Accept ; Section 12.1 | Accept-Encoding ; Section 12.2 | Accept-Language ; Section 12.3 | Authorization ; Section 12.5 | From ; Section 12.20 | If-Modified-Since ; Section 12.23 | Range ; Section 12.29 | Referer ; Section 12.30 | User-Agent ; Section 12.41
request-header = Accept ; Section 12.1 | Accept-Encoding ; Section 12.2 | Accept-Language ; Section 12.3 | Authorization ; Section 12.5 | From ; Section 12.20 | If-Modified-Since ; Section 12.23 | Range ; Section 12.29 | Referer ; Section 12.30 | User-Agent ; Section 12.41
Note that in contrast to HTTP/1.1 [2], RTSP requests always contain the absolute URL (that is, including the scheme, host and port) rather than just the absolute path.
请注意,与HTTP/1.1[2]相反,RTSP请求始终包含绝对URL(即,包括方案、主机和端口),而不仅仅是绝对路径。
HTTP/1.1 requires servers to understand the absolute URL, but clients are supposed to use the Host request header. This is purely needed for backward-compatibility with HTTP/1.0 servers, a consideration that does not apply to RTSP.
HTTP/1.1要求服务器理解绝对URL,但客户端应该使用主机请求头。这纯粹是为了与HTTP/1.0服务器向后兼容而需要的,这一点不适用于RTSP。
The asterisk "*" in the Request-URI means that the request does not apply to a particular resource, but to the server itself, and is only allowed when the method used does not necessarily apply to a resource. One example would be:
请求URI中的星号“*”表示请求不适用于特定资源,而适用于服务器本身,并且仅当所使用的方法不一定适用于资源时才允许。一个例子是:
OPTIONS * RTSP/1.0
选项*RTSP/1.0
7 Response
7答复
[H6] applies except that HTTP-Version is replaced by RTSP-Version. Also, RTSP defines additional status codes and does not define some HTTP codes. The valid response codes and the methods they can be used with are defined in Table 1.
[H6]适用,但HTTP版本被RTSP版本替换。此外,RTSP还定义了其他状态代码,而没有定义一些HTTP代码。表1中定义了有效的响应代码及其可使用的方法。
After receiving and interpreting a request message, the recipient responds with an RTSP response message.
在接收并解释请求消息后,接收方将使用RTSP响应消息进行响应。
Response = Status-Line ; Section 7.1 *( general-header ; Section 5 | response-header ; Section 7.1.2 | entity-header ) ; Section 8.1 CRLF [ message-body ] ; Section 4.3
响应=状态行;第7.1节*(一般标题;第5节|响应标题;第7.1.2节|实体标题);第8.1节CRLF[报文正文];第4.3节
The first line of a Response message is the Status-Line, consisting of the protocol version followed by a numeric status code, and the textual phrase associated with the status code, with each element separated by SP characters. No CR or LF is allowed except in the final CRLF sequence.
响应消息的第一行是状态行,由协议版本、数字状态代码和与状态代码关联的文本短语组成,每个元素由SP字符分隔。除最终CRLF序列外,不允许使用CR或LF。
Status-Line = RTSP-Version SP Status-Code SP Reason-Phrase CRLF
状态行=RTSP版本SP状态代码SP原因短语CRLF
The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. These codes are fully defined in Section 11. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason-Phrase.
状态代码元素是试图理解和满足请求的3位整数结果代码。这些代码在第11节中有完整的定义。原因短语旨在对状态代码进行简短的文本描述。状态代码供自动机使用,原因短语供人类用户使用。客户端不需要检查或显示原因短语。
The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:
状态代码的第一位数字定义了响应的类别。最后两位数字没有任何分类角色。第一个数字有5个值:
* 1xx: Informational - Request received, continuing process * 2xx: Success - The action was successfully received, understood, and accepted * 3xx: Redirection - Further action must be taken in order to complete the request * 4xx: Client Error - The request contains bad syntax or cannot be fulfilled * 5xx: Server Error - The server failed to fulfill an apparently valid request
* 1xx: Informational - Request received, continuing process * 2xx: Success - The action was successfully received, understood, and accepted * 3xx: Redirection - Further action must be taken in order to complete the request * 4xx: Client Error - The request contains bad syntax or cannot be fulfilled * 5xx: Server Error - The server failed to fulfill an apparently valid request
The individual values of the numeric status codes defined for RTSP/1.0, and an example set of corresponding Reason-Phrase's, are presented below. The reason phrases listed here are only recommended - they may be replaced by local equivalents without affecting the protocol. Note that RTSP adopts most HTTP/1.1 [2] status codes and adds RTSP-specific status codes starting at x50 to avoid conflicts with newly defined HTTP status codes.
为RTSP/1.0定义的数字状态代码的单个值以及相应原因短语的示例集如下所示。此处列出的原因短语仅供推荐-它们可以由本地等效词替换,而不会影响协议。请注意,RTSP采用大多数HTTP/1.1[2]状态代码,并从x50开始添加RTSP特定的状态代码,以避免与新定义的HTTP状态代码冲突。
Status-Code = "100" ; Continue | "200" ; OK | "201" ; Created | "250" ; Low on Storage Space | "300" ; Multiple Choices | "301" ; Moved Permanently | "302" ; Moved Temporarily | "303" ; See Other | "304" ; Not Modified | "305" ; Use Proxy | "400" ; Bad Request | "401" ; Unauthorized | "402" ; Payment Required | "403" ; Forbidden | "404" ; Not Found | "405" ; Method Not Allowed | "406" ; Not Acceptable | "407" ; Proxy Authentication Required | "408" ; Request Time-out | "410" ; Gone | "411" ; Length Required | "412" ; Precondition Failed | "413" ; Request Entity Too Large | "414" ; Request-URI Too Large | "415" ; Unsupported Media Type | "451" ; Parameter Not Understood | "452" ; Conference Not Found | "453" ; Not Enough Bandwidth | "454" ; Session Not Found | "455" ; Method Not Valid in This State | "456" ; Header Field Not Valid for Resource | "457" ; Invalid Range | "458" ; Parameter Is Read-Only | "459" ; Aggregate operation not allowed | "460" ; Only aggregate operation allowed | "461" ; Unsupported transport | "462" ; Destination unreachable | "500" ; Internal Server Error | "501" ; Not Implemented | "502" ; Bad Gateway | "503" ; Service Unavailable | "504" ; Gateway Time-out | "505" ; RTSP Version not supported | "551" ; Option not supported | extension-code
Status-Code = "100" ; Continue | "200" ; OK | "201" ; Created | "250" ; Low on Storage Space | "300" ; Multiple Choices | "301" ; Moved Permanently | "302" ; Moved Temporarily | "303" ; See Other | "304" ; Not Modified | "305" ; Use Proxy | "400" ; Bad Request | "401" ; Unauthorized | "402" ; Payment Required | "403" ; Forbidden | "404" ; Not Found | "405" ; Method Not Allowed | "406" ; Not Acceptable | "407" ; Proxy Authentication Required | "408" ; Request Time-out | "410" ; Gone | "411" ; Length Required | "412" ; Precondition Failed | "413" ; Request Entity Too Large | "414" ; Request-URI Too Large | "415" ; Unsupported Media Type | "451" ; Parameter Not Understood | "452" ; Conference Not Found | "453" ; Not Enough Bandwidth | "454" ; Session Not Found | "455" ; Method Not Valid in This State | "456" ; Header Field Not Valid for Resource | "457" ; Invalid Range | "458" ; Parameter Is Read-Only | "459" ; Aggregate operation not allowed | "460" ; Only aggregate operation allowed | "461" ; Unsupported transport | "462" ; Destination unreachable | "500" ; Internal Server Error | "501" ; Not Implemented | "502" ; Bad Gateway | "503" ; Service Unavailable | "504" ; Gateway Time-out | "505" ; RTSP Version not supported | "551" ; Option not supported | extension-code
extension-code = 3DIGIT
extension-code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF>
Reason-Phrase = *<TEXT, excluding CR, LF>
RTSP status codes are extensible. RTSP applications are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, applications MUST understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent to the x00 status code of that class, with the exception that an unrecognized response MUST NOT be cached. For example, if an unrecognized status code of 431 is received by the client, it can safely assume that there was something wrong with its request and treat the response as if it had received a 400 status code. In such cases, user agents SHOULD present to the user the entity returned with the response, since that entity is likely to include human-readable information which will explain the unusual status.
RTSP状态代码是可扩展的。RTSP应用程序不需要理解所有注册状态代码的含义,尽管这种理解显然是可取的。但是,应用程序必须理解任何状态代码的类别(如第一位数字所示),并将任何未识别的响应视为等同于该类别的x00状态代码,但不能缓存未识别的响应除外。例如,如果客户端接收到无法识别的状态代码431,它可以安全地假设其请求有问题,并将响应视为收到400状态代码。在这种情况下,用户代理应向用户提供随响应返回的实体,因为该实体可能包括解释异常状态的人类可读信息。
Code reason
代码原因
100 Continue all
100继续所有
200 OK all 201 Created RECORD 250 Low on Storage Space RECORD
200 OK all 201已创建记录250存储空间不足记录
300 Multiple Choices all 301 Moved Permanently all 302 Moved Temporarily all 303 See Other all 305 Use Proxy all
300多项选择全部301永久移动全部302临时移动全部303查看其他全部305使用代理全部
400 Bad Request all 401 Unauthorized all 402 Payment Required all 403 Forbidden all 404 Not Found all 405 Method Not Allowed all 406 Not Acceptable all 407 Proxy Authentication Required all 408 Request Timeout all 410 Gone all 411 Length Required all 412 Precondition Failed DESCRIBE, SETUP 413 Request Entity Too Large all 414 Request-URI Too Long all 415 Unsupported Media Type all 451 Invalid parameter SETUP 452 Illegal Conference Identifier SETUP 453 Not Enough Bandwidth SETUP 454 Session Not Found all 455 Method Not Valid In This State all 456 Header Field Not Valid all 457 Invalid Range PLAY 458 Parameter Is Read-Only SET_PARAMETER 459 Aggregate Operation Not Allowed all 460 Only Aggregate Operation Allowed all 461 Unsupported Transport all 462 Destination Unreachable all
400错误请求所有401未经授权所有402支付要求所有403禁止所有404未找到所有405方法不允许所有406不可接受所有407代理身份验证要求所有408请求超时所有410消失所有411长度要求所有412先决条件失败,设置413请求实体太大所有414请求URI太长所有415不支持的媒体类型所有451无效参数设置452非法会议标识符设置453带宽不足设置454会话未找到所有455方法在此状态下无效所有456头字段无效所有457无效范围播放458参数为只读SET_参数459聚合操作不允许所有460仅聚合操作允许所有461不支持的传输所有462目标不可访问所有
500 Internal Server Error all 501 Not Implemented all 502 Bad Gateway all 503 Service Unavailable all 504 Gateway Timeout all 505 RTSP Version Not Supported all 551 Option not support all
500内部服务器错误所有501未实现所有502坏网关所有503服务不可用所有504网关超时所有505 RTSP版本不支持所有551选项不支持所有
Table 1: Status codes and their usage with RTSP methods
表1:状态代码及其与RTSP方法的使用
The response-header fields allow the request recipient to pass additional information about the response which cannot be placed in the Status-Line. These header fields give information about the server and about further access to the resource identified by the Request-URI.
响应头字段允许请求收件人传递有关响应的附加信息,这些信息不能放在状态行中。这些头字段提供有关服务器的信息,以及关于进一步访问由请求URI标识的资源的信息。
response-header = Location ; Section 12.25 | Proxy-Authenticate ; Section 12.26 | Public ; Section 12.28 | Retry-After ; Section 12.31 | Server ; Section 12.36 | Vary ; Section 12.42 | WWW-Authenticate ; Section 12.44
response-header = Location ; Section 12.25 | Proxy-Authenticate ; Section 12.26 | Public ; Section 12.28 | Retry-After ; Section 12.31 | Server ; Section 12.36 | Vary ; Section 12.42 | WWW-Authenticate ; Section 12.44
Response-header field names can be extended reliably only in combination with a change in the protocol version. However, new or experimental header fields MAY be given the semantics of response-header fields if all parties in the communication recognize them to be response-header fields. Unrecognized header fields are treated as entity-header fields.
只有结合协议版本的更改,才能可靠地扩展响应头字段名称。然而,如果通信中的所有各方都将响应报头字段识别为响应报头字段,则新的或实验性的报头字段可以被赋予响应报头字段的语义。无法识别的标题字段被视为实体标题字段。
8 Entity
8实体
Request and Response messages MAY transfer an entity if not otherwise restricted by the request method or response status code. An entity consists of entity-header fields and an entity-body, although some responses will only include the entity-headers.
如果不受请求方法或响应状态代码的限制,请求和响应消息可以传输实体。实体由实体标题字段和实体正文组成,尽管有些响应将只包括实体标题。
In this section, both sender and recipient refer to either the client or the server, depending on who sends and who receives the entity.
在本节中,发送方和接收方都指客户机或服务器,具体取决于谁发送和谁接收实体。
Entity-header fields define optional metainformation about the entity-body or, if no body is present, about the resource identified by the request.
实体头字段定义关于实体主体的可选元信息,如果没有主体,则定义关于请求标识的资源的可选元信息。
entity-header = Allow ; Section 12.4 | Content-Base ; Section 12.11 | Content-Encoding ; Section 12.12 | Content-Language ; Section 12.13 | Content-Length ; Section 12.14 | Content-Location ; Section 12.15 | Content-Type ; Section 12.16 | Expires ; Section 12.19 | Last-Modified ; Section 12.24 | extension-header extension-header = message-header
entity-header = Allow ; Section 12.4 | Content-Base ; Section 12.11 | Content-Encoding ; Section 12.12 | Content-Language ; Section 12.13 | Content-Length ; Section 12.14 | Content-Location ; Section 12.15 | Content-Type ; Section 12.16 | Expires ; Section 12.19 | Last-Modified ; Section 12.24 | extension-header extension-header = message-header
The extension-header mechanism allows additional entity-header fields to be defined without changing the protocol, but these fields cannot be assumed to be recognizable by the recipient. Unrecognized header fields SHOULD be ignored by the recipient and forwarded by proxies.
扩展头机制允许在不更改协议的情况下定义其他实体头字段,但不能假定收件人可以识别这些字段。收件人应忽略无法识别的标题字段,并由代理转发。
See [H7.2]
见[H7.2]
9 Connections
9连接
RTSP requests can be transmitted in several different ways:
RTSP请求可以通过几种不同的方式传输:
* persistent transport connections used for several request-response transactions; * one connection per request/response transaction; * connectionless mode.
* 用于多个请求-响应事务的持久传输连接;*每个请求/响应事务一个连接;*无连接模式。
The type of transport connection is defined by the RTSP URI (Section 3.2). For the scheme "rtsp", a persistent connection is assumed, while the scheme "rtspu" calls for RTSP requests to be sent without setting up a connection.
传输连接的类型由RTSP URI定义(第3.2节)。对于方案“rtsp”,假定存在一个持久连接,而方案“rtspu”在不建立连接的情况下调用发送rtsp请求。
Unlike HTTP, RTSP allows the media server to send requests to the media client. However, this is only supported for persistent connections, as the media server otherwise has no reliable way of reaching the client. Also, this is the only way that requests from media server to client are likely to traverse firewalls.
与HTTP不同,RTSP允许媒体服务器向媒体客户端发送请求。但是,这仅支持持久连接,因为媒体服务器无法可靠地到达客户端。此外,这是从媒体服务器到客户端的请求可能通过防火墙的唯一方式。
A client that supports persistent connections or connectionless mode MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response). A server MUST send its responses to those requests in the same order that the requests were received.
支持持久连接或无连接模式的客户端可以“管道化”其请求(即,在不等待每个响应的情况下发送多个请求)。服务器必须按照接收请求的相同顺序发送对这些请求的响应。
Requests are acknowledged by the receiver unless they are sent to a multicast group. If there is no acknowledgement, the sender may resend the same message after a timeout of one round-trip time (RTT). The round-trip time is estimated as in TCP (RFC 1123) [18], with an initial round-trip value of 500 ms. An implementation MAY cache the last RTT measurement as the initial value for future connections.
除非请求被发送到多播组,否则接收方会确认请求。如果没有确认,发送方可以在一个往返时间(RTT)超时后重新发送相同的消息。往返时间按照TCP(RFC 1123)[18]进行估计,初始往返时间为500 ms。实现可缓存最后的RTT测量值作为未来连接的初始值。
If a reliable transport protocol is used to carry RTSP, requests MUST NOT be retransmitted; the RTSP application MUST instead rely on the underlying transport to provide reliability.
如果使用可靠的传输协议来承载RTSP,则不得重新传输请求;RTSP应用程序必须依赖底层传输来提供可靠性。
If both the underlying reliable transport such as TCP and the RTSP application retransmit requests, it is possible that each packet loss results in two retransmissions. The receiver cannot typically take advantage of the application-layer retransmission since the
如果底层可靠传输(如TCP)和RTSP应用程序都有重传请求,则每个数据包丢失都可能导致两次重传。接收机通常不能利用应用层重传,因为
transport stack will not deliver the application-layer retransmission before the first attempt has reached the receiver. If the packet loss is caused by congestion, multiple retransmissions at different layers will exacerbate the congestion.
在第一次尝试到达接收器之前,传输堆栈不会传递应用层重传。如果分组丢失是由拥塞引起的,那么在不同的层上多次重传将加剧拥塞。
If RTSP is used over a small-RTT LAN, standard procedures for optimizing initial TCP round trip estimates, such as those used in T/TCP (RFC 1644) [22], can be beneficial.
如果在小型RTT LAN上使用RTSP,则优化初始TCP往返估计的标准程序(如T/TCP(RFC 1644)[22]中使用的程序)可能是有益的。
The Timestamp header (Section 12.38) is used to avoid the retransmission ambiguity problem [23, p. 301] and obviates the need for Karn's algorithm.
时间戳报头(第12.38节)用于避免重传歧义问题[23,第301页],并避免使用Karn算法。
Each request carries a sequence number in the CSeq header (Section 12.17), which is incremented by one for each distinct request transmitted. If a request is repeated because of lack of acknowledgement, the request MUST carry the original sequence number (i.e., the sequence number is not incremented).
每个请求在CSeq报头中携带一个序列号(第12.17节),对于每个传输的不同请求,该序列号递增一。如果由于缺少确认而重复请求,则请求必须带有原始序列号(即序列号不递增)。
Systems implementing RTSP MUST support carrying RTSP over TCP and MAY support UDP. The default port for the RTSP server is 554 for both UDP and TCP.
实现RTSP的系统必须支持通过TCP承载RTSP,并且可能支持UDP。对于UDP和TCP,RTSP服务器的默认端口均为554。
A number of RTSP packets destined for the same control end point may be packed into a single lower-layer PDU or encapsulated into a TCP stream. RTSP data MAY be interleaved with RTP and RTCP packets. Unlike HTTP, an RTSP message MUST contain a Content-Length header whenever that message contains a payload. Otherwise, an RTSP packet is terminated with an empty line immediately following the last message header.
目的地为同一控制端点的多个RTSP分组可以打包到单个较低层PDU中或封装到TCP流中。RTSP数据可以与RTP和RTCP数据包交织。与HTTP不同,RTSP消息包含有效负载时必须包含内容长度头。否则,RTSP数据包将在最后一个消息头之后立即以空行终止。
10 Method Definitions
10方法定义
The method token indicates the method to be performed on the resource identified by the Request-URI. The method is case-sensitive. New methods may be defined in the future. Method names may not start with a $ character (decimal 24) and must be a token. Methods are summarized in Table 2.
method令牌表示要对请求URI标识的资源执行的方法。该方法区分大小写。将来可能会定义新的方法。方法名称不能以$字符(十进制24)开头,必须是标记。表2总结了这些方法。
method direction object requirement DESCRIBE C->S P,S recommended ANNOUNCE C->S, S->C P,S optional GET_PARAMETER C->S, S->C P,S optional OPTIONS C->S, S->C P,S required (S->C: optional) PAUSE C->S P,S recommended PLAY C->S P,S required RECORD C->S P,S optional REDIRECT S->C P,S optional SETUP C->S S required SET_PARAMETER C->S, S->C P,S optional TEARDOWN C->S P,S required
method direction object requirement DESCRIBE C->S P,S recommended ANNOUNCE C->S, S->C P,S optional GET_PARAMETER C->S, S->C P,S optional OPTIONS C->S, S->C P,S required (S->C: optional) PAUSE C->S P,S recommended PLAY C->S P,S required RECORD C->S P,S optional REDIRECT S->C P,S optional SETUP C->S S required SET_PARAMETER C->S, S->C P,S optional TEARDOWN C->S P,S required
Table 2: Overview of RTSP methods, their direction, and what objects (P: presentation, S: stream) they operate on
表2:RTSP方法概述,它们的方向,以及它们操作的对象(P:presentation,S:stream)
Notes on Table 2: PAUSE is recommended, but not required in that a fully functional server can be built that does not support this method, for example, for live feeds. If a server does not support a particular method, it MUST return "501 Not Implemented" and a client SHOULD not try this method again for this server.
表2的注释:建议暂停,但不需要暂停,因为可以构建一个不支持此方法的功能齐全的服务器,例如,对于实时提要。如果服务器不支持特定方法,则必须返回“501 not Implemented”,并且客户端不应为此服务器再次尝试此方法。
The behavior is equivalent to that described in [H9.2]. An OPTIONS request may be issued at any time, e.g., if the client is about to try a nonstandard request. It does not influence server state.
该行为等同于[H9.2]中所述的行为。选项请求可以在任何时候发出,例如,如果客户机即将尝试非标准请求。它不影响服务器状态。
Example:
例子:
C->S: OPTIONS * RTSP/1.0 CSeq: 1 Require: implicit-play Proxy-Require: gzipped-messages
C->S: OPTIONS * RTSP/1.0 CSeq: 1 Require: implicit-play Proxy-Require: gzipped-messages
S->C: RTSP/1.0 200 OK CSeq: 1 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
S->C: RTSP/1.0 200 OK CSeq: 1 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
Note that these are necessarily fictional features (one would hope that we would not purposefully overlook a truly useful feature just so that we could have a strong example in this section).
请注意,这些都是虚构的特性(希望我们不会故意忽略一个真正有用的特性,以便在本节中有一个强大的示例)。
The DESCRIBE method retrieves the description of a presentation or media object identified by the request URL from a server. It may use the Accept header to specify the description formats that the client understands. The server responds with a description of the requested resource. The DESCRIBE reply-response pair constitutes the media initialization phase of RTSP.
descripe方法从服务器检索由请求URL标识的表示或媒体对象的描述。它可以使用Accept头指定客户机理解的描述格式。服务器响应请求的资源的描述。描述应答对构成RTSP的媒体初始化阶段。
Example:
例子:
C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 CSeq: 312 Accept: application/sdp, application/rtsl, application/mheg
C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 CSeq: 312 Accept: application/sdp, application/rtsl, application/mheg
S->C: RTSP/1.0 200 OK CSeq: 312 Date: 23 Jan 1997 15:35:06 GMT Content-Type: application/sdp Content-Length: 376
S->C: RTSP/1.0 200 OK CSeq: 312 Date: 23 Jan 1997 15:35:06 GMT Content-Type: application/sdp Content-Length: 376
v=0 o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 s=SDP Seminar i=A Seminar on the session description protocol u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps e=mjh@isi.edu (Mark Handley) c=IN IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 3456 RTP/AVP 0 m=video 2232 RTP/AVP 31 m=whiteboard 32416 UDP WB a=orient:portrait
v=0 o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 s=SDP Seminar i=A Seminar on the session description protocol u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps e=mjh@isi.edu (Mark Handley) c=IN IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 3456 RTP/AVP 0 m=video 2232 RTP/AVP 31 m=whiteboard 32416 UDP WB a=orient:portrait
The DESCRIBE response MUST contain all media initialization information for the resource(s) that it describes. If a media client obtains a presentation description from a source other than DESCRIBE and that description contains a complete set of media initialization parameters, the client SHOULD use those parameters and not then request a description for the same media via RTSP.
描述响应必须包含所描述资源的所有媒体初始化信息。如果媒体客户端从Descripte以外的源获取演示文稿描述,并且该描述包含一组完整的媒体初始化参数,则客户端应使用这些参数,而不是通过RTSP请求相同媒体的描述。
Additionally, servers SHOULD NOT use the DESCRIBE response as a means of media indirection.
此外,服务器不应使用描述响应作为媒体间接寻址的手段。
Clear ground rules need to be established so that clients have an unambiguous means of knowing when to request media initialization information via DESCRIBE, and when not to. By forcing a DESCRIBE
需要建立明确的基本规则,以便客户能够清楚地知道何时通过“描述”请求媒体初始化信息,何时不请求。通过强制描述
response to contain all media initialization for the set of streams that it describes, and discouraging use of DESCRIBE for media indirection, we avoid looping problems that might result from other approaches.
响应包含它所描述的一组流的所有媒体初始化,并阻止使用描述进行媒体间接寻址,我们避免了可能由其他方法导致的循环问题。
Media initialization is a requirement for any RTSP-based system, but the RTSP specification does not dictate that this must be done via the DESCRIBE method. There are three ways that an RTSP client may receive initialization information:
任何基于RTSP的系统都需要进行介质初始化,但RTSP规范并未规定必须通过描述方法进行介质初始化。RTSP客户端可以通过三种方式接收初始化信息:
* via RTSP's DESCRIBE method; * via some other protocol (HTTP, email attachment, etc.); * via the command line or standard input (thus working as a browser helper application launched with an SDP file or other media initialization format).
* 通过RTSP的描述方法;*通过其他协议(HTTP、电子邮件附件等)通过命令行或标准输入(从而作为浏览器助手应用程序使用SDP文件或其他媒体初始化格式启动)。
In the interest of practical interoperability, it is highly recommended that minimal servers support the DESCRIBE method, and highly recommended that minimal clients support the ability to act as a "helper application" that accepts a media initialization file from standard input, command line, and/or other means that are appropriate to the operating environment of the client.
为了实现实际的互操作性,强烈建议minimal服务器支持descripe方法,强烈建议minimal客户端支持充当“助手应用程序”的功能,该应用程序从标准输入、命令行、,和/或适用于客户操作环境的其他方式。
The ANNOUNCE method serves two purposes:
公布方法有两个目的:
When sent from client to server, ANNOUNCE posts the description of a presentation or media object identified by the request URL to a server. When sent from server to client, ANNOUNCE updates the session description in real-time.
从客户端发送到服务器时,ANNOUNCE会将由请求URL标识的演示文稿或媒体对象的描述发布到服务器。从服务器发送到客户端时,ANNOUNCE会实时更新会话描述。
If a new media stream is added to a presentation (e.g., during a live presentation), the whole presentation description should be sent again, rather than just the additional components, so that components can be deleted.
如果向演示文稿中添加了新媒体流(例如,在实况演示文稿期间),则应再次发送整个演示文稿描述,而不仅仅是其他组件,以便删除组件。
Example:
例子:
C->S: ANNOUNCE rtsp://server.example.com/fizzle/foo RTSP/1.0 CSeq: 312 Date: 23 Jan 1997 15:35:06 GMT Session: 47112344 Content-Type: application/sdp Content-Length: 332
C->S: ANNOUNCE rtsp://server.example.com/fizzle/foo RTSP/1.0 CSeq: 312 Date: 23 Jan 1997 15:35:06 GMT Session: 47112344 Content-Type: application/sdp Content-Length: 332
v=0 o=mhandley 2890844526 2890845468 IN IP4 126.16.64.4
v=0 o=mhandley 2890844526 2890845468,在IP4 126.16.64.4中
s=SDP Seminar i=A Seminar on the session description protocol u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps e=mjh@isi.edu (Mark Handley) c=IN IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 3456 RTP/AVP 0 m=video 2232 RTP/AVP 31
s=SDP Seminar i=A Seminar on the session description protocol u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps e=mjh@isi.edu (Mark Handley) c=IN IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 3456 RTP/AVP 0 m=video 2232 RTP/AVP 31
S->C: RTSP/1.0 200 OK CSeq: 312
S->C: RTSP/1.0 200 OK CSeq: 312
The SETUP request for a URI specifies the transport mechanism to be used for the streamed media. A client can issue a SETUP request for a stream that is already playing to change transport parameters, which a server MAY allow. If it does not allow this, it MUST respond with error "455 Method Not Valid In This State". For the benefit of any intervening firewalls, a client must indicate the transport parameters even if it has no influence over these parameters, for example, where the server advertises a fixed multicast address.
URI的设置请求指定用于流媒体的传输机制。客户端可以对已经播放的流发出设置请求,以更改传输参数,这是服务器允许的。如果它不允许这样做,它必须响应错误“455方法在此状态下无效”。对于任何介入防火墙的好处,客户端必须指示传输参数,即使它对这些参数没有影响,例如,在服务器播发固定多播地址的情况下。
Since SETUP includes all transport initialization information, firewalls and other intermediate network devices (which need this information) are spared the more arduous task of parsing the DESCRIBE response, which has been reserved for media initialization.
由于安装程序包括所有传输初始化信息,防火墙和其他中间网络设备(需要此信息)可以省去解析描述响应这一更艰巨的任务,该响应已保留用于媒体初始化。
The Transport header specifies the transport parameters acceptable to the client for data transmission; the response will contain the transport parameters selected by the server.
传输头指定客户端可接受的数据传输传输参数;响应将包含服务器选择的传输参数。
C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0 CSeq: 302 Transport: RTP/AVP;unicast;client_port=4588-4589
C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0 CSeq: 302 Transport: RTP/AVP;unicast;client_port=4588-4589
S->C: RTSP/1.0 200 OK CSeq: 302 Date: 23 Jan 1997 15:35:06 GMT Session: 47112344 Transport: RTP/AVP;unicast; client_port=4588-4589;server_port=6256-6257
S->C: RTSP/1.0 200 OK CSeq: 302 Date: 23 Jan 1997 15:35:06 GMT Session: 47112344 Transport: RTP/AVP;unicast; client_port=4588-4589;server_port=6256-6257
The server generates session identifiers in response to SETUP requests. If a SETUP request to a server includes a session identifier, the server MUST bundle this setup request into the
服务器生成会话标识符以响应安装请求。如果对服务器的安装请求包含会话标识符,则服务器必须将此安装请求捆绑到
existing session or return error "459 Aggregate Operation Not Allowed" (see Section 11.3.10).
现有会话或返回错误“459聚合操作不允许”(见第11.3.10节)。
The PLAY method tells the server to start sending data via the mechanism specified in SETUP. A client MUST NOT issue a PLAY request until any outstanding SETUP requests have been acknowledged as successful.
PLAY方法告诉服务器开始通过设置中指定的机制发送数据。在任何未完成的设置请求被确认为成功之前,客户端不得发出播放请求。
The PLAY request positions the normal play time to the beginning of the range specified and delivers stream data until the end of the range is reached. PLAY requests may be pipelined (queued); a server MUST queue PLAY requests to be executed in order. That is, a PLAY request arriving while a previous PLAY request is still active is delayed until the first has been completed.
播放请求将正常播放时间定位到指定范围的开始,并传送流数据,直到到达范围的结束。播放请求可以通过管道传输(排队);服务器必须将要按顺序执行的播放请求排队。也就是说,在前一个播放请求仍处于活动状态时到达的播放请求被延迟,直到第一个播放请求完成。
This allows precise editing.
这允许精确编辑。
For example, regardless of how closely spaced the two PLAY requests in the example below arrive, the server will first play seconds 10 through 15, then, immediately following, seconds 20 to 25, and finally seconds 30 through the end.
例如,无论以下示例中的两个播放请求到达的间隔有多近,服务器都将首先播放10到15秒,然后紧接着播放20到25秒,最后播放30秒直到结束。
C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 CSeq: 835 Session: 12345678 Range: npt=10-15
C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 CSeq: 835 Session: 12345678 Range: npt=10-15
C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 CSeq: 836 Session: 12345678 Range: npt=20-25
C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 CSeq: 836 Session: 12345678 Range: npt=20-25
C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 CSeq: 837 Session: 12345678 Range: npt=30-
C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 CSeq: 837 Session: 12345678 Range: npt=30-
See the description of the PAUSE request for further examples.
有关更多示例,请参阅暂停请求的说明。
A PLAY request without a Range header is legal. It starts playing a stream from the beginning unless the stream has been paused. If a stream has been paused via PAUSE, stream delivery resumes at the pause point. If a stream is playing, such a PLAY request causes no further action and can be used by the client to test server liveness.
没有范围标头的播放请求是合法的。它从开始播放流,除非流已暂停。如果流已通过暂停暂停,则流传送将在暂停点恢复。如果流正在播放,这样的播放请求不会导致进一步的操作,客户端可以使用它来测试服务器的活跃度。
The Range header may also contain a time parameter. This parameter specifies a time in UTC at which the playback should start. If the message is received after the specified time, playback is started immediately. The time parameter may be used to aid in synchronization of streams obtained from different sources.
范围标头还可能包含时间参数。此参数指定播放开始的UTC时间。如果在指定时间后收到消息,则立即开始播放。时间参数可用于帮助同步从不同源获得的流。
For a on-demand stream, the server replies with the actual range that will be played back. This may differ from the requested range if alignment of the requested range to valid frame boundaries is required for the media source. If no range is specified in the request, the current position is returned in the reply. The unit of the range in the reply is the same as that in the request.
对于按需流,服务器用将要播放的实际范围进行响应。如果媒体源需要将请求的范围与有效帧边界对齐,则这可能与请求的范围不同。如果请求中未指定范围,则在答复中返回当前位置。回复中的范围单位与请求中的范围单位相同。
After playing the desired range, the presentation is automatically paused, as if a PAUSE request had been issued.
播放所需范围后,演示文稿将自动暂停,就像发出暂停请求一样。
The following example plays the whole presentation starting at SMPTE time code 0:10:20 until the end of the clip. The playback is to start at 15:36 on 23 Jan 1997.
以下示例从SMPTE时间代码0:10:20开始播放整个演示文稿,直到剪辑结束。播放将于1997年1月23日15时36分开始。
C->S: PLAY rtsp://audio.example.com/twister.en RTSP/1.0 CSeq: 833 Session: 12345678 Range: smpte=0:10:20-;time=19970123T153600Z
C->S: PLAY rtsp://audio.example.com/twister.en RTSP/1.0 CSeq: 833 Session: 12345678 Range: smpte=0:10:20-;time=19970123T153600Z
S->C: RTSP/1.0 200 OK CSeq: 833 Date: 23 Jan 1997 15:35:06 GMT Range: smpte=0:10:22-;time=19970123T153600Z
S->C: RTSP/1.0 200 OK CSeq: 833 Date: 23 Jan 1997 15:35:06 GMT Range: smpte=0:10:22-;time=19970123T153600Z
For playing back a recording of a live presentation, it may be desirable to use clock units:
为了回放实况演示文稿的录制,可能需要使用时钟单元:
C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/1.0 CSeq: 835 Session: 12345678 Range: clock=19961108T142300Z-19961108T143520Z
C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/1.0 CSeq: 835 Session: 12345678 Range: clock=19961108T142300Z-19961108T143520Z
S->C: RTSP/1.0 200 OK CSeq: 835 Date: 23 Jan 1997 15:35:06 GMT
S->C: RTSP/1.0 200 OK CSeq: 835 Date: 23 Jan 1997 15:35:06 GMT
A media server only supporting playback MUST support the npt format and MAY support the clock and smpte formats.
仅支持播放的媒体服务器必须支持npt格式,并且可能支持时钟和smpte格式。
The PAUSE request causes the stream delivery to be interrupted (halted) temporarily. If the request URL names a stream, only playback and recording of that stream is halted. For example, for audio, this is equivalent to muting. If the request URL names a presentation or group of streams, delivery of all currently active streams within the presentation or group is halted. After resuming playback or recording, synchronization of the tracks MUST be maintained. Any server resources are kept, though servers MAY close the session and free resources after being paused for the duration specified with the timeout parameter of the Session header in the SETUP message.
暂停请求导致流传递暂时中断(暂停)。如果请求URL命名一个流,则仅暂停该流的播放和录制。例如,对于音频,这相当于静音。如果请求URL命名了一个演示文稿或一组流,则该演示文稿或组中所有当前活动流的传递将停止。恢复播放或录制后,必须保持曲目的同步。保留所有服务器资源,但服务器可能会关闭会话,并在暂停设置消息中会话头超时参数指定的持续时间后释放资源。
Example:
例子:
C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 834 Session: 12345678
C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 834 Session: 12345678
S->C: RTSP/1.0 200 OK CSeq: 834 Date: 23 Jan 1997 15:35:06 GMT
S->C: RTSP/1.0 200 OK CSeq: 834 Date: 23 Jan 1997 15:35:06 GMT
The PAUSE request may contain a Range header specifying when the stream or presentation is to be halted. We refer to this point as the "pause point". The header must contain exactly one value rather than a time range. The normal play time for the stream is set to the pause point. The pause request becomes effective the first time the server is encountering the time point specified in any of the currently pending PLAY requests. If the Range header specifies a time outside any currently pending PLAY requests, the error "457 Invalid Range" is returned. If a media unit (such as an audio or video frame) starts presentation at exactly the pause point, it is not played or recorded. If the Range header is missing, stream delivery is interrupted immediately on receipt of the message and the pause point is set to the current normal play time.
暂停请求可能包含一个范围标头,指定何时暂停流或演示文稿。我们将此点称为“暂停点”。标头必须仅包含一个值,而不是一个时间范围。流的正常播放时间设置为暂停点。暂停请求在服务器第一次遇到任何当前挂起的播放请求中指定的时间点时生效。如果范围标头指定任何当前挂起的播放请求之外的时间,则返回错误“457无效范围”。如果媒体单元(如音频或视频帧)恰好在暂停点开始显示,则不会播放或录制。如果缺少范围标头,则在收到消息后立即中断流传送,并将暂停点设置为当前正常播放时间。
A PAUSE request discards all queued PLAY requests. However, the pause point in the media stream MUST be maintained. A subsequent PLAY request without Range header resumes from the pause point.
暂停请求丢弃所有排队的播放请求。但是,必须保持媒体流中的暂停点。从暂停点恢复后续的不带范围标头的播放请求。
For example, if the server has play requests for ranges 10 to 15 and 20 to 29 pending and then receives a pause request for NPT 21, it would start playing the second range and stop at NPT 21. If the pause request is for NPT 12 and the server is playing at NPT 13 serving the first play request, the server stops immediately. If the pause request is for NPT 16, the server stops after completing the first
例如,如果服务器对范围10到15和20到29的播放请求处于挂起状态,然后接收到NPT 21的暂停请求,它将开始播放第二个范围,并在NPT 21停止。如果暂停请求是针对NPT 12的,并且服务器正在NPT 13播放第一个播放请求,则服务器立即停止。如果暂停请求是针对NPT 16的,则服务器在完成第一次暂停后停止
play request and discards the second play request.
播放请求并丢弃第二个播放请求。
As another example, if a server has received requests to play ranges 10 to 15 and then 13 to 20 (that is, overlapping ranges), the PAUSE request for NPT=14 would take effect while the server plays the first range, with the second PLAY request effectively being ignored, assuming the PAUSE request arrives before the server has started playing the second, overlapping range. Regardless of when the PAUSE request arrives, it sets the NPT to 14.
作为另一个示例,如果服务器接收到播放范围10到15,然后播放范围13到20(即重叠范围)的请求,则NPT=14的暂停请求将在服务器播放第一个范围时生效,而第二个播放请求实际上被忽略,假设暂停请求在服务器开始播放第二个重叠区域之前到达。无论暂停请求何时到达,它都会将NPT设置为14。
If the server has already sent data beyond the time specified in the Range header, a PLAY would still resume at that point in time, as it is assumed that the client has discarded data after that point. This ensures continuous pause/play cycling without gaps.
如果服务器发送的数据已超过范围标头中指定的时间,则播放仍将在该时间点继续,因为假定客户端已在该时间点之后丢弃数据。这确保了连续的暂停/播放循环,没有间隙。
The TEARDOWN request stops the stream delivery for the given URI, freeing the resources associated with it. If the URI is the presentation URI for this presentation, any RTSP session identifier associated with the session is no longer valid. Unless all transport parameters are defined by the session description, a SETUP request has to be issued before the session can be played again.
TEARDOWN请求停止给定URI的流传递,释放与之关联的资源。如果URI是此演示文稿的演示文稿URI,则与该会话关联的任何RTSP会话标识符都不再有效。除非会话描述定义了所有传输参数,否则必须发出设置请求才能再次播放会话。
Example: C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 892 Session: 12345678 S->C: RTSP/1.0 200 OK CSeq: 892
Example: C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 892 Session: 12345678 S->C: RTSP/1.0 200 OK CSeq: 892
The GET_PARAMETER request retrieves the value of a parameter of a presentation or stream specified in the URI. The content of the reply and response is left to the implementation. GET_PARAMETER with no entity body may be used to test client or server liveness ("ping").
GET_参数请求检索URI中指定的表示或流的参数值。回复和响应的内容留给实现。不带实体体的GET_参数可用于测试客户端或服务器活动性(“ping”)。
Example:
例子:
S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 431 Content-Type: text/parameters Session: 12345678 Content-Length: 15
S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 431 Content-Type: text/parameters Session: 12345678 Content-Length: 15
packets_received jitter
接收到的数据包抖动
C->S: RTSP/1.0 200 OK CSeq: 431 Content-Length: 46 Content-Type: text/parameters
C->S: RTSP/1.0 200 OK CSeq: 431 Content-Length: 46 Content-Type: text/parameters
packets_received: 10 jitter: 0.3838
接收到的数据包:10抖动:0.3838
The "text/parameters" section is only an example type for parameter. This method is intentionally loosely defined with the intention that the reply content and response content will be defined after further experimentation.
“文本/参数”部分只是参数的示例类型。有意对该方法进行松散定义,目的是在进一步实验后定义回复内容和响应内容。
This method requests to set the value of a parameter for a presentation or stream specified by the URI.
此方法请求为URI指定的表示或流设置参数值。
A request SHOULD only contain a single parameter to allow the client to determine why a particular request failed. If the request contains several parameters, the server MUST only act on the request if all of the parameters can be set successfully. A server MUST allow a parameter to be set repeatedly to the same value, but it MAY disallow changing parameter values.
请求应仅包含一个参数,以允许客户端确定特定请求失败的原因。如果请求包含多个参数,则只有在所有参数都可以成功设置的情况下,服务器才能对请求执行操作。服务器必须允许将参数重复设置为相同的值,但可能不允许更改参数值。
Note: transport parameters for the media stream MUST only be set with the SETUP command.
注意:只能使用SETUP命令设置媒体流的传输参数。
Restricting setting transport parameters to SETUP is for the benefit of firewalls.
限制将传输参数设置为SETUP是为了防火墙的好处。
The parameters are split in a fine-grained fashion so that there can be more meaningful error indications. However, it may make sense to allow the setting of several parameters if an atomic setting is desirable. Imagine device control where the client does not want the camera to pan unless it can also tilt to the right angle at the same time.
这些参数以细粒度的方式进行分割,以便出现更有意义的错误指示。但是,如果需要原子设置,则允许设置多个参数可能是有意义的。想象一下,在设备控制中,客户端不希望相机平移,除非它同时也可以倾斜到直角。
Example:
例子:
C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 421 Content-length: 20 Content-type: text/parameters
C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 421 Content-length: 20 Content-type: text/parameters
barparam: barstuff
barparam:barstuff
S->C: RTSP/1.0 451 Invalid Parameter
S->C: RTSP/1.0 451 Invalid Parameter
CSeq: 421 Content-length: 10 Content-type: text/parameters
CSeq:421内容长度:10内容类型:文本/参数
barparam
巴巴拉姆
The "text/parameters" section is only an example type for parameter. This method is intentionally loosely defined with the intention that the reply content and response content will be defined after further experimentation.
“文本/参数”部分只是参数的示例类型。有意对该方法进行松散定义,目的是在进一步实验后定义回复内容和响应内容。
A redirect request informs the client that it must connect to another server location. It contains the mandatory header Location, which indicates that the client should issue requests for that URL. It may contain the parameter Range, which indicates when the redirection takes effect. If the client wants to continue to send or receive media for this URI, the client MUST issue a TEARDOWN request for the current session and a SETUP for the new session at the designated host.
重定向请求通知客户端它必须连接到另一个服务器位置。它包含必需的头位置,这表示客户端应该发出对该URL的请求。它可能包含参数范围,指示重定向何时生效。如果客户端希望继续发送或接收此URI的媒体,则客户端必须在指定主机上发出当前会话的拆卸请求和新会话的设置。
This example request redirects traffic for this URI to the new server at the given play time:
此示例请求在给定播放时间将此URI的流量重定向到新服务器:
S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 732 Location: rtsp://bigserver.com:8001 Range: clock=19960213T143205Z-
S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/1.0 CSeq: 732 Location: rtsp://bigserver.com:8001 Range: clock=19960213T143205Z-
This method initiates recording a range of media data according to the presentation description. The timestamp reflects start and end time (UTC). If no time range is given, use the start or end time provided in the presentation description. If the session has already started, commence recording immediately.
该方法根据呈现描述开始记录一系列媒体数据。时间戳反映开始和结束时间(UTC)。如果未给出时间范围,请使用演示文稿描述中提供的开始或结束时间。如果会话已经开始,请立即开始录制。
The server decides whether to store the recorded data under the request-URI or another URI. If the server does not use the request-URI, the response SHOULD be 201 (Created) and contain an entity which describes the status of the request and refers to the new resource, and a Location header.
服务器决定是将记录的数据存储在请求URI下还是另一个URI下。如果服务器不使用请求URI,则响应应为201(已创建),并包含描述请求状态并引用新资源的实体以及位置标头。
A media server supporting recording of live presentations MUST support the clock range format; the smpte format does not make sense.
支持录制现场演示文稿的媒体服务器必须支持时钟范围格式;smpte格式没有意义。
In this example, the media server was previously invited to the conference indicated.
在本例中,媒体服务器先前被邀请参加指定的会议。
C->S: RECORD rtsp://example.com/meeting/audio.en RTSP/1.0 CSeq: 954 Session: 12345678 Conference: 128.16.64.19/32492374
C->S: RECORD rtsp://example.com/meeting/audio.en RTSP/1.0 CSeq: 954 Session: 12345678 Conference: 128.16.64.19/32492374
Certain firewall designs and other circumstances may force a server to interleave RTSP methods and stream data. This interleaving should generally be avoided unless necessary since it complicates client and server operation and imposes additional overhead. Interleaved binary data SHOULD only be used if RTSP is carried over TCP.
某些防火墙设计和其他情况可能会迫使服务器交错RTSP方法和流数据。除非必要,否则通常应避免这种交错,因为它使客户机和服务器操作复杂化并带来额外开销。只有RTSP通过TCP传输时,才应使用交错二进制数据。
Stream data such as RTP packets is encapsulated by an ASCII dollar sign (24 hexadecimal), followed by a one-byte channel identifier, followed by the length of the encapsulated binary data as a binary, two-byte integer in network byte order. The stream data follows immediately afterwards, without a CRLF, but including the upper-layer protocol headers. Each $ block contains exactly one upper-layer protocol data unit, e.g., one RTP packet.
流数据(如RTP数据包)由ASCII美元符号(24十六进制)封装,后跟一个单字节通道标识符,后跟封装的二进制数据的长度,作为网络字节顺序的二进制、双字节整数。流数据紧跟其后,没有CRLF,但包括上层协议头。每个$block正好包含一个上层协议数据单元,例如,一个RTP数据包。
The channel identifier is defined in the Transport header with the interleaved parameter(Section 12.39).
信道标识符在传输报头中用交织参数定义(第12.39节)。
When the transport choice is RTP, RTCP messages are also interleaved by the server over the TCP connection. As a default, RTCP packets are sent on the first available channel higher than the RTP channel. The client MAY explicitly request RTCP packets on another channel. This is done by specifying two channels in the interleaved parameter of the Transport header(Section 12.39).
当传输选择为RTP时,RTCP消息也由服务器通过TCP连接进行交织。默认情况下,RTCP数据包在高于RTP通道的第一个可用通道上发送。客户端可以在另一个通道上显式请求RTCP数据包。这是通过在传输报头的交织参数中指定两个信道来实现的(第12.39节)。
RTCP is needed for synchronization when two or more streams are interleaved in such a fashion. Also, this provides a convenient way to tunnel RTP/RTCP packets through the TCP control connection when required by the network configuration and transfer them onto UDP when possible.
当两个或多个流以这种方式交织时,同步需要RTCP。此外,这还提供了一种方便的方式,在网络配置需要时通过TCP控制连接对RTP/RTCP数据包进行隧道传输,并在可能时将其传输到UDP。
C->S: SETUP rtsp://foo.com/bar.file RTSP/1.0 CSeq: 2 Transport: RTP/AVP/TCP;interleaved=0-1
C->S: SETUP rtsp://foo.com/bar.file RTSP/1.0 CSeq: 2 Transport: RTP/AVP/TCP;interleaved=0-1
S->C: RTSP/1.0 200 OK CSeq: 2 Date: 05 Jun 1997 18:57:18 GMT Transport: RTP/AVP/TCP;interleaved=0-1
S->C: RTSP/1.0 200 OK CSeq: 2 Date: 05 Jun 1997 18:57:18 GMT Transport: RTP/AVP/TCP;interleaved=0-1
Session: 12345678
会议:12345678
C->S: PLAY rtsp://foo.com/bar.file RTSP/1.0 CSeq: 3 Session: 12345678
C->S: PLAY rtsp://foo.com/bar.file RTSP/1.0 CSeq: 3 Session: 12345678
S->C: RTSP/1.0 200 OK CSeq: 3 Session: 12345678 Date: 05 Jun 1997 18:59:15 GMT RTP-Info: url=rtsp://foo.com/bar.file; seq=232433;rtptime=972948234
S->C: RTSP/1.0 200 OK CSeq: 3 Session: 12345678 Date: 05 Jun 1997 18:59:15 GMT RTP-Info: url=rtsp://foo.com/bar.file; seq=232433;rtptime=972948234
S->C: $\000{2 byte length}{"length" bytes data, w/RTP header} S->C: $\000{2 byte length}{"length" bytes data, w/RTP header} S->C: $\001{2 byte length}{"length" bytes RTCP packet}
S->C: $\000{2 byte length}{"length" bytes data, w/RTP header} S->C: $\000{2 byte length}{"length" bytes data, w/RTP header} S->C: $\001{2 byte length}{"length" bytes RTCP packet}
11 Status Code Definitions
11状态代码定义
Where applicable, HTTP status [H10] codes are reused. Status codes that have the same meaning are not repeated here. See Table 1 for a listing of which status codes may be returned by which requests.
在适用的情况下,重用HTTP状态[H10]代码。此处不重复具有相同含义的状态代码。请参阅表1,了解哪些请求可以返回哪些状态代码。
The server returns this warning after receiving a RECORD request that it may not be able to fulfill completely due to insufficient storage space. If possible, the server should use the Range header to indicate what time period it may still be able to record. Since other processes on the server may be consuming storage space simultaneously, a client should take this only as an estimate.
服务器在收到由于存储空间不足而无法完全完成的记录请求后返回此警告。如果可能的话,服务器应该使用Range头来指示它可能仍然能够记录的时间段。由于服务器上的其他进程可能同时占用存储空间,因此客户端应仅将此作为估计。
See [H10.3].
见[H10.3]。
Within RTSP, redirection may be used for load balancing or redirecting stream requests to a server topologically closer to the client. Mechanisms to determine topological proximity are beyond the scope of this specification.
在RTSP中,重定向可用于负载平衡或将流请求重定向到拓扑上更靠近客户端的服务器。确定拓扑邻近性的机制超出了本规范的范围。
The method specified in the request is not allowed for the resource identified by the request URI. The response MUST include an Allow header containing a list of valid methods for the requested resource. This status code is also to be used if a request attempts to use a method not indicated during SETUP, e.g., if a RECORD request is issued even though the mode parameter in the Transport header only specified PLAY.
请求URI标识的资源不允许使用请求中指定的方法。响应必须包含一个Allow标头,其中包含请求资源的有效方法列表。如果请求试图使用设置过程中未指示的方法,例如,即使传输标头中的模式参数仅指定播放,仍发出录制请求,也将使用此状态代码。
The recipient of the request does not support one or more parameters contained in the request.
请求的收件人不支持请求中包含的一个或多个参数。
The conference indicated by a Conference header field is unknown to the media server.
媒体服务器不知道由会议标头字段指示的会议。
The request was refused because there was insufficient bandwidth. This may, for example, be the result of a resource reservation failure.
由于带宽不足,请求被拒绝。例如,这可能是资源保留失败的结果。
The RTSP session identifier in the Session header is missing, invalid, or has timed out.
会话头中的RTSP会话标识符丢失、无效或已超时。
The client or server cannot process this request in its current state. The response SHOULD contain an Allow header to make error recovery easier.
客户端或服务器无法在其当前状态下处理此请求。响应应包含一个Allow标头,以使错误恢复更容易。
The server could not act on a required request header. For example, if PLAY contains the Range header field but the stream does not allow seeking.
服务器无法对所需的请求标头执行操作。例如,如果播放包含范围标头字段,但流不允许搜索。
The Range value given is out of bounds, e.g., beyond the end of the presentation.
给定的范围值超出范围,例如,超出演示文稿的结尾。
The parameter to be set by SET_PARAMETER can be read but not modified.
set_参数设置的参数可以读取,但不能修改。
The requested method may not be applied on the URL in question since it is an aggregate (presentation) URL. The method may be applied on a stream URL.
请求的方法可能不会应用于相关URL,因为它是聚合(表示)URL。该方法可应用于流URL。
The requested method may not be applied on the URL in question since it is not an aggregate (presentation) URL. The method may be applied on the presentation URL.
请求的方法可能不会应用于相关URL,因为它不是聚合(表示)URL。该方法可应用于演示URL。
The Transport field did not contain a supported transport specification.
传输字段不包含受支持的传输规范。
The data transmission channel could not be established because the client address could not be reached. This error will most likely be the result of a client attempt to place an invalid Destination parameter in the Transport field.
无法建立数据传输通道,因为无法访问客户端地址。此错误很可能是客户端试图在传输字段中放置无效的目标参数的结果。
An option given in the Require or the Proxy-Require fields was not supported. The Unsupported header should be returned stating the option for which there is no support.
不支持Require或Proxy Require字段中给定的选项。应返回不支持的标题,说明不支持的选项。
12 Header Field Definitions
12标题字段定义
HTTP/1.1 [2] or other, non-standard header fields not listed here currently have no well-defined meaning and SHOULD be ignored by the recipient.
HTTP/1.1[2]或此处未列出的其他非标准标头字段目前没有明确定义的含义,收件人应忽略这些字段。
Table 3 summarizes the header fields used by RTSP. Type "g" designates general request headers to be found in both requests and responses, type "R" designates request headers, type "r" designates response headers, and type "e" designates entity header fields. Fields marked with "req." in the column labeled "support" MUST be implemented by the recipient for a particular method, while fields marked "opt." are optional. Note that not all fields marked "req." will be sent in every request of this type. The "req." means only that client (for response headers) and server (for request headers) MUST implement the fields. The last column lists the method for which this header field is meaningful; the designation "entity" refers to all methods that return a message body. Within this specification, DESCRIBE and GET_PARAMETER fall into this class.
表3总结了RTSP使用的标题字段。类型“g”表示在请求和响应中都可以找到的一般请求头,“R”表示请求头,“R”表示响应头,“e”表示实体头字段。在标记为“支持”的列中,收件人必须为特定方法实现标记为“req.”的字段,而标记为“opt.”的字段是可选的。请注意,并非所有标记为“req.”的字段都将在该类型的每个请求中发送。“req.”仅表示客户端(用于响应头)和服务器(用于请求头)必须实现这些字段。最后一列列出了此标题字段对其有意义的方法;名称“实体”是指返回消息体的所有方法。在本规范中,描述并获取属于此类的_参数。
Header type support methods Accept R opt. entity Accept-Encoding R opt. entity Accept-Language R opt. all Allow r opt. all Authorization R opt. all Bandwidth R opt. all Blocksize R opt. all but OPTIONS, TEARDOWN Cache-Control g opt. SETUP Conference R opt. SETUP Connection g req. all Content-Base e opt. entity Content-Encoding e req. SET_PARAMETER Content-Encoding e req. DESCRIBE, ANNOUNCE Content-Language e req. DESCRIBE, ANNOUNCE Content-Length e req. SET_PARAMETER, ANNOUNCE Content-Length e req. entity Content-Location e opt. entity Content-Type e req. SET_PARAMETER, ANNOUNCE Content-Type r req. entity CSeq g req. all Date g opt. all Expires e opt. DESCRIBE, ANNOUNCE From R opt. all If-Modified-Since R opt. DESCRIBE, SETUP Last-Modified e opt. entity Proxy-Authenticate Proxy-Require R req. all Public r opt. all Range R opt. PLAY, PAUSE, RECORD Range r opt. PLAY, PAUSE, RECORD Referer R opt. all Require R req. all Retry-After r opt. all RTP-Info r req. PLAY Scale Rr opt. PLAY, RECORD Session Rr req. all but SETUP, OPTIONS Server r opt. all Speed Rr opt. PLAY Transport Rr req. SETUP Unsupported r req. all User-Agent R opt. all Via g opt. all WWW-Authenticate r opt. all
头类型支持方法接受R opt。实体接受编码R opt。实体接受语言R opt。所有这些都允许r选择。所有授权都可以选择。所有带宽R opt。所有区块大小的R选项。除选项外的所有选项,拆卸缓存控制g opt。设置会议选择。设置连接g请求。所有内容库都是可选的。实体内容编码e-req。设置参数内容编码e req。描述、宣布内容语言e req。描述、宣布内容长度e要求。设置_参数,宣布内容长度e请求。实体内容位置e opt。实体内容类型e req。设置_参数,宣布内容类型r req。实体CSeq g请求。所有日期g opt。所有到期日都可以选择。描述,从R opt宣布。如果自R opt以来进行了修改,则为所有。描述、设置上次修改的e选项。实体代理验证代理需要R req。所有公众都可以选择。所有范围R选项。播放、暂停、录制范围或选择。播放、暂停、录制参考选项。所有要求R req。在r opt之后重试。所有RTP信息请求。播放比例Rr opt。播放、录制会话Rr req。除设置选项、服务器选项外的所有选项。全速右后选择。播放传输请求。安装程序不支持r请求。所有用户代理都可以选择。全部通过g opt。所有的WWW都是可选的。全部的
Overview of RTSP header fields
RTSP头字段概述
The Accept request-header field can be used to specify certain presentation description content types which are acceptable for the response.
Accept request header字段可用于指定响应可接受的某些演示文稿描述内容类型。
The "level" parameter for presentation descriptions is properly defined as part of the MIME type registration, not here.
表示描述的“level”参数正确地定义为MIME类型注册的一部分,而不是这里。
See [H14.1] for syntax.
有关语法,请参见[H14.1]。
Example of use: Accept: application/rtsl, application/sdp;level=2
Example of use: Accept: application/rtsl, application/sdp;level=2
See [H14.3]
见[H14.3]
See [H14.4]. Note that the language specified applies to the presentation description and any reason phrases, not the media content.
见[H14.4]。请注意,指定的语言适用于演示文稿描述和任何原因短语,而不是媒体内容。
The Allow response header field lists the methods supported by the resource identified by the request-URI. The purpose of this field is to strictly inform the recipient of valid methods associated with the resource. An Allow header field must be present in a 405 (Method not allowed) response.
Allow response header字段列出由请求URI标识的资源支持的方法。此字段的目的是严格通知收件人与资源关联的有效方法。405(方法不允许)响应中必须存在允许标头字段。
Example of use: Allow: SETUP, PLAY, RECORD, SET_PARAMETER
使用示例:允许:设置、播放、录制、设置参数
See [H14.8]
见[H14.8]
The Bandwidth request header field describes the estimated bandwidth available to the client, expressed as a positive integer and measured in bits per second. The bandwidth available to the client may change during an RTSP session, e.g., due to modem retraining.
带宽请求头字段描述客户端可用的估计带宽,表示为正整数,以每秒比特数为单位。在RTSP会话期间,客户端可用的带宽可能会发生变化,例如,由于调制解调器重新培训。
Bandwidth = "Bandwidth" ":" 1*DIGIT
Bandwidth = "Bandwidth" ":" 1*DIGIT
Example: Bandwidth: 4000
示例:带宽:4000
This request header field is sent from the client to the media server asking the server for a particular media packet size. This packet size does not include lower-layer headers such as IP, UDP, or RTP. The server is free to use a blocksize which is lower than the one requested. The server MAY truncate this packet size to the closest multiple of the minimum, media-specific block size, or override it with the media-specific size if necessary. The block size MUST be a positive decimal number, measured in octets. The server only returns an error (416) if the value is syntactically invalid.
此请求标头字段从客户端发送到媒体服务器,请求服务器提供特定的媒体数据包大小。此数据包大小不包括较低层的头,如IP、UDP或RTP。服务器可以自由使用小于请求的块大小的块。服务器可以将该数据包大小截断为最小媒体特定块大小的最近倍数,或者在必要时用媒体特定块大小覆盖它。块大小必须为正十进制数,以八位字节为单位。只有当值在语法上无效时,服务器才会返回错误(416)。
The Cache-Control general header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.
Cache Control general header字段用于指定请求/响应链上所有缓存机制必须遵守的指令。
Cache directives must be passed through by a proxy or gateway application, regardless of their significance to that application, since the directives may be applicable to all recipients along the request/response chain. It is not possible to specify a cache-directive for a specific cache.
缓存指令必须由代理或网关应用程序传递,而不管它们对该应用程序的重要性如何,因为这些指令可能适用于请求/响应链上的所有收件人。无法为特定缓存指定缓存指令。
Cache-Control should only be specified in a SETUP request and its response. Note: Cache-Control does not govern the caching of responses as for HTTP, but rather of the stream identified by the SETUP request. Responses to RTSP requests are not cacheable, except for responses to DESCRIBE.
缓存控制只能在安装请求及其响应中指定。注意:缓存控制并不像HTTP那样控制响应的缓存,而是控制由设置请求标识的流的缓存。对RTSP请求的响应不可缓存,但要描述的响应除外。
Cache-Control = "Cache-Control" ":" 1#cache-directive cache-directive = cache-request-directive | cache-response-directive cache-request-directive = "no-cache" | "max-stale" | "min-fresh" | "only-if-cached" | cache-extension cache-response-directive = "public" | "private" | "no-cache" | "no-transform" | "must-revalidate"
Cache-Control = "Cache-Control" ":" 1#cache-directive cache-directive = cache-request-directive | cache-response-directive cache-request-directive = "no-cache" | "max-stale" | "min-fresh" | "only-if-cached" | cache-extension cache-response-directive = "public" | "private" | "no-cache" | "no-transform" | "must-revalidate"
| "proxy-revalidate" | "max-age" "=" delta-seconds | cache-extension cache-extension = token [ "=" ( token | quoted-string ) ]
| "proxy-revalidate" | "max-age" "=" delta-seconds | cache-extension cache-extension = token [ "=" ( token | quoted-string ) ]
no-cache: Indicates that the media stream MUST NOT be cached anywhere. This allows an origin server to prevent caching even by caches that have been configured to return stale responses to client requests.
无缓存:表示媒体流不能缓存在任何位置。这允许源服务器甚至通过已配置为向客户端请求返回过时响应的缓存来阻止缓存。
public: Indicates that the media stream is cacheable by any cache.
公共:表示媒体流可由任何缓存缓存。
private: Indicates that the media stream is intended for a single user and MUST NOT be cached by a shared cache. A private (non-shared) cache may cache the media stream.
私有:表示媒体流是针对单个用户的,不能由共享缓存缓存。私有(非共享)缓存可以缓存媒体流。
no-transform: An intermediate cache (proxy) may find it useful to convert the media type of a certain stream. A proxy might, for example, convert between video formats to save cache space or to reduce the amount of traffic on a slow link. Serious operational problems may occur, however, when these transformations have been applied to streams intended for certain kinds of applications. For example, applications for medical imaging, scientific data analysis and those using end-to-end authentication all depend on receiving a stream that is bit-for-bit identical to the original entity-body. Therefore, if a response includes the no-transform directive, an intermediate cache or proxy MUST NOT change the encoding of the stream. Unlike HTTP, RTSP does not provide for partial transformation at this point, e.g., allowing translation into a different language.
不转换:中间缓存(代理)可能会发现转换特定流的媒体类型很有用。例如,代理可以在视频格式之间转换,以节省缓存空间或减少慢速链接上的流量。然而,当这些转换应用于特定类型应用程序的流时,可能会出现严重的操作问题。例如,医疗成像、科学数据分析和使用端到端身份验证的应用程序都依赖于接收与原始实体完全相同的流。因此,如果响应包含no transform指令,则中间缓存或代理不得更改流的编码。与HTTP不同,RTSP此时不提供部分转换,例如,允许翻译成不同的语言。
only-if-cached: In some cases, such as times of extremely poor network connectivity, a client may want a cache to return only those media streams that it currently has stored, and not to receive these from the origin server. To do this, the client may include the only-if-cached directive in a request. If it receives this directive, a cache SHOULD either respond using a cached media stream that is consistent with the other constraints of the request, or respond with a 504 (Gateway Timeout) status. However, if a group of caches is being operated as a unified system with good internal connectivity, such a request MAY be forwarded within that group of caches.
仅当缓存时:在某些情况下,例如网络连接极差时,客户端可能希望缓存仅返回其当前存储的媒体流,而不从源服务器接收这些媒体流。为此,客户端可以在请求中包含only if cached指令。如果收到该指令,缓存应该使用与请求的其他约束一致的缓存媒体流进行响应,或者使用504(网关超时)状态进行响应。然而,如果一组缓存作为具有良好内部连接的统一系统运行,则可以在该组缓存内转发这样的请求。
max-stale: Indicates that the client is willing to accept a media stream that has exceeded its expiration time. If max-stale is assigned a value, then the client is willing to accept a response that has exceeded its expiration time by no more than the specified number of seconds. If no value is assigned to max-stale, then the client is willing to accept a stale response of any age.
max stale:表示客户端愿意接受超过其过期时间的媒体流。如果为max stale分配了一个值,则客户端愿意接受超出其过期时间不超过指定秒数的响应。如果没有为max stale指定值,那么客户机愿意接受任何年龄的stale响应。
min-fresh: Indicates that the client is willing to accept a media stream whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds.
min fresh:表示客户端愿意接受新鲜度生命周期不小于其当前年龄加上指定时间(以秒为单位)的媒体流。也就是说,客户机希望响应至少在指定的秒数内保持新鲜。
must-revalidate: When the must-revalidate directive is present in a SETUP response received by a cache, that cache MUST NOT use the entry after it becomes stale to respond to a subsequent request without first revalidating it with the origin server. That is, the cache must do an end-to-end revalidation every time, if, based solely on the origin server's Expires, the cached response is stale.)
必须重新验证:当缓存接收到的设置响应中存在必须重新验证指令时,该缓存在过时后不得使用该条目来响应后续请求,而必须首先与源服务器重新验证该条目。也就是说,如果仅基于源服务器的过期,缓存的响应过时,则每次缓存都必须进行端到端重新验证。)
This request header field establishes a logical connection between a pre-established conference and an RTSP stream. The conference-id must not be changed for the same RTSP session.
此请求标头字段在预先建立的会议和RTSP流之间建立逻辑连接。不能为同一RTSP会话更改会议id。
Conference = "Conference" ":" conference-id Example: Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
Conference = "Conference" ":" conference-id Example: Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
A response code of 452 (452 Conference Not Found) is returned if the conference-id is not valid.
如果会议id无效,则返回响应代码452(452 Conference Not Found)。
See [H14.10]
见[H14.10]
See [H14.11]
见[H14.11]
See [H14.12]
见[H14.12]
See [H14.13]
见[H14.13]
This field contains the length of the content of the method (i.e. after the double CRLF following the last header). Unlike HTTP, it MUST be included in all messages that carry content beyond the header portion of the message. If it is missing, a default value of zero is assumed. It is interpreted according to [H14.14].
此字段包含方法内容的长度(即,在最后一个标题后面的双CRLF之后)。与HTTP不同,它必须包含在所有包含消息头部分以外内容的消息中。如果缺少,则假定默认值为零。根据[H14.14]对其进行解释。
See [H14.15]
见[H14.15]
See [H14.18]. Note that the content types suitable for RTSP are likely to be restricted in practice to presentation descriptions and parameter-value types.
见[H14.18]。注意,适用于RTSP的内容类型在实践中可能仅限于表示描述和参数值类型。
The CSeq field specifies the sequence number for an RTSP request-response pair. This field MUST be present in all requests and responses. For every RTSP request containing the given sequence number, there will be a corresponding response having the same number. Any retransmitted request must contain the same sequence number as the original (i.e. the sequence number is not incremented for retransmissions of the same request).
CSeq字段指定RTSP请求-响应对的序列号。此字段必须出现在所有请求和响应中。对于包含给定序列号的每个RTSP请求,将有一个具有相同序列号的相应响应。任何重新传输的请求必须包含与原始请求相同的序列号(即,对于相同请求的重新传输,序列号不会增加)。
See [H14.19].
见[H14.19]。
The Expires entity-header field gives a date and time after which the description or media-stream should be considered stale. The interpretation depends on the method:
Expires entity标头字段提供了一个日期和时间,在该日期和时间之后,说明或媒体流应被视为过时。解释取决于方法:
DESCRIBE response: The Expires header indicates a date and time after which the description should be considered stale.
描述响应:Expires标头指示一个日期和时间,在该日期和时间之后,描述应被视为过时。
A stale cache entry may not normally be returned by a cache (either a proxy cache or an user agent cache) unless it is first validated with the origin server (or with an intermediate cache that has a fresh copy of the entity). See section 13 for further discussion of the expiration model.
缓存(代理缓存或用户代理缓存)通常不会返回过时的缓存项,除非首先使用源服务器(或具有实体新副本的中间缓存)对其进行验证。有关过期模型的进一步讨论,请参见第13节。
The presence of an Expires field does not imply that the original resource will change or cease to exist at, before, or after that time.
Expires字段的存在并不意味着原始资源将在该时间、之前或之后更改或停止存在。
The format is an absolute date and time as defined by HTTP-date in [H3.3]; it MUST be in RFC1123-date format:
格式为[H3.3]中HTTP date定义的绝对日期和时间;必须采用RFC1123日期格式:
Expires = "Expires" ":" HTTP-date
Expires=“Expires”“:”HTTP日期
An example of its use is
其使用的一个例子是
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Expires: Thu, 01 Dec 1994 16:00:00 GMT
RTSP/1.0 clients and caches MUST treat other invalid date formats, especially including the value "0", as having occurred in the past (i.e., "already expired").
RTSP/1.0客户端和缓存必须将其他无效的日期格式(尤其包括值“0”)视为过去发生的(即“已过期”)。
To mark a response as "already expired," an origin server should use an Expires date that is equal to the Date header value. To mark a response as "never expires," an origin server should use an Expires date approximately one year from the time the response is sent. RTSP/1.0 servers should not send Expires dates more than one year in the future.
要将响应标记为“已过期”,源服务器应使用与日期标头值相等的过期日期。要将响应标记为“永不过期”,源服务器应使用从发送响应起大约一年的过期日期。RTSP/1.0服务器发送的过期日期不应超过一年。
The presence of an Expires header field with a date value of some time in the future on a media stream that otherwise would by default be non-cacheable indicates that the media stream is cacheable, unless indicated otherwise by a Cache-Control header field (Section 12.8).
除非缓存控制头字段另有指示,否则默认情况下不可缓存的媒体流上存在日期值为未来某个时间的Expires头字段表示媒体流可缓存(第12.8节)。
See [H14.22].
见[H14.22]。
This HTTP request header field is not needed for RTSP. It should be silently ignored if sent.
RTSP不需要此HTTP请求标头字段。如果发送,则应忽略它。
See [H14.25].
见[H14.25]。
This field is especially useful for ensuring the integrity of the presentation description, in both the case where it is fetched via means external to RTSP (such as HTTP), or in the case where the server implementation is guaranteeing the integrity of the description between the time of the DESCRIBE message and the SETUP message.
在通过RTSP之外的方式(如HTTP)获取表示描述的情况下,或者在服务器实现在描述消息和设置消息之间保证描述的完整性的情况下,此字段对于确保表示描述的完整性特别有用。
The identifier is an opaque identifier, and thus is not specific to any particular session description language.
标识符是不透明的标识符,因此不特定于任何特定的会话描述语言。
The If-Modified-Since request-header field is used with the DESCRIBE and SETUP methods to make them conditional. If the requested variant has not been modified since the time specified in this field, a description will not be returned from the server (DESCRIBE) or a stream will not be set up (SETUP). Instead, a 304 (not modified) response will be returned without any message-body.
If-Modified-Since-request标头字段与descripe和SETUP方法一起使用,使它们具有条件。如果自此字段中指定的时间以来未修改请求的变量,则不会从服务器返回描述(描述)或设置流(设置)。相反,将返回304(未修改)响应,而不返回任何消息体。
If-Modified-Since = "If-Modified-Since" ":" HTTP-date
如果修改自=“如果修改自”“:”HTTP日期
An example of the field is:
该字段的一个示例是:
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
The Last-Modified entity-header field indicates the date and time at which the origin server believes the presentation description or media stream was last modified. See [H14.29]. For the methods DESCRIBE or ANNOUNCE, the header field indicates the last modification date and time of the description, for SETUP that of the media stream.
Last Modified entity header字段表示源服务器认为演示文稿描述或媒体流上次被修改的日期和时间。见[H14.29]。对于描述或宣布的方法,标题字段指示描述的最后修改日期和时间,用于设置媒体流。
See [H14.30].
见[H14.30]。
See [H14.33].
见[H14.33]。
The Proxy-Require header is used to indicate proxy-sensitive features that MUST be supported by the proxy. Any Proxy-Require header features that are not supported by the proxy MUST be negatively acknowledged by the proxy to the client if not supported. Servers
Proxy Require标头用于指示代理必须支持的代理敏感功能。如果代理不支持任何代理要求标头功能,则代理必须向客户端否定地确认这些功能。服务器
should treat this field identically to the Require field.
该字段应与Require字段相同。
See Section 12.32 for more details on the mechanics of this message and a usage example.
有关此消息的机制和用法示例的更多详细信息,请参见第12.32节。
See [H14.35].
见[H14.35]。
This request and response header field specifies a range of time. The range can be specified in a number of units. This specification defines the smpte (Section 3.5), npt (Section 3.6), and clock (Section 3.7) range units. Within RTSP, byte ranges [H14.36.1] are not meaningful and MUST NOT be used. The header may also contain a time parameter in UTC, specifying the time at which the operation is to be made effective. Servers supporting the Range header MUST understand the NPT range format and SHOULD understand the SMPTE range format. The Range response header indicates what range of time is actually being played or recorded. If the Range header is given in a time format that is not understood, the recipient should return "501 Not Implemented".
此请求和响应标头字段指定时间范围。范围可以用许多单位指定。本规范定义了smpte(第3.5节)、npt(第3.6节)和时钟(第3.7节)量程单位。在RTSP中,字节范围[H14.36.1]没有意义,不得使用。标题还可以包含UTC时间参数,指定操作生效的时间。支持范围标头的服务器必须理解NPT范围格式,并且应该理解SMPTE范围格式。范围响应标题指示实际播放或录制的时间范围。如果范围标头以不可理解的时间格式给出,则收件人应返回“501未实现”。
Ranges are half-open intervals, including the lower point, but excluding the upper point. In other words, a range of a-b starts exactly at time a, but stops just before b. Only the start time of a media unit such as a video or audio frame is relevant. As an example, assume that video frames are generated every 40 ms. A range of 10.0- 10.1 would include a video frame starting at 10.0 or later time and would include a video frame starting at 10.08, even though it lasted beyond the interval. A range of 10.0-10.08, on the other hand, would exclude the frame at 10.08.
范围是半开区间,包括下限,但不包括上限。换句话说,a-b的范围正好在时间a开始,但在时间b之前停止。只有媒体单元(如视频或音频帧)的开始时间才相关。例如,假设每40 ms生成一次视频帧。10.0-10.1的范围将包括在10.0或更高时间开始的视频帧,并且将包括在10.08开始的视频帧,即使其持续时间超过了间隔。另一方面,10.0-10.08的范围将排除10.08的帧。
Range = "Range" ":" 1\#ranges-specifier [ ";" "time" "=" utc-time ] ranges-specifier = npt-range | utc-range | smpte-range
Range = "Range" ":" 1\#ranges-specifier [ ";" "time" "=" utc-time ] ranges-specifier = npt-range | utc-range | smpte-range
Example: Range: clock=19960213T143205Z-;time=19970123T143720Z
Example: Range: clock=19960213T143205Z-;time=19970123T143720Z
The notation is similar to that used for the HTTP/1.1 [2] byte-range header. It allows clients to select an excerpt from the media object, and to play from a given point to the end as well as from the current location to a given point. The start of playback can be scheduled for any time in the future, although a server may refuse to keep server resources for extended idle periods.
该符号与HTTP/1.1[2]字节范围标头所用的符号类似。它允许客户端从媒体对象中选择摘录,并从给定点播放到结尾,以及从当前位置播放到给定点。播放的开始可以安排在将来的任何时间,尽管服务器可能会拒绝将服务器资源保留更长的空闲时间。
See [H14.37]. The URL refers to that of the presentation description, typically retrieved via HTTP.
见[H14.37]。URL指的是表示描述的URL,通常通过HTTP检索。
See [H14.38].
见[H14.38]。
The Require header is used by clients to query the server about options that it may or may not support. The server MUST respond to this header by using the Unsupported header to negatively acknowledge those options which are NOT supported.
客户机使用Require头查询服务器可能支持或不支持的选项。服务器必须通过使用不受支持的标头来响应此标头,以否定地确认那些不受支持的选项。
This is to make sure that the client-server interaction will proceed without delay when all options are understood by both sides, and only slow down if options are not understood (as in the case above). For a well-matched client-server pair, the interaction proceeds quickly, saving a round-trip often required by negotiation mechanisms. In addition, it also removes state ambiguity when the client requires features that the server does not understand.
这是为了确保当双方都理解所有选项时,客户机-服务器交互将毫不延迟地进行,并且只有在不理解选项时(如上所述)才会减慢速度。对于匹配良好的客户机-服务器对,交互进行得很快,节省了协商机制通常需要的往返时间。此外,当客户端需要服务器不理解的功能时,它还消除了状态模糊性。
Require = "Require" ":" 1#option-tag
Require = "Require" ":" 1#option-tag
Example: C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 CSeq: 302 Require: funky-feature Funky-Parameter: funkystuff
Example: C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 CSeq: 302 Require: funky-feature Funky-Parameter: funkystuff
S->C: RTSP/1.0 551 Option not supported CSeq: 302 Unsupported: funky-feature
S->C: RTSP/1.0 551 Option not supported CSeq: 302 Unsupported: funky-feature
C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 CSeq: 303
C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 CSeq: 303
S->C: RTSP/1.0 200 OK CSeq: 303
S->C: RTSP/1.0 200 OK CSeq: 303
In this example, "funky-feature" is the feature tag which indicates to the client that the fictional Funky-Parameter field is required. The relationship between "funky-feature" and Funky-Parameter is not communicated via the RTSP exchange, since that relationship is an immutable property of "funky-feature" and thus should not be transmitted with every exchange.
在本例中,“funky feature”是一个feature标记,它向客户端指示虚构的funky参数字段是必需的。“funky feature”和funky参数之间的关系不通过RTSP交换进行通信,因为该关系是“funky feature”的不可变属性,因此不应在每次交换中传输。
Proxies and other intermediary devices SHOULD ignore features that are not understood in this field. If a particular extension requires that intermediate devices support it, the extension should be tagged in the Proxy-Require field instead (see Section 12.27).
代理和其他中间设备应忽略本领域未理解的功能。如果特定扩展需要中间设备支持,则应在代理要求字段中标记该扩展(参见第12.27节)。
This field is used to set RTP-specific parameters in the PLAY response.
此字段用于设置播放响应中的RTP特定参数。
url: Indicates the stream URL which for which the following RTP parameters correspond.
url:指示以下RTP参数对应的流url。
seq: Indicates the sequence number of the first packet of the stream. This allows clients to gracefully deal with packets when seeking. The client uses this value to differentiate packets that originated before the seek from packets that originated after the seek.
seq:表示流的第一个数据包的序列号。这允许客户端在查找数据包时优雅地处理数据包。客户机使用此值区分在搜索之前发出的数据包和在搜索之后发出的数据包。
rtptime: Indicates the RTP timestamp corresponding to the time value in the Range response header. (Note: For aggregate control, a particular stream may not actually generate a packet for the Range time value returned or implied. Thus, there is no guarantee that the packet with the sequence number indicated by seq actually has the timestamp indicated by rtptime.) The client uses this value to calculate the mapping of RTP time to NPT.
rtptime:表示与范围响应标头中的时间值相对应的RTP时间戳。(注意:对于聚合控制,特定流可能不会实际为返回或隐含的范围时间值生成数据包。因此,不能保证序列号为seq的数据包实际具有rtptime指示的时间戳。)客户端使用此值计算RTP时间到NPT的映射。
A mapping from RTP timestamps to NTP timestamps (wall clock) is available via RTCP. However, this information is not sufficient to generate a mapping from RTP timestamps to NPT. Furthermore, in order to ensure that this information is available at the necessary time (immediately at startup or after a seek), and that it is delivered reliably, this mapping is placed in the RTSP control channel.
从RTP时间戳到NTP时间戳(挂钟)的映射可通过RTCP获得。但是,该信息不足以生成从RTP时间戳到NPT的映射。此外,为了确保该信息在必要的时间可用(启动时或寻道后立即可用),并且可靠地传递,将该映射放置在RTSP控制通道中。
In order to compensate for drift for long, uninterrupted presentations, RTSP clients should additionally map NPT to NTP, using initial RTCP sender reports to do the mapping, and later reports to check drift against the mapping.
为了补偿长时间不间断演示的漂移,RTSP客户端应另外将NPT映射到NTP,使用初始RTCP发送方报告进行映射,然后使用后续报告根据映射检查漂移。
Syntax:
语法:
RTP-Info = "RTP-Info" ":" 1#stream-url 1*parameter stream-url = "url" "=" url parameter = ";" "seq" "=" 1*DIGIT | ";" "rtptime" "=" 1*DIGIT
RTP-Info = "RTP-Info" ":" 1#stream-url 1*parameter stream-url = "url" "=" url parameter = ";" "seq" "=" 1*DIGIT | ";" "rtptime" "=" 1*DIGIT
Example:
例子:
RTP-Info: url=rtsp://foo.com/bar.avi/streamid=0;seq=45102, url=rtsp://foo.com/bar.avi/streamid=1;seq=30211
RTP-Info: url=rtsp://foo.com/bar.avi/streamid=0;seq=45102, url=rtsp://foo.com/bar.avi/streamid=1;seq=30211
A scale value of 1 indicates normal play or record at the normal forward viewing rate. If not 1, the value corresponds to the rate with respect to normal viewing rate. For example, a ratio of 2 indicates twice the normal viewing rate ("fast forward") and a ratio of 0.5 indicates half the normal viewing rate. In other words, a ratio of 2 has normal play time increase at twice the wallclock rate. For every second of elapsed (wallclock) time, 2 seconds of content will be delivered. A negative value indicates reverse direction.
刻度值为1表示在正常向前观看速率下正常播放或录制。如果不是1,则该值对应于相对于正常观看率的速率。例如,比率2表示正常观看率的两倍(“快进”),比率0.5表示正常观看率的一半。换句话说,比率为2时,正常播放时间将以两倍于挂钟的速率增加。每经过一秒(wallclock)时间,就会传送2秒的内容。负值表示方向相反。
Unless requested otherwise by the Speed parameter, the data rate SHOULD not be changed. Implementation of scale changes depends on the server and media type. For video, a server may, for example, deliver only key frames or selected key frames. For audio, it may time-scale the audio while preserving pitch or, less desirably, deliver fragments of audio.
除非速度参数另有要求,否则不应更改数据速率。规模更改的实施取决于服务器和媒体类型。例如,对于视频,服务器可以仅传送关键帧或选定的关键帧。对于音频,它可以在保持音高的同时对音频进行时间缩放,或者,不太理想地,传递音频片段。
The server should try to approximate the viewing rate, but may restrict the range of scale values that it supports. The response MUST contain the actual scale value chosen by the server.
服务器应尝试近似查看速率,但可能会限制其支持的缩放值范围。响应必须包含服务器选择的实际比例值。
If the request contains a Range parameter, the new scale value will take effect at that time.
如果请求包含范围参数,则新的比例值将在此时生效。
Scale = "Scale" ":" [ "-" ] 1*DIGIT [ "." *DIGIT ]
Scale = "Scale" ":" [ "-" ] 1*DIGIT [ "." *DIGIT ]
Example of playing in reverse at 3.5 times normal rate:
以3.5倍正常速率反向播放的示例:
Scale: -3.5
比例:-3.5
This request header fields parameter requests the server to deliver data to the client at a particular speed, contingent on the server's ability and desire to serve the media stream at the given speed. Implementation by the server is OPTIONAL. The default is the bit rate of the stream.
此request header fields参数请求服务器以特定的速度向客户端交付数据,这取决于服务器以给定速度服务媒体流的能力和愿望。由服务器实现是可选的。默认值是流的比特率。
The parameter value is expressed as a decimal ratio, e.g., a value of 2.0 indicates that data is to be delivered twice as fast as normal. A speed of zero is invalid. If the request contains a Range parameter, the new speed value will take effect at that time.
参数值以十进制比率表示,例如,值为2.0表示数据传输速度为正常速度的两倍。速度为零是无效的。如果请求包含范围参数,则新的速度值将在此时生效。
Speed = "Speed" ":" 1*DIGIT [ "." *DIGIT ]
Speed = "Speed" ":" 1*DIGIT [ "." *DIGIT ]
Example: Speed: 2.5
示例:速度:2.5
Use of this field changes the bandwidth used for data delivery. It is meant for use in specific circumstances where preview of the presentation at a higher or lower rate is necessary. Implementors should keep in mind that bandwidth for the session may be negotiated beforehand (by means other than RTSP), and therefore re-negotiation may be necessary. When data is delivered over UDP, it is highly recommended that means such as RTCP be used to track packet loss rates.
使用此字段会更改用于数据传输的带宽。它适用于需要以较高或较低速率预览演示文稿的特定情况。实现者应该记住,会话的带宽可以事先协商(通过RTSP以外的方式),因此可能需要重新协商。当数据通过UDP传输时,强烈建议使用RTCP等方法跟踪数据包丢失率。
See [H14.39]
见[H14.39]
This request and response header field identifies an RTSP session started by the media server in a SETUP response and concluded by TEARDOWN on the presentation URL. The session identifier is chosen by the media server (see Section 3.4). Once a client receives a Session identifier, it MUST return it for any request related to that session. A server does not have to set up a session identifier if it has other means of identifying a session, such as dynamically generated URLs.
此请求和响应标头字段标识媒体服务器在设置响应中启动的RTSP会话,并通过在演示URL上拆卸结束。会话标识符由媒体服务器选择(参见第3.4节)。一旦客户机接收到会话标识符,它必须为与该会话相关的任何请求返回该标识符。如果服务器有其他识别会话的方法(如动态生成的URL),则不必设置会话标识符。
Session = "Session" ":" session-id [ ";" "timeout" "=" delta-seconds ]
Session = "Session" ":" session-id [ ";" "timeout" "=" delta-seconds ]
The timeout parameter is only allowed in a response header. The server uses it to indicate to the client how long the server is prepared to wait between RTSP commands before closing the session due to lack of activity (see Section A). The timeout is measured in
超时参数仅允许在响应标头中使用。服务器使用它向客户端指示由于缺少活动而关闭会话之前,服务器准备在RTSP命令之间等待多长时间(请参见A节)。超时的测量单位为
seconds, with a default of 60 seconds (1 minute).
秒,默认值为60秒(1分钟)。
Note that a session identifier identifies a RTSP session across transport sessions or connections. Control messages for more than one RTSP URL may be sent within a single RTSP session. Hence, it is possible that clients use the same session for controlling many streams constituting a presentation, as long as all the streams come from the same server. (See example in Section 14). However, multiple "user" sessions for the same URL from the same client MUST use different session identifiers.
请注意,会话标识符标识跨传输会话或连接的RTSP会话。可以在单个RTSP会话中发送多个RTSP URL的控制消息。因此,只要所有流来自同一服务器,客户端就可能使用同一会话来控制构成表示的多个流。(参见第14节中的示例)。但是,来自同一客户端的同一URL的多个“用户”会话必须使用不同的会话标识符。
The session identifier is needed to distinguish several delivery requests for the same URL coming from the same client.
需要会话标识符来区分来自同一客户端的同一URL的多个传递请求。
The response 454 (Session Not Found) is returned if the session identifier is invalid.
如果会话标识符无效,则返回响应454(未找到会话)。
The timestamp general header describes when the client sent the request to the server. The value of the timestamp is of significance only to the client and may use any timescale. The server MUST echo the exact same value and MAY, if it has accurate information about this, add a floating point number indicating the number of seconds that has elapsed since it has received the request. The timestamp is used by the client to compute the round-trip time to the server so that it can adjust the timeout value for retransmissions.
timestamp general标头描述客户端何时向服务器发送请求。时间戳的值仅对客户端重要,并且可以使用任何时间刻度。服务器必须回显完全相同的值,并且如果有关于该值的准确信息,可以添加一个浮点数,指示自收到请求以来经过的秒数。客户机使用时间戳来计算到服务器的往返时间,以便调整重传的超时值。
Timestamp = "Timestamp" ":" *(DIGIT) [ "." *(DIGIT) ] [ delay ] delay = *(DIGIT) [ "." *(DIGIT) ]
Timestamp = "Timestamp" ":" *(DIGIT) [ "." *(DIGIT) ] [ delay ] delay = *(DIGIT) [ "." *(DIGIT) ]
This request header indicates which transport protocol is to be used and configures its parameters such as destination address, compression, multicast time-to-live and destination port for a single stream. It sets those values not already determined by a presentation description.
此请求标头指示要使用的传输协议,并为单个流配置其参数,如目标地址、压缩、多播生存时间和目标端口。它设置那些尚未由演示文稿描述确定的值。
Transports are comma separated, listed in order of preference. Parameters may be added to each transport, separated by a semicolon.
传输以逗号分隔,按优先顺序列出。可以将参数添加到每个传输中,并用分号分隔。
The Transport header MAY also be used to change certain transport parameters. A server MAY refuse to change parameters of an existing stream.
传输标头也可用于更改某些传输参数。服务器可能拒绝更改现有流的参数。
The server MAY return a Transport response header in the response to indicate the values actually chosen.
服务器可以在响应中返回传输响应头,以指示实际选择的值。
A Transport request header field may contain a list of transport options acceptable to the client. In that case, the server MUST return a single option which was actually chosen.
传输请求标头字段可能包含客户端可接受的传输选项列表。在这种情况下,服务器必须返回实际选择的单个选项。
The syntax for the transport specifier is
传输说明符的语法为
transport/profile/lower-transport.
运输/外形/下部运输。
The default value for the "lower-transport" parameters is specific to the profile. For RTP/AVP, the default is UDP.
“较低传输”参数的默认值特定于配置文件。对于RTP/AVP,默认为UDP。
Below are the configuration parameters associated with transport:
以下是与传输相关的配置参数:
General parameters:
一般参数:
unicast | multicast: mutually exclusive indication of whether unicast or multicast delivery will be attempted. Default value is multicast. Clients that are capable of handling both unicast and multicast transmission MUST indicate such capability by including two full transport-specs with separate parameters for each.
单播|多播:互斥指示是否尝试单播或多播传送。默认值为多播。能够处理单播和多播传输的客户端必须通过包含两个完整的传输规范(每个规范有单独的参数)来指示这种能力。
destination: The address to which a stream will be sent. The client may specify the multicast address with the destination parameter. To avoid becoming the unwitting perpetrator of a remote-controlled denial-of-service attack, a server SHOULD authenticate the client and SHOULD log such attempts before allowing the client to direct a media stream to an address not chosen by the server. This is particularly important if RTSP commands are issued via UDP, but implementations cannot rely on TCP as reliable means of client identification by itself. A server SHOULD not allow a client to direct media streams to an address that differs from the address commands are coming from.
目的地:流将发送到的地址。客户端可以使用destination参数指定多播地址。为了避免无意中成为远程控制拒绝服务攻击的实施者,服务器应该对客户端进行身份验证,并在允许客户端将媒体流定向到服务器未选择的地址之前记录此类尝试。如果RTSP命令是通过UDP发出的,这一点尤其重要,但实现不能依靠TCP本身作为客户端标识的可靠手段。服务器不应允许客户端将媒体流定向到与来自的地址命令不同的地址。
source: If the source address for the stream is different than can be derived from the RTSP endpoint address (the server in playback or the client in recording), the source MAY be specified.
源:如果流的源地址不同于从RTSP端点地址(播放中的服务器或录制中的客户端)派生的源地址,则可以指定源。
This information may also be available through SDP. However, since this is more a feature of transport than media initialization, the authoritative source for this information should be in the SETUP response.
此信息也可通过SDP获得。但是,由于这更多的是传输功能,而不是媒体初始化功能,因此此信息的权威来源应在设置响应中。
layers: The number of multicast layers to be used for this media stream. The layers are sent to consecutive addresses starting at the destination address.
layers:用于此媒体流的多播层数。层被发送到从目标地址开始的连续地址。
mode: The mode parameter indicates the methods to be supported for this session. Valid values are PLAY and RECORD. If not provided, the default is PLAY.
模式:模式参数指示此会话支持的方法。有效值为播放和录制。如果未提供,则默认为播放。
append: If the mode parameter includes RECORD, the append parameter indicates that the media data should append to the existing resource rather than overwrite it. If appending is requested and the server does not support this, it MUST refuse the request rather than overwrite the resource identified by the URI. The append parameter is ignored if the mode parameter does not contain RECORD.
追加:如果模式参数包括记录,则追加参数指示媒体数据应追加到现有资源,而不是覆盖它。如果请求追加,而服务器不支持追加,则必须拒绝请求,而不是覆盖URI标识的资源。如果模式参数不包含记录,则忽略append参数。
interleaved: The interleaved parameter implies mixing the media stream with the control stream in whatever protocol is being used by the control stream, using the mechanism defined in Section 10.12. The argument provides the channel number to be used in the $ statement. This parameter may be specified as a range, e.g., interleaved=4-5 in cases where the transport choice for the media stream requires it.
交错:交错参数意味着使用第10.12节中定义的机制,以控制流正在使用的任何协议将媒体流与控制流混合。参数提供要在$statement中使用的通道号。该参数可以被指定为一个范围,例如,在媒体流的传输选择需要它的情况下,交错=4-5。
This allows RTP/RTCP to be handled similarly to the way that it is done with UDP, i.e., one channel for RTP and the other for RTCP.
这使得RTP/RTCP的处理方式与UDP类似,即一个通道用于RTP,另一个通道用于RTCP。
Multicast specific:
特定于多播:
ttl: multicast time-to-live
ttl:多播生存时间
RTP Specific:
RTP特定:
port: This parameter provides the RTP/RTCP port pair for a multicast session. It is specified as a range, e.g., port=3456-3457.
端口:此参数为多播会话提供RTP/RTCP端口对。它被指定为一个范围,例如端口=3456-3457。
client_port: This parameter provides the unicast RTP/RTCP port pair on which the client has chosen to receive media data and control information. It is specified as a range, e.g., client_port=3456-3457.
客户端端口:此参数提供客户端选择接收媒体数据和控制信息的单播RTP/RTCP端口对。它被指定为一个范围,例如客户端端口=3456-3457。
server_port: This parameter provides the unicast RTP/RTCP port pair on which the server has chosen to receive media data and control information. It is specified as a range, e.g., server_port=3456-3457.
服务器端口:此参数提供服务器选择接收媒体数据和控制信息的单播RTP/RTCP端口对。它被指定为一个范围,例如服务器端口=3456-3457。
ssrc: The ssrc parameter indicates the RTP SSRC [24, Sec. 3] value that should be (request) or will be (response) used by the media server. This parameter is only valid for unicast transmission. It identifies the synchronization source to be associated with the media stream.
ssrc:ssrc参数表示媒体服务器应(请求)或将(响应)使用的RTP ssrc[24,第3节]值。此参数仅对单播传输有效。它标识要与媒体流关联的同步源。
Transport = "Transport" ":" 1\#transport-spec transport-spec = transport-protocol/profile[/lower-transport] *parameter transport-protocol = "RTP" profile = "AVP" lower-transport = "TCP" | "UDP" parameter = ( "unicast" | "multicast" ) | ";" "destination" [ "=" address ] | ";" "interleaved" "=" channel [ "-" channel ] | ";" "append" | ";" "ttl" "=" ttl | ";" "layers" "=" 1*DIGIT | ";" "port" "=" port [ "-" port ] | ";" "client_port" "=" port [ "-" port ] | ";" "server_port" "=" port [ "-" port ] | ";" "ssrc" "=" ssrc | ";" "mode" = <"> 1\#mode <"> ttl = 1*3(DIGIT) port = 1*5(DIGIT) ssrc = 8*8(HEX) channel = 1*3(DIGIT) address = host mode = <"> *Method <"> | Method
Transport = "Transport" ":" 1\#transport-spec transport-spec = transport-protocol/profile[/lower-transport] *parameter transport-protocol = "RTP" profile = "AVP" lower-transport = "TCP" | "UDP" parameter = ( "unicast" | "multicast" ) | ";" "destination" [ "=" address ] | ";" "interleaved" "=" channel [ "-" channel ] | ";" "append" | ";" "ttl" "=" ttl | ";" "layers" "=" 1*DIGIT | ";" "port" "=" port [ "-" port ] | ";" "client_port" "=" port [ "-" port ] | ";" "server_port" "=" port [ "-" port ] | ";" "ssrc" "=" ssrc | ";" "mode" = <"> 1\#mode <"> ttl = 1*3(DIGIT) port = 1*5(DIGIT) ssrc = 8*8(HEX) channel = 1*3(DIGIT) address = host mode = <"> *Method <"> | Method
Example: Transport: RTP/AVP;multicast;ttl=127;mode="PLAY", RTP/AVP;unicast;client_port=3456-3457;mode="PLAY"
Example: Transport: RTP/AVP;multicast;ttl=127;mode="PLAY", RTP/AVP;unicast;client_port=3456-3457;mode="PLAY"
The Transport header is restricted to describing a single RTP stream. (RTSP can also control multiple streams as a single entity.) Making it part of RTSP rather than relying on a multitude of session description formats greatly simplifies designs of firewalls.
传输头仅限于描述单个RTP流。(RTSP还可以作为一个实体控制多个流。)使其成为RTSP的一部分而不是依赖于多种会话描述格式大大简化了防火墙的设计。
The Unsupported response header lists the features not supported by the server. In the case where the feature was specified via the Proxy-Require field (Section 12.32), if there is a proxy on the path between the client and the server, the proxy MUST insert a message reply with an error message "551 Option Not Supported".
不受支持的响应标头列出了服务器不支持的功能。如果通过Proxy Require(代理要求)字段(第12.32节)指定了该功能,则如果客户端和服务器之间的路径上存在代理,则代理必须插入一条带有错误消息“551选项不受支持”的消息回复。
See Section 12.32 for a usage example.
有关用法示例,请参见第12.32节。
See [H14.42]
见[H14.42]
See [H14.43]
见[H14.43]
See [H14.44].
见[H14.44]。
See [H14.46].
见[H14.46]。
13 Caching
13缓存
In HTTP, response-request pairs are cached. RTSP differs significantly in that respect. Responses are not cacheable, with the exception of the presentation description returned by DESCRIBE or included with ANNOUNCE. (Since the responses for anything but DESCRIBE and GET_PARAMETER do not return any data, caching is not really an issue for these requests.) However, it is desirable for the continuous media data, typically delivered out-of-band with respect to RTSP, to be cached, as well as the session description.
在HTTP中,响应请求对被缓存。RTSP在这方面有很大不同。响应不可缓存,但由descripe返回或包含在annound中的演示文稿描述除外。(由于除descripe和GET_参数外的任何响应都不会返回任何数据,因此缓存对于这些请求来说并不是一个真正的问题。)但是,需要缓存连续媒体数据(通常在RTSP带外传输)以及会话描述。
On receiving a SETUP or PLAY request, a proxy ascertains whether it has an up-to-date copy of the continuous media content and its description. It can determine whether the copy is up-to-date by issuing a SETUP or DESCRIBE request, respectively, and comparing the Last-Modified header with that of the cached copy. If the copy is not up-to-date, it modifies the SETUP transport parameters as appropriate and forwards the request to the origin server. Subsequent control commands such as PLAY or PAUSE then pass the proxy unmodified. The proxy delivers the continuous media data to the client, while possibly making a local copy for later reuse. The exact behavior allowed to the cache is given by the cache-response directives
在收到设置或播放请求时,代理确定其是否具有连续媒体内容及其描述的最新副本。它可以通过分别发出SETUP或descripe请求并将上次修改的头与缓存副本的头进行比较来确定副本是否是最新的。如果副本不是最新的,它会根据需要修改设置传输参数,并将请求转发给源服务器。随后的控制命令(如播放或暂停)会在未修改的情况下传递代理。代理将连续媒体数据传送到客户端,同时可能制作一个本地副本供以后重用。缓存响应指令给出了允许缓存的确切行为
described in Section 12.8. A cache MUST answer any DESCRIBE requests if it is currently serving the stream to the requestor, as it is possible that low-level details of the stream description may have changed on the origin-server.
如第12.8节所述。如果缓存当前正在向请求者提供流,那么它必须回答任何descripe请求,因为源服务器上流描述的低级细节可能已经更改。
Note that an RTSP cache, unlike the HTTP cache, is of the "cut-through" variety. Rather than retrieving the whole resource from the origin server, the cache simply copies the streaming data as it passes by on its way to the client. Thus, it does not introduce additional latency.
请注意,与HTTP缓存不同,RTSP缓存属于“直通”类型。缓存不会从源服务器检索整个资源,而是在流数据传递到客户端时简单地复制流数据。因此,它不会引入额外的延迟。
To the client, an RTSP proxy cache appears like a regular media server, to the media origin server like a client. Just as an HTTP cache has to store the content type, content language, and so on for the objects it caches, a media cache has to store the presentation description. Typically, a cache eliminates all transport-references (that is, multicast information) from the presentation description, since these are independent of the data delivery from the cache to the client. Information on the encodings remains the same. If the cache is able to translate the cached media data, it would create a new presentation description with all the encoding possibilities it can offer.
对于客户端来说,RTSP代理缓存就像普通的媒体服务器,对于媒体源服务器来说就像客户端。正如HTTP缓存必须存储其缓存对象的内容类型、内容语言等,媒体缓存也必须存储表示描述。通常,缓存会从表示描述中删除所有传输引用(即多播信息),因为这些传输引用独立于从缓存到客户端的数据传递。有关编码的信息保持不变。如果缓存能够转换缓存的媒体数据,它将创建一个新的表示描述,并提供所有可能的编码。
14 Examples
14个例子
The following examples refer to stream description formats that are not standards, such as RTSL. The following examples are not to be used as a reference for those formats.
以下示例涉及非标准的流描述格式,例如RTSL。以下示例不作为这些格式的参考。
Client C requests a movie from media servers A ( audio.example.com) and V (video.example.com). The media description is stored on a web server W . The media description contains descriptions of the presentation and all its streams, including the codecs that are available, dynamic RTP payload types, the protocol stack, and content information such as language or copyright restrictions. It may also give an indication about the timeline of the movie.
客户端C从媒体服务器a(audio.example.com)和V(video.example.com)请求电影。媒体描述存储在web服务器W上。媒体描述包含演示文稿及其所有流的描述,包括可用的编解码器、动态RTP负载类型、协议堆栈以及内容信息(如语言或版权限制)。它还可以给出电影的时间表。
In this example, the client is only interested in the last part of the movie.
在本例中,客户只对电影的最后一部分感兴趣。
C->W: GET /twister.sdp HTTP/1.1 Host: www.example.com Accept: application/sdp
C->W: GET /twister.sdp HTTP/1.1 Host: www.example.com Accept: application/sdp
W->C: HTTP/1.0 200 OK Content-Type: application/sdp
W->C: HTTP/1.0 200 OK Content-Type: application/sdp
v=0 o=- 2890844526 2890842807 IN IP4 192.16.24.202 s=RTSP Session m=audio 0 RTP/AVP 0 a=control:rtsp://audio.example.com/twister/audio.en m=video 0 RTP/AVP 31 a=control:rtsp://video.example.com/twister/video
v=0 o=- 2890844526 2890842807 IN IP4 192.16.24.202 s=RTSP Session m=audio 0 RTP/AVP 0 a=control:rtsp://audio.example.com/twister/audio.en m=video 0 RTP/AVP 31 a=control:rtsp://video.example.com/twister/video
C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 1 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057
C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 1 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057
A->C: RTSP/1.0 200 OK CSeq: 1 Session: 12345678 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057; server_port=5000-5001
A->C: RTSP/1.0 200 OK CSeq: 1 Session: 12345678 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057; server_port=5000-5001
C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 1 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059
C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 1 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059
V->C: RTSP/1.0 200 OK CSeq: 1 Session: 23456789 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059; server_port=5002-5003
V->C: RTSP/1.0 200 OK CSeq: 1 Session: 23456789 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059; server_port=5002-5003
C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 2 Session: 23456789 Range: smpte=0:10:00-
C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 2 Session: 23456789 Range: smpte=0:10:00-
V->C: RTSP/1.0 200 OK CSeq: 2 Session: 23456789 Range: smpte=0:10:00-0:20:00 RTP-Info: url=rtsp://video.example.com/twister/video; seq=12312232;rtptime=78712811
V->C: RTSP/1.0 200 OK CSeq: 2 Session: 23456789 Range: smpte=0:10:00-0:20:00 RTP-Info: url=rtsp://video.example.com/twister/video; seq=12312232;rtptime=78712811
C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 2 Session: 12345678 Range: smpte=0:10:00-
C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 2 Session: 12345678 Range: smpte=0:10:00-
A->C: RTSP/1.0 200 OK CSeq: 2 Session: 12345678
A->C: RTSP/1.0 200 OK CSeq: 2 Session: 12345678
Range: smpte=0:10:00-0:20:00 RTP-Info: url=rtsp://audio.example.com/twister/audio.en; seq=876655;rtptime=1032181
Range: smpte=0:10:00-0:20:00 RTP-Info: url=rtsp://audio.example.com/twister/audio.en; seq=876655;rtptime=1032181
C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 3 Session: 12345678
C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 3 Session: 12345678
A->C: RTSP/1.0 200 OK CSeq: 3
A->C: RTSP/1.0 200 OK CSeq: 3
C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 3 Session: 23456789
C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 CSeq: 3 Session: 23456789
V->C: RTSP/1.0 200 OK CSeq: 3
V->C: RTSP/1.0 200 OK CSeq: 3
Even though the audio and video track are on two different servers, and may start at slightly different times and may drift with respect to each other, the client can synchronize the two using standard RTP methods, in particular the time scale contained in the RTCP sender reports.
即使音频和视频曲目位于两个不同的服务器上,并且可能在稍有不同的时间启动,并且可能会相互漂移,客户机也可以使用标准RTP方法,尤其是RTCP发送方报告中包含的时间刻度,来同步这两个。
For purposes of this example, a container file is a storage entity in which multiple continuous media types pertaining to the same end-user presentation are present. In effect, the container file represents an RTSP presentation, with each of its components being RTSP streams. Container files are a widely used means to store such presentations. While the components are transported as independent streams, it is desirable to maintain a common context for those streams at the server end.
在本示例中,容器文件是一种存储实体,其中存在与同一最终用户演示文稿相关的多个连续介质类型。实际上,容器文件表示RTSP表示,其每个组件都是RTSP流。容器文件是存储此类演示文稿的一种广泛使用的方法。当组件作为独立流传输时,希望在服务器端维护这些流的公共上下文。
This enables the server to keep a single storage handle open easily. It also allows treating all the streams equally in case of any prioritization of streams by the server.
这使服务器能够轻松地打开单个存储句柄。它还允许在服务器对流进行任何优先级排序的情况下平等地处理所有流。
It is also possible that the presentation author may wish to prevent selective retrieval of the streams by the client in order to preserve the artistic effect of the combined media presentation. Similarly, in such a tightly bound presentation, it is desirable to be able to control all the streams via a single control message using an aggregate URL.
演示文稿作者还可能希望防止客户端选择性地检索流,以保持组合媒体演示文稿的艺术效果。类似地,在这种紧密绑定的表示中,希望能够通过使用聚合URL的单个控制消息来控制所有流。
The following is an example of using a single RTSP session to control multiple streams. It also illustrates the use of aggregate URLs.
以下是使用单个RTSP会话控制多个流的示例。它还说明了聚合URL的使用。
Client C requests a presentation from media server M . The movie is stored in a container file. The client has obtained an RTSP URL to the container file.
客户端C从媒体服务器M请求演示文稿。电影存储在一个容器文件中。客户端已获得容器文件的RTSP URL。
C->M: DESCRIBE rtsp://foo/twister RTSP/1.0 CSeq: 1
C->M: DESCRIBE rtsp://foo/twister RTSP/1.0 CSeq: 1
M->C: RTSP/1.0 200 OK CSeq: 1 Content-Type: application/sdp Content-Length: 164
M->C: RTSP/1.0 200 OK CSeq: 1 Content-Type: application/sdp Content-Length: 164
v=0 o=- 2890844256 2890842807 IN IP4 172.16.2.93 s=RTSP Session i=An Example of RTSP Session Usage a=control:rtsp://foo/twister t=0 0 m=audio 0 RTP/AVP 0 a=control:rtsp://foo/twister/audio m=video 0 RTP/AVP 26 a=control:rtsp://foo/twister/video
v=0 o=- 2890844256 2890842807 IN IP4 172.16.2.93 s=RTSP Session i=An Example of RTSP Session Usage a=control:rtsp://foo/twister t=0 0 m=audio 0 RTP/AVP 0 a=control:rtsp://foo/twister/audio m=video 0 RTP/AVP 26 a=control:rtsp://foo/twister/video
C->M: SETUP rtsp://foo/twister/audio RTSP/1.0 CSeq: 2 Transport: RTP/AVP;unicast;client_port=8000-8001
C->M: SETUP rtsp://foo/twister/audio RTSP/1.0 CSeq: 2 Transport: RTP/AVP;unicast;client_port=8000-8001
M->C: RTSP/1.0 200 OK CSeq: 2 Transport: RTP/AVP;unicast;client_port=8000-8001; server_port=9000-9001 Session: 12345678
M->C: RTSP/1.0 200 OK CSeq: 2 Transport: RTP/AVP;unicast;client_port=8000-8001; server_port=9000-9001 Session: 12345678
C->M: SETUP rtsp://foo/twister/video RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=8002-8003 Session: 12345678
C->M: SETUP rtsp://foo/twister/video RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=8002-8003 Session: 12345678
M->C: RTSP/1.0 200 OK CSeq: 3 Transport: RTP/AVP;unicast;client_port=8002-8003; server_port=9004-9005 Session: 12345678
M->C: RTSP/1.0 200 OK CSeq: 3 Transport: RTP/AVP;unicast;client_port=8002-8003; server_port=9004-9005 Session: 12345678
C->M: PLAY rtsp://foo/twister RTSP/1.0 CSeq: 4 Range: npt=0- Session: 12345678
C->M: PLAY rtsp://foo/twister RTSP/1.0 CSeq: 4 Range: npt=0- Session: 12345678
M->C: RTSP/1.0 200 OK CSeq: 4 Session: 12345678 RTP-Info: url=rtsp://foo/twister/video; seq=9810092;rtptime=3450012
M->C: RTSP/1.0 200 OK CSeq: 4 Session: 12345678 RTP-Info: url=rtsp://foo/twister/video; seq=9810092;rtptime=3450012
C->M: PAUSE rtsp://foo/twister/video RTSP/1.0 CSeq: 5 Session: 12345678
C->M: PAUSE rtsp://foo/twister/video RTSP/1.0 CSeq: 5 Session: 12345678
M->C: RTSP/1.0 460 Only aggregate operation allowed CSeq: 5
M->C: RTSP/1.0 460 Only aggregate operation allowed CSeq: 5
C->M: PAUSE rtsp://foo/twister RTSP/1.0 CSeq: 6 Session: 12345678
C->M: PAUSE rtsp://foo/twister RTSP/1.0 CSeq: 6 Session: 12345678
M->C: RTSP/1.0 200 OK CSeq: 6 Session: 12345678
M->C: RTSP/1.0 200 OK CSeq: 6 Session: 12345678
C->M: SETUP rtsp://foo/twister RTSP/1.0 CSeq: 7 Transport: RTP/AVP;unicast;client_port=10000
C->M: SETUP rtsp://foo/twister RTSP/1.0 CSeq: 7 Transport: RTP/AVP;unicast;client_port=10000
M->C: RTSP/1.0 459 Aggregate operation not allowed CSeq: 7
M->C: RTSP/1.0 459 Aggregate operation not allowed CSeq: 7
In the first instance of failure, the client tries to pause one stream (in this case video) of the presentation. This is disallowed for that presentation by the server. In the second instance, the aggregate URL may not be used for SETUP and one control message is required per stream to set up transport parameters.
在第一个失败实例中,客户端尝试暂停演示文稿的一个流(在本例中为视频)。服务器不允许对该演示文稿执行此操作。在第二个实例中,聚合URL可能不用于设置,每个流需要一条控制消息来设置传输参数。
This keeps the syntax of the Transport header simple and allows easy parsing of transport information by firewalls.
这使传输头的语法保持简单,并允许防火墙轻松解析传输信息。
Some RTSP servers may treat all files as though they are "container files", yet other servers may not support such a concept. Because of this, clients SHOULD use the rules set forth in the session description for request URLs, rather than assuming that a consistent URL may always be used throughout. Here's an example of how a multi-stream server might expect a single-stream file to be served:
一些RTSP服务器可能会将所有文件视为“容器文件”,但其他服务器可能不支持这种概念。因此,客户端应该使用会话描述中为请求URL设置的规则,而不是假设始终使用一致的URL。下面是一个多流服务器如何期望提供单个流文件的示例:
Accept: application/x-rtsp-mh, application/sdp
Accept: application/x-rtsp-mh, application/sdp
CSeq: 1
CSeq:1
S->C RTSP/1.0 200 OK CSeq: 1 Content-base: rtsp://foo.com/test.wav/ Content-type: application/sdp Content-length: 48
S->C RTSP/1.0 200 OK CSeq: 1 Content-base: rtsp://foo.com/test.wav/ Content-type: application/sdp Content-length: 48
v=0 o=- 872653257 872653257 IN IP4 172.16.2.187 s=mu-law wave file i=audio test t=0 0 m=audio 0 RTP/AVP 0 a=control:streamid=0
v=0 o=- 872653257 872653257 IN IP4 172.16.2.187 s=mu-law wave file i=audio test t=0 0 m=audio 0 RTP/AVP 0 a=control:streamid=0
C->S SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/1.0 Transport: RTP/AVP/UDP;unicast; client_port=6970-6971;mode=play CSeq: 2
C->S SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/1.0 Transport: RTP/AVP/UDP;unicast; client_port=6970-6971;mode=play CSeq: 2
S->C RTSP/1.0 200 OK Transport: RTP/AVP/UDP;unicast;client_port=6970-6971; server_port=6970-6971;mode=play CSeq: 2 Session: 2034820394
S->C RTSP/1.0 200 OK Transport: RTP/AVP/UDP;unicast;client_port=6970-6971; server_port=6970-6971;mode=play CSeq: 2 Session: 2034820394
C->S PLAY rtsp://foo.com/test.wav RTSP/1.0 CSeq: 3 Session: 2034820394
C->S PLAY rtsp://foo.com/test.wav RTSP/1.0 CSeq: 3 Session: 2034820394
S->C RTSP/1.0 200 OK CSeq: 3 Session: 2034820394 RTP-Info: url=rtsp://foo.com/test.wav/streamid=0; seq=981888;rtptime=3781123
S->C RTSP/1.0 200 OK CSeq: 3 Session: 2034820394 RTP-Info: url=rtsp://foo.com/test.wav/streamid=0; seq=981888;rtptime=3781123
Note the different URL in the SETUP command, and then the switch back to the aggregate URL in the PLAY command. This makes complete sense when there are multiple streams with aggregate control, but is less than intuitive in the special case where the number of streams is one.
注意SETUP命令中的不同URL,然后切换回PLAY命令中的聚合URL。当存在多个具有聚合控制的流时,这是完全有意义的,但在流的数量为一的特殊情况下,这不太直观。
In this special case, it is recommended that servers be forgiving of implementations that send:
在这种特殊情况下,建议服务器原谅发送以下内容的实现:
C->S PLAY rtsp://foo.com/test.wav/streamid=0 RTSP/1.0 CSeq: 3
C->S PLAY rtsp://foo.com/test.wav/streamid=0 RTSP/1.0 CSeq: 3
In the worst case, servers should send back:
在最坏的情况下,服务器应发回:
S->C RTSP/1.0 460 Only aggregate operation allowed CSeq: 3
S->C RTSP/1.0 460仅允许聚合操作CSeq:3
One would also hope that server implementations are also forgiving of the following:
我们还希望服务器实现也能原谅以下情况:
C->S SETUP rtsp://foo.com/test.wav RTSP/1.0 Transport: rtp/avp/udp;client_port=6970-6971;mode=play CSeq: 2
C->S SETUP rtsp://foo.com/test.wav RTSP/1.0 Transport: rtp/avp/udp;client_port=6970-6971;mode=play CSeq: 2
Since there is only a single stream in this file, it's not ambiguous what this means.
因为这个文件中只有一个流,所以这意味着什么并不含糊。
The media server M chooses the multicast address and port. Here, we assume that the web server only contains a pointer to the full description, while the media server M maintains the full description.
媒体服务器M选择多播地址和端口。这里,我们假设web服务器仅包含指向完整描述的指针,而媒体服务器M维护完整描述。
C->W: GET /concert.sdp HTTP/1.1 Host: www.example.com
C->W: GET /concert.sdp HTTP/1.1 Host: www.example.com
W->C: HTTP/1.1 200 OK Content-Type: application/x-rtsl
W->C: HTTP/1.1 200 OK Content-Type: application/x-rtsl
<session> <track src="rtsp://live.example.com/concert/audio"> </session>
<session> <track src="rtsp://live.example.com/concert/audio"> </session>
C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/1.0 CSeq: 1
C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/1.0 CSeq: 1
M->C: RTSP/1.0 200 OK CSeq: 1 Content-Type: application/sdp Content-Length: 44
M->C: RTSP/1.0 200 OK CSeq: 1 Content-Type: application/sdp Content-Length: 44
v=0 o=- 2890844526 2890842807 IN IP4 192.16.24.202 s=RTSP Session m=audio 3456 RTP/AVP 0 a=control:rtsp://live.example.com/concert/audio c=IN IP4 224.2.0.1/16
v=0 o=- 2890844526 2890842807 IN IP4 192.16.24.202 s=RTSP Session m=audio 3456 RTP/AVP 0 a=control:rtsp://live.example.com/concert/audio c=IN IP4 224.2.0.1/16
C->M: SETUP rtsp://live.example.com/concert/audio RTSP/1.0 CSeq: 2
C->M: SETUP rtsp://live.example.com/concert/audio RTSP/1.0 CSeq: 2
Transport: RTP/AVP;multicast
Transport: RTP/AVP;multicast
M->C: RTSP/1.0 200 OK CSeq: 2 Transport: RTP/AVP;multicast;destination=224.2.0.1; port=3456-3457;ttl=16 Session: 0456804596
M->C: RTSP/1.0 200 OK CSeq: 2 Transport: RTP/AVP;multicast;destination=224.2.0.1; port=3456-3457;ttl=16 Session: 0456804596
C->M: PLAY rtsp://live.example.com/concert/audio RTSP/1.0 CSeq: 3 Session: 0456804596
C->M: PLAY rtsp://live.example.com/concert/audio RTSP/1.0 CSeq: 3 Session: 0456804596
M->C: RTSP/1.0 200 OK CSeq: 3 Session: 0456804596
M->C: RTSP/1.0 200 OK CSeq: 3 Session: 0456804596
A conference participant C wants to have the media server M play back a demo tape into an existing conference. C indicates to the media server that the network addresses and encryption keys are already given by the conference, so they should not be chosen by the server. The example omits the simple ACK responses.
会议参与者C希望媒体服务器M将演示磁带回放到现有会议中。C向媒体服务器表示网络地址和加密密钥已由会议提供,因此服务器不应选择它们。该示例省略了简单的ACK响应。
C->M: DESCRIBE rtsp://server.example.com/demo/548/sound RTSP/1.0 CSeq: 1 Accept: application/sdp
C->M: DESCRIBE rtsp://server.example.com/demo/548/sound RTSP/1.0 CSeq: 1 Accept: application/sdp
M->C: RTSP/1.0 200 1 OK Content-type: application/sdp Content-Length: 44
M->C: RTSP/1.0 200 1 OK Content-type: application/sdp Content-Length: 44
v=0 o=- 2890844526 2890842807 IN IP4 192.16.24.202 s=RTSP Session i=See above t=0 0 m=audio 0 RTP/AVP 0
v=0 o=-2890844526 IP4 192.16.24.202中的2890842807 s=RTSP会话i=见上文t=0 m=0音频0 RTP/AVP 0
C->M: SETUP rtsp://server.example.com/demo/548/sound RTSP/1.0 CSeq: 2 Transport: RTP/AVP;multicast;destination=225.219.201.15; port=7000-7001;ttl=127 Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
C->M: SETUP rtsp://server.example.com/demo/548/sound RTSP/1.0 CSeq: 2 Transport: RTP/AVP;multicast;destination=225.219.201.15; port=7000-7001;ttl=127 Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
M->C: RTSP/1.0 200 OK CSeq: 2 Transport: RTP/AVP;multicast;destination=225.219.201.15;
M->C: RTSP/1.0 200 OK CSeq: 2 Transport: RTP/AVP;multicast;destination=225.219.201.15;
port=7000-7001;ttl=127 Session: 91389234234 Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
port=7000-7001;ttl=127 Session: 91389234234 Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
C->M: PLAY rtsp://server.example.com/demo/548/sound RTSP/1.0 CSeq: 3 Session: 91389234234
C->M: PLAY rtsp://server.example.com/demo/548/sound RTSP/1.0 CSeq: 3 Session: 91389234234
M->C: RTSP/1.0 200 OK CSeq: 3
M->C: RTSP/1.0 200 OK CSeq: 3
The conference participant client C asks the media server M to record the audio and video portions of a meeting. The client uses the ANNOUNCE method to provide meta-information about the recorded session to the server.
会议参与者客户端C请求媒体服务器M记录会议的音频和视频部分。客户端使用annound方法向服务器提供有关记录会话的元信息。
C->M: ANNOUNCE rtsp://server.example.com/meeting RTSP/1.0 CSeq: 90 Content-Type: application/sdp Content-Length: 121
C->M: ANNOUNCE rtsp://server.example.com/meeting RTSP/1.0 CSeq: 90 Content-Type: application/sdp Content-Length: 121
v=0 o=camera1 3080117314 3080118787 IN IP4 195.27.192.36 s=IETF Meeting, Munich - 1 i=The thirty-ninth IETF meeting will be held in Munich, Germany u=http://www.ietf.org/meetings/Munich.html e=IETF Channel 1 <ietf39-mbone@uni-koeln.de> p=IETF Channel 1 +49-172-2312 451 c=IN IP4 224.0.1.11/127 t=3080271600 3080703600 a=tool:sdr v2.4a6 a=type:test m=audio 21010 RTP/AVP 5 c=IN IP4 224.0.1.11/127 a=ptime:40 m=video 61010 RTP/AVP 31 c=IN IP4 224.0.1.12/127
v=0 o=camera1 3080117314 3080118787 IN IP4 195.27.192.36 s=IETF Meeting, Munich - 1 i=The thirty-ninth IETF meeting will be held in Munich, Germany u=http://www.ietf.org/meetings/Munich.html e=IETF Channel 1 <ietf39-mbone@uni-koeln.de> p=IETF Channel 1 +49-172-2312 451 c=IN IP4 224.0.1.11/127 t=3080271600 3080703600 a=tool:sdr v2.4a6 a=type:test m=audio 21010 RTP/AVP 5 c=IN IP4 224.0.1.11/127 a=ptime:40 m=video 61010 RTP/AVP 31 c=IN IP4 224.0.1.12/127
M->C: RTSP/1.0 200 OK CSeq: 90
M->C: RTSP/1.0 200 OK CSeq: 90
C->M: SETUP rtsp://server.example.com/meeting/audiotrack RTSP/1.0 CSeq: 91 Transport: RTP/AVP;multicast;destination=224.0.1.11; port=21010-21011;mode=record;ttl=127
C->M: SETUP rtsp://server.example.com/meeting/audiotrack RTSP/1.0 CSeq: 91 Transport: RTP/AVP;multicast;destination=224.0.1.11; port=21010-21011;mode=record;ttl=127
M->C: RTSP/1.0 200 OK CSeq: 91 Session: 50887676 Transport: RTP/AVP;multicast;destination=224.0.1.11; port=21010-21011;mode=record;ttl=127
M->C: RTSP/1.0 200 OK CSeq: 91 Session: 50887676 Transport: RTP/AVP;multicast;destination=224.0.1.11; port=21010-21011;mode=record;ttl=127
C->M: SETUP rtsp://server.example.com/meeting/videotrack RTSP/1.0 CSeq: 92 Session: 50887676 Transport: RTP/AVP;multicast;destination=224.0.1.12; port=61010-61011;mode=record;ttl=127
C->M: SETUP rtsp://server.example.com/meeting/videotrack RTSP/1.0 CSeq: 92 Session: 50887676 Transport: RTP/AVP;multicast;destination=224.0.1.12; port=61010-61011;mode=record;ttl=127
M->C: RTSP/1.0 200 OK CSeq: 92 Transport: RTP/AVP;multicast;destination=224.0.1.12; port=61010-61011;mode=record;ttl=127
M->C: RTSP/1.0 200 OK CSeq: 92 Transport: RTP/AVP;multicast;destination=224.0.1.12; port=61010-61011;mode=record;ttl=127
C->M: RECORD rtsp://server.example.com/meeting RTSP/1.0 CSeq: 93 Session: 50887676 Range: clock=19961110T1925-19961110T2015
C->M: RECORD rtsp://server.example.com/meeting RTSP/1.0 CSeq: 93 Session: 50887676 Range: clock=19961110T1925-19961110T2015
M->C: RTSP/1.0 200 OK CSeq: 93
M->C: RTSP/1.0 200 OK CSeq: 93
15 Syntax
15语法
The RTSP syntax is described in an augmented Backus-Naur form (BNF) as used in RFC 2068 [2].
RTSP语法以RFC 2068[2]中使用的增广巴科斯诺尔形式(BNF)描述。
OCTET = <any 8-bit sequence of data> CHAR = <any US-ASCII character (octets 0 - 127)> UPALPHA = <any US-ASCII uppercase letter "A".."Z"> LOALPHA = <any US-ASCII lowercase letter "a".."z"> ALPHA = UPALPHA | LOALPHA
OCTET = <any 8-bit sequence of data> CHAR = <any US-ASCII character (octets 0 - 127)> UPALPHA = <any US-ASCII uppercase letter "A".."Z"> LOALPHA = <any US-ASCII lowercase letter "a".."z"> ALPHA = UPALPHA | LOALPHA
DIGIT = <any US-ASCII digit "0".."9"> CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)> CR = <US-ASCII CR, carriage return (13)> LF = <US-ASCII LF, linefeed (10)>
DIGIT = <any US-ASCII digit "0".."9"> CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)> CR = <US-ASCII CR, carriage return (13)> LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)> HT = <US-ASCII HT, horizontal-tab (9)> <"> = <US-ASCII double-quote mark (34)> CRLF = CR LF
SP = <US-ASCII SP, space (32)> HT = <US-ASCII HT, horizontal-tab (9)> <"> = <US-ASCII double-quote mark (34)> CRLF = CR LF
LWS = [CRLF] 1*( SP | HT ) TEXT = <any OCTET except CTLs> tspecials = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT
LWS = [CRLF] 1*( SP | HT ) TEXT = <any OCTET except CTLs> tspecials = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT
token = 1*<any CHAR except CTLs or tspecials> quoted-string = ( <"> *(qdtext) <"> ) qdtext = <any TEXT except <">> quoted-pair = "\" CHAR
token = 1*<any CHAR except CTLs or tspecials> quoted-string = ( <"> *(qdtext) <"> ) qdtext = <any TEXT except <">> quoted-pair = "\" CHAR
message-header = field-name ":" [ field-value ] CRLF field-name = token field-value = *( field-content | LWS ) field-content = <the OCTETs making up the field-value and consisting of either *TEXT or combinations of token, tspecials, and quoted-string>
message-header = field-name ":" [ field-value ] CRLF field-name = token field-value = *( field-content | LWS ) field-content = <the OCTETs making up the field-value and consisting of either *TEXT or combinations of token, tspecials, and quoted-string>
safe = "\$" | "-" | "_" | "." | "+" extra = "!" | "*" | "$'$" | "(" | ")" | ","
safe = "\$" | "-" | "_" | "." | "+" extra = "!" | "*" | "$'$" | "(" | ")" | ","
hex = DIGIT | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f" escape = "\%" hex hex reserved = ";" | "/" | "?" | ":" | "@" | "&" | "="
hex = DIGIT | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f" escape = "\%" hex hex reserved = ";" | "/" | "?" | ":" | "@" | "&" | "="
unreserved = alpha | digit | safe | extra xchar = unreserved | reserved | escape
未保留=α|数字|安全|额外xchar=未保留|保留|转义
16 Security Considerations
16安全考虑
Because of the similarity in syntax and usage between RTSP servers and HTTP servers, the security considerations outlined in [H15] apply. Specifically, please note the following:
由于RTSP服务器和HTTP服务器在语法和用法上的相似性,[H15]中概述的安全注意事项适用。具体而言,请注意以下几点:
Authentication Mechanisms: RTSP and HTTP share common authentication schemes, and thus should follow the same prescriptions with regards to authentication. See [H15.1] for client authentication issues, and [H15.2] for issues regarding support for multiple authentication mechanisms.
身份验证机制:RTSP和HTTP共享公共身份验证方案,因此在身份验证方面应遵循相同的规定。有关客户端身份验证问题,请参见[H15.1],有关支持多种身份验证机制的问题,请参见[H15.2]。
Abuse of Server Log Information: RTSP and HTTP servers will presumably have similar logging mechanisms, and thus should be equally guarded in protecting the contents of those logs, thus protecting the privacy of the
滥用服务器日志信息:RTSP和HTTP服务器可能具有类似的日志记录机制,因此在保护这些日志的内容时应该同样受到保护,从而保护用户的隐私
users of the servers. See [H15.3] for HTTP server recommendations regarding server logs.
服务器的用户。有关服务器日志的HTTP服务器建议,请参见[H15.3]。
Transfer of Sensitive Information: There is no reason to believe that information transferred via RTSP may be any less sensitive than that normally transmitted via HTTP. Therefore, all of the precautions regarding the protection of data privacy and user privacy apply to implementors of RTSP clients, servers, and proxies. See [H15.4] for further details.
敏感信息的传输:没有理由相信通过RTSP传输的信息可能比通常通过HTTP传输的信息敏感。因此,所有关于保护数据隐私和用户隐私的预防措施都适用于RTSP客户端、服务器和代理的实现者。有关更多详细信息,请参见[H15.4]。
Attacks Based On File and Path Names: Though RTSP URLs are opaque handles that do not necessarily have file system semantics, it is anticipated that many implementations will translate portions of the request URLs directly to file system calls. In such cases, file systems SHOULD follow the precautions outlined in [H15.5], such as checking for ".." in path components.
基于文件名和路径名的攻击:尽管RTSP URL是不透明的句柄,不一定具有文件系统语义,但预计许多实现会将部分请求URL直接转换为文件系统调用。在这种情况下,文件系统应遵循[H15.5]中概述的预防措施,例如检查路径组件中的“.”。
Personal Information: RTSP clients are often privy to the same information that HTTP clients are (user name, location, etc.) and thus should be equally. See [H15.6] for further recommendations.
个人信息:RTSP客户机通常与HTTP客户机拥有相同的信息(用户名、位置等),因此应该平等地使用这些信息。更多建议参见[H15.6]。
Privacy Issues Connected to Accept Headers: Since may of the same "Accept" headers exist in RTSP as in HTTP, the same caveats outlined in [H15.7] with regards to their use should be followed.
与Accept头相关的隐私问题:由于RTSP中可能存在与HTTP中相同的“Accept”头,因此应遵循[H15.7]中概述的关于其使用的相同警告。
DNS Spoofing: Presumably, given the longer connection times typically associated to RTSP sessions relative to HTTP sessions, RTSP client DNS optimizations should be less prevalent. Nonetheless, the recommendations provided in [H15.8] are still relevant to any implementation which attempts to rely on a DNS-to-IP mapping to hold beyond a single use of the mapping.
DNS欺骗:假设RTSP会话的连接时间通常比HTTP会话长,RTSP客户端DNS优化应该不那么普遍。尽管如此,[H15.8]中提供的建议仍然适用于任何试图依靠DNS到IP映射来保持映射的单一使用之外的实现。
Location Headers and Spoofing: If a single server supports multiple organizations that do not trust one another, then it must check the values of Location and Content-Location headers in responses that are generated under control of said organizations to make sure that they do not attempt to invalidate resources over which they have no authority. ([H15.9])
位置头和欺骗:如果一台服务器支持多个彼此不信任的组织,那么它必须检查在所述组织控制下生成的响应中的位置头和内容位置头的值,以确保它们不会试图使其无权访问的资源无效。([H15.9])
In addition to the recommendations in the current HTTP specification (RFC 2068 [2], as of this writing), future HTTP specifications may provide additional guidance on security issues.
除了当前HTTP规范(RFC 2068[2]中的建议,截至本文撰写之时),未来的HTTP规范可能会提供有关安全问题的额外指导。
The following are added considerations for RTSP implementations.
以下是RTSP实现的附加注意事项。
Concentrated denial-of-service attack: The protocol offers the opportunity for a remote-controlled denial-of-service attack. The attacker may initiate traffic flows to one or more IP addresses by specifying them as the destination in SETUP requests. While the attacker's IP address may be known in this case, this is not always useful in prevention of more attacks or ascertaining the attackers identity. Thus, an RTSP server SHOULD only allow client-specified destinations for RTSP-initiated traffic flows if the server has verified the client's identity, either against a database of known users using RTSP authentication mechanisms (preferably digest authentication or stronger), or other secure means.
集中拒绝服务攻击:该协议提供了远程控制拒绝服务攻击的机会。攻击者可以通过在安装请求中将一个或多个IP地址指定为目标来启动到这些地址的通信流。虽然在这种情况下攻击者的IP地址可能是已知的,但这在防止更多攻击或确定攻击者身份方面并不总是有用的。因此,如果RTSP服务器已经使用RTSP身份验证机制(最好是摘要身份验证或更强的身份验证)或其他安全手段对已知用户的数据库验证了客户端的身份,则RTSP服务器应该只允许RTSP发起的通信流的客户端指定目的地。
Session hijacking: Since there is no relation between a transport layer connection and an RTSP session, it is possible for a malicious client to issue requests with random session identifiers which would affect unsuspecting clients. The server SHOULD use a large, random and non-sequential session identifier to minimize the possibility of this kind of attack.
会话劫持:由于传输层连接和RTSP会话之间没有关系,恶意客户端可能会发出带有随机会话标识符的请求,这会影响到不知情的客户端。服务器应使用大型、随机和非顺序的会话标识符,以将此类攻击的可能性降至最低。
Authentication: Servers SHOULD implement both basic and digest [8] authentication. In environments requiring tighter security for the control messages, the RTSP control stream may be encrypted.
身份验证:服务器应实现基本身份验证和摘要身份验证[8]。在需要更严格的控制消息安全性的环境中,可以对RTSP控制流进行加密。
Stream issues: RTSP only provides for stream control. Stream delivery issues are not covered in this section, nor in the rest of this memo. RTSP implementations will most likely rely on other protocols such as RTP, IP multicast, RSVP and IGMP, and should address security considerations brought up in those and other applicable specifications.
流问题:RTSP仅提供流控制。本节和本备忘录的其余部分均未涉及流交付问题。RTSP实现最有可能依赖于其他协议,如RTP、IP多播、RSVP和IGMP,并且应该解决这些和其他适用规范中提出的安全注意事项。
Persistently suspicious behavior: RTSP servers SHOULD return error code 403 (Forbidden) upon receiving a single instance of behavior which is deemed a security risk. RTSP servers SHOULD also be aware of attempts to probe the server for weaknesses and entry points and MAY arbitrarily disconnect and ignore further requests clients which are deemed to be in violation of local security policy.
持续可疑行为:RTSP服务器在收到被视为存在安全风险的单个行为实例时,应返回错误代码403(禁止)。RTSP服务器还应注意尝试探测服务器的弱点和入口点,并可任意断开和忽略被视为违反本地安全策略的客户端的进一步请求。
Appendix A: RTSP Protocol State Machines
附录A:RTSP协议状态机
The RTSP client and server state machines describe the behavior of the protocol from RTSP session initialization through RTSP session termination.
RTSP客户端和服务器状态机描述从RTSP会话初始化到RTSP会话终止的协议行为。
State is defined on a per object basis. An object is uniquely identified by the stream URL and the RTSP session identifier. Any request/reply using aggregate URLs denoting RTSP presentations composed of multiple streams will have an effect on the individual states of all the streams. For example, if the presentation /movie contains two streams, /movie/audio and /movie/video, then the following command:
状态是基于每个对象定义的。对象由流URL和RTSP会话标识符唯一标识。使用表示由多个流组成的RTSP表示的聚合URL的任何请求/回复都会对所有流的各个状态产生影响。例如,如果演示/电影包含两个流,/movie/audio和/movie/video,则以下命令:
PLAY rtsp://foo.com/movie RTSP/1.0 CSeq: 559 Session: 12345678
PLAY rtsp://foo.com/movie RTSP/1.0 CSeq: 559 Session: 12345678
will have an effect on the states of movie/audio and movie/video.
将对电影/音频和电影/视频的状态产生影响。
This example does not imply a standard way to represent streams in URLs or a relation to the filesystem. See Section 3.2.
此示例并不意味着用URL或与文件系统的关系来表示流的标准方法。见第3.2节。
The requests OPTIONS, ANNOUNCE, DESCRIBE, GET_PARAMETER, SET_PARAMETER do not have any effect on client or server state and are therefore not listed in the state tables.
请求选项、通告、描述、获取\ u参数、设置\ u参数对客户端或服务器状态没有任何影响,因此不在状态表中列出。
The client can assume the following states:
客户端可以假定以下状态:
Init: SETUP has been sent, waiting for reply.
初始化:安装程序已发送,正在等待答复。
Ready: SETUP reply received or PAUSE reply received while in Playing state.
就绪:在播放状态下收到设置回复或暂停回复。
Playing: PLAY reply received
播放:收到播放回复
Recording: RECORD reply received
记录:记录收到的回复
In general, the client changes state on receipt of replies to requests. Note that some requests are effective at a future time or position (such as a PAUSE), and state also changes accordingly. If no explicit SETUP is required for the object (for example, it is
通常,客户端在收到请求的答复时更改状态。请注意,某些请求在将来的时间或位置(例如暂停)有效,并且状态也会相应地更改。如果对象不需要显式设置(例如
available via a multicast group), state begins at Ready. In this case, there are only two states, Ready and Playing. The client also changes state from Playing/Recording to Ready when the end of the requested range is reached.
可通过多播组访问),状态从就绪开始。在这种情况下,只有两种状态,即就绪状态和正在播放状态。当达到请求范围的末尾时,客户端还将状态从播放/录制更改为就绪。
The "next state" column indicates the state assumed after receiving a success response (2xx). If a request yields a status code of 3xx, the state becomes Init, and a status code of 4xx yields no change in state. Messages not listed for each state MUST NOT be issued by the client in that state, with the exception of messages not affecting state, as listed above. Receiving a REDIRECT from the server is equivalent to receiving a 3xx redirect status from the server.
“下一个状态”列表示在收到成功响应(2xx)后假定的状态。如果请求产生3xx的状态代码,则状态变为Init,4xx的状态代码不产生状态更改。未针对每个状态列出的消息不得由处于该状态的客户端发出,但不影响状态的消息除外,如上所述。从服务器接收重定向相当于从服务器接收3xx重定向状态。
state message sent next state after response Init SETUP Ready TEARDOWN Init Ready PLAY Playing RECORD Recording TEARDOWN Init SETUP Ready Playing PAUSE Ready TEARDOWN Init PLAY Playing SETUP Playing (changed transport) Recording PAUSE Ready TEARDOWN Init RECORD Recording SETUP Recording (changed transport)
状态消息在响应后发送下一个状态初始化设置就绪拆卸初始化就绪播放录制拆卸初始化设置就绪播放暂停就绪拆卸初始化播放播放设置播放(更改的传输)录制暂停就绪拆卸初始化录制设置录制(更改的传输)
The server can assume the following states:
服务器可以假定以下状态:
Init: The initial state, no valid SETUP has been received yet.
初始化:初始状态,尚未收到有效的设置。
Ready: Last SETUP received was successful, reply sent or after playing, last PAUSE received was successful, reply sent.
准备就绪:上次接收的安装成功,已发送回复或播放后,上次接收的暂停成功,已发送回复。
Playing: Last PLAY received was successful, reply sent. Data is being sent.
播放:上次收到的播放成功,已发送回复。正在发送数据。
Recording: The server is recording media data.
录制:服务器正在录制媒体数据。
In general, the server changes state on receiving requests. If the server is in state Playing or Recording and in unicast mode, it MAY revert to Init and tear down the RTSP session if it has not received "wellness" information, such as RTCP reports or RTSP commands, from the client for a defined interval, with a default of one minute. The server can declare another timeout value in the Session response header (Section 12.37). If the server is in state Ready, it MAY revert to Init if it does not receive an RTSP request for an interval of more than one minute. Note that some requests (such as PAUSE) may be effective at a future time or position, and server state changes at the appropriate time. The server reverts from state Playing or Recording to state Ready at the end of the range requested by the client.
通常,服务器在接收请求时会更改状态。如果服务器处于播放或录制状态且处于单播模式,则如果在定义的时间间隔内未从客户端接收到“健康”信息(如RTCP报告或RTSP命令),则服务器可能会恢复到Init并中断RTSP会话,默认时间为一分钟。服务器可以在会话响应头中声明另一个超时值(第12.37节)。如果服务器处于就绪状态,则如果在超过一分钟的时间间隔内未收到RTSP请求,它可能会恢复为Init。请注意,某些请求(如暂停)可能在将来某个时间或位置生效,并且服务器状态会在适当的时间更改。在客户端请求的范围结束时,服务器将从播放或录制状态恢复为就绪状态。
The REDIRECT message, when sent, is effective immediately unless it has a Range header specifying when the redirect is effective. In such a case, server state will also change at the appropriate time.
重定向消息在发送时立即生效,除非它具有指定重定向生效时间的范围标头。在这种情况下,服务器状态也将在适当的时间更改。
If no explicit SETUP is required for the object, the state starts at Ready and there are only two states, Ready and Playing.
如果对象不需要显式设置,则状态从就绪开始,只有两种状态:就绪和正在播放。
The "next state" column indicates the state assumed after sending a success response (2xx). If a request results in a status code of 3xx, the state becomes Init. A status code of 4xx results in no change.
“下一个状态”列表示发送成功响应(2xx)后假定的状态。如果请求导致状态代码为3xx,则状态变为Init。4xx状态代码不会导致任何更改。
state message received next state Init SETUP Ready TEARDOWN Init Ready PLAY Playing SETUP Ready TEARDOWN Init RECORD Recording Playing PLAY Playing PAUSE Ready TEARDOWN Init SETUP Playing Recording RECORD Recording PAUSE Ready TEARDOWN Init SETUP Recording
状态消息已收到下一状态初始化设置就绪拆卸初始化就绪播放设置就绪拆卸初始化录制播放播放播放暂停就绪拆卸初始化设置播放录制录制暂停就绪拆卸初始化录制暂停就绪拆卸初始化设置播放录制录制暂停就绪拆卸初始化录制
Appendix B: Interaction with RTP
附录B:与RTP的互动
RTSP allows media clients to control selected, non-contiguous sections of media presentations, rendering those streams with an RTP media layer[24]. The media layer rendering the RTP stream should not be affected by jumps in NPT. Thus, both RTP sequence numbers and RTP timestamps MUST be continuous and monotonic across jumps of NPT.
RTSP允许媒体客户端控制媒体演示文稿中选定的非连续部分,使用RTP媒体层呈现这些流[24]。呈现RTP流的媒体层不应受到NPT中跳转的影响。因此,RTP序列号和RTP时间戳必须是连续的和单调的。
As an example, assume a clock frequency of 8000 Hz, a packetization interval of 100 ms and an initial sequence number and timestamp of zero. First we play NPT 10 through 15, then skip ahead and play NPT 18 through 20. The first segment is presented as RTP packets with sequence numbers 0 through 49 and timestamp 0 through 39,200. The second segment consists of RTP packets with sequence number 50 through 69, with timestamps 40,000 through 55,200.
例如,假设时钟频率为8000 Hz,打包间隔为100 ms,初始序列号和时间戳为零。首先我们玩NPT 10到15,然后跳到前面玩NPT 18到20。第一段表示为序列号为0到49、时间戳为0到39200的RTP数据包。第二段由序列号为50到69、时间戳为40000到55200的RTP数据包组成。
We cannot assume that the RTSP client can communicate with the RTP media agent, as the two may be independent processes. If the RTP timestamp shows the same gap as the NPT, the media agent will assume that there is a pause in the presentation. If the jump in NPT is large enough, the RTP timestamp may roll over and the media agent may believe later packets to be duplicates of packets just played out.
我们不能假设RTSP客户端可以与RTP媒体代理通信,因为这两个代理可能是独立的进程。如果RTP时间戳显示与NPT相同的间隙,则媒体代理将假定演示中存在暂停。如果NPT中的跳转足够大,则RTP时间戳可能会滚动,并且媒体代理可能认为后面的包是刚刚播放的包的副本。
For certain datatypes, tight integration between the RTSP layer and the RTP layer will be necessary. This by no means precludes the above restriction. Combined RTSP/RTP media clients should use the RTP-Info field to determine whether incoming RTP packets were sent before or after a seek.
对于某些数据类型,RTSP层和RTP层之间的紧密集成是必要的。这并不排除上述限制。组合RTSP/RTP媒体客户端应使用RTP Info字段来确定传入RTP数据包是在寻道之前还是之后发送的。
For continuous audio, the server SHOULD set the RTP marker bit at the beginning of serving a new PLAY request. This allows the client to perform playout delay adaptation.
对于连续音频,服务器应在服务新播放请求的开始处设置RTP标记位。这允许客户端执行播放延迟自适应。
For scaling (see Section 12.34), RTP timestamps should correspond to the playback timing. For example, when playing video recorded at 30 frames/second at a scale of two and speed (Section 12.35) of one, the server would drop every second frame to maintain and deliver video packets with the normal timestamp spacing of 3,000 per frame, but NPT would increase by 1/15 second for each video frame.
对于缩放(参见第12.34节),RTP时间戳应与回放定时相对应。例如,当以2的比例和1的速度(第12.35节)播放以30帧/秒的速度录制的视频时,服务器将每秒丢弃一帧,以维持和传送每帧3000的正常时间戳间隔的视频包,但对于每个视频帧,NPT将增加1/15秒。
The client can maintain a correct display of NPT by noting the RTP timestamp value of the first packet arriving after repositioning. The sequence parameter of the RTP-Info (Section 12.33) header provides the first sequence number of the next segment.
客户端可以通过记录重新定位后到达的第一个数据包的RTP时间戳值来保持NPT的正确显示。RTP信息(第12.33节)标题的序列参数提供下一段的第一个序列号。
Appendix C: Use of SDP for RTSP Session Descriptions
附录C:将SDP用于RTSP会话描述
The Session Description Protocol (SDP, RFC 2327 [6]) may be used to describe streams or presentations in RTSP. Such usage is limited to specifying means of access and encoding(s) for:
会话描述协议(SDP,RFC 2327[6])可用于描述RTSP中的流或表示。此类使用仅限于指定以下访问和编码方式:
aggregate control: A presentation composed of streams from one or more servers that are not available for aggregate control. Such a description is typically retrieved by HTTP or other non-RTSP means. However, they may be received with ANNOUNCE methods.
聚合控制:由来自一个或多个服务器但不可用于聚合控制的流组成的表示。这种描述通常通过HTTP或其他非RTSP方式检索。但是,它们可以通过通告方法接收。
non-aggregate control: A presentation composed of multiple streams from a single server that are available for aggregate control. Such a description is typically returned in reply to a DESCRIBE request on a URL, or received in an ANNOUNCE method.
非聚合控制:由来自单个服务器的可用于聚合控制的多个流组成的表示。这样的描述通常在回复URL上的描述请求时返回,或者在公告方法中接收。
This appendix describes how an SDP file, retrieved, for example, through HTTP, determines the operation of an RTSP session. It also describes how a client should interpret SDP content returned in reply to a DESCRIBE request. SDP provides no mechanism by which a client can distinguish, without human guidance, between several media streams to be rendered simultaneously and a set of alternatives (e.g., two audio streams spoken in different languages).
本附录描述了例如通过HTTP检索的SDP文件如何确定RTSP会话的操作。它还描述了客户端应该如何解释响应descripe请求返回的SDP内容。SDP不提供任何机制,客户机可以在没有人工指导的情况下,区分要同时呈现的多个媒体流和一组备选方案(例如,以不同语言发言的两个音频流)。
The terms "session-level", "media-level" and other key/attribute names and values used in this appendix are to be used as defined in SDP (RFC 2327 [6]):
本附录中使用的术语“会话级别”、“媒体级别”和其他键/属性名称和值将按照SDP(RFC 2327[6])中的定义使用:
The "a=control:" attribute is used to convey the control URL. This attribute is used both for the session and media descriptions. If used for individual media, it indicates the URL to be used for controlling that particular media stream. If found at the session level, the attribute indicates the URL for aggregate control.
“a=control:”属性用于传递控件URL。此属性用于会话和媒体描述。如果用于单个媒体,则表示用于控制特定媒体流的URL。如果在会话级别找到,则该属性指示聚合控制的URL。
Example: a=control:rtsp://example.com/foo
Example: a=control:rtsp://example.com/foo
This attribute may contain either relative and absolute URLs, following the rules and conventions set out in RFC 1808 [25]. Implementations should look for a base URL in the following order:
该属性可以包含相对和绝对URL,遵循RFC 1808[25]中规定的规则和约定。实现应按以下顺序查找基本URL:
1. The RTSP Content-Base field 2. The RTSP Content-Location field 3. The RTSP request URL
1. RTSP内容基字段2。RTSP内容位置字段3。RTSP请求URL
If this attribute contains only an asterisk (*), then the URL is treated as if it were an empty embedded URL, and thus inherits the entire base URL.
如果此属性仅包含星号(*),则URL将被视为空的嵌入URL,从而继承整个基本URL。
The "m=" field is used to enumerate the streams. It is expected that all the specified streams will be rendered with appropriate synchronization. If the session is unicast, the port number serves as a recommendation from the server to the client; the client still has to include it in its SETUP request and may ignore this recommendation. If the server has no preference, it SHOULD set the port number value to zero.
“m=”字段用于枚举流。预期所有指定的流都将以适当的同步方式呈现。如果会话是单播的,则端口号用作从服务器到客户端的建议;客户端仍然必须将其包括在其设置请求中,并且可能会忽略此建议。如果服务器没有首选项,则应将端口号值设置为零。
Example: m=audio 0 RTP/AVP 31
示例:m=音频0 RTP/AVP 31
The payload type(s) are specified in the "m=" field. In case the payload type is a static payload type from RFC 1890 [1], no other information is required. In case it is a dynamic payload type, the media attribute "rtpmap" is used to specify what the media is. The "encoding name" within the "rtpmap" attribute may be one of those specified in RFC 1890 (Sections 5 and 6), or an experimental encoding with a "X-" prefix as specified in SDP (RFC 2327 [6]). Codec-specific parameters are not specified in this field, but rather in the "fmtp" attribute described below. Implementors seeking to register new encodings should follow the procedure in RFC 1890 [1]. If the media type is not suited to the RTP AV profile, then it is recommended that a new profile be created and the appropriate profile name be used in lieu of "RTP/AVP" in the "m=" field.
有效负载类型在“m=”字段中指定。如果有效负载类型是RFC 1890[1]中的静态有效负载类型,则不需要其他信息。如果是动态有效负载类型,则使用介质属性“rtpmap”指定介质类型。“rtpmap”属性中的“编码名称”可以是RFC 1890(第5节和第6节)中规定的名称之一,也可以是SDP(RFC 2327[6])中规定的带有“X-”前缀的实验编码。编解码器特定参数不在此字段中指定,而是在下面描述的“fmtp”属性中指定。寻求注册新编码的实现者应遵循RFC1890[1]中的过程。如果媒体类型不适合RTP AV配置文件,则建议创建一个新的配置文件,并使用适当的配置文件名称代替“m=”字段中的“RTP/AVP”。
Format-specific parameters are conveyed using the "fmtp" media attribute. The syntax of the "fmtp" attribute is specific to the encoding(s) that the attribute refers to. Note that the packetization interval is conveyed using the "ptime" attribute.
使用“fmtp”媒体属性传递特定于格式的参数。“fmtp”属性的语法特定于该属性所指的编码。请注意,打包间隔是使用“ptime”属性传递的。
The "a=range" attribute defines the total time range of the stored session. (The length of live sessions can be deduced from the "t" and "r" parameters.) Unless the presentation contains media streams of different durations, the range attribute is a session-level attribute. The unit is specified first, followed by the value range. The units and their values are as defined in Section 3.5, 3.6 and 3.7.
“a=range”属性定义存储会话的总时间范围。(实时会话的长度可以从“t”和“r”参数中推断出来。)除非演示文稿包含不同持续时间的媒体流,否则范围属性是会话级别属性。首先指定单位,然后指定值范围。单位及其值如第3.5、3.6和3.7节所述。
Examples: a=range:npt=0-34.4368 a=range:clock=19971113T2115-19971113T2203
Examples: a=range:npt=0-34.4368 a=range:clock=19971113T2115-19971113T2203
The "t=" field MUST contain suitable values for the start and stop times for both aggregate and non-aggregate stream control. With aggregate control, the server SHOULD indicate a stop time value for which it guarantees the description to be valid, and a start time that is equal to or before the time at which the DESCRIBE request was received. It MAY also indicate start and stop times of 0, meaning that the session is always available. With non-aggregate control, the values should reflect the actual period for which the session is available in keeping with SDP semantics, and not depend on other means (such as the life of the web page containing the description) for this purpose.
“t=”字段必须包含聚合和非聚合流控制的开始和停止时间的合适值。使用聚合控制时,服务器应指示一个停止时间值(它保证描述对其有效),以及一个等于或早于接收到描述请求的时间的开始时间。它还可能指示开始和停止时间为0,这意味着会话始终可用。对于非聚合控制,这些值应反映符合SDP语义的会话可用的实际时间段,而不依赖于用于此目的的其他方法(例如包含描述的网页的生命周期)。
In SDP, the "c=" field contains the destination address for the media stream. However, for on-demand unicast streams and some multicast streams, the destination address is specified by the client via the SETUP request. Unless the media content has a fixed destination address, the "c=" field is to be set to a suitable null value. For addresses of type "IP4", this value is "0.0.0.0".
在SDP中,“c=”字段包含媒体流的目标地址。但是,对于按需单播流和一些多播流,目标地址由客户端通过设置请求指定。除非媒体内容具有固定的目标地址,“c=”字段应设置为合适的空值。对于“IP4”类型的地址,该值为“0.0.0.0”。
The optional "a=etag" attribute identifies a version of the session description. It is opaque to the client. SETUP requests may include this identifier in the If-Match field (see section 12.22) to only allow session establishment if this attribute value still corresponds to that of the current description. The attribute value is opaque and may contain any character allowed within SDP attribute values.
可选的“a=etag”属性标识会话描述的版本。这对客户来说是不透明的。设置请求可将该标识符包含在If匹配字段中(参见第12.22节),以便仅当该属性值仍与当前描述的属性值相对应时,才允许建立会话。属性值不透明,可能包含SDP属性值中允许的任何字符。
Example: a=etag:158bb3e7c7fd62ce67f12b533f06b83a
Example: a=etag:158bb3e7c7fd62ce67f12b533f06b83a
One could argue that the "o=" field provides identical functionality. However, it does so in a manner that would put constraints on servers that need to support multiple session description types other than SDP for the same piece of media content.
可以说“o=”字段提供了相同的功能。但是,它这样做的方式会对需要支持多个会话描述类型(SDP除外)的服务器施加约束,而SDP不支持同一段媒体内容。
If a presentation does not support aggregate control and multiple media sections are specified, each section MUST have the control URL specified via the "a=control:" attribute.
如果演示文稿不支持聚合控件,并且指定了多个媒体节,则每个节必须具有通过“a=control:”属性指定的控件URL。
Example: v=0 o=- 2890844256 2890842807 IN IP4 204.34.34.32 s=I came from a web page t=0 0 c=IN IP4 0.0.0.0 m=video 8002 RTP/AVP 31 a=control:rtsp://audio.com/movie.aud m=audio 8004 RTP/AVP 3 a=control:rtsp://video.com/movie.vid
Example: v=0 o=- 2890844256 2890842807 IN IP4 204.34.34.32 s=I came from a web page t=0 0 c=IN IP4 0.0.0.0 m=video 8002 RTP/AVP 31 a=control:rtsp://audio.com/movie.aud m=audio 8004 RTP/AVP 3 a=control:rtsp://video.com/movie.vid
Note that the position of the control URL in the description implies that the client establishes separate RTSP control sessions to the servers audio.com and video.com.
请注意,描述中控制URL的位置意味着客户端与服务器audio.com和video.com建立单独的RTSP控制会话。
It is recommended that an SDP file contains the complete media initialization information even if it is delivered to the media client through non-RTSP means. This is necessary as there is no mechanism to indicate that the client should request more detailed media stream information via DESCRIBE.
建议SDP文件包含完整的介质初始化信息,即使它是通过非RTSP方式传送到介质客户端的。这是必要的,因为没有机制表明客户端应该通过descripe请求更详细的媒体流信息。
In this scenario, the server has multiple streams that can be controlled as a whole. In this case, there are both media-level "a=control:" attributes, which are used to specify the stream URLs, and a session-level "a=control:" attribute which is used as the request URL for aggregate control. If the media-level URL is relative, it is resolved to absolute URLs according to Section C.1.1 above.
在这个场景中,服务器有多个可以作为一个整体控制的流。在这种情况下,既有用于指定流URL的媒体级别“a=control:”属性,也有用作聚合控制请求URL的会话级别“a=control:”属性。如果媒体级URL是相对的,则根据上文第C.1.1节将其解析为绝对URL。
If the presentation comprises only a single stream, the media-level "a=control:" attribute may be omitted altogether. However, if the presentation contains more than one stream, each media stream section MUST contain its own "a=control" attribute.
如果表示仅包括单个流,则可以完全省略媒体级别“a=控制:”属性。但是,如果演示文稿包含多个流,则每个媒体流部分必须包含其自己的“a=control”属性。
Example: v=0 o=- 2890844256 2890842807 IN IP4 204.34.34.32 s=I contain i=<more info> t=0 0 c=IN IP4 0.0.0.0 a=control:rtsp://example.com/movie/ m=video 8002 RTP/AVP 31 a=control:trackID=1 m=audio 8004 RTP/AVP 3 a=control:trackID=2
Example: v=0 o=- 2890844256 2890842807 IN IP4 204.34.34.32 s=I contain i=<more info> t=0 0 c=IN IP4 0.0.0.0 a=control:rtsp://example.com/movie/ m=video 8002 RTP/AVP 31 a=control:trackID=1 m=audio 8004 RTP/AVP 3 a=control:trackID=2
In this example, the client is required to establish a single RTSP session to the server, and uses the URLs rtsp://example.com/movie/trackID=1 and rtsp://example.com/movie/trackID=2 to set up the video and audio streams, respectively. The URL rtsp://example.com/movie/ controls the whole movie.
在本例中,客户机需要建立到服务器的单个RTSP会话,并使用URLrtsp://example.com/movie/trackID=1 和rtsp://example.com/movie/trackID=2 分别设置视频和音频流。网址rtsp://example.com/movie/ 控制整个电影。
Appendix D: Minimal RTSP implementation
附录D:最小RTSP实施
A client implementation MUST be able to do the following :
客户端实现必须能够执行以下操作:
* Generate the following requests: SETUP, TEARDOWN, and one of PLAY (i.e., a minimal playback client) or RECORD (i.e., a minimal recording client). If RECORD is implemented, ANNOUNCE must be implemented as well. * Include the following headers in requests: CSeq, Connection, Session, Transport. If ANNOUNCE is implemented, the capability to include headers Content-Language, Content-Encoding, Content-Length, and Content-Type should be as well. * Parse and understand the following headers in responses: CSeq, Connection, Session, Transport, Content-Language, Content-Encoding, Content-Length, Content-Type. If RECORD is implemented, the Location header must be understood as well. RTP-compliant implementations should also implement RTP-Info. * Understand the class of each error code received and notify the end-user, if one is present, of error codes in classes 4xx and 5xx. The notification requirement may be relaxed if the end-user explicitly does not want it for one or all status codes. * Expect and respond to asynchronous requests from the server, such as ANNOUNCE. This does not necessarily mean that it should implement the ANNOUNCE method, merely that it MUST respond positively or negatively to any request received from the server.
* 生成以下请求:设置、拆卸和播放(即最小播放客户端)或录制(即最小录制客户端)之一。如果实施了记录,则还必须实施公告。*在请求中包括以下标题:CSeq、连接、会话、传输。如果实现了annound,则还应提供包含标题、内容语言、内容编码、内容长度和内容类型的功能。*解析并理解响应中的以下标题:CSeq、连接、会话、传输、内容语言、内容编码、内容长度、内容类型。如果实现了记录,则还必须理解位置标头。RTP兼容的实现还应实现RTP信息。*了解收到的每个错误代码的类别,并将4xx和5xx类的错误代码通知最终用户(如果存在)。如果最终用户明确不希望将通知要求用于一个或所有状态代码,则可以放宽通知要求。*期望并响应来自服务器的异步请求,如通告。这并不一定意味着它应该实现annound方法,只意味着它必须对从服务器接收到的任何请求做出肯定或否定的响应。
Though not required, the following are highly recommended at the time of publication for practical interoperability with initial implementations and/or to be a "good citizen".
尽管不是必需的,但为了与初始实现实现的实际互操作性和/或成为一名“好公民”,在发布时强烈推荐以下内容。
* Implement RTP/AVP/UDP as a valid transport. * Inclusion of the User-Agent header. * Understand SDP session descriptions as defined in Appendix C * Accept media initialization formats (such as SDP) from standard input, command line, or other means appropriate to the operating environment to act as a "helper application" for other applications (such as web browsers).
* 将RTP/AVP/UDP实现为有效的传输。*包含用户代理标头。*理解附录C中定义的SDP会话描述*从标准输入、命令行或适合操作环境的其他方式接受媒体初始化格式(如SDP),以充当其他应用程序(如web浏览器)的“助手应用程序”。
There may be RTSP applications different from those initially envisioned by the contributors to the RTSP specification for which the requirements above do not make sense. Therefore, the recommendations above serve only as guidelines instead of strict requirements.
可能存在与RTSP规范贡献者最初设想的RTSP应用程序不同的RTSP应用程序,对于这些RTSP应用程序,上述要求没有意义。因此,上述建议仅作为指导原则,而不是严格要求。
To support on-demand playback of media streams, the client MUST additionally be able to do the following: * generate the PAUSE request; * implement the REDIRECT method, and the Location header.
要支持媒体流的按需播放,客户端还必须能够执行以下操作:*生成暂停请求;*实现重定向方法和位置头。
In order to access media presentations from RTSP servers that require authentication, the client MUST additionally be able to do the following: * recognize the 401 status code; * parse and include the WWW-Authenticate header; * implement Basic Authentication and Digest Authentication.
In order to access media presentations from RTSP servers that require authentication, the client MUST additionally be able to do the following: * recognize the 401 status code; * parse and include the WWW-Authenticate header; * implement Basic Authentication and Digest Authentication.
A minimal server implementation MUST be able to do the following:
最低限度的服务器实现必须能够执行以下操作:
* Implement the following methods: SETUP, TEARDOWN, OPTIONS and either PLAY (for a minimal playback server) or RECORD (for a minimal recording server). If RECORD is implemented, ANNOUNCE should be implemented as well. * Include the following headers in responses: Connection, Content-Length, Content-Type, Content-Language, Content-Encoding, Transport, Public. The capability to include the Location header should be implemented if the RECORD method is. RTP-compliant implementations should also implement the RTP-Info field. * Parse and respond appropriately to the following headers in requests: Connection, Session, Transport, Require.
* 实现以下方法:设置、拆卸、选项和播放(对于最小播放服务器)或录制(对于最小录制服务器)。如果实施了记录,则还应实施公告。*在响应中包括以下标题:连接、内容长度、内容类型、内容语言、内容编码、传输、公共。如果使用记录方法,则应实现包含位置标头的功能。RTP兼容的实现还应实现RTP信息字段。*在请求中适当地解析并响应以下标题:连接、会话、传输、请求。
Though not required, the following are highly recommended at the time of publication for practical interoperability with initial implementations and/or to be a "good citizen".
尽管不是必需的,但为了与初始实现实现的实际互操作性和/或成为一名“好公民”,在发布时强烈推荐以下内容。
* Implement RTP/AVP/UDP as a valid transport. * Inclusion of the Server header. * Implement the DESCRIBE method. * Generate SDP session descriptions as defined in Appendix C
* 将RTP/AVP/UDP实现为有效的传输。*包含服务器头。*实现描述方法。*生成附录C中定义的SDP会话描述
There may be RTSP applications different from those initially envisioned by the contributors to the RTSP specification for which the requirements above do not make sense. Therefore, the recommendations above serve only as guidelines instead of strict requirements.
可能存在与RTSP规范贡献者最初设想的RTSP应用程序不同的RTSP应用程序,对于这些RTSP应用程序,上述要求没有意义。因此,上述建议仅作为指导原则,而不是严格要求。
To support on-demand playback of media streams, the server MUST additionally be able to do the following:
要支持媒体流的按需播放,服务器还必须能够执行以下操作:
* Recognize the Range header, and return an error if seeking is not supported. * Implement the PAUSE method.
* 识别范围标头,如果不支持查找,则返回错误。*实现暂停方法。
In addition, in order to support commonly-accepted user interface features, the following are highly recommended for on-demand media servers:
此外,为了支持普遍接受的用户界面功能,强烈建议按需媒体服务器使用以下功能:
* Include and parse the Range header, with NPT units. Implementation of SMPTE units is recommended. * Include the length of the media presentation in the media initialization information. * Include mappings from data-specific timestamps to NPT. When RTP is used, the rtptime portion of the RTP-Info field may be used to map RTP timestamps to NPT.
* 使用NPT单位包括并分析范围标头。建议采用SMPTE装置。*在媒体初始化信息中包括媒体演示文稿的长度。*包括从特定于数据的时间戳到NPT的映射。当使用RTP时,RTP信息字段的rtptime部分可用于将RTP时间戳映射到NPT。
Client implementations may use the presence of length information to determine if the clip is seekable, and visibly disable seeking features for clips for which the length information is unavailable. A common use of the presentation length is to implement a "slider bar" which serves as both a progress indicator and a timeline positioning tool.
客户端实现可以使用长度信息的存在来确定剪辑是否可搜索,并且可以明显地禁用长度信息不可用的剪辑的搜索功能。演示文稿长度的一个常见用途是实现一个“滑块”,它既是进度指示器又是时间轴定位工具。
Mappings from RTP timestamps to NPT are necessary to ensure correct positioning of the slider bar.
从RTP时间戳到NPT的映射是确保滑块正确定位所必需的。
In order to correctly handle client authentication, the server MUST additionally be able to do the following:
为了正确处理客户端身份验证,服务器还必须能够执行以下操作:
* Generate the 401 status code when authentication is required for the resource. * Parse and include the WWW-Authenticate header * Implement Basic Authentication and Digest Authentication
* 当资源需要身份验证时,生成401状态代码。*解析并包含WWW身份验证标头*实现基本身份验证和摘要身份验证
Appendix E: Authors' Addresses
附录E:作者地址
Henning Schulzrinne Dept. of Computer Science Columbia University 1214 Amsterdam Avenue New York, NY 10027 USA
美国纽约州纽约市阿姆斯特丹大道1214号哥伦比亚大学计算机科学系
EMail: schulzrinne@cs.columbia.edu
EMail: schulzrinne@cs.columbia.edu
Anup Rao Netscape Communications Corp. 501 E. Middlefield Road Mountain View, CA 94043 USA
阿努普·拉奥·网景通信公司,美国加利福尼亚州米德尔菲尔德东路山景城501号,邮编94043
EMail: anup@netscape.com
EMail: anup@netscape.com
Robert Lanphier RealNetworks 1111 Third Avenue Suite 2900 Seattle, WA 98101 USA
美国华盛顿州西雅图市第三大道1111号第三大道2900室罗伯特·兰菲尔RealNetworks 98101
EMail: robla@real.com
EMail: robla@real.com
Appendix F: Acknowledgements
附录F:确认书
This memo is based on the functionality of the original RTSP document submitted in October 96. It also borrows format and descriptions from HTTP/1.1.
本备忘录基于1996年10月提交的原始RTSP文件的功能。它还借用了HTTP/1.1的格式和描述。
This document has benefited greatly from the comments of all those participating in the MMUSIC-WG. In addition to those already mentioned, the following individuals have contributed to this specification:
本文件从所有参与MMUSIC-WG的人员的意见中受益匪浅。除上述人员外,以下人员对本规范做出了贡献:
Rahul Agarwal, Torsten Braun, Brent Browning, Bruce Butterfield, Steve Casner, Francisco Cortes, Kelly Djahandari, Martin Dunsmuir, Eric Fleischman, Jay Geagan, Andy Grignon, V. Guruprasad, Peter Haight, Mark Handley, Brad Hefta-Gaub, John K. Ho, Philipp Hoschka, Anne Jones, Anders Klemets, Ruth Lang, Stephanie Leif, Jonathan Lennox, Eduardo F. Llach, Rob McCool, David Oran, Maria Papadopouli, Sujal Patel, Ema Patki, Alagu Periyannan, Igor Plotnikov, Pinaki Shah, David Singer, Jeff Smith, Alexander Sokolsky, Dale Stammen, and John Francis Stracke.
Rahul Agarwal、Torsten Braun、Brent Browning、Bruce Butterfield、Steve Casner、Francisco Cortes、Kelly Djahandari、Martin Dunsmuir、Eric Fleischman、Jay Geagan、Andy Grignon、V.Guruprasad、Peter Haight、Mark Handley、Brad Hefta Gaub、John K.Ho、Philipp Hoschka、Anne Jones、Anders Klemets、Ruth Lang、Stephanie Leif、Jonathan Lennox、,爱德华多·拉赫、罗布·麦库尔、大卫·奥兰、玛丽亚·帕帕佐普利、苏哈尔·帕特尔、埃玛·帕特基、阿拉古·佩里扬南、伊戈尔·普洛特尼科夫、皮纳基·沙阿、大卫·辛格、杰夫·史密斯、亚历山大·索科尔斯基、戴尔·斯坦曼和约翰·弗朗西斯·斯特拉克。
References
工具书类
1 Schulzrinne, H., "RTP profile for audio and video conferences with minimal control", RFC 1890, January 1996.
1 Schulzrinne,H.,“具有最小控制的音频和视频会议的RTP配置文件”,RFC 1890,1996年1月。
2 Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, "Hypertext transfer protocol - HTTP/1.1", RFC 2068, January 1997.
2菲尔丁,R.,盖蒂,J.,莫卧儿,J.,尼尔森,H.,和T.伯纳斯李,“超文本传输协议-HTTP/1.1”,RFC 2068,1997年1月。
3 Yergeau, F., Nicol, G., Adams, G., and M. Duerst, "Internationalization of the hypertext markup language", RFC 2070, January 1997.
3 Yergeau,F.,Nicol,G.,Adams,G.,和M.Duerst,“超文本标记语言的国际化”,RFC 2070,1997年1月。
4 Bradner, S., "Key words for use in RFCs to indicate requirement levels", BCP 14, RFC 2119, March 1997.
4 Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
5 ISO/IEC, "Information technology - generic coding of moving pictures and associated audio information - part 6: extension for digital storage media and control," Draft International Standard ISO 13818-6, International Organization for Standardization ISO/IEC JTC1/SC29/WG11, Geneva, Switzerland, Nov. 1995.
5 ISO/IEC,“信息技术-运动图像和相关音频信息的通用编码-第6部分:数字存储媒体和控制的扩展”,国际标准ISO 13818-6草案,国际标准化组织ISO/IEC JTC1/SC29/WG11,瑞士日内瓦,1995年11月。
6 Handley, M., and V. Jacobson, "SDP: Session Description Protocol", RFC 2327, April 1998.
6 Handley,M.和V.Jacobson,“SDP:会话描述协议”,RFC 2327,1998年4月。
7 Franks, J., Hallam-Baker, P., and J. Hostetler, "An extension to HTTP: digest access authentication", RFC 2069, January 1997.
7 Franks,J.,Hallam Baker,P.,和J.Hostetler,“HTTP的扩展:摘要访问认证”,RFC 2069,1997年1月。
8 Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.
8 Postel,J.,“用户数据报协议”,STD 6,RFC 768,1980年8月。
9 Hinden, B. and C. Partridge, "Version 2 of the reliable data protocol (RDP)", RFC 1151, April 1990.
9 Hinden,B.和C.Partridge,“可靠数据协议(RDP)第2版”,RFC 115119990年4月。
10 Postel, J., "Transmission control protocol", STD 7, RFC 793, September 1981.
10 Postel,J.,“传输控制协议”,标准7,RFC 793,1981年9月。
11 H. Schulzrinne, "A comprehensive multimedia control architecture for the Internet," in Proc. International Workshop on Network and Operating System Support for Digital Audio and Video (NOSSDAV), (St. Louis, Missouri), May 1997.
11 H.Schulzrinne,“互联网的综合多媒体控制体系结构”,在Proc。数字音频和视频网络和操作系统支持国际研讨会(NOSSDAV)(密苏里州圣路易斯),1997年5月。
12 International Telecommunication Union, "Visual telephone systems and equipment for local area networks which provide a non-guaranteed quality of service," Recommendation H.323, Telecommunication Standardization Sector of ITU, Geneva, Switzerland, May 1996.
12国际电信联盟,“提供非保证服务质量的局域网可视电话系统和设备”,建议H.323,国际电联电信标准化部门,瑞士日内瓦,1996年5月。
13 McMahon, P., "GSS-API authentication method for SOCKS version 5", RFC 1961, June 1996.
13 McMahon,P.,“SOCKS版本5的GSS-API认证方法”,RFC 1961,1996年6月。
14 J. Miller, P. Resnick, and D. Singer, "Rating services and rating systems (and their machine readable descriptions)," Recommendation REC-PICS-services-961031, W3C (World Wide Web Consortium), Boston, Massachusetts, Oct. 1996.
14 J.Miller、P.Resnick和D.Singer,“评级服务和评级系统(及其机器可读描述)”,建议REC-PICS-services-961031,W3C(万维网联盟),马萨诸塞州波士顿,1996年10月。
15 J. Miller, T. Krauskopf, P. Resnick, and W. Treese, "PICS label distribution label syntax and communication protocols," Recommendation REC-PICS-labels-961031, W3C (World Wide Web Consortium), Boston, Massachusetts, Oct. 1996.
15 J.Miller、T.Krauskopf、P.Resnick和W.Treese,“PICS标签分发标签语法和通信协议”,建议REC-PICS-labels-961031,W3C(万维网联盟),马萨诸塞州波士顿,1996年10月。
16 Crocker, D. and P. Overell, "Augmented BNF for syntax specifications: ABNF", RFC 2234, November 1997.
16 Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。
17 Braden, B., "Requirements for internet hosts - application and support", STD 3, RFC 1123, October 1989.
17 Braden,B.“互联网主机的要求——应用和支持”,STD 3,RFC 1123,1989年10月。
18 Elz, R., "A compact representation of IPv6 addresses", RFC 1924, April 1996.
18 Elz,R.,“IPv6地址的紧凑表示”,RFC 1924,1996年4月。
19 Berners-Lee, T., Masinter, L. and M. McCahill, "Uniform resource locators (URL)", RFC 1738, December 1994.
19 Berners Lee,T.,Masinter,L.和M.McCahill,“统一资源定位器(URL)”,RFC 17381994年12月。
20 Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.
20 Yergeau,F.,“UTF-8,ISO 10646的转换格式”,RFC 2279,1998年1月。
22 Braden, B., "T/TCP - TCP extensions for transactions functional specification", RFC 1644, July 1994.
22 Braden,B.,“T/TCP-事务功能规范的TCP扩展”,RFC 16441994年7月。
22 W. R. Stevens, TCP/IP illustrated: the implementation, vol. 2. Reading, Massachusetts: Addison-Wesley, 1994.
22 W.R.Stevens,《TCP/IP图解:实现》,第2卷。雷丁,马萨诸塞州:艾迪生·韦斯利,1994年。
23 Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: a transport protocol for real-time applications", RFC 1889, January 1996.
23 Schulzrinne,H.,Casner,S.,Frederick,R.和V.Jacobson,“RTP:实时应用的传输协议”,RFC 1889,1996年1月。
24 Fielding, R., "Relative uniform resource locators", RFC 1808, June 1995.
24 Fielding,R.,“相对统一资源定位器”,RFC 1808,1995年6月。
Full Copyright Statement
完整版权声明
Copyright (C) The Internet Society (1998). All Rights Reserved.
版权所有(C)互联网协会(1998年)。版权所有。
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。