📄 rfc2326.txt
字号:
Network Working Group H. SchulzrinneRequest for Comments: 2326 Columbia U.Category: Standards Track A. Rao Netscape R. Lanphier RealNetworks April 1998 Real Time Streaming Protocol (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.Copyright Notice Copyright (C) The Internet Society (1998). All Rights Reserved.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).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 .......................................... 14Schulzrinne, et. al. Standards Track [Page 1]RFC 2326 Real Time Streaming Protocol April 1998 + 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 ...................... 42Schulzrinne, et. al. Standards Track [Page 2]RFC 2326 Real Time Streaming Protocol April 1998 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 .............................................. 57Schulzrinne, et. al. Standards Track [Page 3]RFC 2326 Real Time Streaming Protocol April 1998 + 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 ....................................... 92Schulzrinne, et. al. Standards Track [Page 4]RFC 2326 Real Time Streaming Protocol April 19981 Introduction1.1 Purpose 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. 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. 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 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. This makes "virtual hosting" easier, where a single host with one IP address hosts several document trees.Schulzrinne, et. al. Standards Track [Page 5]RFC 2326 Real Time Streaming Protocol April 1998 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. 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -