idnits 2.17.1 draft-ietf-mmusic-rtsp-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-03-28) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Abstract section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack an Authors' Addresses Section. ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 163 instances of too long lines in the document, the longest one being 3 characters in excess of 72. ** There are 296 instances of lines with control characters in the document. == There are 8 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 3 instances of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 == There are 1 instance of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 493: '... A server SHOULD implement all heade...' RFC 2119 keyword, line 513: '...the server. The server SHOULD list the...' RFC 2119 keyword, line 686: '...ddresses in URLs SHOULD be avoided whe...' RFC 2119 keyword, line 727: '...conference identifier MUST be globally...' RFC 2119 keyword, line 749: '... A session identifier SHOULD be chosen...' (93 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 1115 has weird spacing: '...equired all...' == Line 1128 has weird spacing: '...s State all...' == Line 1132 has weird spacing: '...allowed all...' == Line 1133 has weird spacing: '...allowed all...' == Line 1851 has weird spacing: '... type supp...' == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: 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. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: 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. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: destination: The address to which a stream will be sent. The client may specify the multicast address with the destination parameter. 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 to avoid becoming the unwitting perpetrator of a remote-controlled denial-of-service attack. This is particularly important if RTSP commands are issued via UDP, but TCP cannot be relied upon 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. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? '1' on line 3292 looks like a reference -- Missing reference section? '3' on line 243 looks like a reference -- Missing reference section? '4' on line 284 looks like a reference -- Missing reference section? '5' on line 287 looks like a reference -- Missing reference section? '19' on line 795 looks like a reference -- Missing reference section? '6' on line 3297 looks like a reference -- Missing reference section? '7' on line 678 looks like a reference -- Missing reference section? '8' on line 3050 looks like a reference -- Missing reference section? '9' on line 408 looks like a reference -- Missing reference section? '10' on line 409 looks like a reference -- Missing reference section? '11' on line 410 looks like a reference -- Missing reference section? '12' on line 736 looks like a reference -- Missing reference section? '13' on line 444 looks like a reference -- Missing reference section? '21' on line 451 looks like a reference -- Missing reference section? '14' on line 642 looks like a reference -- Missing reference section? '15' on line 687 looks like a reference -- Missing reference section? '17' on line 691 looks like a reference -- Missing reference section? '18' on line 735 looks like a reference -- Missing reference section? 'H6' on line 979 looks like a reference -- Missing reference section? 'H10' on line 1753 looks like a reference -- Missing reference section? '22' on line 2636 looks like a reference -- Missing reference section? 'CRLF' on line 3012 looks like a reference -- Missing reference section? 'H15' on line 3052 looks like a reference -- Missing reference section? '16' on line 3265 looks like a reference Summary: 13 errors (**), 0 flaws (~~), 12 warnings (==), 26 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Engineering Task Force MMUSIC WG 2 Internet Draft H. Schulzrinne, A. Rao, R. Lanphier 3 draft-ietf-mmusic-rtsp-04.txt Columbia U./Netscape/Progressive Networks 4 September 17, 1997 Expires: March 17, 1998 6 Real Time Streaming Protocol (RTSP) 8 STATUS OF THIS MEMO 10 This document is an Internet-Draft. Internet-Drafts are working 11 documents of the Internet Engineering Task Force (IETF), its areas, 12 and its working groups. Note that other groups may also distribute 13 working documents as Internet-Drafts. 15 Internet-Drafts are draft documents valid for a maximum of six months 16 and may be updated, replaced, or obsoleted by other documents at any 17 time. It is inappropriate to use Internet-Drafts as reference 18 material or to cite them other than as ``work in progress''. 20 To learn the current status of any Internet-Draft, please check the 21 ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow 22 Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), 23 munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or 24 ftp.isi.edu (US West Coast). 26 Distribution of this document is unlimited. 28 Abstract: 30 The Real Time Streaming Protocol, or RTSP, is an application-level 31 protocol for control over the delivery of data with real-time 32 properties. RTSP provides an extensible framework to enable 33 controlled, on-demand delivery of real-time data, such as audio and 34 video. Sources of data can include both live data feeds and stored 35 clips. This protocol is intended to control multiple data delivery 36 sessions, provide a means for choosing delivery channels such as UDP, 37 multicast UDP and TCP, and delivery mechanisms based upon RTP (RFC 38 1889). 40 This is a snapshot of the current draft which will become the next 41 version of the ``official'' Internet Draft. 43 H. Schulzrinne, A. Rao, R. Lanphier Page 1 44 Contents 46 * Contents 47 * 1 Introduction 48 + 1.1 Purpose 49 + 1.2 Requirements 50 + 1.3 Terminology 51 + 1.4 Protocol Properties 52 + 1.5 Extending RTSP 53 + 1.6 Overall Operation 54 + 1.7 RTSP States 55 + 1.8 Relationship with Other Protocols 56 * 2 Notational Conventions 57 * 3 Protocol Parameters 58 + 3.1 RTSP Version 59 + 3.2 RTSP URL 60 + 3.3 Conference Identifiers 61 + 3.4 Session Identifiers 62 + 3.5 SMPTE Relative Timestamps 63 + 3.6 Normal Play Time 64 + 3.7 Absolute Time 65 * 4 RTSP Message 66 + 4.1 Message Types 67 + 4.2 Message Headers 68 + 4.3 Message Body 69 + 4.4 Message Length 70 * 5 General Header Fields 71 * 6 Request 72 + 6.1 Request Line 73 + 6.2 Request Header Fields 74 * 7 Response 75 + 7.1 Status-Line 76 o 7.1.1 Status Code and Reason Phrase 77 o 7.1.2 Response Header Fields 78 * 8 Entity 79 + 8.1 Entity Header Fields 80 + 8.2 Entity Body 81 * 9 Connections 82 + 9.1 Pipelining 83 + 9.2 Reliability and Acknowledgements 84 * 10 Method Definitions 85 + 10.1 OPTIONS 86 + 10.2 DESCRIBE 87 + 10.3 ANNOUNCE 88 + 10.4 SETUP 89 + 10.5 PLAY 91 H. Schulzrinne, A. Rao, R. Lanphier Page 2 92 + 10.6 PAUSE 93 + 10.7 TEARDOWN 94 + 10.8 GET_PARAMETER 95 + 10.9 SET_PARAMETER 96 + 10.10 REDIRECT 97 + 10.11 RECORD 98 + 10.12 Embedded (Interleaved) Binary Data 99 * 11 Status Code Definitions 100 + 11.1 Redirection 3xx 101 + 11.2 Client Error 4xx 102 o 11.2.1 405 Method Not Allowed 103 o 11.2.2 451 Parameter Not Understood 104 o 11.2.3 452 Conference Not Found 105 o 11.2.4 453 Not Enough Bandwidth 106 o 11.2.5 454 Session Not Found 107 o 11.2.6 455 Method Not Valid in This State 108 o 11.2.7 456 Header Field Not Valid for Resource 109 o 11.2.8 457 Invalid Range 110 o 11.2.9 458 Parameter Is Read-Only 111 o 11.2.10 459 Aggregate operation not allowed 112 o 11.2.11 460 Only aggregate operation allowed 113 * 12 Header Field Definitions 114 + 12.1 Accept 115 + 12.2 Accept-Encoding 116 + 12.3 Accept-Language 117 + 12.4 Allow 118 + 12.5 Authorization 119 + 12.6 Bandwidth 120 + 12.7 Blocksize 121 + 12.8 Cache-Control 122 + 12.9 Conference 123 + 12.10 Connection 124 + 12.11 Content-Base 125 + 12.12 Content-Encoding 126 + 12.13 Content-Language 127 + 12.14 Content-Length 128 + 12.15 Content-Location 129 + 12.16 Content-Type 130 + 12.17 CSeq 131 + 12.18 Date 132 + 12.19 Expires 133 + 12.20 From 134 + 12.21 Host 135 + 12.22 If-Match 136 + 12.23 If-Modified-Since 137 + 12.24 Last-Modified 139 H. Schulzrinne, A. Rao, R. Lanphier Page 3 140 + 12.25 Location 141 + 12.26 Proxy-Authenticate 142 + 12.27 Proxy-Require 143 + 12.28 Public 144 + 12.29 Range 145 + 12.30 Referer 146 + 12.31 Retry-After 147 + 12.32 Require 148 + 12.33 RTP-Info 149 + 12.34 Scale 150 + 12.35 Speed 151 + 12.36 Server 152 + 12.37 Session 153 + 12.38 Timestamp 154 + 12.39 Transport 155 + 12.40 Unsupported 156 + 12.41 User-Agent 157 + 12.42 Vary 158 + 12.43 Via 159 + 12.44 WWW-Authenticate 160 * 13 Caching 161 * 14 Examples 162 + 14.1 Media on Demand (Unicast) 163 + 14.2 Streaming of a Container file 164 + 14.3 Live Media Presentation Using Multicast 165 + 14.4 Playing media into an existing session 166 + 14.5 Recording 167 * 15 Syntax 168 + 15.1 Base Syntax 169 * 16 Security Considerations 170 * A RTSP Protocol State Machines 171 + A.1 Client State Machine 172 + A.2 Server State Machine 173 * B Interaction with RTP 174 * C Use of SDP for RTSP Session Descriptions 175 + C.1 Specification 176 o C.1.1 Control URL 177 o C.1.2 Media streams 178 o C.1.3 Payload type(s) 179 o C.1.4 Format specific parameters 180 o C.1.5 Length of presentation 181 o C.1.6 Time of availability 182 o C.1.7 Connection Information 183 o C.1.8 Entity Tag 184 + C.2 Scenario A 185 + C.3 Scenario B 187 H. Schulzrinne, A. Rao, R. Lanphier Page 4 188 * D Minimal RTSP implementation 189 + D.1 Client 190 o D.1.1 Basic Playback 191 o D.1.2 Authentication-enabled 192 + D.2 Server 193 o D.2.1 Basic Playback 194 o D.2.2 Authentication-enabled 195 * E Open Issues 196 * F Changes 197 * G Author Addresses 198 * H Acknowledgements 199 * References 201 1 Introduction 203 1.1 Purpose 205 The Real-Time Streaming Protocol (RTSP) establishes and controls 206 either a single or several time-synchronized streams of continuous 207 media such as audio and video. It does not typically deliver the 208 continuous streams itself, although interleaving of the continuous 209 media stream with the control stream is possible (see Section 10.12). 210 In other words, RTSP acts as a ``network remote control'' for 211 multimedia servers. 213 The set of streams to be controlled is defined by a presentation 214 description. This memorandum does not define a format for a 215 presentation description. 217 There is no notion of an RTSP connection; instead, a server maintains 218 a session labeled by an identifier. An RTSP session is in no way tied 219 to a transport-level connection such as a TCP connection. During an 220 RTSP session, an RTSP client may open and close many reliable 221 transport connections to the server to issue RTSP requests. 222 Alternatively, it may use a connectionless transport protocol such as 223 UDP. 225 The streams controlled by RTSP may use RTP [1], but the operation of 226 RTSP does not depend on the transport mechanism used to carry 227 continuous media. 229 The protocol is intentionally similar in syntax and operation to 230 HTTP/1.1, so that extension mechanisms to HTTP can in most cases also 231 be added to RTSP. However, RTSP differs in a number of important 232 aspects from HTTP: 234 H. Schulzrinne, A. Rao, R. Lanphier Page 5 235 * RTSP introduces a number of new methods and has a different 236 protocol identifier. 237 * An RTSP server needs to maintain state by default in almost all 238 cases, as opposed to the stateless nature of HTTP. 239 * Both an RTSP server and client can issue requests. 240 * Data is carried out-of-band, by a different protocol. (There is an 241 exception to this.) 242 * RTSP is defined to use ISO 10646 (UTF-8) rather than ISO 8859-1, 243 consistent with current HTML internationalization efforts [3]. 244 * The Request-URI always contains the absolute URI. Because of 245 backward compatibility with a historical blunder, HTTP/1.1 carries 246 only the absolute path in the request and puts the host name in a 247 separate header field. 249 This makes ``virtual hosting'' easier, where a single host with one 250 IP address hosts several document trees. 252 The protocol supports the following operations: 254 Retrieval of media from media server: 255 The client can request a presentation description via HTTP or 256 some other method. If the presentation is being multicast, the 257 presentation description contains the multicast addresses and 258 ports to be used for the continuous media. If the presentation 259 is to be sent only to the client via unicast, the client 260 provides the destination for security reasons. 262 Invitation of a media server to a conference: 263 A media server can be ``invited'' to join an existing 264 conference, either to play back media into the presentation or 265 to record all or a subset of the media in a presentation. This 266 mode is useful for distributed teaching applications. Several 267 parties in the conference may take turns ``pushing the remote 268 control buttons''. 270 Addition of media to an existing presentation: 271 Particularly for live presentations, it is useful if the server 272 can tell the client about additional media becoming available. 274 RTSP requests may be handled by proxies, tunnels and caches as in 275 HTTP/1.1. 277 H. Schulzrinne, A. Rao, R. Lanphier Page 6 278 1.2 Requirements 280 The key words ``MUST'', ``MUST NOT'', ``REQUIRED'', ``SHALL'', ``SHALL 281 NOT'', ``SHOULD'', ``SHOULD NOT'', ``RECOMMENDED'', ``MAY'', and 282 ``OPTIONAL'' in this document are to be interpreted as described in 283 RFC 2119 [4]. 285 1.3 Terminology 287 Some of the terminology has been adopted from HTTP/1.1 [5]. Terms not 288 listed here are defined as in HTTP/1.1. 290 Aggregate control: 291 The control of the multiple streams using a single timeline by 292 the server. For audio/video feeds, this means that the client 293 may issue a single play or pause message to control both the 294 audio and video feeds. 296 Conference: 297 a multiparty, multimedia presentation, where ``multi'' implies 298 greater than or equal to one. 300 Client: 301 The client requests continuous media data from the media 302 server. 304 Connection: 305 A transport layer virtual circuit established between two 306 programs for the purpose of communication. 308 Continuous media: 309 Data where there is a timing relationship between source and 310 sink, that is, the sink must reproduce the timing relationshop 311 that existed at the source. The most common examples of 312 continuous media are audio and motion video. Continuous media 313 can be realtime (interactive), where there is a ``tight'' 314 timing relationship between source and sink, or streaming 315 (playback), where the relationship is less strict. 317 Media initialization: 318 Datatype/codec specific initialization. This includes such 319 things as clockrates, color tables, etc. Any 320 transport-independent information which is required by a client 321 for playback of a media stream occurs in the media 322 initialization phase of stream setup. 324 H. Schulzrinne, A. Rao, R. Lanphier Page 7 325 Media parameter: 326 Parameter specific to a media type that may be changed while 327 the stream is being played or prior to it. 329 Media server: 330 The network entity providing playback or recording services for 331 one or more media streams. Different media streams within a 332 presentation may originate from different media servers. A 333 media server may reside on the same or a different host as the 334 web server the presentation is invoked from. 336 Media server indirection: 337 Redirection of a media client to a different media server. 339 (Media) stream: 340 A single media instance, e.g., an audio stream or a video 341 stream as well as a single whiteboard or shared application 342 group. When using RTP, a stream consists of all RTP and RTCP 343 packets created by a source within an RTP session. This is 344 equivalent to the definition of a DSM-CC stream([19]). 346 Message: 347 The basic unit of RTSP communication, consisting of a 348 structured sequence of octets matching the syntax defined in 349 Section 15 and transmitted via a connection or a connectionless 350 protocol. 352 Participant: 353 Participants are members of conferences. A participant may be a 354 machine, e.g., a media record or playback server. 356 Presentation: 357 A set of one or more streams presented to the client as a 358 complete media feed, using a presentation description as 359 defined below. In most cases in the RTSP context, this implies 360 aggregate control of those streams, but doesn't have to. 362 Presentation description: 363 A presentation description contains information about one or 364 more media streams within a presentation, such as the set of 365 encodings, network addresses and information about the content. 366 Other IETF protocols such as SDP [6] use the term ``session'' 367 for a live presentation. The presentation description may take 368 several different formats, including but not limited to the 369 session description format SDP. 371 H. Schulzrinne, A. Rao, R. Lanphier Page 8 372 Response: 373 An RTSP response. If an HTTP response is meant, that is 374 indicated explicitly. 376 Request: 377 An RTSP request. If an HTTP request is meant, that is indicated 378 explicitly. 380 RTSP session: 381 A complete RTSP ``transaction'', e.g., the viewing of a movie. 382 A session typically consists of a client setting up a transport 383 mechanism for the continuous media stream (SETUP), starting the 384 stream with PLAY or RECORD and closing the stream with 385 TEARDOWN. 387 Transport initialization: 388 The negotiation of transport information (i.e. port numbers, 389 transport protocols, etc) between the client and the server. 391 1.4 Protocol Properties 393 RTSP has the following properties: 395 Extendable: 396 New methods and parameters can be easily added to RTSP. 398 Easy to parse: 399 RTSP can be parsed by standard HTTP or MIME parsers. 401 Secure: 402 RTSP re-uses web security mechanisms, either at the transport 403 level (TLS [7]) or within the protocol itself. All HTTP 404 authentication mechanisms such as basic [5, Section 11.1] and 405 digest authentication [8] are directly applicable. 407 Transport-independent: 408 RTSP may use either an unreliable datagram protocol (UDP) [9], 409 a reliable datagram protocol (RDP, not widely used [10]) or a 410 reliable stream protocol such as TCP [11] as it implements 411 application-level reliability. 413 Multi-server capable: 414 Each media stream within a presentation can reside on a 415 different server. The client automatically establishes several 416 concurrent control sessions with the different media servers. 417 Media synchronization is performed at the transport level. 419 H. Schulzrinne, A. Rao, R. Lanphier Page 9 420 Control of recording devices: 421 The protocol can control both recording and playback devices, 422 as well as devices that can alternate between the two modes 423 (``VCR''). 425 Separation of stream control and conference initiation: 426 Stream control is divorced from inviting a media server to a 427 conference. The only requirement is that the conference 428 initiation protocol either provides or can be used to create a 429 unique conference identifier. In particular, SIP [12] or H.323 430 may be used to invite a server to a conference. 432 Suitable for professional applications: 433 RTSP supports frame-level accuracy through SMPTE time stamps to 434 allow remote digital editing. 436 Presentation description neutral: 437 The protocol does not impose a particular presentation 438 description or metafile format and can convey the type of 439 format to be used. However, the presentation description must 440 contain at least one RTSP URI. 442 Proxy and firewall friendly: 443 The protocol should be readily handled by both application and 444 transport-layer (SOCKS [13]) firewalls. A firewall may need to 445 understand the SETUP method to open a ``hole'' for the UDP 446 media stream. 448 HTTP-friendly: 449 Where sensible, RTSP re-uses HTTP concepts, so that the 450 existing infrastructure can be re-used. This infrastructure 451 includes PICS (Platform for Internet Content Selection [21]) 452 for associating labels with content. However, RTSP does not 453 just add methods to HTTP, since the controlling continuous 454 media requires server state in most cases. 456 Appropriate server control: 457 If a client can start a stream, it must be able to stop a 458 stream. Servers should not start streaming to clients in such a 459 way that clients cannot stop the stream. 461 Transport negotiation: 462 The client can negotiate the transport method prior to actually 463 needing to process a continuous media stream. 465 Capability negotiation: 466 If basic features are disabled, there must be some clean 467 mechanism for the client to determine which methods are not 468 going to be implemented. This allows clients to present the 469 appropriate user interface. For example, if seeking is not 470 allowed, the user interface must be able to disallow moving a 471 sliding position indicator. 473 An earlier requirement in RTSP was multi-client capability. 474 However, it was determined that a better approach was to make sure 475 that the protocol is easily extensible to the multi-client 476 scenario. Stream identifiers can be used by several control 477 streams, so that ``passing the remote'' would be possible. The 478 protocol would not address how several clients negotiate access; 479 this is left to either a ``social protocol'' or some other floor 480 control mechanism. 482 1.5 Extending RTSP 484 Since not all media servers have the same functionality, media servers 485 by necessity will support different sets of requests. For example: 486 * A server may only be capable of playback, not recording and thus 487 has no need to support the RECORD request. 488 * A server may not be capable of seeking (absolute positioning), 489 say, if it is to support live events only. 490 * Some servers may not support setting stream parameters and thus 491 not support GET_PARAMETER and SET_PARAMETER. 493 A server SHOULD implement all header fields described in Section 12. 495 It is up to the creators of presentation descriptions not to ask the 496 impossible of a server. This situation is similar in HTTP/1.1, where 497 the methods described in [H19.6] are not likely to be supported across 498 all servers. 500 RTSP can be extended in three ways, listed in order of the magnitude 501 of changes supported: 503 * Existing methods can be extended with new parameters, as long as 504 these parameters can be safely ignored by the recipient. (This is 505 equivalent to adding new parameters to an HTML tag.) If the client 506 needs negative acknowledgement when a method extension is not 507 supported, a tag corresponding to the extension may be added in 508 the Require: field (see Section 12.32). 509 * New methods can be added. If the recipient of the message does not 510 understand the request, it responds with error code 501 (Not 511 implemented) and the sender should not attempt to use this method 512 again. A client may also use the OPTIONS method to inquire about 513 methods supported by the server. The server SHOULD list the 514 methods it supports using the Public response header. 515 * A new version of the protocol can be defined, allowing almost all 516 aspects (except the position of the protocol version number) to 517 change. 519 1.6 Overall Operation 521 Each presentation and media stream may be identified by an RTSP URL. 522 The overall presentation and the properties of the media the 523 presentation is made up of are defined by a presentation description 524 file, the format of which is outside the scope of this specification. 525 The presentation description file may be obtained by the client using 526 HTTP or other means such as email and may not necessarily be stored on 527 the media server. 529 For the purposes of this specification, a presentation description is 530 assumed to describe one or more presentations, each of which maintains 531 a common time axis. For simplicity of exposition and without loss of 532 generality, it is assumed that the presentation description contains 533 exactly one such presentation. A presentation may contain several 534 media streams. 536 The presentation description file contains a description of the media 537 streams making up the presentation, including their encodings, 538 language, and other parameters that enable the client to choose the 539 most appropriate combination of media. In this presentation 540 description, each media stream that is individually controllable by 541 RTSP is identified by an RTSP URL, which points to the media server 542 handling that particular media stream and names the stream stored on 543 that server. Several media streams can be located on different 544 servers; for example, audio and video streams can be split across 545 servers for load sharing. The description also enumerates which 546 transport methods the server is capable of. 548 Besides the media parameters, the network destination address and port 549 need to be determined. Several modes of operation can be 550 distinguished: 552 Unicast: 553 The media is transmitted to the source of the RTSP request, 554 with the port number chosen by the client. Alternatively, the 555 media is transmitted on the same reliable stream as RTSP. 557 Multicast, server chooses address: 558 The media server picks the multicast address and port. This is 559 the typical case for a live or near-media-on-demand 560 transmission. 562 Multicast, client chooses address: 563 If the server is to participate in an existing multicast 564 conference, the multicast address, port and encryption key are 565 given by the conference description, established by means 566 outside the scope of this specification. 568 1.7 RTSP States 570 RTSP controls a stream which may be sent via a separate protocol, 571 independent of the control channel. For example, RTSP control may 572 occur on a TCP connection while the data flows via UDP. Thus, data 573 delivery continues even if no RTSP requests are received by the media 574 server. Also, during its lifetime, a single media stream may be 575 controlled by RTSP requests issued sequentially on different TCP 576 connections. Therefore, the server needs to maintain ``session state'' 577 to be able to correlate RTSP requests with a stream. The state 578 transitions are described in Section A. 580 Many methods in RTSP do not contribute to state. However, the 581 following play a central role in defining the allocation and usage of 582 stream resources on the server: SETUP, PLAY, RECORD, PAUSE, and 583 TEARDOWN. 585 SETUP: 586 Causes the server to allocate resources for a stream and start 587 an RTSP session. 589 PLAY and RECORD: 590 Starts data transmission on a stream allocated via SETUP. 592 PAUSE: 593 Temporarily halts a stream, without freeing server resources. 595 TEARDOWN: 596 Frees resources associated with the stream. The RTSP session 597 ceases to exist on the server. 599 1.8 Relationship with Other Protocols 601 RTSP has some overlap in functionality with HTTP. It also may interact 602 with HTTP in that the initial contact with streaming content is often 603 to be made through a web page. The current protocol specification aims 604 to allow different hand-off points between a web server and the media 605 server implementing RTSP. For example, the presentation description 606 can be retrieved using HTTP or RTSP. Having the presentation 607 description be returned by the web server makes it possible to have 608 the web server take care of authentication and billing, by handing out 609 a presentation description whose media identifier includes an 610 encrypted version of the requestor's IP address and a timestamp, with 611 a shared secret between web and media server. 613 However, RTSP differs fundamentally from HTTP in that data delivery 614 takes place out-of-band, in a different protocol. HTTP is an 615 asymmetric protocol, where the client issues requests and the server 616 responds. In RTSP, both the media client and media server can issue 617 requests. RTSP requests are also not stateless, in that they may set 618 parameters and continue to control a media stream long after the 619 request has been acknowledged. 621 Re-using HTTP functionality has advantages in at least two areas, 622 namely security and proxies. The requirements are very similar, so 623 having the ability to adopt HTTP work on caches, proxies and 624 authentication is valuable. 626 While most real-time media will use RTP as a transport protocol, RTSP 627 is not tied to RTP. 629 RTSP assumes the existence of a presentation description format that 630 can express both static and temporal properties of a presentation 631 containing several media streams. 633 2 Notational Conventions 635 Since many of the definitions and syntax are identical to HTTP/1.1, 636 this specification only points to the section where they are defined 637 rather than copying it. For brevity, [HX.Y] is to be taken to refer to 638 Section X.Y of the current HTTP/1.1 specification (RFC 2068). 640 All the mechanisms specified in this document are described in both 641 prose and an augmented Backus-Naur form (BNF) similar to that used in 642 RFC 2068 [H2.1]. It is described in detail in [14]. 644 In this draft, we use indented and smaller-type paragraphs to provide 645 background and motivation. Some of these paragraphs are marked with 646 HS, AR and RL, designating opinions and comments by the individual 647 authors which may not be shared by the co-authors and require 648 resolution. 650 3 Protocol Parameters 652 3.1 RTSP Version 654 [H3.1] applies, with HTTP replaced by RTSP. 656 3.2 RTSP URL 658 The ``rtsp'', ``rtspu'' and ``rtsps'' schemes are used to refer to 659 network resources via the RTSP protocol. This section defines the 660 scheme-specific syntax and semantics for RTSP URLs. 662 rtsp_URL = ( "rtsp:" | "rtspu:" | "rtsps:" ) 663 "//" host [ ":" port ] [abs_path] 664 host = 667 port = *DIGIT 669 abs_path is defined in [H3.2.1]. 671 Note that fragment and query identifiers do not have a well-defined 672 meaning at this time, with the interpretation left to the RTSP 673 server. 675 The scheme rtsp requires that commands are issued via a reliable 676 protocol (within the Internet, TCP), while the scheme rtspu identifies 677 an unreliable protocol (within the Internet, UDP). The scheme rtsps 678 indicates that a TCP connection secured by TLS [7] must be used. 680 If the port is empty or not given, port 554 is assumed. The semantics 681 are that the identified resource can be controlled be RTSP at the 682 server listening for TCP (scheme ``rtsp'') connections or UDP (scheme 683 ``rtspu'') packets on that port of host, and the Request-URI for the 684 resource is rtsp_URL. 686 The use of IP addresses in URLs SHOULD be avoided whenever possible 687 (see RFC 1924 [15]). 689 A presentation or a stream is identified by an textual media 690 identifier, using the character set and escape conventions [H3.2] of 691 URLs [17]. URLs may refer to a stream or an aggregate of streams ie. a 692 presentation. Accordingly, requests described in Section 10 can apply 693 to either the whole presentation or an individual stream within the 694 presentation. Note that some request methods can only be applied to 695 streams, not presentations and vice versa. 697 For example, the RTSP URL 698 rtsp://media.example.com:554/twister/audiotrack 700 identifies the audio stream within the presentation ``twister'', which 701 can be controlled via RTSP requests issued over a TCP connection to 702 port 554 of host media.example.com. 704 Also, the RTSP URL 705 rtsp://media.example.com:554/twister 707 identifies the presentation ``twister'', which may be composed of 708 audio and video streams. 710 This does not imply a standard way to reference streams in URLs. 711 The presentation description defines the hierarchical relationships 712 in the presentation and the URLs for the individual streams. A 713 presentation description may name a stream 'a.mov' and the whole 714 presentation 'b.mov'. 716 The path components of the RTSP URL are opaque to the client and do 717 not imply any particular file system structure for the server. 719 This decoupling also allows presentation descriptions to be used 720 with non-RTSP media control protocols, simply by replacing the 721 scheme in the URL. 723 3.3 Conference Identifiers 725 Conference identifiers are opaque to RTSP and are encoded using 726 standard URI encoding methods (i.e., LWS is escaped with %). They can 727 contain any octet value. The conference identifier MUST be globally 728 unique. For H.323, the conferenceID value is to be used. 730 conference-id = 1*OCTET ; LWS must be URL-escaped 732 Conference identifiers are used to allow to allow RTSP sessions to 733 obtain parameters from multimedia conferences the media server is 734 participating in. These conferences are created by protocols 735 outside the scope of this specification, e.g., H.323 [18] or SIP 736 [12]. Instead of the RTSP client explicitly providing transport 737 information, for example, it asks the media server to use the 738 values in the conference description instead. If the conference 739 participant inviting the media server would only supply a 740 conference identifier which is unique for that inviting party, the 741 media server could add an internal identifier for that party, e.g., 742 its Internet address. However, this would prevent that the 743 conference participant and the initiator of the RTSP commands are 744 two different entities. 746 3.4 Session Identifiers 748 Session identifiers are opaque strings of arbitrary length. Linear 749 white space must be URL-escaped. A session identifier SHOULD be chosen 750 randomly and SHOULD be at least eight octets long to make guessing it 751 more difficult. (See Section 16). 753 session-id = 1*OCTET ; LWS must be URL-escaped 755 3.5 SMPTE Relative Timestamps 757 A SMPTE relative time-stamp expresses time relative to the start of 758 the clip. Relative timestamps are expressed as SMPTE time codes for 759 frame-level access accuracy. The time code has the format 760 hours:minutes:seconds:frames.subframes, with the origin at the start 761 of the clip. RTSP uses the ``SMPTE 30 drop'' format. The frame rate is 762 29.97 frames per second. The ``frames'' field in the time value can 763 assume the values 0 through 29. The difference between 30 and 29.97 764 frames per second is handled by dropping the first two frame indices 765 (values 00 and 01) of every minute, except every tenth minute. If the 766 frame value is zero, it may be omitted. Subframes are measured in 767 one-hundredth of a frame. 769 smpte-range = "smpte" "=" smpte-time "-" [ smpte-time ] 770 smpte-time = 2DIGIT ":" 2DIGIT ":" 2DIGIT [ ":" 2DIGIT ] [ "." 2DIGIT] 772 Examples: 773 smpte=10:12:33:20- 774 smpte=10:07:33- 775 smpte=10:07:00-10:07:33:05.01 777 3.6 Normal Play Time 779 Normal play time (NPT) indicates the stream absolute position relative 780 to the beginning of the presentation. The timestamp consists is a 781 decimal fraction. The part left of the decimal may be expressed in 782 either seconds or hours, minutes and seconds. The part right of the 783 decimal point measures fractions of a second. 785 The beginning of a presentation corresponds to 0.0 seconds. Negative 786 values are not defined. The special constant now is defined as the 787 current instant of a live event. It may be used only for live events. 789 NPT is defined as in DSM-CC: ``Intuitively, NPT is the clock the 790 viewer associates with a program. It is often digitally displayed on a 791 VCR. NPT advances normally when in normal play mode (scale = 1), 792 advances at a faster rate when in fast scan forward (high positive 793 scale ratio), decrements when in scan reverse (high negative scale 794 ratio) and is fixed in pause mode. NPT is (logically) equivalent to 795 SMPTE time codes.'' [19] 797 npt-time = "now" | npt-sec | npt-hhmmss 798 npt-sec = 1*DIGIT [ "." *DIGIT ] 799 npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT] 800 npt-hh = 1*DIGIT ; any positive number 801 npt-mm = 2DIGIT ; 00-59 802 npt-ss = 2DIGIT ; 00-59 804 Examples: 805 npt=123.45-125 806 npt=12:05:35.3 807 npt=now 809 The syntax conforms to ISO 8601. The npt-sec notation is optimized 810 for automatic generation, the ntp-hhmmss notation for consumption 811 by human readers. The ``now'' constant allows clients to request to 812 receive the live feed rather than the stored or time-delayed 813 version. This is needed since neither absolute time, nor zero time 814 are appropriate for this case. 816 3.7 Absolute Time 818 Absolute time is expressed as ISO 8601 timestamps, using UTC (GMT). 819 Fractions of a second may be indicated. 821 utc-range = "clock" "=" utc-time "-" [ utc-time ] 822 utc-time = utc-date "T" utc-time "Z" 823 utc-date = 8DIGIT ; < YYYYMMDD > 824 utc-time = 6DIGIT [ "." fraction ] ; < HHMMSS.fraction > 826 Example for November 8, 1996 at 14h37 and 20 and a quarter seconds 827 UTC: 829 19961108T143720.25Z 831 4 RTSP Message 833 RTSP is a text-based protocol and uses the ISO 10646 character set 834 in UTF-8 encoding (RFC 2044). Lines are terminated by CRLF, but 835 receivers should be prepared to also interpret CR and LF by themselves 836 as line terminators. 838 Text-based protocols make it easier to add optional parameters in a 839 self-describing manner. Since the number of parameters and the 840 frequency of commands is low, processing efficiency is not a 841 concern. Text-based protocols, if done carefully, also allow easy 842 implementation of research prototypes in scripting languages such 843 as Tcl, Visual Basic and Perl. 845 The 10646 character set avoids tricky character set switching, but 846 is invisible to the application as long as US-ASCII is being used. 847 This is also the encoding used for RTCP. ISO 8859-1 translates 848 directly into Unicode, with a high-order octet of zero. ISO 8859-1 849 characters with the most-significant bit set are represented as 850 1100001x 10xxxxxx. 852 RTSP messages can be carried over any lower-layer transport protocol 853 that is 8-bit clean. 855 Requests contain methods, the object the method is operating upon and 856 parameters to further describe the method. Methods are idempotent, 857 unless otherwise noted. Methods are also designed to require little or 858 no state maintenance at the media server. 860 4.1 Message Types 862 See [H4.1] 864 4.2 Message Headers 866 See [H4.2] 868 4.3 Message Body 870 See [H4.3] 872 4.4 Message Length 874 When a message-body is included with a message, the length of that 875 body is determined by one of the following (in order of precedence): 877 1. Any response message which MUST NOT include a message-body 878 (such as the 1xx, 204, and 304 responses) is always terminated 879 by the first empty line after the header fields, regardless of 880 the entity-header fields present in the message. (Note: An 881 empty line consists of only CRLF.) 882 2. If a Content-Length header field (section 12.14) is present, 883 its value in bytes represents the length of the message-body. 884 If this header field is not present, a value of zero is 885 assumed. 886 3. By the server closing the connection. (Closing the connection 887 cannot be used to indicate the end of a request body, since 888 that would leave no possibility for the server to send back a 889 response.) 891 Note that RTSP does not (at present) support the HTTP/1.1 ``chunked'' 892 transfer coding(see [H3.6]) and requires the presence of the 893 Content-Length header field. 895 Given the moderate length of presentation descriptions returned, 896 the server should always be able to determine its length, even if 897 it is generated dynamically, making the chunked transfer encoding 898 unnecessary. Even though Content-Length must be present if there is 899 any entity body, the rules ensure reasonable behavior even if the 900 length is not given explicitly. 902 5 General Header Fields 904 See [H4.5], except that Pragma, Transfer-Encoding and Upgrade 905 headers are not defined: 907 general-header = Cache-Control ; Section 12.8 908 | Connection ; Section 12.10 909 | Date ; Section 12.18 910 | Via ; Section 12.43 912 6 Request 914 A request message from a client to a server or vice versa includes, 915 within the first line of that message, the method to be applied to the 916 resource, the identifier of the resource, and the protocol version in 917 use. 919 Request = Request-Line ; Section 6.1 920 *( general-header ; Section 5 921 | request-header ; Section 6.2 922 | entity-header ) ; Section 8.1 923 CRLF 924 [ message-body ] ; Section 4.3 926 6.1 Request Line 928 Request-Line = Method SP Request-URI SP RTSP-Version CRLF 930 Method = "DESCRIBE" ; Section 10.2 931 | "ANNOUNCE" ; Section 10.3 932 | "GET_PARAMETER" ; Section 10.8 933 | "OPTIONS" ; Section 10.1 934 | "PAUSE" ; Section 10.6 935 | "PLAY" ; Section 10.5 936 | "RECORD" ; Section 10.11 937 | "REDIRECT" ; Section 10.10 938 | "SETUP" ; Section 10.4 939 | "SET_PARAMETER" ; Section 10.9 940 | "TEARDOWN" ; Section 10.7 941 | extension-method 943 extension-method = token 945 Request-URI = "*" | absolute_URI 947 RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT 949 6.2 Request Header Fields 951 request-header = Accept ; Section 12.1 952 | Accept-Encoding ; Section 12.2 953 | Accept-Language ; Section 12.3 954 | Authorization ; Section 12.5 955 | From ; Section 12.20 956 | If-Modified-Since ; Section 12.23 957 | Range ; Section 12.29 958 | Referer ; Section 12.30 959 | User-Agent ; Section 12.41 961 Note that in contrast to HTTP/1.1, RTSP requests always contain the 962 absolute URL (that is, including the scheme, host and port) rather 963 than just the absolute path. 965 HTTP/1.1 requires servers to understand the absolute URL, but 966 clients are supposed to use the Host request header. This is purely 967 needed for backward-compatibility with HTTP/1.0 servers, a 968 consideration that does not apply to RTSP. 970 The asterisk "*" in the Request-URI means that the request does not 971 apply to a particular resource, but to the server itself, and is only 972 allowed when the method used does not necessarily apply to a resource. 973 One example would be 975 OPTIONS * RTSP/1.0 977 7 Response 979 [H6] applies except that HTTP-Version is replaced by RTSP-Version. 980 Also, RTSP defines additional status codes and does not define some 981 HTTP codes. The valid response codes and the methods they can be used 982 with are defined in the table 1. 984 After receiving and interpreting a request message, the recipient 985 responds with an RTSP response message. 987 Response = Status-Line ; Section 7.1 988 *( general-header ; Section 5 989 | response-header ; Section 7.1.2 990 | entity-header ) ; Section 8.1 991 CRLF 992 [ message-body ] ; Section 4.3 994 7.1 Status-Line 996 The first line of a Response message is the Status-Line, consisting of 997 the protocol version followed by a numeric status code, and the 998 textual phrase associated with the status code, with each element 999 separated by SP characters. No CR or LF is allowed except in the final 1000 CRLF sequence. 1002 Status-Line = RTSP-Version SP Status-Code SP Reason-Phrase CRLF 1004 7.1.1 Status Code and Reason Phrase 1006 The Status-Code element is a 3-digit integer result code of the 1007 attempt to understand and satisfy the request. These codes are fully 1008 defined in section11. The Reason-Phrase is intended to give a short 1009 textual description of the Status-Code. The Status-Code is intended 1010 for use by automata and the Reason-Phrase is intended for the human 1011 user. The client is not required to examine or display the 1012 Reason-Phrase. 1014 The first digit of the Status-Code defines the class of response. The 1015 last two digits do not have any categorization role. There are 5 1016 values for the first digit: 1018 * 1xx: Informational - Request received, continuing process 1019 * 2xx: Success - The action was successfully received, understood, 1020 and accepted 1021 * 3xx: Redirection - Further action must be taken in order to 1022 complete the request 1023 * 4xx: Client Error - The request contains bad syntax or cannot be 1024 fulfilled 1025 * 5xx: Server Error - The server failed to fulfill an apparently 1026 valid request 1028 The individual values of the numeric status codes defined for 1029 RTSP/1.0, and an example set of corresponding Reason-Phrase's, are 1030 presented below. The reason phrases listed here are only recommended - 1031 they may be replaced by local equivalents without affecting the 1032 protocol. Note that RTSP adopts most HTTP/1.1 status codes and adds 1033 RTSP-specific status codes in the starting at 450 to avoid conflicts 1034 with newly defined HTTP status codes. 1036 Status-Code = "100" ; Continue 1037 | "200" ; OK 1038 | "201" ; Created 1039 | "300" ; Multiple Choices 1040 | "301" ; Moved Permanently 1041 | "302" ; Moved Temporarily 1042 | "303" ; See Other 1043 | "304" ; Not Modified 1044 | "305" ; Use Proxy 1045 | "400" ; Bad Request 1046 | "401" ; Unauthorized 1047 | "402" ; Payment Required 1048 | "403" ; Forbidden 1049 | "404" ; Not Found 1050 | "405" ; Method Not Allowed 1051 | "406" ; Not Acceptable 1052 | "407" ; Proxy Authentication Required 1053 | "408" ; Request Time-out 1054 | "409" ; Conflict 1055 | "410" ; Gone 1056 | "411" ; Length Required 1057 | "412" ; Precondition Failed 1058 | "413" ; Request Entity Too Large 1059 | "414" ; Request-URI Too Large 1060 | "415" ; Unsupported Media Type 1061 | "451" ; Parameter Not Understood 1062 | "452" ; Conference Not Found 1063 | "453" ; Not Enough Bandwidth 1064 | "454" ; Session Not Found 1065 | "455" ; Method Not Valid in This State 1066 | "456" ; Header Field Not Valid for Resource 1067 | "457" ; Invalid Range 1068 | "458" ; Parameter Is Read-Only 1069 | "459" ; Aggregate operation not allowed 1070 | "460" ; Only aggregate operation allowed 1071 | "500" ; Internal Server Error 1072 | "501" ; Not Implemented 1073 | "502" ; Bad Gateway 1074 | "503" ; Service Unavailable 1075 | "504" ; Gateway Time-out 1076 | "505" ; RTSP Version not supported 1077 | extension-code 1078 extension-code = 3DIGIT 1080 Reason-Phrase = * 1082 RTSP status codes are extensible. RTSP applications are not required 1083 to understand the meaning of all registered status codes, though such 1084 understanding is obviously desirable. However, applications MUST 1085 understand the class of any status code, as indicated by the first 1086 digit, and treat any unrecognized response as being equivalent to the 1087 x00 status code of that class, with the exception that an unrecognized 1088 response MUST NOT be cached. For example, if an unrecognized status 1089 code of 431 is received by the client, it can safely assume that there 1090 was something wrong with its request and treat the response as if it 1091 had received a 400 status code. In such cases, user agents SHOULD 1092 present to the user the entity returned with the response, since that 1093 entity is likely to include human-readable information which will 1094 explain the unusual status. 1096 Code reason 1098 100 Continue all 1100 200 OK all 1101 201 Created RECORD 1103 300 Multiple Choices all 1104 301 Moved Permanently all 1105 302 Moved Temporarily all 1106 303 See Other all 1107 305 Use Proxy all 1108 400 Bad Request all 1109 401 Unauthorized all 1110 402 Payment Required all 1111 403 Forbidden all 1112 404 Not Found all 1113 405 Method Not Allowed all 1114 406 Not Acceptable all 1115 407 Proxy Authentication Required all 1116 408 Request Timeout all 1117 409 Conflict RECORD 1118 410 Gone all 1119 411 Length Required SETUP 1120 412 Precondition Failed DESCRIBE, SETUP 1121 413 Request Entity Too Large SETUP 1122 414 Request-URI Too Long all 1123 415 Unsupported Media Type SETUP 1124 451 Invalid parameter SETUP 1125 452 Illegal Conference Identifier SETUP 1126 453 Not Enough Bandwidth SETUP 1127 454 Session not found all 1128 455 Method Not Valid In This State all 1129 456 Header Field Not Valid all 1130 457 Invalid Range PLAY 1131 458 Parameter Is Read-Only SET_PARAMETER 1132 459 Aggregate operation not allowed all 1133 460 Only aggregate operation allowed all 1135 500 Internal Server Error all 1136 501 Not Implemented all 1137 502 Bad Gateway all 1138 503 Service Unavailable all 1139 504 Gateway Timeout all 1140 505 RTSP Version Not Supported all 1142 Status codes and their usage with RTSP methods 1144 7.1.2 Response Header Fields 1146 The response-header fields allow the request recipient to pass 1147 additional information about the response which cannot be placed in 1148 the Status-Line. These header fields give information about the server 1149 and about further access to the resource identified by the 1150 Request-URI. 1152 response-header = Location ; Section 12.25 1153 | Proxy-Authenticate ; Section 12.26 1154 | Public ; Section 12.28 1155 | Retry-After ; Section 12.31 1156 | Server ; Section 12.36 1157 | Vary ; Section 12.42 1158 | WWW-Authenticate ; Section 12.44 1160 Response-header field names can be extended reliably only in 1161 combination with a change in the protocol version. However, new or 1162 experimental header fields MAY be given the semantics of 1163 response-header fields if all parties in the communication recognize 1164 them to be response-header fields. Unrecognized header fields are 1165 treated as entity-header fields. 1167 8 Entity 1169 Request and Response messages MAY transfer an entity if not 1170 otherwise restricted by the request method or response status code. An 1171 entity consists of entity-header fields and an entity-body, although 1172 some responses will only include the entity-headers. 1174 In this section, both sender and recipient refer to either the client 1175 or the server, depending on who sends and who receives the entity. 1177 8.1 Entity Header Fields 1179 Entity-header fields define optional metainformation about the 1180 entity-body or, if no body is present, about the resource identified 1181 by the request. 1183 entity-header = Allow ; Section 12.4 1184 | Content-Base ; Section 12.11 1185 | Content-Encoding ; Section 12.12 1186 | Content-Language ; Section 12.13 1187 | Content-Length ; Section 12.14 1188 | Content-Location ; Section 12.15 1189 | Content-Type ; Section 12.16 1190 | Expires ; Section 12.19 1191 | Last-Modified ; Section 12.24 1192 | extension-header 1193 extension-header = message-header 1195 The extension-header mechanism allows additional entity-header fields 1196 to be defined without changing the protocol, but these fields cannot 1197 be assumed to be recognizable by the recipient. Unrecognized header 1198 fields SHOULD be ignored by the recipient and forwarded by proxies. 1200 8.2 Entity Body 1202 See [H7.2] 1204 9 Connections 1206 RTSP requests can be transmitted in several different ways: 1208 * persistent transport connections used for several request-response 1209 transactions; 1210 * one connection per request/response transaction; 1211 * connectionless mode. 1213 The type of transport connection is defined by the RTSP URI 1214 (Section 3.2). For the scheme ``rtsp'', a persistent connection is 1215 assumed, while the scheme ``rtspu'' calls for RTSP requests to be send 1216 without setting up a connection. 1218 Unlike HTTP, RTSP allows the media server to send requests to the 1219 media client. However, this is only supported for persistent 1220 connections, as the media server otherwise has no reliable way of 1221 reaching the client. Also, this is the only way that requests from 1222 media server to client are likely to traverse firewalls. 1224 9.1 Pipelining 1226 A client that supports persistent connections or connectionless mode 1227 MAY ``pipeline'' its requests (i.e., send multiple requests without 1228 waiting for each response). A server MUST send its responses to those 1229 requests in the same order that the requests were received. 1231 9.2 Reliability and Acknowledgements 1233 Requests are acknowledged by the receiver unless they are sent to a 1234 multicast group. If there is no acknowledgement, the sender may resend 1235 the same message after a timeout of one round-trip time (RTT). The 1236 round-trip time is estimated as in TCP (RFC TBD), with an initial 1237 round-trip value of 500 ms. An implementation MAY cache the last RTT 1238 measurement as the initial value for future connections. If a reliable 1239 transport protocol is used to carry RTSP, the timeout value MAY be set 1240 to an arbitrarily large value. 1242 This can greatly increase responsiveness for proxies operating in 1243 local-area networks with small RTTs. The mechanism is defined such 1244 that the client implementation does not have be aware of whether a 1245 reliable or unreliable transport protocol is being used. It is 1246 probably a bad idea to have two reliability mechanisms on top of 1247 each other, although the RTSP RTT estimate is likely to be larger 1248 than the TCP estimate. 1250 Each request carries a sequence number, which is incremented by one 1251 for each request transmitted. If a request is repeated because of lack 1252 of acknowledgement, the sequence number is incremented. 1254 This avoids ambiguities when computing round-trip time estimates. 1256 The reliability mechanism described here does not protect against 1257 reordering. This may cause problems in some instances. For example, a 1258 TEARDOWN followed by a PLAY has quite a different effect than the 1259 reverse. Similarly, if a PLAY request arrives before all parameters 1260 are set due to reordering, the media server would have to issue an 1261 error indication. Since sequence numbers for retransmissions are 1262 incremented (to allow easy RTT estimation), the receiver cannot just 1263 ignore out-of-order packets. [TBD: This problem could be fixed by 1264 including both a sequence number that stays the same for 1265 retransmissions and a timestamp for RTT estimation.] 1267 Systems implementing RTSP MUST support carrying RTSP over TCP and MAY 1268 support UDP. The default port for the RTSP server is 554 for both UDP 1269 and TCP. 1271 A number of RTSP packets destined for the same control end point may 1272 be packed into a single lower-layer PDU or encapsulated into a TCP 1273 stream. RTSP data MAY be interleaved with RTP and RTCP packets. Unlike 1274 HTTP, an RTSP message MUST contain a Content-Length header whenever 1275 that message contains a payload. Otherwise, an RTSP packet is 1276 terminated with an empty line immediately following the last message 1277 header. 1279 10 Method Definitions 1281 The method token indicates the method to be performed on the 1282 resource identified by the Request-URI. The method is case-sensitive. 1283 New methods may be defined in the future. Method names may not start 1284 with a $ character (decimal 24) and must be a token. Methods are 1285 summarized in Table 2. 1287 method direction object requirement 1288 DESCRIBE C->S P,S recommended 1289 ANNOUNCE C->S, S->C P,S optional 1290 GET_PARAMETER C->S, S->C P,S optional 1291 OPTIONS C->S P,S required 1292 PAUSE C->S P,S recommended 1293 PLAY C->S P,S required 1294 RECORD C->S P,S optional 1295 REDIRECT S->C P,S optional 1296 SETUP C->S S required 1297 SET_PARAMETER C->S, S->C P,S optional 1298 TEARDOWN C->S P,S required 1300 Overview of RTSP methods, their direction, and what objects (P: 1301 presentation, S: stream) they operate on 1303 Notes on Table 2: PAUSE is recommended, but not required in that a 1304 fully functional server can be built that does not support this 1305 method, for example, for live feeds. If a server does not support a 1306 particular method, it MUST return "501 Not Implemented" and a client 1307 SHOULD not try this method again for this server. 1309 10.1 OPTIONS 1311 The behavior is equivalent to that described in [H9.2]. An OPTIONS 1312 request may be issued at any time, e.g., if the client is about to try 1313 a non-standard request. It does not influence server state. 1315 Example : 1316 C->S: OPTIONS * RTSP/1.0 1317 CSeq: 1 1318 Require: implicit-play 1319 Proxy-Require: gzipped-messages 1321 S->C: RTSP/1.0 200 OK 1322 CSeq: 1 1323 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE 1324 Note that these are necessarily fictional features (one would hope 1325 that we would not purposefully overlook a truly useful feature just so 1326 that we could have a strong example in this section). 1328 DESCRIBE 1330 The DESCRIBE method retrieves the description of a presentation or 1331 media object identified by the request URL from a server. It may use 1332 the Accept header to specify the description formats that the client 1333 understands. The server responds with a description of the requested 1334 resource. 1336 The DESCRIBE reply-response pair constitutes the media initialization 1337 phase of RTSP. 1339 Example: 1341 C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 1342 CSeq: 312 1343 Accept: application/sdp, application/rtsl, application/mheg 1345 S->C: RTSP/1.0 200 OK 1346 CSeq: 312 1347 Date: 23 Jan 1997 15:35:06 GMT 1348 Content-Type: application/sdp 1349 Content-Length: 376 1351 v=0 1352 o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 1353 s=SDP Seminar 1354 i=A Seminar on the session description protocol 1355 u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps 1356 e=mjh@isi.edu (Mark Handley) 1357 c=IN IP4 224.2.17.12/127 1358 t=2873397496 2873404696 1359 a=recvonly 1360 m=audio 3456 RTP/AVP 0 1361 m=video 2232 RTP/AVP 31 1362 m=whiteboard 32416 UDP WB 1363 a=orient:portrait 1364 The DESCRIBE response MUST contain all media initialization 1365 information for the resource(s) that it describes. If a media client 1366 obtains a presentation description from a source other than DESCRIBE 1367 and that description contains a complete set of media initialization 1368 parameters, the client SHOULD use those parameters and not then 1369 request a description for the same media via RTSP. 1371 Additionally, servers SHOULD NOT use the DESCRIBE response as a means 1372 of media indirection. 1374 Clear ground rules need to be established so that clients have an 1375 unambiguous means of knowing when to request media initialization 1376 information via DESCRIBE, and when not to. By forcing a DESCRIBE 1377 response to contain all media initialization for the set of streams 1378 that it describes, and discouraging use of DESCRIBE for media 1379 indirection, we avoid looping problems that might result from other 1380 approaches. 1382 ANNOUNCE 1384 The ANNOUNCE method serves two purposes: 1386 When sent from client to server, ANNOUNCE posts the description of a 1387 presentation or media object identified by the request URL to a 1388 server. When sent from server to client, ANNOUNCE updates the session 1389 description in real-time. 1391 If a new media stream is added to a presentation (e.g., during a live 1392 presentation), the whole presentation description should be sent 1393 again, rather than just the additional components, so that components 1394 can be deleted. 1396 Example: 1398 C->S: ANNOUNCE rtsp://server.example.com/fizzle/foo RTSP/1.0 1399 CSeq: 312 1400 Date: 23 Jan 1997 15:35:06 GMT 1401 Session: 4711 1402 Content-Type: application/sdp 1403 Content-Length: 332 1405 v=0 1406 o=mhandley 2890844526 2890845468 IN IP4 126.16.64.4 1407 s=SDP Seminar 1408 i=A Seminar on the session description protocol 1409 u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps 1410 e=mjh@isi.edu (Mark Handley) 1411 c=IN IP4 224.2.17.12/127 1412 t=2873397496 2873404696 1413 a=recvonly 1414 m=audio 3456 RTP/AVP 0 1415 m=video 2232 RTP/AVP 31 1417 S->C: RTSP/1.0 200 OK 1418 CSeq: 312 1420 SETUP 1422 The SETUP request for a URI specifies the transport mechanism to be 1423 used for the streamed media. A client can issue a SETUP request for a 1424 stream that is already playing to change transport parameters, which a 1425 server MAY allow(If it does not allow it, it must respond with error 1426 ``455 Method not valid in this state'' ). For the benefit of any 1427 intervening firewalls, a client must indicate the transport parameters 1428 even if it has no influence over these parameters, for example, where 1429 the server advertises a fixed multicast address. 1431 Segregating content desciption into a DESCRIBE message and 1432 transport information in SETUP avoids having firewall to parse 1433 numerous different presentation description formats for information 1434 which is irrelevant to transport. 1436 The Transport header specifies the transport parameters acceptable to 1437 the client for data transmission; the response will contain the 1438 transport parameters selected by the server. 1440 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0 1441 CSeq: 302 1442 Transport: RTP/AVP;port=4588 1444 S->C: RTSP/1.0 200 OK 1445 CSeq: 302 1446 Date: 23 Jan 1997 15:35:06 GMT 1447 Transport: RTP/AVP;port=4588 1449 PLAY 1451 The PLAY method tells the server to start sending data via the 1452 mechanism specified in SETUP. A client MUST NOT issue a PLAY request 1453 until any outstanding SETUP requests have been acknowledged as 1454 successful. 1456 The PLAY request positions the normal play time to the beginning of 1457 the range specified and delivers stream data until the end of the 1458 range is reached. PLAY requests may be pipelined (queued); a server 1459 MUST queue PLAY requests to be executed in order. That is, a PLAY 1460 request arriving while a previous PLAY request is still active is 1461 delayed until the first has been completed. 1463 This allows precise editing. 1465 For example, regardless of how closely spaced the two PLAY commands in 1466 the example below arrive, the server will play first second 10 through 1467 15 and then, immediately following, seconds 20 to 25 and finally 1468 seconds 30 through the end. 1470 C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 1471 CSeq: 835 1472 Range: npt=10-15 1474 C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 1475 CSeq: 836 1476 Range: npt=20-25 1478 C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 1479 CSeq: 837 1480 Range: npt=30- 1481 See the description of the PAUSE request for further examples. 1483 A PLAY request without a Range header is legal. It starts playing a 1484 stream from the beginning unless the stream has been paused. If a 1485 stream has been paused via PAUSE, stream delivery resumes at the pause 1486 point. If a stream is playing, such a PLAY request causes no further 1487 action and can be used by the client to test server liveness. 1489 The Range header may also contain a time parameter. This parameter 1490 specifies a time in UTC at which the playback should start. If the 1491 message is received after the specified time, playback is started 1492 immediately. The time parameter may be used to aid in synchronisation 1493 of streams obtained from different sources. 1495 For a on-demand stream, the server replies back with the actual range 1496 that will be played back. This may differ from the requested range if 1497 alignment of the requested range to valid frame boundaries is required 1498 for the media source. If no range is specified in the request, the 1499 current position is returned in the reply. The unit of the range in 1500 the reply is the same as that in the request. 1502 After playing the desired range, the presentation is automatically 1503 paused, as if a PAUSE request had been issued. 1505 The following example plays the whole presentation starting at SMPTE 1506 time code 0:10:20 until the end of the clip. The playback is to start 1507 at 15:36 on 23 Jan 1997. 1509 C->S: PLAY rtsp://audio.example.com/twister.en RTSP/1.0 1510 CSeq: 833 1511 Range: smpte=0:10:20-;time=19970123T153600Z 1513 S->C: RTSP/1.0 200 OK 1514 CSeq: 833 1515 Date: 23 Jan 1997 15:35:06 GMT 1516 Range: smpte=0:10:22-;time=19970123T153600Z 1518 For playing back a recording of a live presentation, it may be 1519 desirable to use clock units: 1521 C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/1.0 1522 CSeq: 835 1523 Range: clock=19961108T142300Z-19961108T143520Z 1525 S->C: RTSP/1.0 200 OK 1526 CSeq: 835 1527 Date: 23 Jan 1997 15:35:06 GMT 1529 A media server only supporting playback MUST support the npt format 1530 and MAY support the clock and smpte formats. 1532 PAUSE 1534 The PAUSE request causes the stream delivery to be interrupted 1535 (halted) temporarily. If the request URL names a stream, only playback 1536 and recording of that stream is halted. For example, for audio, this 1537 is equivalent to muting. If the request URL names a presentation or 1538 group of streams, delivery of all currently active streams within the 1539 presentation or group is halted. After resuming playback or recording, 1540 synchronization of the tracks MUST be maintained. Any server resources 1541 are kept. 1543 The PAUSE request may contain a Range header specifying when the 1544 stream or presentation is to be halted. The header must contain 1545 exactly one value rather than a time range. The normal play time for 1546 the stream is set to that value. The pause request becomes effective 1547 the first time the server is encountering the time point specified. If 1548 this header is missing, stream delivery is interrupted immediately on 1549 receipt of the message. 1551 For example, if the server has play requests for ranges 10 to 15 and 1552 20 to 29 pending and then receives a pause request for NPT 21, it 1553 would start playing the second range and stop at NPT 21. If the pause 1554 request is for NPT 12 and the server is playing at NPT 13 serving the 1555 first play request, it stops immediately. If the pause request is for 1556 NPT 16, it stops after completing the first play request and discards 1557 the second play request. 1559 As another example, if a server has received requests to play ranges 1560 10 to 15 and then 13 to 20, that is, overlapping ranges, the PAUSE 1561 request for NPT=14 would take effect while playing the first range, 1562 with the second PLAY request effectively being ignored, assuming the 1563 PAUSE request arrives before the server has started playing the 1564 second, overlapping range. Regardless of when the PAUSE request 1565 arrives, it sets the NPT to 14. 1567 If the server has already sent data beyond the time specified in the 1568 Range header, a PLAY would still resume at that point in time, as it 1569 is assumed that the client has discarded data after that point. This 1570 ensures continuous pause/play cycling without gaps. 1572 Example: 1574 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 1575 CSeq: 834 1576 Session: 1234 1578 S->C: RTSP/1.0 200 OK 1579 CSeq: 834 1580 Date: 23 Jan 1997 15:35:06 GMT 1582 TEARDOWN 1584 Stop the stream delivery for the given URI, freeing the resources 1585 associated with it. If the URI is the presentation URI for this 1586 presentation, any RTSP session identifier associated with the session 1587 is no longer valid. Unless all transport parameters are defined by the 1588 session description, a SETUP request has to be issued before the 1589 session can be played again. 1591 Example: 1593 C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0 1594 CSeq: 892 1595 Session: 1234 1597 S->C: RTSP/1.0 200 OK 1598 CSeq: 892 1600 GET_PARAMETER 1602 The requests retrieves the value of a parameter of a presentation or 1603 stream specified in the URI. Multiple parameters can be requested in 1604 the message body using the content type text/rtsp-parameters. Note 1605 that parameters include server and client statistics. IANA registers 1606 parameter names for statistics and other purposes. GET_PARAMETER with 1607 no entity body may be used to test client or server liveness 1608 (``ping''). 1610 Example: 1612 S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 1613 CSeq: 431 1614 Content-Type: text/rtsp-parameters 1615 Session: 1234 1616 Content-Length: 15 1618 packets_received 1619 jitter 1621 C->S: RTSP/1.0 200 OK 1622 CSeq: 431 1623 Content-Length: 46 1624 Content-Type: text/rtsp-parameters 1626 packets_received: 10 1627 jitter: 0.3838 1629 SET_PARAMETER 1631 This method requests to set the value of a parameter for a 1632 presentation or stream specified by the URI. 1634 A request SHOULD only contain a single parameter to allow the client 1635 to determine why a particular request failed. A server MUST allow a 1636 parameter to be set repeatedly to the same value, but it MAY disallow 1637 changing parameter values. 1639 Note: transport parameters for the media stream MUST only be set with 1640 the SETUP command. 1642 Restricting setting transport parameters to SETUP is for the 1643 benefit of firewalls. 1645 The parameters are split in a fine-grained fashion so that there 1646 can be more meaningful error indications. However, it may make 1647 sense to allow the setting of several parameters if an atomic 1648 setting is desirable. Imagine device control where the client does 1649 not want the camera to pan unless it can also tilt to the right 1650 angle at the same time. 1652 A SET_PARAMETER request without parameters can be used as a way to 1653 detect client or server liveness. 1655 Example: 1657 C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 1658 CSeq: 421 1659 Content-type: text/rtsp-parameters 1661 barparam: barstuff 1663 S->C: RTSP/1.0 450 Invalid Parameter 1664 CSeq: 421 1665 Content-Length: 6 1667 barparam 1669 REDIRECT 1671 A redirect request informs the client that it must connect to 1672 another server location. It contains the mandatory header Location, 1673 which indicates that the client should issue requests for that URL. It 1674 may contain the parameter Range, which indicates when the redirection 1675 takes effect. 1677 This example request redirects traffic for this URI to the new server 1678 at the given play time: 1680 S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/1.0 1681 CSeq: 732 1682 Location: rtsp://bigserver.com:8001 1683 Range: clock=19960213T143205Z- 1685 RECORD 1687 This method initiates recording a range of media data according to 1688 the presentation description. The timestamp reflects start and end 1689 time (UTC). If no time range is given, use the start or end time 1690 provided in the presentation description. If the session has already 1691 started, commence recording immediately. 1693 The server decides whether to store the recorded data under the 1694 request-URI or another URI. If the server does not use the 1695 request-URI, the response SHOULD be 201 (Created) and contain an 1696 entity which describes the status of the request and refers to the new 1697 resource, and a Location header. 1699 A media server supporting recording of live presentations MUST support 1700 the clock range format; the smpte format does not make sense. 1702 In this example, the media server was previously invited to the 1703 conference indicated. 1705 C->S: RECORD rtsp://example.com/meeting/audio.en RTSP/1.0 1706 CSeq: 954 1707 Session: 1234 1708 Conference: 128.16.64.19/32492374 1710 10.12 Embedded (Interleaved) Binary Data 1712 Certain firewall designs and other circumstances may force a server 1713 to interleave RTSP methods and stream data. This interleaving should 1714 generally be avoided unless necessary since it complicates client and 1715 server operation and imposes additional overhead. Interleaved binary 1716 data SHOULD only be used if RTSP is carried over TCP. 1718 Stream data such as RTP packets is encapsulated by an ASCII dollar 1719 sign (24 decimal), followed by a one-byte channel identifier, followed 1720 by the length of the encapsulated binary data as a binary, two-byte 1721 integer in network byte order. The stream data follows immediately 1722 afterwards, without a CRLF, but including the upper-layer protocol 1723 headers. Each $ block contains exactly one upper-layer protocol data 1724 unit, e.g., one RTP packet. 1726 The channel identifier is defined in the Transport header with the 1727 interleaved parameter 12.39. 1729 C->S: SETUP rtsp://foo.com/bar.file RTSP/1.0 1730 CSeq: 2 1731 Transport: RTP/AVP/TCP;interleaved=0 1733 S->C: RTSP/1.0 200 OK 1734 CSeq: 2 1735 Date: 05 Jun 1997 18:57:18 GMT 1736 Transport: RTP/AVP/TCP;interleaved=0 1737 Session: 12345 1739 C->S: PLAY rtsp://foo.com/bar.file RTSP/1.0 1740 CSeq: 3 1741 Session: 12345 1743 S->C: RTSP/1.0 200 OK 1744 CSeq: 3 1745 Session: 12345 1746 Date: 05 Jun 1997 18:59:15 GMT 1748 S->C: $\000{2 byte length}{"length" bytes data, w/RTP header} 1749 S->C: $\000{2 byte length}{"length" bytes data, w/RTP header} 1751 11 Status Code Definitions 1753 Where applicable, HTTP status [H10] codes are re-used. Status codes 1754 that have the same meaning are not repeated here. See Table 1 for a 1755 listing of which status codes may be returned by which request. 1757 11.1 Redirection 3xx 1759 See [H10.3]. 1761 Within RTSP, redirection may be used for load balancing or redirecting 1762 stream requests to a server topologically closer to the client. 1763 Mechanisms to determine topological proximity are beyond the scope of 1764 this specification. 1766 11.2 Client Error 4xx 1768 11.2.1 405 Method Not Allowed 1770 The method specified in the request is not allowed for the resource 1771 identified by the request URI. The response MUST include an Allow 1772 header containing a list of valid methods for the requested resource. 1773 This status code is also to be used if a request attempts to use a 1774 method not indicated during SETUP, e.g., if a RECORD request is issued 1775 even though the mode parameter in the Transport header only specified 1776 PLAY. 1778 11.2.2 451 Parameter Not Understood 1780 The recipient of the request does not support one or more parameters 1781 contained in the request. 1783 11.2.3 452 Conference Not Found 1785 The conference indicated by a Conference header field is unknown to 1786 the media server. 1788 11.2.4 453 Not Enough Bandwidth 1790 The request was refused since there was insufficient bandwidth. This 1791 may, for example, be the result of a resource reservation failure. 1793 11.2.5 454 Session Not Found 1795 The RTSP session identifier is invalid or has timed out. 1797 11.2.6 455 Method Not Valid in This State 1799 The client or server cannot process this request in its current state. 1801 11.2.7 456 Header Field Not Valid for Resource 1803 The server could not act on a required request header. For example, if 1804 PLAY contains the Range header field, but the stream does not allow 1805 seeking. 1807 11.2.8 457 Invalid Range 1809 The Range value given is out of bounds, e.g., beyond the end of the 1810 presentation. 1812 11.2.9 458 Parameter Is Read-Only 1814 The parameter to be set by SET_PARAMETER can only be read, but not 1815 modified. 1817 11.2.10 459 Aggregate operation not allowed 1819 The requested method may not be applied on the URL in question since 1820 it is an aggregate(presentation) URL. The method may be applied on a 1821 stream URL. 1823 11.2.11 460 Only aggregate operation allowed 1825 The requested method may not be applied on the URL in question since 1826 it is not an aggregate(presentation) URL. The method may be applied on 1827 the presentation URL. 1829 12 Header Field Definitions 1831 HTTP/1.1 or other, non-standard header fields not listed here 1832 currently have no well-defined meaning and SHOULD be ignored by the 1833 recipient. 1835 Tables 3 summarizes the header fields used by RTSP. Type ``g'' 1836 designates general request headers, to be found in both requests and 1837 responses, type ``R'' designates request headers, type ``r'' response 1838 headers, type ``e'' entity header fields. Fields marked with ``req.'' 1839 in the column labeled ``support'' MUST be implemented by the recipient 1840 for a particular method, while fields marked ``opt.'' are optional. 1841 Note that not all fields marked 'r' will be send in every request of 1842 this type; merely, that client (for response headers) and server (for 1843 request headers) MUST implement them. The last column lists the method 1844 for which this header field is meaningful; the designation ``entity'' 1845 refers to all methods that return a message body. Within this 1846 specification, DESCRIBE and GET_PARAMETER fall into this class. 1848 If the field content does not apply to the particular resource, the 1849 server MUST return status 456 (Header Field Not Valid for Resource). 1851 Header type support methods 1852 Accept R opt. entity 1853 Accept-Encoding R opt. entity 1854 Accept-Language R opt. all 1855 Authorization R opt. all 1856 Bandwidth R opt. all 1857 Blocksize R opt. all but OPTIONS, TEARDOWN 1858 Cache-Control g opt. SETUP 1859 Conference R opt. SETUP 1860 Connection g req. all 1861 Content-Base e opt. entity 1862 Content-Encoding e req. SET_PARAMETER 1863 Content-Encoding e req. DESCRIBE, ANNOUNCE 1864 Content-Language e req. DESCRIBE, ANNOUNCE 1865 Content-Length e req. SET_PARAMETER, ANNOUNCE 1866 Content-Length e req. entity 1867 Content-Location e opt. entity 1868 Content-Type e req. SET_PARAMETER, ANNOUNCE 1869 Content-Type r req. entity 1870 CSeq g req. all 1871 Date g opt. all 1872 Expires e opt. DESCRIBE, ANNOUNCE 1873 From R opt. all 1874 If-Modified-Since R opt. DESCRIBE, SETUP 1875 Last-Modified e opt. entity 1876 Proxy-Authenticate 1877 Proxy-Require R req. all 1878 Public r opt. all 1879 Range R opt. PLAY, PAUSE, RECORD 1880 Range r opt. PLAY, PAUSE, RECORD 1881 Referer R opt. all 1882 Require R req. all 1883 Retry-After r opt. all 1884 RTP-Info r req. PLAY 1885 Scale Rr opt. PLAY, RECORD 1886 Session Rr req. all but SETUP, OPTIONS 1887 Server r opt. all 1888 Speed Rr opt. PLAY 1889 Transport Rr req. SETUP 1890 Unsupported r req. all 1891 User-Agent R opt. all 1892 Via g opt. all 1893 WWW-Authenticate r opt. all 1894 Overview of RTSP header fields 1896 12.1 Accept 1898 The Accept request-header field can be used to specify certain 1899 presentation description content types which are acceptable for the 1900 response. 1902 The ``level'' parameter for presentation descriptions is properly 1903 defined as part of the MIME type registration, not here. 1905 See [H14.1] for syntax. 1907 Example of use: 1908 Accept: application/rtsl, application/sdp;level=2 1910 12.2 Accept-Encoding 1912 See [H14.3] 1914 12.3 Accept-Language 1916 See [H14.4]. Note that the language specified applies to the 1917 presentation description and any reason phrases, not the media 1918 content. 1920 12.4 Allow 1922 The Allow response header field lists the methods supported by the 1923 resource identified by the request-URI. The purpose of this field is 1924 to strictly inform the recipient of valid methods associated with the 1925 resource. An Allow header field must be present in a 405 (Method not 1926 allowed) response. 1928 Example of use: 1929 Allow: SETUP, PLAY, RECORD, SET_PARAMETER 1931 12.5 Authorization 1933 See [H14.8] 1935 12.6 Bandwidth 1937 The Bandwidth request header field describes the estimated bandwidth 1938 available to the client, expressed as a positive integer and measured 1939 in bits per second. The bandwidth available to the client may change 1940 during an RTSP session, e.g., due to modem retraining. 1942 Bandwidth = "Bandwidth" ":" 1*DIGIT 1944 Example: 1945 Bandwidth: 4000 1947 12.7 Blocksize 1949 This request header field is sent from the client to the media 1950 server asking the server for a particular media packet size. This 1951 packet size does not include lower-layer headers such as IP, UDP, or 1952 RTP. The server is free to use a blocksize which is lower than the one 1953 requested. The server MAY truncate this packet size to the closest 1954 multiple of the minimum media-specific block size or override it with 1955 the media specific size if necessary. The block size is a strictly 1956 positive decimal number and measured in octets. The server only 1957 returns an error (416) if the value is syntactically invalid. 1959 12.8 Cache-Control 1961 The Cache-Control general header field is used to specify directives 1962 that MUST be obeyed by all caching mechanisms along the 1963 request/response chain. 1965 Cache directives must be passed through by a proxy or gateway 1966 application, regardless of their significance to that application, 1967 since the directives may be applicable to all recipients along the 1968 request/response chain. It is not possible to specify a cache- 1969 directive for a specific cache. 1971 Cache-Control should only be specified in a SETUP request and its 1972 response. Note: Cache-Control does not govern the caching of responses 1973 as for HTTP, but rather of the stream identified by the SETUP request. 1974 Responses to RTSP requests are not cacheable, except for responses to 1975 DESCRIBE. 1977 Cache-Control = "Cache-Control" ":" 1#cache-directive 1979 cache-directive = cache-request-directive 1980 | cache-response-directive 1982 cache-request-directive = 1983 "no-cache" 1984 | "max-stale" 1985 | "min-fresh" 1986 | "only-if-cached" 1987 | cache-extension 1989 cache-response-directive = 1990 "public" 1991 | "private" 1992 | "no-cache" 1993 | "no-transform" 1994 | "must-revalidate" 1995 | "proxy-revalidate" 1996 | "max-age" "=" delta-seconds 1997 | cache-extension 1999 cache-extension = token [ "=" ( token | quoted-string ) ] 2001 no-cache: 2002 Indicates that the media stream MUST NOT be cached anywhere. 2003 This allows an origin server to prevent caching even by caches 2004 that have been configured to return stale responses to client 2005 requests. 2007 public: 2008 Indicates that the media stream is cachable by any cache. 2010 private: 2011 Indicates that the media stream is intended for a single user 2012 and MUST NOT be cached by a shared cache. A private 2013 (non-shared) cache may cache the media stream. 2015 no-transform: 2016 An intermediate cache (proxy) may find it useful to convert the 2017 media type of certain stream. A proxy might, for example, 2018 convert between video formats to save cache space or to reduce 2019 the amount of traffic on a slow link. Serious operational 2020 problems may occur, however, when these transformations have 2021 been applied to streams intended for certain kinds of 2022 applications. For example, applications for medical imaging, 2023 scientific data analysis and those using end-to-end 2024 authentication, all depend on receiving a stream that is bit 2025 for bit identical to the original entity-body. Therefore, if a 2026 response includes the no-transform directive, an intermediate 2027 cache or proxy MUST NOT change the encoding of the stream. 2028 Unlike HTTP, RTSP does not provide for partial transformation 2029 at this point, e.g., allowing translation into a different 2030 language. 2032 only-if-cached: 2033 In some cases, such as times of extremely poor network 2034 connectivity, a client may want a cache to return only those 2035 media streams that it currently has stored, and not to receive 2036 these from the origin server. To do this, the client may 2037 include the only-if-cached directive in a request. If it 2038 receives this directive, a cache SHOULD either respond using a 2039 cached media stream that is consistent with the other 2040 constraints of the request, or respond with a 504 (Gateway 2041 Timeout) status. However, if a group of caches is being 2042 operated as a unified system with good internal connectivity, 2043 such a request MAY be forwarded within that group of caches. 2045 max-stale: 2046 Indicates that the client is willing to accept a media stream 2047 that has exceeded its expiration time. If max-stale is assigned 2048 a value, then the client is willing to accept a response that 2049 has exceeded its expiration time by no more than the specified 2050 number of seconds. If no value is assigned to max-stale, then 2051 the client is willing to accept a stale response of any age. 2053 min-fresh: 2054 Indicates that the client is willing to accept a media stream 2055 whose freshness lifetime is no less than its current age plus 2056 the specified time in seconds. That is, the client wants a 2057 response that will still be fresh for at least the specified 2058 number of seconds. 2060 must-revalidate: 2061 When the must-revalidate directive is present in a SETUP 2062 response received by a cache, that cache MUST NOT use the entry 2063 after it becomes stale to respond to a subsequent request 2064 without first revalidating it with the origin server. (I.e., 2065 the cache must do an end-to-end revalidation every time, if, 2066 based solely on the origin server's Expires, the cached 2067 response is stale.) 2069 12.9 Conference 2071 This request header field establishes a logical connection between a 2072 conference, established using non-RTSP means, and an RTSP stream. The 2073 conference-id must not be changed for the same RTSP session. 2075 Conference = "Conference" ":" conference-id 2077 Example: 2078 Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr 2080 A response code of 452 (452 Conference Not Found) is returned if the 2081 conference-id is not valid. 2083 12.10 Connection 2085 See [H14.10]. 2087 TBD: Connection: timeout= 2089 12.11 Content-Base 2091 See [H14.11] 2093 12.12 Content-Encoding 2095 See [H14.12] 2097 12.13 Content-Language 2099 See [H14.13] 2101 12.14 Content-Length 2103 This field contains the length of the content of the method (i.e. 2104 after the double CRLF following the last header). Unlike HTTP, it MUST 2105 be included in all messages that carry content beyond the header 2106 portion of the message. It is interpreted according to [H14.14]. 2108 12.15 Content-Location 2110 See [H14.15] 2112 12.16 Content-Type 2114 See [H14.18]. Note that the content types suitable for RTSP are 2115 likely to be restricted in practice to presentation descriptions and 2116 parameter-value types. 2118 12.17 CSeq 2120 This field is a mandatory field that specifies the sequence number 2121 for an RTSP request-response pair. For every RTSP request containing 2122 the given sequence number, there will be a corresponding response 2123 having the same number. 2125 12.18 Date 2127 See [H14.19]. 2129 12.19 Expires 2131 The Expires entity-header field gives a date and time after which 2132 the description or media-stream should be considered stale. 2134 The interpretation depends on the method: 2136 DESCRIBE response: 2137 The Expires header indicates a date and time after which the 2138 description should be considered stale. 2140 A stale cache entry may not normally be returned by a cache (either a 2141 proxy cache or an user agent cache) unless it is first validated with 2142 the origin server (or with an intermediate cache that has a fresh copy 2143 of the entity). See section 13 for further discussion of the 2144 expiration model. 2146 The presence of an Expires field does not imply that the original 2147 resource will change or cease to exist at, before, or after that time. 2149 The format is an absolute date and time as defined by HTTP-date in 2150 [H3.3]; it MUST be in RFC1123-date format: 2152 Expires = "Expires" ":" HTTP-date 2154 An example of its use is 2156 Expires: Thu, 01 Dec 1994 16:00:00 GMT 2158 RTSP/1.0 clients and caches MUST treat other invalid date formats, 2159 especially including the value "0", as in the past (i.e., ``already 2160 expired''). 2162 To mark a response as ``already expired,'' an origin server should use 2163 an Expires date that is equal to the Date header value. To mark a 2164 response as ``never expires,'' an origin server should use an Expires 2165 date approximately one year from the time the response is sent. 2166 RTSP/1.0 servers should not send Expires dates more than one year in 2167 the future. 2169 The presence of an Expires header field with a date value of some time 2170 in the future on a media stream that otherwise would by default be 2171 non-cacheable indicates that the media stream is cachable, unless 2172 indicated otherwise by a Cache-Control header field (Section 12.8). 2174 12.20 From 2176 See [H14.22]. 2178 12.21 Host 2180 This HTTP request header field is not needed for RTSP. It should be 2181 silently ignored if sent. 2183 12.22 If-Match 2185 See [H14.25]. 2187 This field is especially useful for ensuring the integrity of the 2188 presentation description, in both the case where it is fetched via 2189 means external to RTSP (such as HTTP), or in the case where the server 2190 implementation is guaranteeing the integrety of the description 2191 between the time of the DESCRIBE message and the SETUP message. 2193 The identifier is an opaque identifier, and thus is not specific to 2194 any particular session description language. 2196 12.23 If-Modified-Since 2198 The If-Modified-Since request-header field is used with the DESCRIBE 2199 and SETUP methods to make them conditional: if the requested variant 2200 has not been modified since the time specified in this field, a 2201 description will not be returned from the server (DESCRIBE) or a 2202 stream will not be setup (SETUP); instead, a 304 (not modified) 2203 response will be returned without any message-body. 2205 If-Modified-Since = "If-Modified-Since" ":" HTTP-date 2207 An example of the field is: 2209 If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT 2211 12.24 Last-Modified 2213 The Last-Modified entity-header field indicates the date and time at 2214 which the origin server believes the entity (presentation description 2215 or media stream) was last modified. See [H14.29]. For the methods 2216 DESCRIBE or ANNOUNCE, the header field indicates the last modification 2217 date and time of the description, for SETUP that of the media stream. 2219 12.25 Location 2221 See [H14.30]. 2223 12.26 Proxy-Authenticate 2225 See [H14.33]. 2227 12.27 Proxy-Require 2229 The Proxy-Require header is used to indicate proxy-sensitive 2230 features that MUST be stripped by the proxy to the server if not 2231 supported. Furthermore, any Proxy-Require header features that are not 2232 supported by the proxy MUST be negatively acknowledged by the proxy to 2233 the client if not supported. 2235 See Section 12.32 for more details on the mechanics of this message 2236 and a usage example. 2238 We explored using the W3C's PEP proposal [22] for this 2239 functionality. However, we determined that such a device was too 2240 complex for our needs. 2242 This field roughly corresponds to the C-PEP field in the PEP draft. 2244 12.28 Public 2246 See [H14.35]. 2248 12.29 Range 2250 This request and response header field specifies a range of time. 2251 The range can be specified in a number of units. This specification 2252 defines the smpte (see Section 3.5) and clock (see Section 3.7) range 2253 units. Within RTSP, byte ranges [H14.36.1] are not meaningful and MUST 2254 NOT be used. The header may also contain a time parameter in UTC, 2255 specifying the time at which the operation is to be made effective. 2256 Servers supporting the Range header MUST understand the NPT range 2257 format and SHOULD understand the SMPTE range format. The Range 2258 response header indicates what range of time is actually being played 2259 or recorded. 2261 Range = "Range" ":" 1#ranges-specifier [ ";" "time" "=" utc-time ] 2263 ranges-specifier = npt-range | utc-range | smpte-range 2265 Example: 2266 Range: clock=19960213T143205Z-;time=19970123T143720Z 2268 The notation is similar to that used for the HTTP/1.1 header. It 2269 allows to select a clip from the media object, to play from a given 2270 point to the end and from the current location to a given point. 2271 The start of playback can be scheduled for at any time in the 2272 future, although a server may refuse to keep server resources for 2273 extended idle periods. 2275 12.30 Referer 2277 See [H14.37]. The URL refers to that of the presentation 2278 description, typically retrieved via HTTP. 2280 12.31 Retry-After 2282 See [H14.38]. 2284 12.32 Require 2286 The Require header is used by clients to query the server about 2287 features that it may or may not support. The server MUST respond to 2288 this header by negatively acknowledging those features which are NOT 2289 supported in the Unsupported header. 2291 For example 2292 C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 2293 CSeq: 302 2294 Require: funky-feature 2295 Funky-Parameter: funkystuff 2297 S->C: RTSP/1.0 200 Option not supported 2298 CSeq: 302 2299 Unsupported: funky-feature 2301 C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 2302 CSeq: 303 2304 S->C: RTSP/1.0 200 OK 2305 CSeq: 303 2307 This is to make sure that the client-server interaction will proceed 2308 optimally when all options are understood by both sides, and only slow 2309 down if options aren't understood (as in the case above). For a 2310 well-matched client-server pair, the interaction proceeds quickly, 2311 saving a round-trip often required by negotiation mechanisms. In 2312 addition, it also removes state ambiguity when the client requires 2313 features that the server doesn't understand. 2315 We explored using the W3C's PEP proposal [22] for this 2316 functionality. However, we determined that such a device was too 2317 complex for our needs. 2319 This field roughly corresponds to the PEP field in the PEP draft. 2321 Proxies and other intermediary devices SHOULD ignore features that are 2322 not understood in this field. If a particular extension requires that 2323 intermediate devices support it, the extension should be tagged in the 2324 Proxy-Require field instead (see Section 3.4). 2326 12.33 RTP-Info 2328 This field is used to set RTP-specific parameters in the PLAY 2329 response. 2331 url: 2332 Indicates the stream URL which for which the following RTP 2333 parameters correspond. 2335 seq: 2336 Indicates the sequence number of the first packet of the 2337 stream. This allows clients to gracefully deal with packets 2338 when seeking. The client uses this value to differentiate 2339 packets that originated before the seek from packets that 2340 originated after the seek. 2342 rtptime: 2343 Indicates the RTP timestamp of the first packet of the stream. 2344 The client uses this value to calculate the mapping of RTP time 2345 to NPT. 2347 This information is also available in RTCP timestamps. However, in 2348 order to ensure that this information is available at the necessary 2349 time (immediately at startup or after a seek), and that it is 2350 delivered reliably, it is placed in the RTSP control channel as 2351 well. 2353 RTP-Info = "RTP-Info" ":" 2354 1#stream-url ";" 2355 *parameter 2356 stream-url = "url" "=" url 2357 parameter = ";" "seq" "=" sequence-number 2358 sequence-number = 1*16(DIGIT) 2360 Example: 2361 RTP-Info: url=rtsp://foo.com/bar.avi/streamid=0;seq=43754027, 2362 url=rtsp://foo.com/bar.avi/streamid=1;seq=34834738 2363 12.34 Scale 2365 A scale value of 1 indicates normal play or record at the normal 2366 forward viewing rate. If not 1, the value corresponds to the rate with 2367 respect to normal viewing rate. For example, a ratio of 2 indicates 2368 twice the normal viewing rate (``fast forward'') and a ratio of 0.5 2369 indicates half the normal viewing rate. In other words, a ratio of 2 2370 has normal play time increase at twice the wallclock rate. For every 2371 second of elapsed (wallclock) time, 2 seconds of content will be 2372 delivered. A negative value indicates reverse direction. 2374 Unless requested otherwise by the Speed parameter, the data rate 2375 SHOULD not be changed. Implementation of scale changes depends on the 2376 server and media type. For video, a server may, for example, deliver 2377 only key frames or selected key frames. For audio, it may time-scale 2378 the audio while preserving pitch or, less desirably, deliver fragments 2379 of audio. 2381 The server should try to approximate the viewing rate, but may 2382 restrict the range of scale values that it supports. The response MUST 2383 contain the actual scale value chosen by the server. 2385 If the request contains a Range parameter, the new scale value will 2386 take effect at that time. 2388 Scale = "Scale" ":" [ "-" ] 1*DIGIT [ "." *DIGIT ] 2390 Example of playing in reverse at 3.5 times normal rate: 2392 Scale: -3.5 2394 12.35 Speed 2396 This request header fields parameter requests the server to deliver 2397 data to the client at a particular speed, contingent on the server's 2398 ability and desire to serve the media stream at the given speed. 2399 Implementation by the server is OPTIONAL. The default is the bit rate 2400 of the stream. 2402 The parameter value is expressed as a decimal ratio, e.g., a value of 2403 2.0 indicates that data is to be delivered twice as fast as normal. A 2404 speed of zero is invalid. If the request contains a Range parameter, 2405 the new speed value will take effect at that time. 2407 Speed = "Speed" ":" 1*DIGIT [ "." *DIGIT ] 2409 Example: 2410 Speed: 2.5 2412 Use of this field changes the bandwidth used for data delivery. It is 2413 meant for use in specific circumstances where preview of the 2414 presentation at a higher or lower rate is necessary. Implementors 2415 should keep in mind that bandwidth for the session may be negotiated 2416 beforehand (by means other than RTSP), and therefore re-negotiation 2417 may be necessary. When data is delivered over UDP, it is highly 2418 recommended that means such as RTCP be used to track packet loss 2419 rates. 2421 12.36 Server 2423 See [H14.39] 2425 12.37 Session 2427 This request and response header field identifies an RTSP session, 2428 started by the media server in a SETUP response and concluded by 2429 TEARDOWN on the presentation URL. The session identifier is chosen by 2430 the media server (see Section 3.4). Once a client receives a Session 2431 identifier, it MUST return it for any request related to that session. 2433 A server does not have to set up a session identifier if it has other 2434 means of identifying a session, such as dynamically generated URLs. 2436 Session = "Session" ":" session-id [ ";" "timeout" "=" delta-seconds ] 2438 The timeout parameter is only allowed in a response header. The server 2439 uses it to indicate to the client how long the server is prepared to 2440 wait between RTSP commands before closing the session due to lack of 2441 activity (see Section A). The timeout is measured in seconds, with a 2442 default of 60 seconds (1 minute). 2444 Note that a session identifier identifies a RTSP session across 2445 transport sessions or connections. Control messages for more than one 2446 RTSP URL may be sent within a single RTSP session. Hence, it is 2447 possible that clients use the same session for controlling many 2448 streams comprising a presentation, as long as all the streams come 2449 from the same server. (See example in Section 14). However, multiple 2450 ``user'' sessions for the same URL from the same client MUST use 2451 different session identifiers. 2453 The session identifier is needed to distinguish several delivery 2454 requests for the same URL coming from the same client. 2456 The response 454 (Session Not Found) is returned if the session 2457 identifier is invalid. 2459 12.38 Timestamp 2461 The timestamp general header describes when the client sent the 2462 request to the server. The value of the timestamp is of significance 2463 only to the client and may use any timescale. The server MUST echo the 2464 exact same value and MAY, if it has accurate information about this, 2465 add a floating point number indicating the number of seconds that has 2466 elapsed since it has received the request. The timestamp is used by 2467 the client to compute the round-trip time to the server so that it can 2468 adjust the timeout value for retransmissions. 2470 Timestamp = "Timestamp" ":" *(DIGIT) [ "." *(DIGIT) ] 2471 [ delay ] 2472 delay = *(DIGIT) [ "." *(DIGIT) ] 2474 12.39 Transport 2476 This request header indicates which transport protocol is to be used 2477 and configures its parameters such as destination address, 2478 compression, multicast time-to-live and destination port for a single 2479 stream. It sets those values not already determined by a presentation 2480 description. 2482 Transports are comma separated, listed in order of preference. 2483 Parameters may be added to each tranpsort, separated by a semicolon. 2485 The Transport header MAY also be used to change certain transport 2486 parameters. A server MAY refuse to change parameters of an existing 2487 stream. 2489 The server MAY return a Transport response header in the response to 2490 indicate the values actually chosen. 2492 A Transport request header field may contain a list of transport 2493 options acceptable to the client. In that case, the server MUST return 2494 a single option which was actually chosen. 2496 The syntax for the transport specifier is 2498 transport/profile/lower-transport. 2500 The default value for the ``lower-transport'' parameters is specific 2501 to the profile. For RTP/AVP, the default is UDP. 2503 Below are the configuration parameters associated with transport: 2505 General parameters: 2507 unicast | multicast: 2508 Mutually exclusive indication of whether unicast or multicast 2509 delivery will be attempted. Default value is multicast. Clients 2510 that are capable of handling both unicast and multicast 2511 transmission MUST indicate such capability by including two 2512 full transport-specs with separate parameters for each. 2514 destination: 2515 The address to which a stream will be sent. The client may 2516 specify the multicast address with the destination parameter. A 2517 server SHOULD authenticate the client and SHOULD log such 2518 attempts before allowing the client to direct a media stream to 2519 an address not chosen by the server to avoid becoming the 2520 unwitting perpetrator of a remote-controlled denial-of-service 2521 attack. This is particularly important if RTSP commands are 2522 issued via UDP, but TCP cannot be relied upon as reliable means 2523 of client identification by itself. A server SHOULD not allow a 2524 client to direct media streams to an address that differs from 2525 the address commands are coming from. 2527 source: 2528 Unicast only. If the source address for the stream is different 2529 than can be derived from the RTSP endpoint address (the server 2530 in playback or the client in recording), the source MAY be 2531 specified. 2533 This information may also be available through SDP, however, since 2534 this is more a feature of transport than media initialization, the 2535 authoritative source for this information should be in the SETUP 2536 response. 2538 layers: 2539 The number of multicast layers to be used for this media 2540 stream. The layers are sent to consecutive addresses starting 2541 at the destination address. 2543 mode: 2544 The mode parameter indicates the methods to be supported for 2545 this session. Valid values are PLAY and RECORD. If not 2546 provided, the default is PLAY. For RECORD, the append flag 2547 indicates that the media data should be appended to the 2548 existing resource rather than overwriting it. If appending is 2549 requested and the server does not support this, it MUST refuse 2550 the request rather than overwrite the resouce identified by the 2551 URI. The append parameter is ignored if the mode parameter does 2552 not contain RECORD. 2554 interleaved: 2555 The interleaved parameter implies mixing the media stream with 2556 the control stream, in whatever protocol is being used by the 2557 control stream, using the mechanism defined in Section 10.12. 2558 The argument provides the the channel number to be used in the 2559 $ statement. 2561 Multicast specific: 2563 ttl: 2564 multicast time-to-live 2566 RTP Specific: 2568 compressed: 2569 Boolean parameter indicating compressed RTP according to RFC 2570 XXXX. 2572 port: 2573 the RTP/RTCP port pair for a multicast session. Specified as a 2574 range (e.g. port=3456-3457). 2576 client_port: 2577 the RTP/RTCP port pair on the server in the unicast model. 2578 Specified as a range (e.g. port=3456-3457). 2580 server_port: 2581 the RTP/RTCP port pair on the server in the unicast model. 2582 Specified as a range (e.g. port=3456-3457). 2584 ssrc: 2585 Indicates the RTP SSRC [20, Sec. 3] value that should be 2586 (request) or will be (response) used by the media server. This 2587 parameter is only valid for unicast transmission. It identifies 2588 the synchronization source to be associated with the media 2589 stream. 2591 Transport = "Transport" ":" 2592 1\#transport-spec 2593 transport-spec = transport-protocol/profile[/lower-transport] 2594 *parameter 2595 transport-protocol = "RTP" 2596 profile = "AVP" 2597 lower-transport = "TCP" | "UDP" 2598 parameter = ( "unicast" | "multicast" ) 2599 | ";" "destination" [ "=" address ] 2600 | ";" "compressed" 2601 | ";" "interleaved" "=" channel 2603 | ";" "append" 2604 | ";" "ttl" "=" ttl 2605 | ";" "layers" "=" 1*DIGIT 2606 | ";" "port" "=" port [ "-" port ] 2607 | ";" "client_port" "=" port [ "-" port ] 2608 | ";" "server_port" "=" port [ "-" port ] 2609 | ";" "ssrc" "=" ssrc 2610 | ";" "mode" = <"> 1\#mode <"> 2611 ttl = 1*3(DIGIT) 2612 port = 1*5(DIGIT) 2613 ssrc = 8*8(HEX) 2614 channel = 1*3(DIGIT) 2615 address = host 2616 mode = "PLAY" | "RECORD" *parameter 2618 Example: 2619 Transport: RTP/AVP;multicast;compressed;ttl=127;mode="PLAY", 2620 RTP/AVP;unicast;compressed;client_port=3456-3457;mode="PLAY" 2622 The Transport header is restricted to describing a single RTP 2623 stream. (RTSP can also control multiple streams as a single 2624 entity.) Making it part of RTSP rather than relying on a multitude 2625 of session description formats greatly simplifies designs of 2626 firewalls. 2628 12.40 Unsupported 2630 Negative acknowledgement of features not supported by the server. In 2631 the case where the feature was specified via the Proxy-Require: field 2632 (Section 12.32), if there is a proxy on the path between the client 2633 and the server, the proxy MUST insert a message reply with an error 2634 message 506 (Feature not supported). 2636 We explored using the W3C's PEP proposal [22] for this 2637 functionality. However, we determined that such a device was too 2638 complex for our needs. 2640 This field roughly corresponds to the PEP-Info and C-PEP-Info in 2641 the PEP draft. 2643 See Section 12.32 for a usage example. 2645 12.41 User-Agent 2647 See [H14.42] 2649 12.42 Vary 2651 See [H14.43] 2653 12.43 Via 2655 See [H14.44]. 2657 12.44 WWW-Authenticate 2659 See [H14.46]. 2661 13 Caching 2663 In HTTP, response-request pairs are cached. RTSP differs 2664 significantly in that respect. Responses are not cachable, with the 2665 exception of the stream description returned by DESCRIBE. (Since the 2666 responses for anything but DESCRIBE and GET_PARAMETER do not return 2667 any data, caching is not really an issue for these requests.) However, 2668 it is desirable for the continuous media data, typically delivered 2669 out-of-band with respect to RTSP, to be cached. 2671 On receiving a SETUP or PLAY request, the proxy would ascertain as to 2672 whether it has an up-to-date copy of the continuous media content. If 2673 not, it would modify the SETUP transport parameters as appropriate and 2674 forward the request to the origin server. Subsequent control commands 2675 such as PLAY or PAUSE would pass the proxy unmodified. The proxy would 2676 then pass the continuous media data to the client, while possibly 2677 making a local copy for later re-use. The exact behavior allowed to 2678 the cache is given by the cache-response directives described in 2679 Section 12.8. A cache MUST answer any DESCRIBE requests if it is 2680 currently serving the stream to the requestor, as it is possible that 2681 low-level details of the stream description may have changed on the 2682 origin-server. 2684 Note that an RTSP cache, unlike the HTTP cache, is of the 2685 ``cut-through'' variety. Rather than retrieving the whole resource 2686 from the origin server, the cache simply copies the streaming data as 2687 it passes by on its way to the client, thus, it does not introduce 2688 additional latency. 2690 To the client, an RTSP proxy cache would appear like a regular media 2691 server, to the media origin server like a client. Just like an HTTP 2692 cache has to store the content type, content language, etc. for the 2693 objects it caches, a media cache has to store the presentation 2694 description. Typically, a cache would eliminate all 2695 transport-references (that is, multicast information) from the 2696 presentation description, since these are independent of the data 2697 delivery from the cache to the client. Information on the encodings 2698 remains the same. If the cache is able to translate the cached media 2699 data, it would create a new presentation description with all the 2700 encoding possibilities it can offer. 2702 14 Examples 2704 The following examples reference stream description formats that are 2705 not finalized, such as RTSL and SDP. Please do not use these examples 2706 as a reference for those formats. 2708 14.1 Media on Demand (Unicast) 2710 Client C requests a movie from media servers A ( audio.example.com) 2711 and V (video.example.com). The media description is stored on a web 2712 server W . The media description contains descriptions of the 2713 presentation and all its streams, including the codecs that are 2714 available, dynamic RTP payload types, the protocol stack and content 2715 information such as language or copyright restrictions. It may also 2716 give an indication about the time line of the movie. 2718 In our example, the client is only interested in the last part of the 2719 movie. The server requires authentication for this movie. 2721 C->W: GET /twister.sdp HTTP/1.1 2722 Host: www.example.com 2723 Accept: application/sdp 2725 W->C: HTTP/1.0 200 OK 2726 Content-Type: application/sdp 2728 v=0 2729 o=- 2890844526 2890842807 IN IP4 192.16.24.202 2730 s=RTSP Session 2731 m=audio 0 RTP/AVP 0 2732 a=murl:rtsp://audio.example.com/twister/audio.en 2733 m=video 0 RTP/AVP 31 2734 a=murl:rtsp://audio.example.com/twister/video 2736 C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 2737 CSeq: 1 2738 Transport: rtp/udp;port=3056 2740 A->C: RTSP/1.0 200 OK 2741 CSeq: 1 2742 Session: 1234 2744 C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0 2745 CSeq: 1 2746 Transport: rtp/udp;port=3058 2748 V->C: RTSP/1.0 200 OK 2749 CSeq: 1 2750 Session: 1235 2752 C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0 2753 CSeq: 2 2754 Session: 1235 2755 Range: smpte=0:10:00- 2757 V->C: RTSP/1.0 200 OK 2758 CSeq: 2 2760 C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 2761 CSeq: 2 2762 Session: 1234 2763 Range: smpte=0:10:00- 2764 A->C: RTSP/1.0 200 OK 2765 CSeq: 2 2767 C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0 2768 CSeq: 3 2769 Session: 1234 2771 A->C: RTSP/1.0 200 OK 2772 CSeq: 3 2774 C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 2775 CSeq: 3 2776 Session: 1235 2778 V->C: RTSP/1.0 200 OK 2779 CSeq: 3 2781 Even though the audio and video track are on two different servers, 2782 and may start at slightly different times and may drift with respect 2783 to each other, the client can synchronize the two using standard RTP 2784 methods, in particular the time scale contained in the RTCP sender 2785 reports. 2787 14.2 Streaming of a Container file 2789 For purposes of this example, a container file is a storage entity in 2790 which multiple continuous media types pertaining to the same end-user 2791 presentation are present. In effect, the container file represents a 2792 RTSP presentation, with each of its components being RTSP streams. 2793 Container files are a widely used means to store such presentations. 2794 While the components are essentially transported as independant 2795 streams, it is desirable to maintain a common context for those 2796 streams at the server end. 2798 This enables the server to keep a single storage handle open 2799 easily. It also allows treating all the streams equally in case of 2800 any prioritization of streams by the server. 2802 It is also possible that the presentation author may wish to prevent 2803 selective retrieval of the streams by client in order to preserve the 2804 artistic effect of the combined media presentation. Similarly, in such 2805 a tightly bound presentation, it is desirable to be able to control 2806 all the streams via a single control message using an aggregate URL. 2808 The following is an example of using a single RTSP session to control 2809 multiple streams. It also illustrates the use of aggregate URLs. 2811 Client C requests a presentation from media server M . The movie is 2812 stored in a container file. The client has obtained a RTSP URL to the 2813 container file. 2815 C->M: DESCRIBE rtsp://foo/twister RTSP/1.0 2816 CSeq: 1 2818 M->C: RTSP/1.0 200 OK 2819 CSeq: 1 2820 Content-Type: application/sdp 2821 Content-Length: 164 2823 v=0 2824 o=- 2890844256 2890842807 IN IP4 172.16.2.93 2825 s=RTSP Session 2826 i=An Example of RTSP Session Usage 2827 a=control:rtsp://foo/twister # aggregate URL 2828 t=0 0 2829 m=audio 0 RTP/AVP 0 2830 a=control:rtsp://foo/twister/audio 2831 m=video 0 RTP/AVP 26 2832 a=control:rtsp://foo/twister/video 2834 C->M: SETUP rtsp://foo/twister/audio RTSP/1.0 2835 CSeq: 2 2836 Transport: RTP/AVP;port=8000 2838 M->C: RTSP/1.0 200 OK 2839 CSeq: 2 2840 Session: 1234 2842 C->M: SETUP rtsp://foo/twister/video RTSP/1.0 2843 CSeq: 3 2844 Transport: RTP/AVP;port=8002 2845 Session: 1234 2847 M->C: RTSP/1.0 200 OK 2848 CSeq: 3 2849 Session: 1234 2851 C->M: PLAY rtsp://foo/twister RTSP/1.0 2852 CSeq: 4 2853 Range: npt=0- 2854 Session: 1234 2855 M->C: RTSP/1.0 200 OK 2856 CSeq: 4 2857 Session: 1234 2859 C->M: PAUSE rtsp://foo/twister/video RTSP/1.0 2860 CSeq: 5 2861 Session: 1234 2863 M->C: RTSP/1.0 4xx Only aggregate operation allowed 2864 CSeq: 5 2866 C->M: PAUSE rtsp://foo/twister RTSP/1.0 2867 CSeq: 6 2868 Session: 1234 2870 M->C: RTSP/1.0 200 OK 2871 CSeq: 6 2872 Session: 1234 2874 C->M: SETUP rtsp://foo/twister RTSP/1.0 2875 CSeq: 7 2876 Transport: RTP/AVP;port=10000 2878 M->C: RTSP/1.0 4xx Aggregate operation not allowed 2879 CSeq: 7 2881 In the first instance of failure, the client tries to pause one stream 2882 (in this case video) of the presentation which is disallowed for that 2883 presentation by the server. In the second instance, the aggregate URL 2884 may not be used for SETUP and one control message is required per 2885 stream to setup transport parameters. 2887 This keeps the syntax of the Transport header simple, and allows 2888 easy parsing of transport information by firewalls. 2890 14.3 Live Media Presentation Using Multicast 2892 The media server M chooses the multicast address and port. Here, we 2893 assume that the web server only contains a pointer to the full 2894 description, while the media server M maintains the full description. 2896 C->W: GET /concert.sdp HTTP/1.1 2897 Host: www.example.com 2899 W->C: HTTP/1.1 200 OK 2900 Content-Type: application/rtsl 2901 2902 2903 2905 C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/1.0 2906 CSeq: 1 2908 M->C: RTSP/1.0 200 OK 2909 CSeq: 1 2910 Content-Type: application/sdp 2912 v=0 2913 o=- 2890844526 2890842807 IN IP4 192.16.24.202 2914 s=RTSP Session 2915 m=audio 3456 RTP/AVP 0 2916 c=IN IP4 224.2.0.1/16 2918 C->M: SETUP rtsp://live.example.com/concert/audio RTSP/1.0 2919 CSeq: 2 2920 Transport: multicast=224.2.0.1; port=3456; ttl=16 2922 M->C: RTSP/1.0 200 OK 2923 CSeq: 2 2925 C->M: PLAY rtsp://live.example.com/concert/audio RTSP/1.0 2926 CSeq: 3 2928 M->C: RTSP/1.0 200 OK 2929 CSeq: 3 2931 The attempt to position the stream fails since this is a live 2932 presentation. 2934 14.4 Playing media into an existing session 2936 A conference participant C wants to have the media server M play back 2937 a demo tape into an existing conference. When retrieving the 2938 presentation description, C indicates to the media server that the 2939 network addresses and encryption keys are already given by the 2940 conference, so they should not be chosen by the server. The example 2941 omits the simple ACK responses. 2943 C->M: DESCRIBE rtsp://server.example.com/demo/548/sound RTSP/1.0 2944 CSeq: 1 2945 Accept: application/sdp 2946 M->C: RTSP/1.0 200 1 OK 2947 Content-type: application/rtsl 2949 v=0 2950 o=- 2890844526 2890842807 IN IP4 192.16.24.202 2951 s=RTSP Session 2952 m=audio 0 RTP/AVP 0 2954 C->M: SETUP rtsp://server.example.com/demo/548/sound RTSP/1.0 2955 CSeq: 2 2956 Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr 2958 14.5 Recording 2960 The conference participant C asks the media server M to record a 2961 meeting. If the presentation description contains any alternatives, 2962 the server records them all. 2964 C->M: DESCRIBE rtsp://server.example.com/meeting RTSP/1.0 2965 CSeq: 90 2966 Content-Type: application/sdp 2968 v=0 2969 s=Mbone Audio 2970 i=Discussion of Mbone Engineering Issues 2972 M->C: RTSP/1.0 200 OK 2973 CSeq: 90 2975 C->S: SETUP rtsp://server.example.com/meeting RTSP/1.0 2976 CSeq: 91 2977 Transport: RTP/AVP;mode=record 2979 S->C: RTSP/1.0 200 OK 2980 CSeq: 91 2981 Transport: RTP/AVP;port=3244;mode=record 2982 Session: 508876 2984 C->M: RECORD rtsp://server.example.com/meeting RTSP/1.0 2985 CSeq: 92 2986 Session: 508876 2987 Range: clock 19961110T1925-19961110T2015 2989 S->C: RTSP/1.0 200 OK 2990 CSeq: 92 2991 15 Syntax 2993 The RTSP syntax is described in an augmented Backus-Naur form (BNF) 2994 as used in RFC 2068 (HTTP/1.1). 2996 15.1 Base Syntax 2998 OCTET = 2999 CHAR = 3000 UPALPHA = 3001 LOALPHA = 3002 ALPHA = UPALPHA | LOALPHA 3003 DIGIT = 3004 CTL = 3006 CR = 3007 LF = 3008 SP = 3009 HT = 3010 <"> = 3011 CRLF = CR LF 3012 LWS = [CRLF] 1*( SP | HT ) 3013 TEXT = 3014 tspecials = "(" | ")" | "<" | ">" | "@" 3015 | "," | ";" | ":" | "\" | <"> 3016 | "/" | "[" | "]" | "?" | "=" 3017 | "{" | "}" | SP | HT 3018 token = 1* 3019 quoted-string = ( <"> *(qdtext) <"> ) 3020 qdtext = > 3021 quoted-pair = "\" CHAR 3023 message-header = field-name ":" [ field-value ] CRLF 3024 field-name = token 3025 field-value = *( field-content | LWS ) 3026 field-content = 3030 16 Security Considerations 3032 The protocol offers the opportunity for a remote-controlled 3033 denial-of-service attack. 3035 The attacker, using a forged source IP address, can ask for a stream 3036 to be played back to that forged IP address. Thus, an RTSP server 3037 SHOULD only allow client-specified destinations for RTSP-initiated 3038 traffic flows if the server has verified the client's identity, e.g., 3039 using the RTSP authentication mechanisms. 3041 Since there is no relation between a transport layer connection and an 3042 RTSP session, it is possible for a malicious client to issue requests 3043 with random session identifiers which would affect unsuspecting 3044 clients. This does not require spoofing of network packet addresses. 3045 The server SHOULD use a large random session identifier to make this 3046 attack more difficult. 3048 Both problems can be be prevented by appropriate authentication. 3050 Servers SHOULD implement both basic and digest [8] authentication. 3052 In addition, the security considerations outlined in [H15] apply. 3054 A RTSP Protocol State Machines 3056 The RTSP client and server state machines describe the behavior of 3057 the protocol from RTSP session initialization through RTSP session 3058 termination. 3060 State is defined on a per object basis. An object is uniquely 3061 identified by the stream URL and the RTSP session identifier. Any 3062 request/reply using aggregate URLs denoting RTSP presentations 3063 comprised of multiple streams will have an effect on the individual 3064 states of all the streams. For example, if the presentation /movie 3065 contains two streams, /movie/audio and /movie/video, then the 3066 following command: 3068 PLAY rtsp://foo.com/movie RTSP/1.0 3069 CSeq: 559 3070 Session: 12345 3072 will have an effect on the states of movie/audio and movie/video. 3074 This example does not imply a standard way to represent streams in 3075 URLs or a relation to the filesystem. See Section 3.2. 3077 The requests OPTIONS, ANNOUNCE, DESCRIBE, GET_PARAMETER, SET_PARAMETER 3078 do not have any effect on client or server state and are therefore not 3079 listed in the state tables. 3081 A.1 Client State Machine 3083 The client can assume the following states: 3085 Init: 3086 SETUP has been sent, waiting for reply. 3088 Ready: 3089 SETUP reply received or PAUSE reply received while in Playing 3090 state. 3092 Playing: 3093 PLAY reply received 3095 Recording: 3096 RECORD reply received 3098 In general, the client changes state on receipt of replies to 3099 requests. Note that some requests are effective at a future time or 3100 position (such as a PAUSE), and state also changes accordingly. If no 3101 explicit SETUP is required for the object (for example, it is 3102 available via a multicast group), state begins at Ready. In this case, 3103 there are only two states, Ready and Playing. 3105 The client also changes state from Playing/Recording to Ready when the 3106 end of the requested range is reached. 3108 The ``next state'' column indicates the state assumed after receiving 3109 a success response (2xx). If a request yields a status code of 3xx, 3110 the state becomes Init, and a status code of 4xx yields no change in 3111 state. Messages not listed for each state MUST NOT be issued by the 3112 client in that state, with the exception of messages not affecting 3113 state, as listed above. Receiving a REDIRECT from the server is 3114 equivalent to receiving a 3xx redirect status from the server. 3116 state message next state 3117 Init SETUP Ready 3118 TEARDOWN Init 3119 Ready PLAY Playing 3120 RECORD Recording 3121 TEARDOWN Init 3122 SETUP Ready 3123 Playing PAUSE Ready 3124 TEARDOWN Init 3125 PLAY Playing 3126 SETUP Playing (changed transport) 3127 Recording PAUSE Ready 3128 TEARDOWN Init 3129 RECORD Recording 3130 SETUP Recording (changed transport) 3132 A.2 Server State Machine 3134 The server can assume the following states: 3136 Init: 3137 The initial state, no valid SETUP has been received yet. 3139 Ready: 3140 Last SETUP received was successful, reply sent or after 3141 playing, last PAUSE received was successful, reply sent. 3143 Playing: 3144 Last PLAY received was successful, reply sent. Data is being 3145 sent. 3147 Recording: 3148 The server is recording media data. 3150 In general,the server changes state on receiving requests. If the 3151 server is in state Playing or Recording and in unicast mode, it MAY 3152 revert to Init and tear down the RTSP session if it has not received 3153 ``wellness'' information, such as RTCP reports or RTSP commands, from 3154 the client for a defined interval, with a default of one minute. The 3155 server can declare another timeout value in the Session response 3156 header (Section 12.37). If the server is in state Ready, it MAY revert 3157 to Init if it does not receive an RTSP request for an interval of more 3158 than one minute. Note that some requests (such as PAUSE) may be 3159 effective at a future time or position, and server state transitions 3160 at the appropriate time. The server reverts from state Playing or 3161 Recording to state Ready at the end of the range requested by the 3162 client. 3164 The REDIRECT message, when sent, is effective immediately unless it 3165 has a Range header specifying when the redirect is effective. In such 3166 a case, server state will also change at the appropriate time. 3168 If no explicit SETUP is required for the object, the state starts at 3169 Ready and there are only two states, Ready and Playing. 3171 The ``next state'' column indicates the state assumed after sending a 3172 success response (2xx). If a request results in a status code of 3xx, 3173 the state becomes Init. A status code of 4xx results in no change. 3175 state message next state 3176 Init SETUP Ready 3177 TEARDOWN Init 3178 Ready PLAY Playing 3179 SETUP Ready 3180 TEARDOWN Init 3181 RECORD Recording 3182 Playing PLAY Playing 3183 PAUSE Ready 3184 TEARDOWN Init 3185 SETUP Playing 3186 Recording RECORD Recording 3187 PAUSE Ready 3188 TEARDOWN Init 3189 SETUP Recording 3191 B Interaction with RTP 3193 RTSP allows to play selected, non-contiguous sections of a 3194 presentation. The media client playing back the RTP stream should not 3195 be affected by jumps in NPT. Thus, both RTP sequence numbers and RTP 3196 timestamps MUST be continuous and monotonic across jumps of NPT. 3198 As an example, assume a clock frequency of 8000 Hz, a packetization 3199 interval of 100 ms and an initial sequence number and timestamp of 3200 zero. First we play NPT 10 through 15, then skip ahead and play NPT 18 3201 through 20. The first segment is presented as RTP packets with 3202 sequence numbers 0 through 49 and timestamp 0 through 39,200. The 3203 second segment consists of RTP packets with sequence number 50 through 3204 69, with timestamps 40,000 through 55,200. 3206 We cannot assume that the RTSP client can communicate with the RTP 3207 media agent, as the two may be independent processes. If the RTP 3208 timestamp shows the same gap as the NPT, the media agent will 3209 assume that there is a pause in the presentation. If the jump in 3210 NPT is large enough, the RTP timestamp may roll over and the media 3211 agent may believe later packets to be duplicates of packets just 3212 played out. 3214 For scaling (see Section 12.34), RTP timestamps should correspond to 3215 the playback timing. For example, when playing video recorded at 30 3216 frames/second at a scale of two and speed (Section 12.35) of one, the 3217 server would drop every second frame to maintain and deliver video 3218 packets with the normal timestamp spacing of 3,000 per frame, but NPT 3219 would increase by 1/15 second for each video frame. 3221 The client can maintain a correct display of NPT by noting the RTP 3222 timestamp value of the first packet arriving after repositioning. The 3223 sequence parameter of the RTP-Info (Section 12.33 header provides the 3224 last sequence number of the previous segment. 3226 C Use of SDP for RTSP Session Descriptions 3228 The Session Description Protocol (SDP [6]) may be used to describe 3229 streams or presentations in RTSP. Such usage is limited to specifying 3230 means of access and encoding(s) for: 3232 * Scenario A: A presentation comprised of streams from one or more 3233 servers that are not available for aggregate control. Such a 3234 description is typically retrieved by HTTP or other non-RTSP 3235 means. However, they MAY be received with ANNOUNCE methods. 3236 * Scenario B: A presentation comprised of multiple streams from a 3237 single server that are available for aggregate control. Such a 3238 description is typically returned in reply to a DESCRIBE request 3239 on a URL, or received in an ANNOUNCE method. 3241 Specifically, this appendix addresses the usage of SDP (for example, 3242 embedded in a web page) that triggers a RTSP session, and the usage in 3243 replies to RTSP DESCRIBE requests. However, it does not address the 3244 issue of media or encoding negotiation within such descriptions. 3246 C.1 Specification 3248 The terms ``session-level'', ``media-level'' and other key/attribute 3249 names and values used in this appendix are as defined in [6]. SDP 3250 fields not specifically mentioned in this section are assumed to have 3251 their usual meaning. 3253 C.1.1 Control URL 3255 The ``a=control:'' field is used to convey the control URL. This 3256 field is used both at the media-level to provide a means to reference 3257 individual streams, and at the session-level to signify a global URL 3258 for aggregate control, providing the URL to be used on aggregate 3259 commands (PLAY, PAUSE, etc.). 3261 Example: 3262 a=control:rtsp://example.com/foo 3264 This field may contain both relative and absolute URLs, following the 3265 rules and conventions set out in RFC 1808 ([16]). Specifically, the 3266 order for which implementations should look for a base URL is as 3267 follows: 3269 * The RTSP Content-Base field 3270 * The RTSP Content-Location field 3271 * The RTSP request URL 3273 If this field contains only an asterix (*), then the URL is treated as 3274 if it were an empty embedded URL, and thus inherits the entire base 3275 URL. 3277 C.1.2 Media streams 3279 The ``m='' field is used to enumerate the streams. It is expected that 3280 all the specified streams will be rendered with appropriate 3281 synchronization. If the session is unicast, the port number simply 3282 serves as a recommendation, and would still need to be conveyed to the 3283 server via a SETUP request. The port number may be specified as 0, in 3284 which case the client makes the choice of the port. 3286 Example: 3287 m=audio 0 RTP/AVP 31 3289 C.1.3 Payload type(s) 3291 The payload type(s) are specified in the ``m='' field. In case the 3292 payload type is a static payload type from RFC 1890([1]), no other 3293 information is required. In case it is a dynamic payload type, the 3294 media attribute ``rtpmap'' is used to specify what the media is. The 3295 ``encoding name'' within the ``rtpmap'' attribute may be one of those 3296 specified in RFC 1890(Sections 5 and 6), or an experimental encoding 3297 with a ``X-'' prefix as specified in [6]. Codec-specific parameters 3298 are not specified in this field but the ``fmtp'' attribute described 3299 below. Implementors seeking to register new encodings should follow 3300 the procedure in RFC 1890. If the media type is not suited to the RTP 3301 AV profile, then it is recommended that a new profile be created and 3302 the appropriate profile name must be used in lieu of ``RTP/AVP'' in 3303 the ``m='' field. An informational document may be published in lieu 3304 of this if the usage is expected to be limited or experimental. 3306 C.1.4 Format specific parameters 3308 This is accomplished using the ``fmtp'' media attribute. The syntax of 3309 the ``fmtp'' attribute is specific to the encoding(s) that the 3310 attribute refers to. This is with the exception of the number of 3311 samples per packet, which is conveyed using the ``ptime'' attribute. 3313 C.1.5 Length of presentation 3315 This is applicable to non-live sessions(typically on-demand retreivals 3316 of stored files) only and is specified using a media-level 3317 ``a=length'' field. It defines the total length of the presentation in 3318 time. The unit is specified first, followed by the value. The units 3319 and their values are as defined in Section 3. 3321 Example : 3322 a=length:npt=34.4368 3324 C.1.6 Time of availability 3326 It is required that suitable values for the start and stop times for 3327 the ``t='' field be used for both scnearios. In Scenario B, the server 3328 SHOULD indicate a stop time value for which it guarantees the 3329 description to be valid, and a start time that is equal to or before 3330 the time at which the DESCRIBE request was received.(It MAY also 3331 indicate start and stop times of 0, meaning that the session is always 3332 available). In Scenario A, the values should reflect the actual period 3333 for which the session is avaiable in keeping with SDP semantics, and 3334 not depend on other means(such as the life of the web page containing 3335 the description) for this purpose. 3337 C.1.7 Connection Information 3339 In some cases, the mandatory ``c='' field may have no well-defined 3340 interpretation. This is since all the necessary information may be 3341 conveyed by the control URL and subsequent RTSP operations. In such 3342 cases, the address within this field must be set to a suitable null 3343 value. For address of type ``IP4'', this value is ``0.0.0.0''. 3345 C.1.8 Entity Tag 3347 Because RTSP supports the If-Match field (see section 12.22) in a 3348 session-description-independent fashion, it's necessary to embed an 3349 entirely opaque uniqueness field in the specification. The contents of 3350 this tag is totally implementation specific, so long as it serves as a 3351 unique identifier for this exact description of the media. Support of 3352 this tag is optional. 3354 Example : 3355 a=etag:''158bb3e7c7fd62ce67f12b533f06b83a'' 3357 One could argue that the o= field provides identical functionality. 3358 However, it does so in a manner that would put constraints on 3359 servers that need to support multiple session description types 3360 other than SDP for the same piece of media content. 3362 C.2 Scenario A 3364 Multiple media sections are specified, and each section MUST have the 3365 control URL specified via the ``a=control:''field. 3367 Example: 3369 v=0 3370 o=- 2890844256 2890842807 IN IP4 204.34.34.32 3371 s=I came from a web page 3372 t=0 0 3373 c=IN IP4 0.0.0.0 3374 m=video 8002 RTP/AVP 31 3375 a=control:rtsp://audio.com/movie.aud 3376 m=audio 8004 RTP/AVP 3 3377 a=control:rtsp://video.com/movie.vid 3379 Note that the control URL in this case implies that the client 3380 establishes seperate RTSP control sessions to the servers audio.com 3381 and video.com. 3383 C.3 Scenario B 3385 In this scenario, the server has multiple streams that are available 3386 for aggregate control. In this case, there is both a media-level 3387 ``a=control:'' field which is used to specify the stream URL, and a 3388 session-level ``a=control:'' field which is used as a global handle 3389 for aggregate control. The media-level URLs may be relative, in which 3390 case they resolve to absolute URLs as defined in C.1.1 above. 3392 If the session comprises only a single stream, the media-level 3393 ``a=control:'' field may be omitted altogether. In case more than one 3394 stream is present, the ``a=control:'' field MUST be used. 3396 Example: 3398 v=0 3399 o=- 2890844256 2890842807 IN IP4 204.34.34.32 3400 s=I contain 3401 i= 3402 t=0 0 3403 c=IN IP4 0.0.0.0 3404 a=control:rtsp://example.com/movie/ 3405 m=video 8002 RTP/AVP 31 3406 a=control:trackID=1 3407 m=audio 8004 RTP/AVP 3 3408 a=control:trackID=2 3410 In this example, the client is required to establish a single RTSP 3411 session to the server, and uses the URLs 3412 rtsp://example.com/movie/trackID=1 and 3413 rtsp://example.com/movie/trackID=2 to setup the media streams, and 3414 rtsp://example.com/movie/ to control it. 3416 D Minimal RTSP implementation 3418 D.1 Client 3420 A client implementation MUST be able to do the following : 3422 * Generate the following requests : SETUP, TEARDOWN, and one of 3423 PLAY(ie. a minimal playback client) or RECORD(ie. a minimal 3424 recording client). If RECORD is implemented, ANNOUNCE must be 3425 implemented as well. 3426 * Include the following headers in requests: Connection, Session, 3427 Transport. If ANNOUNCE is implemented, the capability to include 3428 headers Content-Language, Content-Encoding, Content-Length, 3429 Content-Type should be as well. 3430 * Parse and understand the following headers in responses: 3431 Connection, Session, Transport, Content-Language, 3432 Content-Encoding, Content-Length, Content-Type. If RECORD is 3433 implemented, the Location header must be understood as well. 3434 RTP-complient implementations should also implement RTP-Info. 3435 * Understand the class of each error code received and notify the 3436 end-user, if one is present, of error codes in classes 4xx and 3437 5xx. The notification requirement may be relaxed if the end-user 3438 explicity does not want it for one or all status codes. 3439 * Expect and respond to asynchronous requests from the server, such 3440 as ANNOUNCE. This does not necessarily mean that it should 3441 implement the ANNOUNCE method, merely that it MUST respond 3442 positively or negatively to any request received from the server 3443 * Implement RTP transport. 3445 Inclusion of the User-Agent header is recommended. 3447 The following capability sets are defined over and above the minimal 3448 implementation : 3450 D.1.1 Basic Playback 3452 The client MUST additionally be able to do the following: 3453 * Include and parse the Range header, with ``npt'' units. 3454 * Generate the PAUSE reqeust. 3455 * Implement the REDIRECT method, and the Location header. 3456 * Implement the OPTIONS method, and the Public header. 3457 * Understand SDP session descriptions as defined in Appendix C 3459 Implementation of DESCRIBE is highly recommended for this case. 3461 D.1.2 Authentication-enabled 3463 The client MUST additionally be able to do the following: 3464 * Recognize the 401 status code. 3465 * Parse and include the WWW-Authenicate header 3466 * Implement Basic and Digest authentication 3468 D.2 Server 3470 A minimal server implementation MUST be able to do the following: 3472 * Implement SETUP, TEARDOWN, OPTIONS and one of the PLAY(ie. a 3473 minimal playback server) or RECORD(ie. a minimal recording server) 3474 methods. If RECORD is implemented, ANNOUNCE should be implemented 3475 as well. 3476 * Include the following headers in responses: Connection, 3477 Content-Length, Content-Type, Content-Language, Content-Encoding, 3478 Transport, Public. The capability to include the Location header 3479 should be implemented if the RECORD method is. RTP-complient 3480 implementations should also implement the RTP-Info field. 3481 * Parse and respond appropriately to the following headers in 3482 requests: Connection, Session, Transport, Require. 3483 * Implement RTP transport. 3485 Inclusion of the Server header is recommended. 3487 The following capability sets are defined over and above the minimal 3488 implementation : 3490 D.2.1 Basic Playback 3492 The server MUST additionally be able to do the following: 3493 * Include and parse the Range header, with ``npt'' units. 3494 Implementation of ``smpte'' units is recommended. 3495 * Implement the PAUSE method. 3496 * Implement the REDIRECT method, and the Location header. 3498 Implementation of DESCRIBE and generation of SDP descriptions as 3499 defined in Appendix C is highly recommended for this case. 3501 D.2.2 Authentication-enabled 3503 The server MUST additionally be able to do the following: 3504 * Generate the 401 status code when authentication is required for 3505 the resource. 3506 * Parse and include the WWW-Authenicate header 3507 * Implement Basic and Digest authentication 3509 E Open Issues 3511 1. Define text/rtsp-parameter MIME type. 3512 2. Allow byte offsets for Range (Prasoon Tiwari). 3513 3. Reverse: Scale: -1, with reversed start times, or both? 3514 4. How does the server get back to the client unless a persistent 3515 connection is used? Probably cannot, in general. 3516 5. Server issues TEARDOWN and other 'event' notifications to 3517 client? This raises the problem discussed in the previous open 3518 issue, but is useful for the client if the data stream contains 3519 no end indication. 3521 F Changes 3523 Since draft03 (July 30, 1997 version) of RTSP, the following changes 3524 were made: 3526 * PEP was removed, ``Require'' header returns 3527 * Usage of SDP within RTSP is specified as an appendix 3528 * Minimal RTSP implementation specified as an appendix 3529 * The RTSP control sequence number was moved off of the request and 3530 response lines, and put into a new CSeq: header. 3531 * Interaction with RTP appendix added 3532 * Several changes to Transport: and RTP-Info: fields (RTP-Info: was 3533 formerly Transport-Info:) 3535 Between draft02 (March, 1997) and draft03 (July, 1997), the following 3536 changes were made: 3538 * Definition of RTP behavior. 3539 * Definition of behavior for container files. 3540 * Remove server-to-client DESCRIBE request. 3541 * Allowing the Transport header to direct media streams to unicast 3542 and multicast addresses, with an appropriate warning about 3543 denial-of-service attacks. 3544 * Add mode parameter to Transport header to allow RECORD or PLAY. 3545 * The Embedded binary data section was modified to clearly indicate 3546 the stream the data corresponds to, and a reference to the 3547 Transport header was added. 3548 * The Transport header format has been changed to use a more general 3549 means to specify data channel and application level protocol. It 3550 also conveys the port to be used at the server for RTCP messages, 3551 and the start sequence number that will be used in the RTP 3552 packets. 3553 * The use of the Session: header has been enhanced. Requests for 3554 multiple URLs may be sent in a single session. 3555 * There is a distinction between aggregate(presentation) URLs and 3556 stream URLs. Error codes have been added to reflect the fact that 3557 some methods may be allowed only on a particular type of URL. 3558 * Example showing the use of aggregate/presentation control using a 3559 single RTSP session has been added. 3560 * Support for the PEP(Protocol Extension Protocol) headers has been 3561 added. 3562 * Server-Client DESCRIBE messages have been renamed to ANNOUNCE for 3563 better clarity and differentiation. 3565 Note that this list does not reflect minor changes in wording or 3566 correction of typographical errors. 3568 G Author Addresses 3570 Henning Schulzrinne 3571 Dept. of Computer Science 3572 Columbia University 3573 1214 Amsterdam Avenue 3574 New York, NY 10027 3575 USA 3576 electronic mail: schulzrinne@cs.columbia.edu 3578 Anup Rao 3579 Netscape Communications Corp. 3580 501 E. Middlefield Road 3581 Mountain View, CA 94043 3582 USA 3583 electronic mail: anup@netscape.com 3584 Robert Lanphier 3585 Progressive Networks 3586 1111 Third Avenue Suite 2900 3587 Seattle, WA 98101 3588 USA 3589 electronic mail: robla@prognet.com 3591 H Acknowledgements 3593 This draft is based on the functionality of the original RTSP draft 3594 submitted in October 96. It also borrows format and descriptions from 3595 HTTP/1.1. 3597 This document has benefited greatly from the comments of all those 3598 participating in the MMUSIC-WG. In addition to those already 3599 mentioned, the following individuals have contributed to this 3600 specification: 3602 Rahul Agarwal, Bruce Butterfield, Steve Casner, Francisco Cortes, 3603 Martin Dunsmuir, Eric Fleischman, V. Guruprasad, Peter Haight, Mark 3604 Handley, Brad Hefta-Gaub, John K. Ho, Philipp Hoschka, Anders Klemets, 3605 Ruth Lang, Stephanie Leif, Eduardo F. Llach, Rob McCool, David Oran, 3606 Sujal Patel, Alagu Periyannan, Igor Plotnikov, Pinaki Shah, Jeff 3607 Smith, Alexander Sokolsky, Dale Stammen, and John Francis Stracke. 3609 References 3611 1 H. Schulzrinne, ``RTP profile for audio and video conferences 3612 with minimal control,'' RFC 1890, Internet Engineering Task 3613 Force, Jan. 1996. 3615 2 D. Kristol and L. Montulli, ``HTTP state management 3616 mechanism,'' RFC 2109, Internet Engineering Task Force, Feb. 3617 1997. 3619 3 F. Yergeau, G. Nicol, G. Adams, and M. Duerst, 3620 ``Internationalization of the hypertext markup language,'' RFC 3621 2070, Internet Engineering Task Force, Jan. 1997. 3623 4 S. Bradner, ``Key words for use in RFCs to indicate requirement 3624 levels,'' RFC 2119, Internet Engineering Task Force, Mar. 1997. 3626 5 R. Fielding, J. Gettys, J. Mogul, H. Frystyk, and T. 3627 Berners-Lee, ``Hypertext transfer protocol - HTTP/1.1,'' RFC 3628 2068, Internet Engineering Task Force, Jan. 1997. 3630 6 M. Handley, ``SDP: Session description protocol,'' Internet 3631 Draft, Internet Engineering Task Force, Nov. 1996. 3632 Work in progress. 3634 7 A. Freier, P. Karlton, and P. Kocher, ``The TLS protocol,'' 3635 Internet Draft, Internet Engineering Task Force, Dec. 1996. 3636 Work in progress. 3638 8 J. Franks, P. Hallam-Baker, J. Hostetler, P. A. Luotonen, and 3639 E. L. Stewart, ``An extension to HTTP: digest access 3640 authentication,'' RFC 2069, Internet Engineering Task Force, 3641 Jan. 1997. 3643 9 J. Postel, ``User datagram protocol,'' STD 6, RFC 768, Internet 3644 Engineering Task Force, Aug. 1980. 3646 10 R. Hinden and C. Partridge, ``Version 2 of the reliable data 3647 protocol (RDP),'' RFC 1151, Internet Engineering Task Force, 3648 Apr. 1990. 3650 11 J. Postel, ``Transmission control protocol,'' STD 7, RFC 793, 3651 Internet Engineering Task Force, Sept. 1981. 3653 12 M. Handley, H. Schulzrinne, and E. Schooler, ``SIP: Session 3654 initiation protocol,'' Internet Draft, Internet Engineering 3655 Task Force, Dec. 1996. 3656 Work in progress. 3658 13 P. McMahon, ``GSS-API authentication method for SOCKS version 3659 5,'' RFC 1961, Internet Engineering Task Force, June 1996. 3661 14 D. Crocker, ``Augmented BNF for syntax specifications: ABNF,'' 3662 Internet Draft, Internet Engineering Task Force, Oct. 1996. 3663 Work in progress. 3665 15 R. Elz, ``A compact representation of IPv6 addresses,'' RFC 3666 1924, Internet Engineering Task Force, Apr. 1996. 3668 16 R. Fielding, ``Relative Uniform Resource Locators,'' RFC 1808, 3669 Internet Engineering Task Force, June 1995. 3671 17 T. Berners-Lee, L. Masinter, and M. McCahill, ``Uniform 3672 resource locators (URL),'' RFC 1738, Internet Engineering Task 3673 Force, Dec. 1994. 3675 18 International Telecommunication Union, ``Visual telephone 3676 systems and equipment for local area networks which provide a 3677 non-guaranteed quality of service,'' Recommendation H.323, 3678 Telecommunication Standardization Sector of ITU, Geneva, 3679 Switzerland, May 1996. 3681 19 ISO/IEC, ``Information technology - generic coding of moving 3682 pictures and associated audio informaiton - part 6: extension 3683 for digital storage media and control,'' Draft International 3684 Standard ISO 13818-6, International Organization for 3685 Standardization ISO/IEC JTC1/SC29/WG11, Geneva, Switzerland, 3686 Nov. 1995. 3688 20 H. Schulzrinne, S. Casner, R. Frederick, and V. Jacobson, 3689 ``RTP: a transport protocol for real-time applications,'' RFC 3690 1889, Internet Engineering Task Force, Jan. 1996. 3692 21 J. Miller, P. Resnick, and D. Singer, ``Rating Services and 3693 Rating Systems(and Their Machine Readable Descriptions), '' 3694 REC-PICS-services-961031, Worldwide Web Consortium, Oct. 1996. 3696 22 D. Connolly, R. Khare, H.F. Nielsen, ``PEP - an Extension 3697 Mechanism for HTTP", Internet draft, work-in-progress. W3C 3698 Draft WD-http-pep-970714 3699 http://www.w3.org/TR/WD-http-pep-970714, July, 1996.