idnits 2.17.1 draft-ietf-mmusic-rfc2326bis-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1.a on line 20. -- Found old boilerplate from RFC 3978, Section 5.5 on line 8119. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 8092. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 8099. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 8105. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. ** The document uses RFC 3667 boilerplate or RFC 3978-like boilerplate instead of verbatim RFC 3978 boilerplate. After 6 May 2005, submission of drafts without verbatim RFC 3978 boilerplate is not accepted. The following non-3978 patterns matched text found in the document. That text should be removed or replaced: By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** 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 == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 36) being 59 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Authors' Addresses Section. ** There are 11 instances of too long lines in the document, the longest one being 13 characters in excess of 72. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. == There are 5 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 2 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 2 instances 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. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 1607 has weird spacing: '...equired all...' == Line 1608 has weird spacing: '...ccepted all...' == Line 1945 has weird spacing: '...mmended rec...' == Line 1948 has weird spacing: '...mmended rec...' == Line 1949 has weird spacing: '...mmended opt...' == (23 more instances...) == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. == 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 'MUST not' in this paragraph: The name of the feature MUST follow these rules: The name may be of any length, but SHOULD be no more than twenty characters long. The name MUST not contain any spaces, or control characters. The registration SHALL indicate if the feature tag applies to servers only, proxies only or both server and proxies. Any proprietary feature SHALL have as the first part of the name a vendor tag, which identifies the organization. == 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 'SHALL not' in this paragraph: The response to valid request meeting the requisites is normally a 2xx (SUCCESS) unless other noted in the response column. The exceptions needs to be given a response according to the response column. If the request does not meet the requisite, is erroneous or some other type of error occur the appropriate response code MUST be sent. If the response code is a 4xx the session state is unchanged. A response code of 3rr will result in that the session is ended and its state is changed to Init. A response code of 304 results in no state change. However there exist restrictions to when a 3xx response may be used. A 5xx response SHALL not result in any change of the session state, except if the error is not possible to recover from. A unrecoverable error SHALL result the ending of the session. As it in the general case can't be determined if it was a unrecoverable error or not the client will be required to test. In the case that the next request after a 5xx is responded with 454 (Session Not Found) the client knows that the session has ended. -- 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? '23' on line 7995 looks like a reference -- Missing reference section? '24' on line 7999 looks like a reference -- Missing reference section? '25' on line 8004 looks like a reference -- Missing reference section? '26' on line 8007 looks like a reference -- Missing reference section? '27' on line 8010 looks like a reference -- Missing reference section? '1' on line 7913 looks like a reference -- Missing reference section? '2' on line 7916 looks like a reference -- Missing reference section? '3' on line 7920 looks like a reference -- Missing reference section? '28' on line 8013 looks like a reference -- Missing reference section? '4' on line 7925 looks like a reference -- Missing reference section? '5' on line 7928 looks like a reference -- Missing reference section? '18' on line 7973 looks like a reference -- Missing reference section? '6' on line 7931 looks like a reference -- Missing reference section? '7' on line 7934 looks like a reference -- Missing reference section? '8' on line 7939 looks like a reference -- Missing reference section? '9' on line 7942 looks like a reference -- Missing reference section? '29' on line 8017 looks like a reference -- Missing reference section? '30' on line 8022 looks like a reference -- Missing reference section? '31' on line 8027 looks like a reference -- Missing reference section? '32' on line 8030 looks like a reference -- Missing reference section? '33' on line 8035 looks like a reference -- Missing reference section? '16' on line 7966 looks like a reference -- Missing reference section? '10' on line 7945 looks like a reference -- Missing reference section? '11' on line 7948 looks like a reference -- Missing reference section? '34' on line 8040 looks like a reference -- Missing reference section? '35' on line 8044 looks like a reference -- Missing reference section? '36' on line 8050 looks like a reference -- Missing reference section? '13' on line 7956 looks like a reference -- Missing reference section? 'H6' on line 1428 looks like a reference -- Missing reference section? 'H10' on line 2925 looks like a reference -- Missing reference section? 'TBW' on line 2969 looks like a reference -- Missing reference section? '14' on line 7959 looks like a reference -- Missing reference section? '15' on line 7962 looks like a reference -- Missing reference section? '37' on line 8055 looks like a reference -- Missing reference section? 'H15' on line 5827 looks like a reference -- Missing reference section? '17' on line 7970 looks like a reference -- Missing reference section? '19' on line 7977 looks like a reference -- Missing reference section? '20' on line 7981 looks like a reference -- Missing reference section? '38' on line 8058 looks like a reference -- Missing reference section? '39' on line 8063 looks like a reference -- Missing reference section? '40' on line 8066 looks like a reference -- Missing reference section? '41' on line 8070 looks like a reference -- Missing reference section? '21' on line 7985 looks like a reference -- Missing reference section? '22' on line 7989 looks like a reference -- Missing reference section? '42' on line 8074 looks like a reference -- Missing reference section? '43' on line 8077 looks like a reference -- Missing reference section? '44' on line 8080 looks like a reference -- Missing reference section? '12' on line 7952 looks like a reference Summary: 8 errors (**), 0 flaws (~~), 17 warnings (==), 55 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 3 draft-ietf-mmusic-rfc2326bis-09.txt Columbia U. 4 February 21, 2005 A. Rao 5 Expires: August 21, 2005 Cisco 6 R. Lanphier 7 RealNetworks 8 M. Westerlund 9 Ericsson 10 A. Narasimhan 11 Overture 13 Real Time Streaming Protocol (RTSP) 15 STATUS OF THIS MEMO 17 By submitting this Internet-Draft, each author represents that any 18 applicable patent or other IPR claims of which he or she is aware 19 have been or will be disclosed, and any of which he or she becomes 20 aware will be disclosed, in accordance with RFC 3668. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as Internet- 25 Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress". 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/ietf/1id-abstracts.txt 35 To view the list Internet-Draft Shadow Directories, see 36 http://www.ietf.org/shadow.html. 38 Abstract 40 This memorandum is a revision of RFC 2326, which is currently a 41 Proposed Standard. 43 The Real Time Streaming Protocol, or RTSP, is an application-level 44 protocol for control over the delivery of data with real-time 45 properties. RTSP provides an extensible framework to enable 46 controlled, on-demand delivery of real-time data, such as audio and 47 video. Sources of data can include both live data feeds and stored 48 clips. This protocol is intended to control multiple data delivery 49 sessions, provide a means for choosing delivery channels such as UDP, 50 multicast UDP and TCP, and provide a means for choosing delivery 51 mechanisms based upon RTP (RFC 3550). 53 Table of Contents 55 1 Introduction ........................................ 9 56 1.1 RTSP Specification Update ........................... 9 57 1.2 Purpose ............................................. 10 58 1.3 Notational Conventions .............................. 11 59 1.4 Terminology ......................................... 12 60 1.5 Protocol Properties ................................. 15 61 1.6 Extending RTSP ...................................... 17 62 1.7 Overall Operation ................................... 18 63 1.8 RTSP States ......................................... 19 64 1.9 Relationship with Other Protocols ................... 19 65 2 RTSP Use Cases ...................................... 20 66 2.1 On-demand Playback of Stored Content ................ 20 67 2.2 Unicast distribution of Live Content ................ 22 68 2.3 On-demand Playback using Multicast .................. 22 69 2.4 Inviting a RTSP server into a conference ............ 22 70 2.5 Live Content using Multicast ........................ 23 71 3 Protocol Parameters ................................. 24 72 3.1 RTSP Version ........................................ 24 73 3.2 RTSP URI ............................................ 24 74 3.3 Session Identifiers ................................. 26 75 3.4 SMPTE Relative Timestamps ........................... 26 76 3.5 Normal Play Time .................................... 26 77 3.6 Absolute Time ....................................... 27 78 3.7 Feature-tags ........................................ 28 79 3.8 Entity Tags ......................................... 28 80 4 RTSP Message ........................................ 28 81 4.1 Message Types ....................................... 29 82 4.2 Message Headers ..................................... 29 83 4.3 Message Body ........................................ 29 84 4.4 Message Length ...................................... 29 85 5 General Header Fields ............................... 30 86 6 Request ............................................. 30 87 6.1 Request Line ........................................ 30 88 6.2 Request Header Fields ............................... 32 89 7 Response ............................................ 33 90 7.1 Status-Line ......................................... 33 91 7.1.1 Status Code and Reason Phrase ....................... 33 92 7.1.2 Response Header Fields .............................. 34 93 8 Entity .............................................. 34 94 8.1 Entity Header Fields ................................ 35 95 8.2 Entity Body ......................................... 35 96 9 Connections ......................................... 35 97 9.1 Reliability and Acknowledgements .................... 37 98 9.2 Using Connections ................................... 38 99 9.3 Closing Connections ................................. 39 100 9.4 Timing Out Connections and RTSP Messages ............ 40 101 9.5 Use of IPv6 ......................................... 41 102 10 Capability Handling ................................. 41 103 11 Method Definitions .................................. 43 104 11.1 OPTIONS ............................................. 44 105 11.2 DESCRIBE ............................................ 45 106 11.3 SETUP ............................................... 47 107 11.4 PLAY ................................................ 50 108 11.5 PAUSE ............................................... 54 109 11.6 TEARDOWN ............................................ 58 110 11.7 GET_PARAMETER ....................................... 58 111 11.8 SET_PARAMETER ....................................... 59 112 11.9 REDIRECT ............................................ 61 113 11.10 PING ................................................ 63 114 12 Embedded (Interleaved) Binary Data .................. 64 115 13 Status Code Definitions ............................. 65 116 13.1 Success 1xx ......................................... 65 117 13.1.1 100 Continue ........................................ 65 118 13.2 Success 2xx ......................................... 65 119 13.3 Redirection 3xx ..................................... 66 120 13.3.1 300 Multiple Choices ................................ 66 121 13.3.2 301 Moved Permanently ............................... 66 122 13.3.3 302 Found ........................................... 66 123 13.3.4 303 See Other ....................................... 67 124 13.3.5 304 Not Modified .................................... 67 125 13.3.6 305 Use Proxy ....................................... 67 126 13.4 Client Error 4xx .................................... 67 127 13.4.1 400 Bad Request ..................................... 67 128 13.4.2 405 Method Not Allowed .............................. 67 129 13.4.3 451 Parameter Not Understood ........................ 68 130 13.4.4 452 reserved ........................................ 68 131 13.4.5 453 Not Enough Bandwidth ............................ 68 132 13.4.6 454 Session Not Found ............................... 68 133 13.4.7 455 Method Not Valid in This State .................. 68 134 13.4.8 456 Header Field Not Valid for Resource ............. 68 135 13.4.9 457 Invalid Range ................................... 68 136 13.4.10 458 Parameter Is Read-Only .......................... 69 137 13.4.11 459 Aggregate Operation Not Allowed ................. 69 138 13.4.12 460 Only Aggregate Operation Allowed ................ 69 139 13.4.13 461 Unsupported Transport ........................... 69 140 13.4.14 462 Destination Unreachable ......................... 69 141 13.4.15 470 Connection Authorization Required ............... 69 142 13.4.16 471 Connection Credentials not accepted ............. 69 143 13.5 Server Error 5xx .................................... 69 144 13.5.1 551 Option not supported ............................ 69 145 14 Header Field Definitions ............................ 70 146 14.1 Accept .............................................. 72 147 14.2 Accept-Credentials .................................. 72 148 14.3 Accept-Encoding ..................................... 76 149 14.4 Accept-Language ..................................... 76 150 14.5 Accept-Ranges ....................................... 76 151 14.6 Allow ............................................... 77 152 14.7 Authorization ....................................... 77 153 14.8 Bandwidth ........................................... 77 154 14.9 Blocksize ........................................... 77 155 14.10 Cache-Control ....................................... 78 156 14.11 Connection .......................................... 80 157 14.12 Connection-Credentials .............................. 80 158 14.13 Content-Base ........................................ 81 159 14.14 Content-Encoding .................................... 81 160 14.15 Content-Language .................................... 81 161 14.16 Content-Length ...................................... 81 162 14.17 Content-Location .................................... 81 163 14.18 Content-Type ........................................ 81 164 14.19 CSeq ................................................ 82 165 14.20 Date ................................................ 82 166 14.21 ETag ................................................ 82 167 14.22 Expires ............................................. 83 168 14.23 From ................................................ 83 169 14.24 Host ................................................ 84 170 14.25 If-Match ............................................ 84 171 14.26 If-Modified-Since ................................... 84 172 14.27 If-None-Match ....................................... 84 173 14.28 Last-Modified ....................................... 85 174 14.29 Location ............................................ 85 175 14.30 Proxy-Authenticate .................................. 85 176 14.31 Proxy-Require ....................................... 85 177 14.32 Proxy-Supported ..................................... 85 178 14.33 Public .............................................. 86 179 14.34 Range ............................................... 87 180 14.35 Referer ............................................. 89 181 14.36 Retry-After ......................................... 89 182 14.37 Require ............................................. 89 183 14.38 RTP-Info ............................................ 90 184 14.39 Scale ............................................... 92 185 14.40 Speed ............................................... 93 186 14.41 Server .............................................. 94 187 14.42 Session ............................................. 94 188 14.43 Supported ........................................... 96 189 14.44 Timestamp ........................................... 96 190 14.45 Transport ........................................... 96 191 14.46 Unsupported ......................................... 103 192 14.47 User-Agent .......................................... 103 193 14.48 Vary ................................................ 103 194 14.49 Via ................................................. 103 195 14.50 WWW-Authenticate .................................... 103 196 15 Caching ............................................. 103 197 16 Examples ............................................ 104 198 16.1 Media on Demand (Unicast) ........................... 105 199 16.2 Streaming of a Container file ....................... 107 200 16.3 Single Stream Container Files ....................... 110 201 16.4 Live Media Presentation Using Multicast ............. 112 202 16.5 Capability Negotiation .............................. 113 203 17 Security Framework .................................. 114 204 17.1 RTSP and HTTP Authentication ........................ 115 205 17.2 RTSP over TLS ....................................... 115 206 17.3 Security and Proxies ................................ 116 207 17.3.1 Accept-Credentials .................................. 117 208 17.3.2 User approved TLS procedure ......................... 118 209 18 Syntax .............................................. 119 210 18.1 Base Syntax ......................................... 119 211 18.2 RTSP Protocol Definition ............................ 121 212 18.2.1 Generic Protocol elements ........................... 121 213 18.2.2 Message Syntax ...................................... 122 214 18.2.3 Header Syntax ....................................... 126 215 19 Security Considerations ............................. 129 216 20 IANA Considerations ................................. 131 217 20.1 Feature-tags ........................................ 131 218 20.1.1 Description ......................................... 131 219 20.1.2 Registering New Feature-tags with IANA .............. 132 220 20.1.3 Registered entries .................................. 132 221 20.2 RTSP Methods ........................................ 132 222 20.2.1 Description ......................................... 132 223 20.2.2 Registering New Methods with IANA ................... 132 224 20.2.3 Registered Entries .................................. 133 225 20.3 RTSP Status Codes ................................... 133 226 20.3.1 Description ......................................... 133 227 20.3.2 Registering New Status Codes with IANA .............. 133 228 20.3.3 Registered Entries .................................. 133 229 20.4 RTSP Headers ........................................ 133 230 20.4.1 Description ......................................... 133 231 20.4.2 Registering New Headers with IANA ................... 134 232 20.4.3 Registered entries .................................. 134 233 20.5 Transport Header registries ......................... 134 234 20.5.1 Transport Protocols ................................. 135 235 20.5.2 Profile ............................................. 135 236 20.5.3 Lower Transport ..................................... 136 237 20.5.4 Transport modes ..................................... 136 238 20.6 Cache Directive Extensions .......................... 136 239 20.7 Accept-Credentials policies ......................... 137 240 20.8 URI Schemes ......................................... 138 241 20.9 SDP attributes ...................................... 138 242 A RTSP Protocol State Machine ......................... 139 243 A.1 States .............................................. 139 244 A.2 State variables ..................................... 139 245 A.3 Abbreviations ....................................... 140 246 A.4 State Tables ........................................ 140 247 B Media Transport Alternatives ........................ 143 248 B.1 RTP ................................................. 143 249 B.1.1 AVP ................................................. 143 250 B.1.2 AVP/UDP ............................................. 144 251 B.1.3 AVP/TCP ............................................. 146 252 B.1.4 Handling NPT Jumps in the RTP Media Layer ........... 146 253 B.1.5 Handling RTP Timestamps after PAUSE ................. 149 254 B.1.6 RTSP / RTP Integration .............................. 151 255 B.1.7 Scaling with RTP .................................... 151 256 B.1.8 Maintaining NPT synchronization with RTP 257 timestamps ..................................................... 151 258 B.1.9 Continuous Audio .................................... 151 259 B.1.10 Multiple Sources in an RTP Session .................. 152 260 B.1.11 Usage of SSRCs and the RTCP BYE Message During an 261 RTSP Session ................................................... 152 262 B.2 Future Additions .................................... 152 263 C Use of SDP for RTSP Session Descriptions ............ 153 264 C.1 Definitions ......................................... 153 265 C.1.1 Control URI ......................................... 153 266 C.1.2 Media Streams ....................................... 154 267 C.1.3 Payload Type(s) ..................................... 155 268 C.1.4 Format-Specific Parameters .......................... 155 269 C.1.5 Range of Presentation ............................... 155 270 C.1.6 Time of Availability ................................ 156 271 C.1.7 Connection Information .............................. 156 272 C.1.8 Entity Tag .......................................... 157 273 C.2 Aggregate Control Not Available ..................... 157 274 C.3 Aggregate Control Available ......................... 158 275 C.4 RTSP external SDP delivery .......................... 159 276 D Minimal RTSP implementation ......................... 159 277 D.1 Client .............................................. 159 278 D.1.1 Basic Playback ...................................... 160 279 D.1.2 Authentication-enabled .............................. 161 280 D.2 Server .............................................. 161 281 D.2.1 Basic Playback ...................................... 162 282 D.2.2 Authentication-enabled .............................. 162 283 E Requirements for Unreliable Transport of RTSP 284 messages ....................................................... 163 285 F Backwards Compatibility Considerations .............. 164 286 F.1 Requirement on Pause before Play in Play mode ....... 164 287 F.2 Using Persistent Connections ........................ 164 288 G Open Issues ......................................... 164 289 H Changes ............................................. 166 290 H.1 Issues Addressed .................................... 166 291 H.2 Changes made to the protocol and specification 292 .............................................................. 167 293 I Author Addresses .................................... 172 294 J Contributors ........................................ 172 295 K Acknowledgements .................................... 173 296 L Normative References ................................ 173 297 M Informative References .............................. 175 299 1 Introduction 301 1.1 RTSP Specification Update 303 This document is a draft to an update of RTSP, a proposed standard 304 defined in RFC 2326 [23]. The goal the update is to progress RTSP to 305 draft standard status. Many flaws have been identified in RTSP since 306 its publication. While this draft tries to address these flaws, not 307 all known issues have been resolved. Appendix H catalogs the issues 308 that have already been addressed. Known open issues are listed in 309 appendix G. 311 The possibility of progressing RTSP to draft standard without 312 republishing RTSP as a proposed standard depends on the changes 313 necessary to make the protocol work. 315 A list of bugs against the specification is available at 316 "http://rtspspec.sourceforge.net". These bugs should be taken into 317 account when reading this specification. Input on the unresolved bugs 318 and other issues can be sent via e-mail to the MMUSIC WG's mailing 319 list mmusic@ietf.org and the authors. 321 Not all of the contents of RFC 2326 are part of this draft. In an 322 attempt to prevent bloat, the specification has been reduced and 323 split. The content of this draft is the core specification of the 324 protocol. It contains the general idea behind RTSP and the basic 325 functionality necessary to establish an on-demand play-back session. 326 It also contains the mechanisms for extending the protocol. Any other 327 functionality will be published as extension documents. The Working 328 group is currently working on: 330 o NAT and FW traversal mechanisms for RTSP are described in a 331 document called "How to make Real-Time Streaming Protocol 332 (RTSP) traverse Network Address Translators (NAT) and interact 333 with Firewalls." [24]. 335 There have also been discussion or proposals about the following 336 extensions to RTSP: 338 o Mute and Unmute Extension [25]. 340 o RTSP Stream Switching [26]. 342 o Live Streaming Relays [27]. 344 o Unreliable transport of RTSP messages (rtspu). 346 o The Record functionality. 348 o A text body type with suitable syntax for basic parameters to 349 be used in SET_PARAMETER, and GET_PARAMETER. Including IANA 350 registry within the defined name space. 352 o An RTSP MIB. 354 1.2 Purpose 356 The Real-Time Streaming Protocol (RTSP) establishes and controls 357 single or several time-synchronized streams of continuous media such 358 as audio and video. Put simply, RTSP acts as a "network remote 359 control" for multimedia servers. 361 There is no notion of an RTSP connection in the protocol. Instead, an 362 RTSP server maintains a session labelled by an identifier to 363 associate groups of media streams and their states. An RTSP session 364 is not tied to a transport-level connection such as a TCP connection. 365 During a session, a client may open and close many reliable transport 366 connections to the server to issue RTSP requests for that session. 368 This memorandum describes the use of RTSP over a reliable connection 369 based transport level protocol such as TCP. RTSP may be implemented 370 over an unreliable connectionless transport protocol such as UDP. 371 While nothing in RTSP precludes this, additional definition of this 372 problem area needs to be handled as an extension to the core 373 specification. 375 The mechanisms of RTSP's operation over UDP were left out 376 of this spec. because they were poorly defined in RFC 2326 377 [23] and the tradeoff in size and complexity of this spec. 378 for a small gain in a targeted problem space was not deemed 379 justifiable. 381 The set of streams to be controlled in an RTSP session is defined by 382 a presentation description. This memorandum does not define a format 383 for the presentation description. However appendix C defines how SDP 384 [1] is used for this purpose. The streams controlled by RTSP may use 385 RTP [2] for their data transport, but the operation of RTSP does not 386 depend on the transport mechanism used to carry continuous media. 387 RTSP is intentionally similar in syntax and operation to HTTP/1.1 [3] 388 so that extension mechanisms to HTTP can in most cases also be added 389 to RTSP. However, RTSP differs in a number of important aspects from 390 HTTP: 392 o RTSP introduces a number of new methods and has a different 393 protocol identifier. 395 o RTSP has the notion of a session built into the protocol. 397 o An RTSP server needs to maintain state by default in almost 398 all cases, as opposed to the stateless nature of HTTP. 400 o Both an RTSP server and client can issue requests. 402 o Data is usually carried out-of-band by a different protocol. 403 Session descriptions returned in a DESCRIBE response (see 404 Section 11.2) and interleaving of RTP with RTSP over TCP are 405 exceptions to this rule (see Section 12). 407 o RTSP is defined to use ISO 10646 (UTF-8) rather than ISO 408 8859-1, consistent with HTML internationalization efforts 409 [28]. 411 o The Request-URI always contains the absolute URI. Because of 412 backward compatibility with a historical blunder, HTTP/1.1 [3] 413 carries only the absolute path in the request and puts the 414 host name in a separate header field. 416 This makes "virtual hosting" easier, where a single 417 host with one IP address hosts several document trees. 419 The protocol supports the following operations: 421 Retrieval of media from media server: The client can either 422 request a presentation description via RTSP DESCRIBE, HTTP 423 or some other method. If the presentation is being 424 multicast, the presentation description contains the 425 multicast addresses and ports to be used for the continuous 426 media. If the presentation is to be sent only to the client 427 via unicast, the client provides the destination for 428 security reasons. 430 Invitation of a media server to a conference: A media server can 431 be "invited" to join an existing conference to play back 432 media into the presentation. This mode is useful for 433 example distributed teaching applications. Several parties 434 in the conference may take turns "pushing the remote 435 control buttons". 437 RTSP requests may be handled by proxies, tunnels and caches as in 438 HTTP/1.1 [3]. 440 1.3 Notational Conventions 441 Since many of the definitions and syntax are identical to HTTP/1.1, 442 this specification only points to the section where they are defined 443 rather than copying it. For brevity, [HX.Y] is to be taken to refer 444 to Section X.Y of the current HTTP/1.1 specification (RFC 2616 [3]). 446 All the mechanisms specified in this document are described in both 447 prose and the augmented Backus-Naur form (BNF) described in detail in 448 RFC 2234 [4]. 450 Indented and smaller-type paragraphs are used to provide informative 451 background and motivation. This is intended to give readers who were 452 not involved with the formulation of the specification an 453 understanding of why things are the way they are in RTSP. 455 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 456 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 457 document are to be interpreted as described in RFC 2119 [5]. 459 The word, "unspecified" is used to indicate functionality or features 460 that are not defined in this specification. Such functionality cannot 461 be used in a standardized manner without further definition and 462 review in an extension specification to RTSP. 464 1.4 Terminology 466 Some of the terminology has been adopted from HTTP/1.1 [3]. Terms not 467 listed here are defined as in HTTP/1.1. 469 Aggregate control: The concept of controlling multiple streams 470 using a single timeline, generally maintained by the 471 server. A client, for example, uses aggregate control when 472 it issues a single play or pause message to simultaneously 473 control both the audio and video in a movie. 475 Aggregate control URI: The URI used in an RTSP request to refer 476 to and control an aggregated session. It normally, but not 477 always, corresponds to the presentation URI specified in 478 the session description. See Section 11.3 for more 479 information. 481 Conference: a multiparty, multimedia presentation, where "multi" 482 implies greater than or equal to one. 484 Client: The client requests media service from the media server. 486 Connection: A transport layer virtual circuit established 487 between two programs for the purpose of communication. 489 Container file: A file which may contain multiple media streams 490 which often constitutes a presentation when played 491 together. The concept of a container file is not embedded 492 in the protocol. However, RTSP servers may offer aggregate 493 control on the media streams within these files. 495 Continuous media: Data where there is a timing relationship 496 between source and sink; that is, the sink needs to 497 reproduce the timing relationship that existed at the 498 source. The most common examples of continuous media are 499 audio and motion video. Continuous media can be real-time 500 (interactive or conversational), where there is a "tight" 501 timing relationship between source and sink, or streaming 502 (playback), where the relationship is less strict. 504 Entity: The information transferred as the payload of a request 505 or response. An entity consists of meta-information in the 506 form of entity-header fields and content in the form of an 507 entity-body, as described in Section 8. 509 Feature-tag: A tag representing a certain set of functionality, 510 i.e. a feature. 512 Live: Normally used to describe a presentation or session with 513 media coming from ongoing event. This generally results in 514 that the session has a unbound or only loosely defined 515 duration, and that no seek operations are possible. 517 Media initialization: Datatype/codec specific initialization. 518 This includes such things as clock rates, color tables, 519 etc. Any transport-independent information which is 520 required by a client for playback of a media stream occurs 521 in the media initialization phase of stream setup. 523 Media parameter: Parameter specific to a media type that may be 524 changed before or during stream playback. 526 Media server: The server providing playback services for one or 527 more media streams. Different media streams within a 528 presentation may originate from different media servers. A 529 media server may reside on the same host or on a different 530 host from which the presentation is invoked. 532 Media server indirection: Redirection of a media client to a 533 different media server. 535 (Media) stream: A single media instance, e.g., an audio stream 536 or a video stream as well as a single whiteboard or shared 537 application group. When using RTP, a stream consists of all 538 RTP and RTCP packets created by a source within an RTP 539 session. 541 Message: The basic unit of RTSP communication, consisting of a 542 structured sequence of octets matching the syntax defined 543 in Section 18 and transmitted over a connection or a 544 connectionless transport. 546 Non-Aggregated Control: Control of a single media stream. Only 547 possible in RTSP sessions with a single media. 549 Participant: Member of a conference. A participant may be a 550 machine, e.g., a playback server. 552 Presentation: A set of one or more streams presented to the 553 client as a complete media feed and described by a 554 presentation description as defined below. Presentations 555 with more than one media stream is often handled in RTSP 556 under aggregate control. 558 Presentation description: A presentation description contains 559 information about one or more media streams within a 560 presentation, such as the set of encodings, network 561 addresses and information about the content. Other IETF 562 protocols such as SDP (RFC 2327 [1]) use the term "session" 563 for a presentation. The presentation description may take 564 several different formats, including but not limited to the 565 session description protocol format, SDP. 567 Response: An RTSP response. If an HTTP response is meant, that 568 is indicated explicitly. 570 Request: An RTSP request. If an HTTP request is meant, that is 571 indicated explicitly. 573 Request-URI: The URI used in a request to indicate the resource 574 on which the request is to be performed. 576 RTSP agent: Refers to either an RTSP client, an RTSP server, or 577 an RTSP Proxy. In this specification, there are many 578 capabilities that are common to these three entities such 579 as the capability to send requests or receive responses. 580 This term will be used when describing functionality that 581 is applicable to all three of these entities. 583 RTSP session: A stateful abstraction upon which the main control 584 methods of RTSP operate. An RTSP session is a server 585 entity; it is created, maintained and destroyed by the 586 server. It is established by an RTSP server upon the 587 completion of a successful SETUP request (when 200 OK 588 response is sent) and is labelled by a session identifier 589 at that time. The session exists until timed out by the 590 server or explicitly removed by a TEARDOWN request. An RTSP 591 session is a stateful entity; an RTSP server maintains an 592 explicit session state machine (see Appendix A) where most 593 state transitions are triggered by client requests. The 594 existence of a session implies the existence of state about 595 the session's media streams and their respective transport 596 mechanisms. A given session can have zero or more media 597 streams associated with it. An RTSP server uses the session 598 to aggregate control over multiple media streams. 600 Transport initialization: The negotiation of transport 601 information (e.g., port numbers, transport protocols) 602 between the client and the server. 604 URI: Universal Resource Identifier, see RFC 3986 [18]. In RTSP 605 the used URIs are as general rule in fact URI's as they 606 gives an location for the resource. Therefore although RTSP 607 URIs are a subset of URIs, they will be refered as URIs. 609 URI: Universal Resource Locator, is an URI which identifies the 610 resource through its primary access mechanism, rather than 611 identifying the resource by name or by some other 612 attribute(s) of that resource. 614 1.5 Protocol Properties 616 RTSP has the following properties: 618 Extendable: New methods and parameters can be easily added to 619 RTSP. 621 Easy to parse: RTSP can be parsed by standard HTTP or MIME 622 parsers. 624 Secure: RTSP re-uses web security mechanisms, either at the 625 transport level (TLS, RFC 2246 [6]) or within the protocol 626 itself. All HTTP authentication mechanisms such as basic 627 (RFC 2616 [3]) and digest authentication (RFC 2617 [7]) are 628 directly applicable. 630 Transport-independent: RTSP does not preclude the use of an 631 unreliable datagram protocol (UDP) (RFC 768 [8]) as it 632 would be possible to implement application-level 633 reliability. The use of a connectionless datagram protocol 634 such as UDP requires additional definition that may be 635 provided as extensions to the core RTSP specification. The 636 usage of the reliable stream protocol TCP (RFC 793 [9]) and 637 secured reliable stream protocol TLS over TCP [6] is what 638 is currently defined as transport protocol of RTSP 639 messages. 641 Multi-server capable: Each media stream within a presentation 642 can reside on a different server. The client automatically 643 establishes several concurrent control sessions with the 644 different media servers. Media synchronization is 645 performed at the transport level. 647 Separation of stream control and conference initiation: Stream 648 control is divorced from inviting a media server to a 649 conference. In particular, SIP [29] or H.323 [30] may be 650 used to invite a server to a conference. 652 Suitable for professional applications: RTSP supports frame- 653 level accuracy through SMPTE time stamps to allow remote 654 digital editing. 656 Presentation description neutral: The protocol does not impose a 657 particular presentation description or metafile format and 658 can convey the type of format to be used. However, the 659 presentation description is required to contain at least 660 one RTSP URI. 662 Proxy and firewall friendly: The protocol should be readily 663 handled by both application and transport-layer (SOCKS 664 [31]) firewalls. A firewall may need to understand the 665 SETUP method to open a "hole" for the media stream. 667 HTTP-friendly: Where sensible, RTSP reuses HTTP concepts, so 668 that the existing infrastructure can be reused. This 669 infrastructure includes PICS (Platform for Internet Content 670 Selection [32,33]) for associating labels with content. 671 However, RTSP does not just add methods to HTTP since the 672 controlling continuous media requires server state in most 673 cases. 675 Appropriate server control: If a client can start a stream, it 676 needs to be able to stop a stream. Servers should not start 677 streaming to clients in such a way that clients cannot stop 678 the stream. 680 Transport negotiation: The client can negotiate the transport 681 method prior to actually needing to process a continuous 682 media stream. 684 1.6 Extending RTSP 686 Since not all media servers have the same functionality, media 687 servers by necessity will support different sets of requests. For 688 example: 690 o A server may not be capable of seeking (absolute positioning) 691 if it is to support live events only. 693 o Some servers may not support setting stream parameters and 694 thus not support GET_PARAMETER and SET_PARAMETER. 696 o Some server may support an RTSP extension, for example the 697 currently proposed "end of stream" indication. 699 A server SHOULD implement all header fields described in Section 14. 701 It is up to the creators of presentation descriptions not to ask the 702 impossible of a server. This situation is similar in HTTP/1.1 [3], 703 where the methods described in [H19.5] are not likely to be supported 704 across all servers. 706 RTSP can be extended in three ways, listed here in order of the 707 magnitude of changes supported: 709 o Existing methods can be extended with new parameters, e.g. 710 headers, as long as these parameters can be safely ignored by 711 the recipient. If the client needs negative acknowledgement 712 when a method extension is not supported, a tag corresponding 713 to the extension may be added in the Require: field (see 714 Section 14.37). 716 o New methods can be added. If the recipient of the message does 717 not understand the request, it responds with error code 501 718 (Not Implemented) and the sender should not attempt to use 719 this method again. A client may also use the OPTIONS method to 720 inquire about methods supported by the server. The server MUST 721 list the methods it supports using the Public response header. 723 o A new version of the protocol can be defined, allowing almost 724 all aspects (except the position of the protocol version 725 number) to change. 727 The basic capability discovery mechanism can be used to both discover 728 support for a certain feature and to ensure that a feature is 729 available when performing a request. For detailed explanation of this 730 see section 10. 732 1.7 Overall Operation 734 Each presentation and media stream is identified by an RTSP URI. The 735 overall presentation and the properties of the media the presentation 736 is made up of are defined by a presentation description file, the 737 format of which is outside the scope of this specification. The 738 presentation description file may be obtained by the client using 739 HTTP or other means such as email and may not necessarily be stored 740 on the media server. 742 For the purposes of this specification, a presentation description is 743 assumed to describe one or more presentations, each of which 744 maintains a common time axis. For simplicity of exposition and 745 without loss of generality, it is assumed that the presentation 746 description contains exactly one such presentation. A presentation 747 may contain several media streams. 749 The presentation description file contains a description of the media 750 streams making up the presentation, including their encodings, 751 language, and other parameters that enable the client to choose the 752 most appropriate combination of media. In this presentation 753 description, each media stream that is individually controllable by 754 RTSP is identified by an RTSP URI, which points to the media server 755 handling that particular media stream and names the stream stored on 756 that server. Several media streams can be located on different 757 servers; for example, audio and video streams can be split across 758 servers for load sharing. The description also enumerates which 759 transport methods the server is capable of. 761 Besides the media parameters, the network destination address and 762 port need to be determined. Several modes of operation can be 763 distinguished: 765 Unicast: The media is transmitted to the source of the RTSP 766 request, with the port number chosen by the client. 767 Alternatively, the media is transmitted on the same 768 reliable stream as RTSP. 770 Multicast, server chooses address: The media server picks the 771 multicast address and port. This is the typical case for a 772 live or near-media-on-demand transmission. 774 Multicast, client chooses address: If the server is to 775 participate in an existing multicast conference, the 776 multicast address, port and encryption key are given by the 777 conference description, established by means outside the 778 scope of this specification, for example by a SIP created 779 conference. 781 1.8 RTSP States 783 RTSP controls a stream which may be sent via a separate protocol, 784 independent of the control channel. For example, RTSP control may be 785 transported on a TCP connection while the media data is conveyed via 786 UDP. Thus, data delivery continues even if no RTSP requests are 787 received by the media server. Also, during its lifetime, a single 788 media stream may be controlled by RTSP requests issued sequentially 789 on different TCP connections. Therefore, the server needs to maintain 790 "session state" to be able to correlate RTSP requests with a stream. 791 The state transitions are described in Appendix A. 793 Many methods in RTSP do not contribute to state. However, the 794 following play a central role in defining the allocation and usage of 795 stream resources on the server: SETUP, PLAY, PAUSE, REDIRECT, PING 796 and TEARDOWN. 798 SETUP: Causes the server to allocate resources for a stream and 799 create an RTSP session. 801 PLAY: Starts data transmission on a stream allocated via SETUP. 803 PAUSE: Temporarily halts a stream without freeing server 804 resources. 806 REDIRECT: Indicates that the session should be moved to new 807 server / location 809 PING: Prevents the identified session from being timed out. 811 TEARDOWN: Frees resources associated with the stream. The RTSP 812 session ceases to exist on the server. 814 RTSP methods that contribute to state use the Session header field 815 (Section 14.42) to identify the RTSP session whose state is being 816 manipulated. The server generates session identifiers in response to 817 SETUP requests (Section 11.3). 819 1.9 Relationship with Other Protocols 821 RTSP has some overlap in functionality with HTTP. It also may 822 interact with HTTP in that the initial contact with streaming content 823 is often to be made through a web page. The current protocol 824 specification aims to allow different hand-off points between a web 825 server and the media server implementing RTSP. For example, the 826 presentation description can be retrieved using HTTP or RTSP, which 827 reduces round trips in web-browser-based scenarios, yet also allows 828 for stand alone RTSP servers and clients which do not rely on HTTP at 829 all. However, RTSP differs fundamentally from HTTP in that most data 830 delivery takes place out-of-band in a different protocol. HTTP is an 831 asymmetric protocol where the client issues requests and the server 832 responds. In RTSP, both the media client and media server can issue 833 requests. RTSP requests are also stateful; they may set parameters 834 and continue to control a media stream long after the request has 835 been acknowledged. 837 Re-using HTTP functionality has advantages in at least two 838 areas, namely security and proxies. The requirements are 839 very similar, so having the ability to adopt HTTP work on 840 caches, proxies and authentication is valuable. 842 RTSP assumes the existence of a presentation description format that 843 can express both static and temporal properties of a presentation 844 containing several media streams. Session Description Protocol (SDP) 845 [1] is generally the format of choice; however, RTSP is not bound to 846 it. For data delivery, most real-time media will use RTP as a 847 transport protocol. While RTSP works well with RTP, it is not tied to 848 RTP. 850 2 RTSP Use Cases 852 This section describes some of the use cases for RTSP. They are 853 listed in descending order of importance in regards to ensuring that 854 all necessary functionality is present. This specification does only 855 fully support usage of the two first. Also in these first two cases 856 are there special cases that will not be supported without 857 extensions, e.g. the redirection of media to another address than the 858 controlling entity. 860 2.1 On-demand Playback of Stored Content 862 An RTSP capable server stores content suitable for being streamed to 863 a client. A client desiring playback of any of the stored content 864 uses RTSP to set up the media transport required for the desired 865 content. Then RTSP is used to initiate, halt and manipulate the 866 transmission of the content. There are also requirement on being able 867 to use RTSP to carry necessary description and synchronization 868 information for the content. The above high level description can be 869 broken down into a number of functionalities that RTSP needs to be 870 capable of. 872 Presentation Description: The possibility to carry 873 initialization information about the presentation 874 (content), for example, which media codec(s) that are 875 needed for the content. Other information that are 876 important; how many media stream that the presentation 877 contains; what transport protocols to use for the media 878 streams; and identifiers for these media streams. This 879 information is required before setup of the content is 880 possible. The information is also needed by the client to 881 determine if it is capable at all to support the content. 882 This information is not required to be sent using RTSP, 883 instead other external protocols can be utilized to 884 transport presentation descriptions. Two good examples are 885 the use of HTTP [3] or email to fetch or receive 886 presentation descriptions like SDP [1]. .XP Setup: 887 Performing setup of some or all of the media streams in a 888 presentation. The setup itself consist of determining which 889 protocols for media transport to use; the necessary 890 parameters for the protocol, like addresses and ports. .XP 891 Control of Transmission: After the necessary media streams 892 has been established the client can request the server to 893 start transmitting the content. There is need to allow the 894 client to arbitrary times start or stop the transmission of 895 the content. There are also exist need to be able to start 896 the transmission at an any point in the timeline of the 897 presentation. .XP Synchronization: For media transport 898 protocols like RTP [16] it might be beneficial to carry 899 synchronization information within RTSP. Either due to the 900 lack of inter media synchronization within the protocol 901 itself, or the potential delay before the synchronization 902 is established (which is the case for RTP when using RTCP). 903 .XP Termination There is also need to be able to terminate 904 the established contexts. 905 For this use cases there is a number of assumption about how it 906 works. These are listed below: 908 On-Demand content: The content available is stored at the server 909 and can be accessed at any time during a time period when 910 it is intended to be available. .XP Independent sessions: A 911 server is capable of serving a number of clients 912 simultaneously, including from the same piece of content at 913 different points in that presentations time-line. .XP 914 Unicast Transport: Content for each individual client is 915 transmitted to them using unicast traffic. 916 It is also possible to redirect the media traffic to another 917 destination than where the entity controlling traffic uses. 918 However allowing this without appropriate mechanisms for 919 checking that the destination approves of this is a denial of 920 service threat. 922 2.2 Unicast distribution of Live Content 924 This use cases is not that different from the above on-demand content 925 case (see section 2.1. The difference is really the restriction the 926 content itself establish. Live content is continuously distributed as 927 it becomes available from a source, i.e. the main difference to on- 928 demand is that one starts distributing content before the end of it 929 has become available to the server. In many cases the consumer of 930 live content is only interested in consuming what is actually happens 931 "now", i.e. very similar to broadcast TV. However in this case it is 932 assumed that there exist no broadcast or multicast channel to the 933 users, and instead the server functions as a distribution node, 934 sending the same content to multiple receivers, using unicast traffic 935 between server and client. This unicast traffic and the transport 936 parameters are individually negotiated for each receiving client. 937 Another aspect of live content is that it has often very limited time 938 of availability, as it is only is available for the duration of the 939 event the content covers. A example of such a live content could for 940 example be a music concert, which lasts 2 hour and starts at a 941 predetermined time. Thus there is need to announce when and for how 942 long the live content is available. 944 2.3 On-demand Playback using Multicast 946 It is possible to use RTSP to request that media is delivered to a 947 multicast group. The entity setting up the session (the controller) 948 will then control when and what media that is delivered to the group. 949 Also this use case has some potential for denial of service attacks, 950 in this case flooding any multicast group. Therefore there is need 951 for a mechanism indicating that the group actually accepts the 952 traffic from the RTSP server. An open issue in this use case is how 953 one ensures that all receivers listening to the multicast or 954 broadcast receives the session presentation configuring the 955 receivers. 957 2.4 Inviting a RTSP server into a conference 959 If one has an established conference or group session, it is possible 960 to have a RTSP server distribute media to the whole group. The 961 transmission to the group is simplest controlled by a single 962 participant or leader of the conference. Shared control might be 963 possible, but would require further investigation and possibly 964 extensions. There are some protocol mechanisms missing for this 965 scenario. For reasonable complexity in the media transmission stage, 966 this use case assumes that there exist either multicast or a 967 conference focus that redistribute media to all participants. In some 968 more detail, this use case is intended to be able to handle the 969 following scenario: A conference leader or participant (from here 970 called the controller) has some pre-stored content on a RTSP server 971 that he likes to share with the group. The controller sets up a RTSP 972 session at the streaming server for the content the controller likes 973 to share. The session description for the content is retrieved to the 974 controller. The media destination for the media content is set to the 975 shared multicast group or conference focus. When desired by the 976 controller, he/she can start and stop the transmission of the media 977 to the conference group. There are several issues with this use case 978 that is not solved by this core specification for RTSP: 980 o Denial of service threat, to avoid a RTSP server from being a 981 unknowing participant of a denial of service attack the server 982 needs to be able to verify the destinations acceptance for the 983 media. Such a mechanism does not yet exist that can be used to 984 verify the approval to received media, instead only policies 985 can be used, which can be made to work in controlled 986 environments. .IP o 2 The problem of distributing the 987 presentation description to all participants in the group. To 988 enable a media receiver to decode the content correctly the 989 media configuration information will need to be distributed 990 reliable to all participants. This will most likely require 991 support from an external protocol. .IP o 2 Passing the 992 control. If it is desired to be able to pass the control of 993 the RTSP session between the participants some support will be 994 required by an external protocol for the necessary exchange of 995 state information and possibly floor control of who is 996 controlling the RTSP session. 998 So if there interest in this use case further work on the necessary 999 extensions has to be performed. 1001 2.5 Live Content using Multicast 1003 This use case does in its simplest form do not require any use of 1004 RTSP at all. This is what multicast conferences being announce with 1005 SAP and SDP are intended to handle. However in use cases where more 1006 advance features like access control to the multicast session is 1007 desired, RTSP could be used for session establishment. A client 1008 desiring to join a live multicasted media session with cryptographic 1009 (encryption) access control could use RTSP in the following way. The 1010 source of the session, announces the session and gives all interested 1011 to join, a RTSP URI. The client connects to the server and requests 1012 the presentation description allowing for configuration the 1013 reception. In this step it is possible to use secured transport for 1014 the client, and also desired levels of authentication, for example 1015 for charging purposes or simply access control. An RTSP link also 1016 allows for load balancing between multiple servers. However if this 1017 the only thing that occurs it can probably be solved as simple using 1018 HTTP. However for session where the sender likes to keep track of 1019 each individual receiver during the session, and possibly use this 1020 side channel for pushing out key-updates or other side information 1021 that is desirable to be done on a per receiver basis, and the 1022 receivers are not know prior to the session start, the state 1023 establishment that RTSP provides can be beneficial. In this case a 1024 client would establish a RTSP session to the multicast group. The 1025 RTSP server will not transmit any media, instead it will simply point 1026 to the multicast group. However the client and server will be able to 1027 keep the session alive for as long as the receiver participates in 1028 the session. Thus enabling for example server to client pushes of 1029 updates. This use cases will most likely not be able to actually 1030 implement some extensions in relation to the server to client push 1031 mechanism. Here a method like ANNOUNCE might be suitable, however it 1032 will require a RTSP extension to revive the method. 1034 3 Protocol Parameters 1036 3.1 RTSP Version 1038 HTTP Specification Section [H3.1] applies, with HTTP replaced by 1039 RTSP. This specification defines version 1.0 of RTSP. 1041 3.2 RTSP URI 1043 The "rtsp", "rtsps" schemes are used to refer to network resources 1044 via the RTSP protocol. This section defines the scheme-specific 1045 syntax and semantics for RTSP URIs. The RTSP URI is case sensitive. 1046 An URI scheme "rtspu" was defined in RFC 2326 for transport of RTSP 1047 messages over unreliable transport (UDP) and is currently deprecated 1048 and reserved, and MUST NOT be used . See Appendix E for further 1049 information. 1051 Informative RTSP URI syntax: 1053 rtsp[u|s]://host[:port]/abspath[?query]#fragment 1055 See section 18.2.1 for the formal definition of the RTSP URI syntax. 1057 The fragment identifier is used as defined in section 4.1 of [18], 1058 i.e. the fragment is to be stripped from the URI by the requestor and 1059 not included in the request. The user agent also needs to interpret 1060 the value of the fragment based on the media type the request relates 1061 to, i.e. the media type indicated in Content-Type header in the 1062 response to DESCRIBE. 1064 The syntax of any URI query string is unspecified and responder 1065 (usually the server) specific. As it is from the requestor an opaque 1066 string, it needs to be handled as such. 1068 The URI scheme rtsp requires that commands are issued via a reliable 1069 protocol (within the Internet, TCP), while the scheme rtsps 1070 identifies a reliable transport using secure transport (TLS [6]). 1072 If the no port number is provided in the URI, port number 554 SHALL 1073 be used. The semantics are that the identified resource can be 1074 controlled by RTSP at the server listening for TCP (scheme "rtsp") 1075 connections on that port of host, and the Request-URI for the 1076 resource is rtsp_URI. For the scheme rtsps the TCP and UDP port 322 1077 is registered and SHALL be assumed. 1079 The use of IP addresses in URIs SHOULD be avoided whenever possible 1080 (see RFC 1924 [10]). Note: Using qualified domain names in any URI is 1081 one requirement for making it possible for RFC 2326 implementations 1082 of RTSP to use IPv6. This specification is updated to allow for 1083 literal IPv6 addresses in RTSP URIs using the host specification in 1084 RFC 2732 [11]. 1086 A presentation or a stream is identified by a textual media 1087 identifier, using the character set and escape conventions [H3.2] of 1088 URIs (RFC 3986 [18]). URIs may refer to a stream or an aggregate of 1089 streams, i.e., a presentation. Accordingly, requests described in 1090 Section 11 can apply to either the whole presentation or an 1091 individual stream within the presentation. Note that some request 1092 methods can only be applied to streams, not presentations and vice 1093 versa. 1095 For example, the RTSP URI: 1097 rtsp://media.example.com:554/twister/audiotrack 1099 identifies the audio stream within the presentation "twister", which 1100 can be controlled via RTSP requests issued over a TCP connection to 1101 port 554 of host media.example.com 1103 Also, the RTSP URI: 1105 rtsp://media.example.com:554/twister 1107 identifies the presentation "twister", which may be composed of audio 1108 and video streams. 1110 This does not imply a standard way to reference streams in 1111 URIs. The presentation description defines the hierarchical 1112 relationships in the presentation and the URIs for the 1113 individual streams. A presentation description may name a 1114 stream "a.mov" and the whole presentation "b.mov". 1116 The path components of the RTSP URI are opaque to the client and do 1117 not imply any particular file system structure for the server. 1119 This decoupling also allows presentation descriptions to be 1120 used with non-RTSP media control protocols simply by 1121 replacing the scheme in the URI. 1123 3.3 Session Identifiers 1125 Session identifiers are strings of any arbitrary length. A session 1126 identifier MUST be chosen randomly and MUST be at least eight 1127 characters long to make guessing it more difficult. (See Section 19.) 1129 3.4 SMPTE Relative Timestamps 1131 A SMPTE relative timestamp expresses time relative to the start of 1132 the clip. Relative timestamps are expressed as SMPTE time codes for 1133 frame-level access accuracy. The time code has the format 1134 hours:minutes:seconds:frames.subframes, 1135 with the origin at the start of the clip. The default smpte format 1136 is"SMPTE 30 drop" format, with frame rate is 29.97 frames per second. 1137 Other SMPTE codes MAY be supported (such as "SMPTE 25") through the 1138 use of alternative use of "smpte time". For the "frames" field in the 1139 time value can assume the values 0 through 29. The difference between 1140 30 and 29.97 frames per second is handled by dropping the first two 1141 frame indices (values 00 and 01) of every minute, except every tenth 1142 minute. If the frame value is zero, it may be omitted. Subframes are 1143 measured in one-hundredth of a frame. 1145 Examples: 1147 smpte=10:12:33:20- 1148 smpte=10:07:33- 1149 smpte=10:07:00-10:07:33:05.01 1150 smpte-25=10:07:00-10:07:33:05.01 1152 3.5 Normal Play Time 1154 Normal play time (NPT) indicates the stream absolute position 1155 relative to the beginning of the presentation, not to be confused 1156 with the Network Time Protocol (NTP) [34]. The timestamp consists of 1157 a decimal fraction. The part left of the decimal may be expressed in 1158 either seconds or hours, minutes, and seconds. The part right of the 1159 decimal point measures fractions of a second. 1161 The beginning of a presentation corresponds to 0.0 seconds. Negative 1162 values are not defined. The special constant now is defined as the 1163 current instant of a live type event. It MAY only be used for live 1164 type events, and SHALL NOT be used for on-demand content. 1166 NPT is defined as in DSM-CC [35]: "Intuitively, NPT is the clock the 1167 viewer associates with a program. It is often digitally displayed on 1168 a VCR. NPT advances normally when in normal play mode (scale = 1), 1169 advances at a faster rate when in fast scan forward (high positive 1170 scale ratio), decrements when in scan reverse (high negative scale 1171 ratio) and is fixed in pause mode. NPT is (logically) equivalent to 1172 SMPTE time codes." 1174 Examples: 1176 npt=123.45-125 1177 npt=12:05:35.3- 1178 npt=now- 1180 The syntax conforms to ISO 8601 [36]. The npt-sec notation 1181 is optimized for automatic generation, the ntp-hhmmss 1182 notation for consumption by human readers. The "now" 1183 constant allows clients to request to receive the live feed 1184 rather than the stored or time-delayed version. This is 1185 needed since neither absolute time nor zero time are 1186 appropriate for this case. 1188 3.6 Absolute Time 1190 Absolute time is expressed as ISO 8601 [36] timestamps, using UTC 1191 (GMT). Fractions of a second may be indicated. 1193 Example for November 8, 1996 at 14h37 and 20 and a quarter seconds 1194 UTC: 1196 19961108T143720.25Z 1198 3.7 Feature-tags 1200 Feature-tags are unique identifiers used to designate features in 1201 RTSP. These tags are used in Require (Section 14.37), Proxy-Require 1202 (Section 14.31), Proxy-Supported (Section 14.32), Unsupported 1203 (Section 14.46), and Supported (Section 14.43) header fields. 1205 Feature tag needs to indicate if they apply to servers only, proxies 1206 only, or both server and proxies. 1208 The creator of a new RTSP feature-tag should either prefix the 1209 feature-tag with a reverse domain name (e.g., 1210 "com.example.mynewfeature" is an apt name for a feature whose 1211 inventor can be reached at "example.com"), or register the new 1212 feature-tag with the Internet Assigned Numbers Authority (IANA), see 1213 IANA Section 20. 1215 The usage of feature tags are further described in section 10 that 1216 deals with capability handling. 1218 3.8 Entity Tags 1220 Entity tags are opaque strings that are used to compare two entities 1221 from the same resource, for example in caches or to optimize setup 1222 after a redirect. Further explanation is present in [H3.11]. For 1223 explanation on how to compare Entity tags see [H13.3]. Entity tags 1224 can be carried in the ETag header (see section 14.21) or in SDP (see 1225 section C.1.8). 1227 Entity tags are used in RTSP to make some methods conditional. The 1228 methods are made conditional through the inclusion of headers, see 1229 14.25 and 14.27. 1231 4 RTSP Message 1233 RTSP is a text-based protocol and uses the ISO 10646 character set in 1234 UTF-8 encoding (RFC 2279 [13]). Lines are terminated by CRLF, but 1235 receivers should be prepared to also interpret CR and LF by 1236 themselves as line terminators. 1238 Text-based protocols make it easier to add optional 1239 parameters in a self-describing manner. Since the number of 1240 parameters and the frequency of commands is low, processing 1241 efficiency is not a concern. Text-based protocols, if done 1242 carefully, also allow easy implementation of research 1243 prototypes in scripting languages such as Tcl, Visual Basic 1244 and Perl. 1246 The 10646 character set avoids tricky character set switching, but is 1247 invisible to the application as long as US-ASCII is being used. This 1248 is also the encoding used for RTCP. ISO 8859-1 translates directly 1249 into Unicode with a high-order octet of zero. ISO 8859-1 characters 1250 with the most-significant bit set are represented as 1100001x 1251 10xxxxxx. (See RFC 2279 [13]) 1253 Requests contain methods, the object the method is operating upon and 1254 parameters to further describe the method. Methods are idempotent, 1255 unless otherwise noted. Methods are also designed to require little 1256 or no state maintenance at the media server. 1258 4.1 Message Types 1260 See [H4.1]. 1262 4.2 Message Headers 1264 See [H4.2]. 1266 4.3 Message Body 1268 See [H4.3] 1270 4.4 Message Length 1272 When a message body is included with a message, the length of that 1273 body is determined by one of the following (in order of precedence): 1275 1. Any response message which MUST NOT include a message body 1276 (such as the 1xx, 204, and 304 responses) is always 1277 terminated by the first empty line after the header fields, 1278 regardless of the entity-header fields present in the 1279 message. (Note: An empty line consists of only CRLF.) 1281 2. If a Content-Length header field (section 14.16) is 1282 present, its value in bytes represents the length of the 1283 message-body. If this header field is not present, a value 1284 of zero is assumed. 1286 Unlike an HTTP message, an RTSP message MUST contain a Content-Length 1287 header field whenever it contains a message body. Note that RTSP does 1288 not (at present) support the HTTP/1.1 "chunked" transfer coding(see 1289 [H3.6.1]). 1291 Given the moderate length of presentation descriptions 1292 returned, the server should always be able to determine its 1293 length, even if it is generated dynamically, making the 1294 chunked transfer encoding unnecessary. 1296 5 General Header Fields 1298 See [H4.5], except that Pragma, Trailer, Transfer-Encoding, Upgrade, 1299 and Warning headers are not defined. RTSP further defines the CSeq, 1300 and Timestamp. The general headers are listed in table 1: 1302 Header Name Comment 1303 _________________________________ 1304 Cache-Control See section 14.10 1305 Connection See section 14.11 1306 CSeq See section 14.19 1307 Date See section 14.20 1308 Supported See section 14.43 1309 Timestamp See section 14.44 1310 Via See section 14.49 1312 Table 1: The General headers used in RTSP. 1314 6 Request 1316 A request messages uses the format outlined below, regardless of the 1317 direction of a request, client to server or server to client: 1319 o Request line, containing the method to be applied to the 1320 resource, the identifier of the resource, and the protocol 1321 version in use; 1323 o zero or more Header lines, that can be of the following types: 1324 general (Section 5), request (Section 6.2), or entity (Section 1325 8.1); 1327 o One empty line (CR/LF) to indicate the end of the header 1328 section; 1330 o Optionally a message body (entity), consisting of one or more 1331 lines. the length of the message body in number of bytes is 1332 indicated by the Content-Length entity header. 1334 6.1 Request Line 1336 The request line provides the key information about the request: 1337 What method, on what resources and using which RTSP version. The 1338 methods that are defined by this specification are listed in Table 2. 1340 Method Defined In Section 1341 _________________________________ 1342 DESCRIBE Section 11.2 1343 GET_PARAMETER Section 11.7 1344 OPTIONS Section 11.1 1345 PAUSE Section 11.5 1346 PLAY Section 11.4 1347 PING Section 11.10 1348 REDIRECT Section 11.9 1349 SETUP Section 11.3 1350 SET_PARAMETER Section 11.8 1351 TEARDOWN Section 11.6 1353 Table 2: The RTSP Methods 1355 The syntax of the RTSP request line is the following: 1357 SP SP CRLF 1359 Note: This syntax cannot be freely changed in future versions of 1360 RTSP. This line needs to remain parsable by older RTSP 1361 implementations since it indicates the RTSP version of the message. 1363 In contrast to HTTP/1.1 [3], RTSP requests identify the resource 1364 through an absolute RTSP URI (scheme, host, and port)(see section 1365 3.2) rather than just the absolute path. 1367 HTTP/1.1 requires servers to understand the absolute URI, 1368 but clients are supposed to use the Host request header. 1369 This is purely needed for backward-compatibility with 1370 HTTP/1.0 servers, a consideration that does not apply to 1371 RTSP. 1373 An asterisk "*" can be used in the Request-URI to indicate that the 1374 request does not apply to a particular resource, but to the server or 1375 proxy itself, and is only allowed when the request method does not 1376 necessarily apply to a resource. 1378 For example: 1380 OPTIONS * RTSP/1.0 1382 An OPTIONS in this form will determine the capabilities of the server 1383 or the proxy that first receives the request. If the capability of 1384 the specific server needs to be determined, without regard to the 1385 capability of an intervening proxy, the server should be addressed 1386 explicitly with an absolute URI that contains the server's address. 1388 For example: 1390 OPTIONS rtsp://example.com RTSP/1.0 1392 6.2 Request Header Fields 1394 The RTSP headers in Table 3 can be included in a request, as request 1395 headers, to modify the specifics of the request. These headers may 1396 also be used in the response to a request, as response headers, to 1397 modify the specifics of a response (Section 7.1.2). 1399 Header Defined in Section 1400 _____________________________________ 1401 Accept Section 14.1 1402 Accept-Encoding Section 14.3 1403 Accept-Language Section 14.4 1404 Authorization Section 14.7 1405 Bandwidth Section 14.8 1406 Blocksize Section 14.9 1407 From Section 14.23 1408 If-Match Section 14.25 1409 If-Modified-Since Section 14.26 1410 If-None-Match Section 14.27 1411 Proxy-Require Section 14.31 1412 Range Section 14.34 1413 Referer Section 14.35 1414 Require Section 14.37 1415 Scale Section 14.39 1416 Session Section 14.42 1417 Speed Section 14.40 1418 Supported Section 14.43 1419 Transport Section 14.45 1420 User-Agent Section 14.47 1422 Table 3: The RTSP request headers 1424 Detailed headers definition are provided in Section 14. 1426 7 Response 1428 [H6] applies except that HTTP-Version is replaced by RTSP-Version. 1429 Also, RTSP defines additional status codes and does not define some 1430 HTTP codes. The valid response codes and the methods they can be used 1431 with are defined in Table 4. 1433 After receiving and interpreting a request message, the recipient 1434 responds with an RTSP response message. 1436 7.1 Status-Line 1438 The first line of a Response message is the Status-Line, consisting 1439 of the protocol version followed by a numeric status code, and the 1440 textual phrase associated with the status code, with each element 1441 separated by SP characters. No CR or LF is allowed except in the 1442 final CRLF sequence. 1444 SP SP CRLF 1446 7.1.1 Status Code and Reason Phrase 1448 The Status-Code element is a 3-digit integer result code of the 1449 attempt to understand and satisfy the request. These codes are fully 1450 defined in Section 13. The Reason-Phrase is intended to give a short 1451 textual description of the Status-Code. The Status-Code is intended 1452 for use by automata and the Reason-Phrase is intended for the human 1453 user. The client is not required to examine or display the Reason- 1454 Phrase. 1456 The first digit of the Status-Code defines the class of response. The 1457 last two digits do not have any categorization role. There are 5 1458 values for the first digit: 1460 o 1xx: Informational - Request received, continuing process 1462 o 2xx: Success - The action was successfully received, 1463 understood, and accepted 1465 o 3rr: Redirection - Further action needs to be taken in order 1466 to complete the request 1468 o 4xx: Client Error - The request contains bad syntax or cannot 1469 be fulfilled 1471 o 5xx: Server Error - The server failed to fulfill an apparently 1472 valid request 1474 The individual values of the numeric status codes defined for 1475 RTSP/1.0, and an example set of corresponding Reason-Phrases, are 1476 presented in table 4. The reason phrases listed here are only 1477 recommended; they may be replaced by local equivalents without 1478 affecting the protocol. Note that RTSP adopts most HTTP/1.1 [3] 1479 status codes and adds RTSP-specific status codes starting at x50 to 1480 avoid conflicts with newly defined HTTP status codes. 1482 RTSP status codes are extensible. RTSP applications are not required 1483 to understand the meaning of all registered status codes, though such 1484 understanding is obviously desirable. However, applications MUST 1485 understand the class of any status code, as indicated by the first 1486 digit, and treat any unrecognized response as being equivalent to the 1487 x00 status code of that class, with the exception that an 1488 unrecognized response MUST NOT be cached. For example, if an 1489 unrecognized status code of 431 is received by the client, it can 1490 safely assume that there was something wrong with its request and 1491 treat the response as if it had received a 400 status code. In such 1492 cases, user agents SHOULD present to the user the entity returned 1493 with the response, since that entity is likely to include human- 1494 readable information which will explain the unusual status. 1496 7.1.2 Response Header Fields 1498 The response-header fields allow the request recipient to pass 1499 additional information about the response which cannot be placed in 1500 the Status-Line. These header fields give information about the 1501 server and about further access to the resource identified by the 1502 Request-URI. All headers currently being classified as response 1503 headers are listed in table 5. 1505 Response-header field names can be extended reliably only in 1506 combination with a change in the protocol version. However, new or 1507 experimental header fields MAY be given the semantics of response- 1508 header fields if all parties in the communication recognize them to 1509 be response-header fields. Unrecognized header fields are treated as 1510 entity-header fields. 1512 8 Entity 1514 Request and Response messages MAY transfer an entity if not otherwise 1515 restricted by the request method or response status code. An entity 1516 consists of entity-header fields and an entity-body, although some 1517 responses will only include the entity-headers. 1519 The SET_PARAMETER, and GET_PARAMETER request and response, and 1520 DESCRIBE response MAY have an entity. All 4xx and 5xx responses MAY 1521 also have an entity. 1523 In this section, both sender and recipient refer to either the client 1524 or the server, depending on who sends and who receives the entity. 1526 8.1 Entity Header Fields 1528 Entity-header fields define optional meta-information about the 1529 entity-body or, if no body is present, about the resource identified 1530 by the request. The entity header fields are listed in table 8.1. 1532 Header Defined in Section 1533 ____________________________________ 1534 Allow Section 14.6 1535 Content-Base Section 14.13 1536 Content-Encoding Section 14.14 1537 Content-Language Section 14.15 1538 Content-Length Section 14.16 1539 Content-Location Section 14.17 1540 Content-Type Section 14.18 1541 Expires Section 14.22 1542 Last-Modified Section 14.28 1544 Table 6: The RTSP entity headers 1546 The extension-header mechanism allows additional entity-header fields 1547 to be defined without changing the protocol, but these fields cannot 1548 be assumed to be recognizable by the recipient. Unrecognized header 1549 fields SHOULD be ignored by the recipient and forwarded by proxies. 1551 8.2 Entity Body 1553 See [H7.2] with the addition that an RTSP message with an entity body 1554 MUST include the Content-Type and Content-Length headers. 1556 9 Connections 1558 RTSP requests can be transmitted over two different connection 1559 scenarios listed below: 1561 o persistent - transport connections used for several 1562 request/response transactions; 1564 Code Reason Method 1565 __________________________________________________________ 1566 100 Continue all 1568 __________________________________________________________ 1569 200 OK all 1570 201 Created RECORD 1571 250 Low on Storage Space RECORD 1572 __________________________________________________________ 1573 300 Multiple Choices all 1574 301 Moved Permanently all 1575 302 Found all 1576 303 See Other all 1577 305 Use Proxy all 1579 __________________________________________________________ 1580 400 Bad Request all 1581 401 Unauthorized all 1582 402 Payment Required all 1583 403 Forbidden all 1584 404 Not Found all 1585 405 Method Not Allowed all 1586 406 Not Acceptable all 1587 407 Proxy Authentication Required all 1588 408 Request Timeout all 1589 410 Gone all 1590 411 Length Required all 1591 412 Precondition Failed DESCRIBE, SETUP 1592 413 Request Entity Too Large all 1593 414 Request-URI Too Long all 1594 415 Unsupported Media Type all 1595 451 Parameter Not Understood SET_PARAMETER 1596 452 reserved n/a 1597 453 Not Enough Bandwidth SETUP 1598 454 Session Not Found all 1599 455 Method Not Valid In This State all 1600 456 Header Field Not Valid all 1601 457 Invalid Range PLAY, PAUSE 1602 458 Parameter Is Read-Only SET_PARAMETER 1603 459 Aggregate Operation Not Allowed all 1604 460 Only Aggregate Operation Allowed all 1605 461 Unsupported Transport all 1606 462 Destination Unreachable all 1607 470 Connection Authorization Required all 1608 471 Connection Credentials not accepted all 1609 __________________________________________________________ 1610 500 Internal Server Error all 1611 501 Not Implemented all 1612 502 Bad Gateway all 1613 503 Service Unavailable all 1614 504 Gateway Timeout all 1615 505 RTSP Version Not Supported all 1617 Table 4: Status codes and their usage with RTSP methods 1619 Header Defined in Section 1620 __________________________________________ 1621 Accept-Ranges Section 14.5 1622 Connection-Credentials Section 14.12 1623 ETag Section 14.21 1624 Location Section 14.29 1625 Proxy-Authenticate Section 14.30 1626 Public Section 14.33 1627 Range Section 14.34 1628 Retry-After Section 14.36 1629 RTP-Info Section 14.38 1630 Scale Section 14.39 1631 Session Section 14.42 1632 Server Section 14.41 1633 Speed Section 14.40 1634 Transport Section 14.45 1635 Unsupported Section 14.46 1636 Vary Section 14.48 1637 WWW-Authenticate Section 14.50 1639 Table 5: The RTSP response headers 1641 o transient - transport connections used for a single 1642 request/response transaction. 1644 RFC 2326 attempted to specify an optional mechanism for transmitting 1645 RTSP messages in connectionless mode over a transport protocol such 1646 as UDP. However, it was not specified in sufficient enough detail to 1647 allow for interoperable implementations. In an attempt to reduce 1648 complexity and scope, and due to lack of interest, this specification 1649 does not attempt to define a mechanism for supporting RTSP over UDP 1650 or other connectionless transport protocols. A side-effect is that 1651 RTSP requests SHALL NOT be sent to multicast groups since no 1652 connection can be established with a specific receiver in multicast 1653 environments. 1655 In order to maintain backwards compatibility of the message format, 1656 certain RTSP headers, such as the CSeq header (Section 14.19), which 1657 would be more relevant to a connectionless transport scenario are 1658 still retained and must be implemented according to the 1659 specification. 1661 9.1 Reliability and Acknowledgements 1662 Since RTSP is transmitted primarily over connection oriented, 1663 reliable transport protocols, all RTSP requests MUST be acknowledged 1664 by the receiver. RTSP requests that are not immediately acknowledged 1665 MUST NOT be retransmitted at the application level. Instead, the 1666 application must rely on the underlying transport to provide 1667 reliability. 1669 If both the underlying reliable transport such as TCP and 1670 the RTSP application retransmit requests, each packet loss 1671 or message loss may result in two retransmissions. The 1672 receiver typically cannot take advantage of the 1673 application-layer retransmission since the transport stack 1674 will not deliver the application-layer retransmission 1675 before the first attempt has reached the receiver. If the 1676 packet loss is caused by congestion, multiple 1677 retransmissions at different layers will exacerbate the 1678 congestion. 1680 Lack of acknowledgement of an RTSP request should be handled within 1681 the constraints of the connection timeout considerations described 1682 below (Section 9.4). 1684 9.2 Using Connections 1686 A TCP transport can be used for both persistent connections (for 1687 several message exchanges) and transient connections (for a single 1688 message exchange). Implementations of this specification MUST support 1689 RTSP over TCP. The scheme of the RTSP URI (Section 3.2) indicates the 1690 default port that the server will listen on. 1692 A server MUST handle both persistent and transient connections. 1694 Transient connections facilitate mechanisms for fault 1695 tolerance. They also allow for application layer mobility. 1696 A server and client pair that support transient connections 1697 can survive the loss of a TCP connection, e.g. due to a NAT 1698 timeout. When the client has discovered that the TCP 1699 connection has been lost, it can set up a new one when 1700 there is need to communicate again. 1702 A persistent connection MAY be used for all transactions between the 1703 server and client, including messages to multiple RTSP sessions. 1704 However a persistent connection MAY also be closed after a few 1705 message exchanges. For example, a client may use a persistent 1706 connection for the initial SETUP and PLAY message exchanges in a 1707 session and then close the connection. Later, when the client wishes 1708 to send a new request, such as a PAUSE for the session, a new 1709 connection would be opened. This connection may either be transient 1710 or persistent. 1712 A client SHOULD NOT have more than one connection to the server at 1713 any given point. If a client or proxy handles multiple RTSP sessions 1714 on the same server, it SHOULD use only one connection for managing 1715 those sessions. 1717 This saves connection resources on the server. It also 1718 reduces complexity by and enabling the server to maintain 1719 less state about its sessions and connections. 1721 Unlike HTTP, RTSP allows a server to send requests to a client. 1722 However, this can be supported only if a client establishes a 1723 persistent connection with the server. In cases where a persistent 1724 connection does not exist between a server and its client, due to the 1725 lack of a signalling channel, the server may be forced to drop an 1726 RTSP session without notifying the client. An example of such a case 1727 is when the server desires to send a REDIRECT request for an RTSP 1728 session to the client but is not able to do so because it cannot 1729 reach the client. 1731 Without a persistent connection between the client and the 1732 server, the media server has no reliable way of reaching 1733 the client. Also, this is the only way that requests from a 1734 media server to its client are likely to traverse 1735 firewalls. 1737 In light of the above, it is RECOMMENDED that clients use persistent 1738 connections whenever possible. There are also backwards compatibility 1739 considerations for clients in supporting persistent connections 1740 (Section F.2). A client that supports persistent connections MAY 1741 "pipeline" its requests (i.e., send multiple requests without waiting 1742 for each response). A server MUST send its responses to those 1743 requests in the order that the requests were received. 1745 Server-side support for transient and persistent connections is 1746 subsumed in the "play.basic" feature-tag. A client may use capability 1747 negotiation (Section 10, Section 16.5) to discover if a server 1748 supports "play.basic" and, consequently, transient and persistent 1749 connections. 1751 9.3 Closing Connections 1753 The client MAY close a connection at any point when no outstanding 1754 request/response transactions exist for any RTSP session being 1755 managed through the connection. The server, however, SHOULD NOT close 1756 a connection until all RTSP sessions being managed through the 1757 connection have been timed out (Section 14.42). A server SHOULD NOT 1758 close a connection immediately after responding to a session-level 1759 TEARDOWN request for the last RTSP session being controlled through 1760 the connection. Instead, it should wait for a reasonable amount of 1761 time for the client to: receive the TEARDOWN response, take 1762 appropriate action, and initiate the connection closing. The server 1763 SHOULD wait at least 10 seconds after sending the TEARDOWN response 1764 before closing the connection. 1766 This is to ensure that the client has time to issue a SETUP 1767 for a new session on the existing connection after having 1768 torn the last one down. 10 seconds should give the client 1769 an opportunity get its message to the server. 1771 A server SHOULD NOT close the connection directly as a result of 1772 responding to a request with an error code. 1774 Certain error responses such as "460 Only Aggregate 1775 Operation Allowed" (Section 13.4.12) are used for 1776 negotiating capabilities of a server with respect to 1777 content or other factors. In such cases, it is inefficient 1778 for the server to close a connection on an error response. 1779 Also, such behavior would prevent implementation of 1780 advanced/special types of requests or result in extra 1781 overhead for the client when testing for new features. On 1782 the flip side, keeping connections open after sending an 1783 error response poses a Denial of Service security risk 1784 (Section 19). 1786 If a server initiates a connection close while the client is 1787 attempting to send a new request, the client will have to close its 1788 current connection, establish a new connection and send its request 1789 over the new connection. 1791 An RTSP message should not be terminated through a connection close. 1792 Such a message will be considered to be incomplete by the receiver 1793 and discarded. An RTSP message is properly terminated as defined in 1794 Section 4. 1796 9.4 Timing Out Connections and RTSP Messages 1798 Receivers of a request (responder) SHOULD respond to requests in a 1799 timely manner even when a reliable transport such as TCP is used. 1801 Similarly, the sender of a request (requestor) SHOULD wait for a 1802 sufficient time for a response before concluding that the responder 1803 will not be acting upon its request. 1805 A responder SHOULD respond to all requests within 5 seconds. If the 1806 responder recognizes that processing of a request will take longer 1807 than 5 seconds, it SHOULD send a 100 response as soon as possible. It 1808 SHOULD continue sending a 100 response every 5 seconds thereafter 1809 until it is ready to send the final response to the requestor. After 1810 sending a 100 response, the receiver MUST send a final response 1811 indicating the success or failure of the request. 1813 A requestor SHOULD wait at least 10 seconds for a response before 1814 concluding that the responder will not be responding to its request. 1815 After receiving a 100 response, the requestor SHOULD continue waiting 1816 for further responses. If more than 10 seconds elapses without 1817 receiving any response, the requestor MAY assume that the responder 1818 is unresponsive and abort the connection. 1820 A requestor SHOULD wait longer than 10 seconds for a response if it 1821 is experiencing significant transport delays on its connection to the 1822 responder. The requestor is capable of determining the RTT of the 1823 request/response cycle using the Timestamp header (section 14.44) in 1824 any RTSP request. 1826 9.5 Use of IPv6 1828 Since explicit IPv6 support was not present in RFC 2326, some 1829 interoperability issues do exist when working with older 1830 implementations. An RFC 2326 implementation can support IPv6 as long 1831 as no literal IPv6 addresses are used within RTSP messages. Thus, 1832 RTSP URIs pointing to IPv6 hosts need to use fully qualified domain 1833 names instead of literal IPv6 addresses. Further, in an IPv6 1834 environment, the Transport header cannot include the source or 1835 destination parameters as they require literal addresses. 1837 This specification has been updated for explicit IPv6 support. 1838 Implementations of this specifiation MUST understand literal IPv6 1839 addresses in URIs and headers. This requirement is subsumed in the 1840 "play.basic" feature-tag. Capability negotiation (Section 10, Section 1841 16.5) for the "play.basic" feature-tag can be used to determine if a 1842 client or server supports literal IPv6 addresses. 1844 10 Capability Handling 1846 This section describes the capability handling mechanism available in 1847 RTSP which allows RTSP to be extended. Extensions to this version of 1848 the protocol are basically done in two ways. First, new headers can 1849 be added. Secondly, new methods can be added. The capability handling 1850 mechanism is designed to handle both cases. 1852 When a method is added, the involved parties can use the OPTIONS 1853 method to discover wether it is supported. This is done by issuing a 1854 OPTIONS request to the other party. Depending on the URI it will 1855 either apply in regards to a certain media resource, the whole server 1856 in general, or simply the next hop. The OPTIONS response will contain 1857 a Public header which declares all methods supported for the 1858 indicated resource. 1860 It is not necessary to use OPTIONS to discover support of a method, 1861 the client could simply try the method. If the receiver of the 1862 request does not support the method it will respond with an error 1863 code indicating the the method is either not implemented (501) or 1864 does not apply for the resource (405). The choice between the two 1865 discovery methods depends on the requirements of the service. 1867 Feature-Tags are defined to handle functionality additions that are 1868 not new methods. Each feature-tag represents a certain block of 1869 functionality. The amount of functionality that a feature-tag 1870 represents can vary significantly. A feature-tag can for example 1871 represent the functionality a single RTSP header provides. Another 1872 feature-tag can represent much more functionality, such as the 1873 "play.basic" feature tag which represents the minimal playback 1874 implementation according to the updated specification. 1876 Feature-tags are used to determine wether the client, server or proxy 1877 supports the functionality that is necessary to achieve the desired 1878 service. To determine support of a feature-tag, several different 1879 headers can be used, each explained below: 1881 Supported: The supported header is used to determine the 1882 complete set of functionality that both client and server 1883 have. The intended usage is to determine before one needs 1884 to use a functionality that it is supported. It can be used 1885 in any method, however OPTIONS is the most suitable one as 1886 it at the same time determines all methods that are 1887 implemented. When sending a request the requestor declares 1888 all its capabilities by including all supported feature- 1889 tags. This results in that the receiver learns the 1890 requestors feature support. The receiver then includes its 1891 set of features in the response. 1893 Proxy-Supported: The Proxy-Supported header is used similar to 1894 the Supported header, but instead of giving the supported 1895 functionality of the client or server it provides both the 1896 requestor and the responder a view of what functionality 1897 the proxy chain between the two supports. Proxies are 1898 required to add this header whenever the Supported header 1899 is present, but proxies may independently of the requestor 1900 add it. 1902 Require: The Require header can be included in any request where 1903 the end-point, i.e. the client or server, is required to 1904 understand the feature to correctly perform the request. 1905 This can, for example, be a SETUP request where the server 1906 is required to understand a certain parameter to be able to 1907 set up the media delivery correctly. Ignoring this 1908 parameter would not have the desired effect and is not 1909 acceptable. Therefore the end-point receiving a request 1910 containing a Require MUST negatively acknowledge any 1911 feature that it does not understand and not perform the 1912 request. The response in cases where features are not 1913 supported are 551 (Option Not Supported). Also the 1914 features that are not supported are given in the 1915 Unsupported header in the response. 1917 Proxy-Require: This method has the same purpose and workings as 1918 Require except that it only applies to proxies and not the 1919 end-point. Features that needs to be supported by both 1920 proxies and end-point needs to be included in both the 1921 Require and Proxy-Require header. 1923 Unsupported: This header is used in a 551 error response, to 1924 indicate which feature(s) that was not supported. Such a 1925 response is only the result of the usage of the Require 1926 and/or Proxy-Require header where one or more feature where 1927 not supported. This information allows the requestor to 1928 make the best of situations as it knows which features are 1929 not supported. 1931 11 Method Definitions 1933 The method indicates what is to be performed on the resource 1934 identified by the Request-URI. The method name is case-sensitive. 1935 New methods may be defined in the future. Method names SHALL NOT 1936 start with a $ character (decimal 24) and MUST be a token as defined 1937 by the ABNF [4]. Methods are summarized in Table 7. 1939 Note on Table 7: PAUSE is recommended, but not required. 1940 For example, a fully functional server can be built to 1941 deliver live feeds, which do not support this method. 1943 method direction object Server req. Client req. 1944 ___________________________________________________________________ 1945 DESCRIBE C -> S P,S recommended recommended 1946 GET_PARAMETER C -> S, S -> C P,S optional optional 1947 OPTIONS C -> S, S -> C P,S R=Req, Sd=Opt Sd=Req, R=Opt 1948 PAUSE C -> S P,S recommended recommended 1949 PING C -> S, S -> C P,S recommended optional 1950 PLAY C -> S P,S required required 1951 REDIRECT S -> C P,S optional optional 1952 SETUP C -> S S required required 1953 SET_PARAMETER C -> S, S -> C P,S optional optional 1954 TEARDOWN C -> S P,S required required 1956 Table 7: Overview of RTSP methods, their direction, and what objects 1957 (P: presentation, S: stream) they operate on. Legend: R=Respond, 1958 Sd=Send, Opt: Optional, Req: Required, Rec: Recommended 1960 If an RTSP agent does not support a particular method, it MUST return 1961 501 (Not Implemented) and the requesting RTSP agent, in turn, SHOULD 1962 NOT try this method again for the given agent / resource combination. 1964 11.1 OPTIONS 1966 The semantics of the RTSP OPTIONS method is equivalent to that of the 1967 HTTP OPTIONS method described in [H9.2]. In RTSP however, OPTIONS is 1968 bi-directional, in that a client can request it to a server and vice 1969 versa. A client MUST implement the capability to send an OPTIONS 1970 request and a server or a proxy MUST implement the capability to 1971 respond to an OPTIONS request. The client, server or proxy MAY also 1972 implement the converse of their required capability. 1974 An OPTIONS request may be issued at any time. Such a request does not 1975 modify the session state. However, it may prolong the session 1976 lifespan (see below). The URI in an OPTIONS request determines the 1977 scope of the request and the corresponding response. If the Request- 1978 URI refers to a specific media resource on a given host, the scope is 1979 limited to the set of methods supported for that media resource by 1980 the indicated RTSP agent. A Request-URI with only the host address 1981 limits the scope to the specified RTSP agent's general capabilities 1982 without regard to any specific media. If the Request-URI is an 1983 asterisk ("*"), the scope is limited to the general capabilities of 1984 the next hop (i.e. the RTSP agent in direct communication with the 1985 request sender). 1987 Regardless of scope of the request, the Public header MUST always be 1988 included in the OPTIONS response listing the methods that are 1989 supported by the responding RTSP agent. In addition, if the scope of 1990 the request is limited to a media resource, the Allow header MAY be 1991 included in the response to enumerate the set of methods that are 1992 allowed for that resource. If the given resource is not available, 1993 the RTSP agent SHOULD return an appropriate response code such as 3rr 1994 or 4xx. The Supported header can be included in the request to query 1995 the set of features that are supported by the responding RTSP agent. 1997 The OPTIONS method can be used to keep an RTSP session alive. 1998 However, it is not the preferred means of session keep-alive 1999 signalling, see section 14.42. An OPTIONS request intended for 2000 keeping alive an RTSP session MUST include the Session header with 2001 the associated session ID. Such a request SHOULD also use the media 2002 or the aggregated control URI as the Request-URI. 2004 Example: 2006 C->S: OPTIONS * RTSP/1.0 2007 CSeq: 1 2008 User-Agent: PhonyClient/1.2 2009 Require: 2010 Proxy-Require: gzipped-messages 2011 Supported: play.basic 2013 S->C: RTSP/1.0 200 OK 2014 CSeq: 1 2015 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE 2016 Supported: play.basic, implicit-play, gzipped-messages 2017 Server: PhonyServer/1.0 2019 Note that some of the feature-tags in Require and Proxy-Require are 2020 necessarily fictional features (one would hope that we would not 2021 purposefully overlook a truly useful feature just so that we could 2022 have a strong example in this section). 2024 11.2 DESCRIBE 2026 The DESCRIBE method is used to retrieve the description of a 2027 presentation or media object from a server. The Request-URI of the 2028 DESCRIBE request identifies the media resource of interest. The 2029 client MAY include the Accept header in the request to list the 2030 description formats that it understands. The server SHALL respond 2031 with a description of the requested resource and return the 2032 description in the entity of the response. The DESCRIBE reply- 2033 response pair constitutes the media initialization phase of RTSP. 2035 Example: 2037 C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 2038 CSeq: 312 2039 User-Agent: PhonyClient 1.2 2040 Accept: application/sdp, application/rtsl, application/mheg 2042 S->C: RTSP/1.0 200 OK 2043 CSeq: 312 2044 Date: 23 Jan 1997 15:35:06 GMT 2045 Server: PhonyServer 1.0 2046 Content-Type: application/sdp 2047 Content-Length: 376 2049 v=0 2050 o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 2051 s=SDP Seminar 2052 i=A Seminar on the session description protocol 2053 u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps 2054 e=mjh@isi.edu (Mark Handley) 2055 c=IN IP4 224.2.17.12/127 2056 t=2873397496 2873404696 2057 a=recvonly 2058 m=audio 3456 RTP/AVP 0 2059 m=video 2232 RTP/AVP 31 2060 m=application 32416 UDP WB 2061 a=orient:portrait 2063 The DESCRIBE response MUST contain all media initialization 2064 information for the resource(s) that it describes. Servers SHOULD NOT 2065 use the DESCRIBE response as a means of media indirection. 2067 By forcing a DESCRIBE response to contain all media 2068 initialization for the set of streams that it describes, 2069 and discouraging the use of DESCRIBE for media indirection, 2070 any looping problems can be avoided that might have 2071 resulted from other approaches. 2073 Media initialization is a requirement for any RTSP-based system, but 2074 the RTSP specification does not dictate that this is required to be 2075 done via the DESCRIBE method. There are three ways that an RTSP 2076 client may receive initialization information: 2078 o via an RTSP DESCRIBE method 2079 o via some other protocol (HTTP, email attachment, etc.) 2081 o via some form of a user interface 2083 If a client obtains a valid description from an alternate source, the 2084 client MAY use this description for initialization purposes without 2085 issuing a DESCRIBE request for the same media. 2087 It is RECOMMENDED that minimal servers support the DESCRIBE method, 2088 and highly recommended that minimal clients support the ability to 2089 act as "helper applications" that accept a media initialization file 2090 from a user interface, and/or other means that are appropriate to the 2091 operating environment of the clients. 2093 11.3 SETUP 2095 The SETUP request for an URI specifies the transport mechanism to be 2096 used for the streamed media. The SETUP method may be used in three 2097 different cases; Create an RTSP session, add a media to a session, 2098 and change the transport parameters of already set up media stream. 2099 When in PLAY state, using SETUP to create or add media to a session 2100 when in PLAY state is unspecified. Otherwise SETUP can be used in all 2101 three states; INIT, and READY, for both purposes and in PLAY to 2102 change the transport parameters. 2104 The Transport header, see section 14.45, specifies the transport 2105 parameters acceptable to the client for data transmission; the 2106 response will contain the transport parameters selected by the 2107 server. This allows the client to enumerate in priority order the 2108 transport mechanisms and parameters acceptable to it, while the 2109 server can select the most appropriate. It is expected that the 2110 session description format used will enable the client to select a 2111 limited number possible configurations that are offered to the server 2112 to choose from. All transport parameters SHOULD be included in the 2113 Transport header, the use of other headers for this purpose is 2114 discouraged due to middle boxes such as firewalls, or NATs. 2116 For the benefit of any intervening firewalls, a client SHOULD 2117 indicate the transport parameters even if it has no influence over 2118 these parameters, for example, where the server advertises a fixed 2119 multicast address. 2121 Since SETUP includes all transport initialization 2122 information, firewalls and other intermediate network 2123 devices (which need this information) are spared the more 2124 arduous task of parsing the DESCRIBE response, which has 2125 been reserved for media initialization. 2127 In a SETUP response the server SHOULD include the Accept-Ranges 2128 header (see section 14.5 to indicate which time formats that are 2129 acceptable to use for this media resource. 2131 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0 2132 CSeq: 302 2133 Transport: RTP/AVP;unicast;client_port=4588-4589, 2134 RTP/AVP/TCP;unicast;interleaved=0-1 2136 S->C: RTSP/1.0 200 OK 2137 CSeq: 302 2138 Date: 23 Jan 1997 15:35:06 GMT 2139 Server: PhonyServer 1.0 2140 Session: 47112344;timeout=60 2141 Transport: RTP/AVP;unicast;client_port=4588-4589; 2142 server_port=6256-6257;ssrc=2A3F93ED 2143 Accept-Ranges: NPT 2145 In the above example the client wants to create an RTSP session 2146 containing the media resource "rtsp://example.com/foo/bar/baz.rm". 2147 The transport parameters acceptable to the client is either 2148 RTP/AVP/UDP (UDP per default) to be received on client port 4588 and 2149 4589 or RTP/AVP interleaved on the RTSP control channel. The server 2150 selects the RTP/AVP/UDP transport and adds the ports it will send and 2151 received RTP and RTCP from, and the RTP SSRC that will be used by the 2152 server. 2154 The server MUST generate a session identifier in response to a 2155 successful SETUP request, unless a SETUP request to a server includes 2156 a session identifier, in which case the server MUST bundle this setup 2157 request into the existing session (aggregated session) or return 2158 error 459 (Aggregate Operation Not Allowed) (see Section 13.4.11). 2159 An Aggregate control URI MUST be used to control an aggregated 2160 session. This URI MUST be different from the stream control URIs of 2161 the individual media streams included in the aggregate. The Aggregate 2162 control URI is to be specified by the session description if the 2163 server supports aggregated control and aggregated control is desired 2164 for the session. However even if aggregated control is offered the 2165 client MAY chose to not set up the session in aggregated control. If 2166 an Aggregate control URI is not specified in the session description, 2167 it is normally an indication that non-aggregated control should be 2168 used. The SETUP of media streams in an aggregate which has not been 2169 given an aggregated control URI is unspecified. 2171 While the session ID sometimes has enough information for 2172 aggregate control of a session, the Aggregate control URI 2173 is still important for some methods such as SET_PARAMETER 2174 where the control URI enables the resource in question to 2175 be easily identified. The Aggregate control URI is also 2176 useful for proxies, enabling them to route the request to 2177 the appropriate server, and for logging, where it is useful 2178 to note the actual resource that a request was operating 2179 on. Finally, presence of the Aggregate control URI allows 2180 for backwards compatibility with RFC 2326 [23]. 2182 A session will exist until it is either removed by a TEARDOWN request 2183 or is timed-out by the server. The server MAY remove a session that 2184 has not demonstrated liveness signs from the client(s) within a 2185 certain timeout period. The default timeout value is 60 seconds; the 2186 server MAY set this to a different value and indicate so in the 2187 timeout field of the Session header in the SETUP response. For 2188 further discussion see section 14.42. Signs of liveness for an RTSP 2189 session are: 2191 o Any RTSP request from a client(s) which includes a Session 2192 header with that session's ID. 2194 o If RTP is used as a transport for the underlying media 2195 streams, an RTCP sender or receiver report from the client(s) 2196 for any of the media streams in that RTSP session. RTCP Sender 2197 Reports may for example be received in sessions where the 2198 server is invited into a conference session and is as valid 2199 for keep-alive. 2201 If a SETUP request on a session fails for any reason, the session 2202 state, as well as transport and other parameters for associated 2203 streams SHALL remain unchanged from their values as if the SETUP 2204 request had never been received by the server. 2206 A client MAY issue a SETUP request for a stream that is already set 2207 up or playing in the session to change transport parameters, which a 2208 server MAY allow. If it does not allow this, it MUST respond with 2209 error 455 (Method Not Valid In This State). Reasons to support 2210 changing transport parameters, is to allow for application layer 2211 mobility and flexibility to utilize the best available transport as 2212 it becomes available. 2214 In a SETUP response for a request to change the transport parameters 2215 while in Play state, the server SHOULD include the Range to indicate 2216 from what point the new transport parameters are used. Further, if 2217 RTP is used for delivery, the server SHOULD also include the RTP-Info 2218 header to indicate from what timestamp and RTP sequence number the 2219 change has taken place. If both RTP-Info and Range is included in the 2220 response the "rtp_time" parameter and range MUST be for the 2221 corresponding time, i.e. be used in the same way as for PLAY to 2222 ensure the correct synchronization information is available. 2224 If the transport parameters change while in PLAY state results in a 2225 change of synchronization related information, for example changing 2226 RTP SSRC, the server MUST provide in the SETUP response the necessary 2227 synchronization information. However the server is RECOMMENDED to 2228 avoid changing the synchronization information if possible. 2230 11.4 PLAY 2232 The PLAY method tells the server to start sending data via the 2233 mechanism specified in SETUP. A client MUST NOT issue a PLAY request 2234 until any outstanding SETUP requests have been acknowledged as 2235 successful. PLAY requests are valid when the session is in READY 2236 state; the use of PLAY requests when the session is in PLAY state is 2237 deprecated. A PLAY request MUST include a Session header to indicate 2238 which session the request applies to. 2240 In an aggregated session the PLAY request MUST contain an aggregated 2241 control URI. A server SHALL responde with error 460 (Only Aggregate 2242 Operation Allowed) if the client PLAY Request-URI is for one of the 2243 media. The media in an aggregate SHALL be played in sync. If a client 2244 want individual control of the media it needs to use separate RTSP 2245 sessions for each media. 2247 The PLAY request SHALL position the normal play time to the beginning 2248 of the range specified by the Range header and delivers stream data 2249 until the end of the range if given, else to the end of the media is 2250 reached. To allow for precise composition multiple ranges MAY be 2251 specified in one PLAY Request. The range values are valid if all 2252 given ranges are part of any media within the aggregate. If a given 2253 range value points outside of the media, the response SHALL be the 2254 457 (Invalid Range) error code. 2256 The below example will first play seconds 10 through 15, then, 2257 immediately following, seconds 20 to 25, and finally seconds 30 2258 through the end. 2260 C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0 2261 CSeq: 835 2262 Session: 12345678 2263 Range: npt=10-15, npt=20-25, npt=30- 2265 See the description of the PAUSE request for further examples. 2267 A PLAY request without a Range header is legal. It SHALL start 2268 playing a stream from the beginning (npt=0-) unless the stream has 2269 been paused. If a stream has been paused via PAUSE, stream delivery 2270 resumes at the pause point. The stream SHALL play until the end of 2271 the media. 2273 The Range header MUST NOT contain a time parameter. The usage of time 2274 in PLAY method has been deprecated. If a request with time parameter 2275 is received the server SHOULD respond with a 457 (Invalid Range) to 2276 indicate that the time parameter is not supported. 2278 Server MUST include a "Range" header in any PLAY response. The 2279 response MUST use the same format as the request's range header 2280 contained. If no Range header was in the request, the NPT time format 2281 SHOULD be used unless the client showed support for an other format 2282 more appropriate. Also for a session with live media streams the 2283 Range header MUST indicate a valid time. It is RECOMMENDED that 2284 normal play time is used, either the "now" indicator, for example 2285 "npt=now-", or the time since session start as an open interval, e.g. 2286 "npt=96.23-". An absolute time value (clock) for the corresponding 2287 time MAY be given, i.e. "clock=20030213T143205Z-". The UTC clock 2288 format SHOULD only be used if client has shown support for it. 2290 A media server only supporting playback MUST support the npt format 2291 and MAY support the clock and smpte formats. 2293 For an on-demand stream, the server MUST reply with the actual range 2294 that will be played back, i.e. for which duration any media (having 2295 content at this time) is delivered. This may differ from the 2296 requested range if alignment of the requested range to valid frame 2297 boundaries is required for the media source. Note that some media 2298 streams in an aggregate may need to be delivered from even earlier 2299 points. Also, some media format have a very long duration per 2300 individual data unit, therefore it might be necessary for the client 2301 to parse the data unit, and select where to start. 2303 Example: Single audio stream (MIDI) 2305 C->S: PLAY rtsp://example.com/audio RTSP/1.0 2306 CSeq: 836 2307 Session: 12345678 2308 Range: npt=7.05- 2310 S->C: RTSP/1.0 200 OK 2311 CSeq: 836 2312 Date: 23 Jan 1997 15:35:06 GMT 2313 Server: PhonyServer 1.0 2314 Range: npt=3.52- 2315 RTP-Info:url=rtsp://example.com/audio; 2316 seq=14783;rtptime=2345962545 2318 S->C: RTP Packet TS=2345962545 => NPT=3.52 2319 Duration: 4.15 seconds 2321 In this example the client receives the first media packet that 2322 stretches all the way up and past the requested playtime. Thus, it is 2323 the client's decision if to render to the user the time between 3.52 2324 and 7.05, or to skip it. In most cases it is probably most suitable 2325 to not render that time period. 2327 For live media sources it might be impossible to specify from which 2328 point in time all media streams carrying active content can actually 2329 be delivered. Therefore a server MAY specify a start time (or now-) 2330 in the range header, for which not all media will be available from. 2332 If no range is specified in the request, the start position SHALL 2333 still be returned in the reply. If the medias that are part of an 2334 aggregate has different lengths, the PLAY request SHALL be performed 2335 as long as the given range is valid for any media, for example the 2336 longest media. Media will be sent whenever it is available for the 2337 given play-out point. 2339 A PLAY response MAY include a header(s) carrying synchronization 2340 information. As the information necessary is dependent on the media 2341 transport format, further rules specifying the header and its usage 2342 is needed. For RTP the RTP-Info header is specified, see section 2343 14.38. 2345 After playing the desired range, the presentation is NOT 2346 automatically paused, media delivery simply stops. A PAUSE request 2347 MUST be issued before another PLAY request can be issued. 2349 Note: The above is a change resulting in a non-operability 2350 with RFC 2326 implementations. See Appendix F.1 2352 A client desiring to play the media from the beginning MUST send a 2353 PLAY request with a Range header pointing at the beginning, e.g. 2354 npt=0-. If a PLAY request is received without a Range header when 2355 media delivery has stopped at the end, the server SHOULD respond with 2356 a 457 "Invalid Range" error response. In that response the current 2357 pause point in a Range header SHALL be included. 2359 The following example plays the whole presentation starting at SMPTE 2360 time code 0:10:20 until the end of the clip. Note: The RTP-Info 2361 headers has been broken into several lines to fit the page. 2363 C->S: PLAY rtsp://audio.example.com/twister.en RTSP/1.0 2364 CSeq: 833 2365 Session: 12345678 2366 Range: smpte=0:10:20- 2368 S->C: RTSP/1.0 200 OK 2369 CSeq: 833 2370 Date: 23 Jan 1997 15:35:06 GMT 2371 Server: PhonyServer 1.0 2372 Range: smpte=0:10:22-0:15:45 2373 RTP-Info:url=rtsp://example.com/twister.en; 2374 seq=14783;rtptime=2345962545 2376 For playing back a recording of a live presentation, it may be 2377 desirable to use clock units: 2379 C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/1.0 2380 CSeq: 835 2381 Session: 12345678 2382 Range: clock=19961108T142300Z-19961108T143520Z 2384 S->C: RTSP/1.0 200 OK 2385 CSeq: 835 2386 Date: 23 Jan 1997 15:35:06 GMT 2387 Server:PhonyServer 1.0 2388 Range: clock=19961108T142300Z-19961108T143520Z 2389 RTP-Info:url=rtsp://example.com/meeting.en; 2390 seq=53745;rtptime=484589019 2392 All range specifiers in this specification allow for ranges with 2393 unspecified begin times (e.g. "npt=-30"). When used in a PLAY 2394 request, the server treats this as a request to start/resume playback 2395 from the current pause point, ending at the end time specified in the 2396 Range header. If the pause point is located later than the given end 2397 value, a 457 (Invalid Range) response SHALL be given. 2399 The queued play functionality described in RFC 2326 [23] is removed 2400 and multiple ranges can be used to achieve a similar functionality. 2401 If a server receives a PLAY request while in the PLAY state, the 2402 server SHALL respond using the error code 455 (Method Not Valid In 2403 This State). This will signal the client that queued play are not 2404 supported. 2406 The use of PLAY for keep-alive signaling, i.e. PLAY request without a 2407 range header in PLAY state, has also been deprecated. Instead a 2408 client can use, PING, SET_PARAMETER or OPTIONS for keep alive. A 2409 server receiving a PLAY keep alive SHALL respond with the 455 error 2410 code. 2412 11.5 PAUSE 2414 The PAUSE request causes the stream delivery to be interrupted 2415 (halted) temporarily. A PAUSE request MUST be done with the 2416 aggregated control URI for aggregated sessions, resulting in all 2417 media being halted, or the media URI for non-aggregated sessions. 2418 Any attempt to do muting of a single media with an PAUSE request in 2419 an aggregated session SHALL be responded with error 460 (Only 2420 Aggregate Operation Allowed). After resuming playback, 2421 synchronization of the tracks MUST be maintained. Any server 2422 resources are kept, though servers MAY close the session and free 2423 resources after being paused for the duration specified with the 2424 timeout parameter of the Session header in the SETUP message. 2426 Example: 2428 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 2429 CSeq: 834 2430 Session: 12345678 2432 S->C: RTSP/1.0 200 OK 2433 CSeq: 834 2434 Date: 23 Jan 1997 15:35:06 GMT 2435 Range: npt=45.76- 2437 The PAUSE request MAY contain a Range header specifying when the 2438 stream or presentation is to be halted. This point is referred to as 2439 the "pause point". The time parameter in the Range MUST NOT be used. 2440 The Range header MUST contain a single value, expressed as the 2441 beginning value an open range. For example, the following clip will 2442 be played from 10 seconds through 21 seconds of the clip's normal 2443 play time, under the assumption that the PAUSE request reaches the 2444 server within 11 seconds of the PLAY request. Note that some lines 2445 has been broken in an non-correct way to fit the page: 2447 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/1.0 2448 CSeq: 834 2449 Session: 12345678 2450 Range: npt=10-30 2452 S->C: RTSP/1.0 200 OK 2453 CSeq: 834 2454 Date: 23 Jan 1997 15:35:06 GMT 2455 Server: PhonyServer 1.0 2456 Range: npt=10-30 2457 RTP-Info:url=rtsp://example.com/fizzle/audiotrack; 2458 seq=5712;rtptime=934207921, 2459 url=rtsp://example.com/fizzle/videotrack; 2460 seq=57654;rtptime=2792482193 2461 Session: 12345678 2463 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 2464 CSeq: 835 2465 Session: 12345678 2466 Range: npt=21- 2468 S->C: RTSP/1.0 200 OK 2469 CSeq: 835 2470 Date: 23 Jan 1997 15:35:09 GMT 2471 Server: PhonyServer 1.0 2472 Range: npt=21- 2473 Session: 12345678 2475 The pause request becomes effective the first time the server is 2476 encountering the time point specified in any of the multiple ranges. 2477 If the Range header specifies a time outside any range from the PLAY 2478 request, the error 457 (Invalid Range) SHALL be returned. If a media 2479 unit (such as an audio or video frame) starts presentation at exactly 2480 the pause point, it is not played. If the Range header is missing, 2481 stream delivery is interrupted immediately on receipt of the message 2482 and the pause point is set to the current normal play time. However, 2483 the pause point in the media stream MUST be maintained. A subsequent 2484 PLAY request without Range header SHALL resume from the pause point 2485 and play until media end. 2487 If the server has already sent data beyond the time specified in the 2488 PAUSE request's Range header, a PLAY without range SHALL resume at 2489 the point in time specified by the PAUSE request's Range header, as 2490 it is assumed that the client has discarded data after that point. 2491 This ensures continuous pause/play cycling without gaps. 2493 The pause point after any PAUSE request SHALL be returned to the 2494 client by adding a Range header with what remains unplayed of the 2495 PLAY request's ranges, i.e. including all the remaining ranges part 2496 of multiple range specification. If one desires to resume playing a 2497 ranged request, one simply includes the Range header from the PAUSE 2498 response. Note that this server behavior was not mandated previously 2499 and servers implementing according to RFC 2326 will probably not 2500 return the range header. 2502 For example, if the server have a play request for ranges 10 to 15 2503 and 20 to 29 pending and then receives a pause request for NPT 21, it 2504 would start playing the second range and stop at NPT 21. If the pause 2505 request is for NPT 12 and the server is playing at NPT 13 serving the 2506 first play request, the server stops immediately. If the pause 2507 request is for NPT 16, the server returns a 457 error message. To 2508 prevent that the second range is played and the server stops after 2509 completing the first range, a PAUSE request for NPT 20 needs to be 2510 issued. 2512 As another example, if a server has received requests to play ranges 2513 10 to 15 and then 13 to 20 (that is, overlapping ranges), the PAUSE 2514 request for NPT=14 would take effect while the server plays the first 2515 range, with the second range effectively being ignored, assuming the 2516 PAUSE request arrives before the server has started playing the 2517 second, overlapping range. Regardless of when the PAUSE request 2518 arrives, it sets the pause point to 14. The below example messages is 2519 for the above case when the PAUSE request arrives before the first 2520 occurrence of NPT=14. 2522 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/1.0 2523 CSeq: 834 2524 Session: 12345678 2525 Range: npt=10-15, npt=13-20 2527 S->C: RTSP/1.0 200 OK 2528 CSeq: 834 2529 Date: 23 Jan 1997 15:35:06 GMT 2530 Server: PhonyServer 1.0 2531 Range: npt=10-15, npt=13-20 2532 RTP-Info:url=rtsp://example.com/fizzle/audiotrack; 2533 seq=5712;rtptime=934207921, 2534 url=rtsp://example.com/fizzle/videotrack; 2535 seq=57654;rtptime=2792482193 2537 Session: 12345678 2539 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 2540 CSeq: 835 2541 Session: 12345678 2542 Range: npt=14- 2544 S->C: RTSP/1.0 200 OK 2545 CSeq: 835 2546 Date: 23 Jan 1997 15:35:09 GMT 2547 Server: PhonyServer 1.0 2548 Range: npt=14-15, npt=13-20 2549 Session: 12345678 2551 If a client issues a PAUSE request and the server acknowledges and 2552 enters the READY state, the proper server response, if the player 2553 issues another PAUSE, is still 200 OK. The 200 OK response MUST 2554 include the Range header with the current pause point, even if the 2555 PAUSE request is asking for some other pause point. See examples 2556 below: 2558 Examples: 2560 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 2561 CSeq: 834 2562 Session: 12345678 2564 S->C: RTSP/1.0 200 OK 2565 CSeq: 834 2566 Session: 12345678 2567 Date: 23 Jan 1997 15:35:06 GMT 2568 Range: npt=45.76-98.36 2570 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0 2571 CSeq: 835 2572 Session: 12345678 2573 Range: 86- 2575 S->C: RTSP/1.0 200 OK 2576 CSeq: 835 2577 Session: 12345678 2578 Date: 23 Jan 1997 15:35:07 GMT 2579 Range: npt=45.76-98.36 2581 11.6 TEARDOWN 2583 The TEARDOWN client to server request stops the stream delivery for 2584 the given URI, freeing the resources associated with it. A TEARDOWN 2585 request MAY be performed on either an aggregated or a media control 2586 URI. However some restrictions apply depending on the current state. 2587 The TEARDOWN request SHALL contain a Session header indicating what 2588 session the request applies to. 2590 A TEARDOWN using the aggregated control URI or the media URI in a 2591 session under non-aggregated control MAY be done in any state (Ready, 2592 and Play). A successful request SHALL result in that media delivery 2593 is immediately halted and the session state is destroyed. This SHALL 2594 be indicated through the lack of a Session header in the response. 2596 A TEARDOWN using a media URI in an aggregated session MAY only be 2597 done in Ready state. Such a request only removes the indicated media 2598 stream and associated resources from the session. This may result in 2599 that a session returns to non-aggregated control, due to that it only 2600 contains a single media after the requests completion. A session that 2601 will exist after the processing of the TEARDOWN request SHALL in the 2602 response to that TEARDOWN request contain a Session header. Thus the 2603 presence of the Session indicates to the receiver of the response if 2604 the session is still existing or has been removed. 2606 Note, the indication with the session header if sessions state remain 2607 may not be done correctly by a RFC 2326 client, but will be for any 2608 server signalling the "play.basic" tag. 2610 Example: 2612 C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0 2613 CSeq: 892 2614 Session: 12345678 2616 S->C: RTSP/1.0 200 OK 2617 CSeq: 892 2618 Server: PhonyServer 1.0 2620 11.7 GET_PARAMETER 2622 The GET_PARAMETER request retrieves the value of a parameter or 2623 parameters for a presentation or stream specified in the URI. If the 2624 Session header is present in a request, the value of a parameter MUST 2625 be retrieved in the specified session context. The content of the 2626 reply and response is left to the implementation. 2628 The method MAY also be used without a body (entity). If the this 2629 request is successful, i.e. a 200 OK response is received, then the 2630 keep-alive timer has been updated. Any non-required header present in 2631 such a request may or may not been processed. To allow a client to 2632 determine if any such header has been processed, it is necessary to 2633 use a feature tag and the Require header. Due to this reason it is 2634 RECOMMENDED that any parameters to be retrieved are sent in the body, 2635 rather than using any header. 2637 Example: 2639 S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 2640 CSeq: 431 2641 Content-Type: text/parameters 2642 Session: 12345678 2643 Content-Length: 15 2645 packets_received 2646 jitter 2648 C->S: RTSP/1.0 200 OK 2649 CSeq: 431 2650 Content-Length: 46 2651 Content-Type: text/parameters 2653 packets_received: 10 2654 jitter: 0.3838 2656 The "text/parameters" section is only an example type for 2657 parameter body. 2659 11.8 SET_PARAMETER 2661 This method requests to set the value of a parameter or a set of 2662 parameters for a presentation or stream specified by the URI. The 2663 method MAY also be used without a body (entity). If this request is 2664 successful, i.e. a 200 OK response is received, then the keep-alive 2665 timer has been updated. Any non-required header present in such a 2666 request may or may not been processed. To allow a client to determine 2667 if any such header has been processed, it is necessary to use a 2668 feature tag and the Require header. Due to this reason it is 2669 RECOMMENDED that any parameters are sent in the body, rather than 2670 using any header. 2672 A request is RECOMMENDED to only contain a single parameter to allow 2673 the client to determine why a particular request failed. If the 2674 request contains several parameters, the server MUST only act on the 2675 request if all of the parameters can be set successfully. A server 2676 MUST allow a parameter to be set repeatedly to the same value, but it 2677 MAY disallow changing parameter values. If the receiver of the 2678 request does not understand or cannot locate a parameter, error 451 2679 (Parameter Not Understood) SHALL be used. In the case a parameter is 2680 not allowed to change, the error code is 458 (Parameter Is Read- 2681 Only). The response body SHOULD contain only the parameters that have 2682 errors. Otherwise no body SHALL be returned. 2684 Note: transport parameters for the media stream MUST only be set with 2685 the SETUP command. 2687 Restricting setting transport parameters to SETUP is for 2688 the benefit of firewalls. 2690 The parameters are split in a fine-grained fashion so that 2691 there can be more meaningful error indications. However, it 2692 may make sense to allow the setting of several parameters 2693 if an atomic setting is desirable. Imagine device control 2694 where the client does not want the camera to pan unless it 2695 can also tilt to the right angle at the same time. 2697 Example: 2699 C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0 2700 CSeq: 421 2701 Content-length: 20 2702 Content-type: text/parameters 2704 barparam: barstuff 2706 S->C: RTSP/1.0 451 Parameter Not Understood 2707 CSeq: 421 2708 Content-length: 10 2709 Content-type: text/parameters 2711 barparam 2713 The "text/parameters" section is only an example type for 2714 parameter. This method is intentionally loosely defined 2715 with the intention that the reply content and response 2716 content will be defined after further experimentation. 2718 11.9 REDIRECT 2720 The REDIRECT method is issued by a server to inform a client that it 2721 required to connect to another server location to access the resource 2722 indicated by the Request-URI. The presence of the Session header in a 2723 REDIRECT request indicates the scope of the request, and determines 2724 the specific semantics of the request. 2726 A REDIRECT request with a Session header has end-to-end (i.e. server 2727 to client) scope and applies only to the given session. Any 2728 intervening proxies SHOULD NOT disconnect the control channel while 2729 there are other remaining end-to-end sessions. The OPTIONAL Location 2730 header, if included in such a request, SHALL contain a complete 2731 absolute URI pointing to the resource to which the client SHOULD 2732 reconnect. Specifically, the Location SHALL NOT contain just the 2733 host and port. A client may receive a REDIRECT request with a Session 2734 header, if and only if, an end-to-end session has been established. 2736 A client may receive a REDIRECT request without a Session header at 2737 any time when it has communication or a connection established with a 2738 server. The scope of such a request is limited to the next-hop (i.e. 2739 the RTSP agent in direct communication with the server) and applies, 2740 as well, to the control connection between the next-hop RTSP agent 2741 and the server. A REDIRECT request without a Session header 2742 indicates that all sessions and pending requests being managed via 2743 the control connection MUST be redirected. The OPTIONAL Location 2744 header, if included in such a request, SHOULD contain an absolute URI 2745 with only the host address and the OPTIONAL port number of the server 2746 to which the RTSP agent SHOULD reconnect. Any intervening proxies 2747 SHOULD do all of the following in the order listed: 2749 1. respond to the REDIRECT request 2751 2. disconnect the control channel from the requesting server 2753 3. connect to the server at the given host address 2755 4. pass the REDIRECT request to each applicable client 2756 (typically those clients with an active session or an 2757 unanswered request) 2759 Note: The proxy is responsible for accepting REDIRECT responses from 2760 its clients; these responses MUST NOT be passed on to either the 2761 original server or the redirected server. 2763 The lack of a Location header in any REDIRECT request is indicative 2764 of the server no longer being able to fulfill the current request and 2765 having no alternatives for the client to continue with its normal 2766 operation. It is akin to a server initiated TEARDOWN that applies 2767 both to sessions as well as the general connection associated with 2768 that client. 2770 When the Range header is not included in a REDIRECT request, the 2771 client SHOULD perform the redirection immediately and return a 2772 response to the server. The server can consider the session as 2773 terminated and can free any associated state after it receives the 2774 successful (2xx) response. The server MAY close the signalling 2775 connection upon receiving the response and the client SHOULD close 2776 the signalling connection after sending the 2xx response. The 2777 exception to this is when the client has several sessions on the 2778 server being managed by the given signalling connection. In this 2779 case, the client SHOULD close the connection when it has received and 2780 responded to REDIRECT requests for all the sessions managed by the 2781 signalling connection. 2783 If the OPTIONAL Range header is included in a REDIRECT request, it 2784 indicates when the redirection takes effect. The range value MUST be 2785 an open ended single value, e.g. npt=59-, indicating the play out 2786 time when redirection SHALL occur. Alternatively, a range with a 2787 time= parameter indicates the wall clock time by when the redirection 2788 MUST take place. When the time= parameter is present in the range, 2789 any range value MUST be ignored even though it MUST be syntactically 2790 correct. When the indicated redirect point is reached, a client MUST 2791 issue a TEARDOWN request and SHOULD close the signalling connection 2792 after receiving a 2xx response. The normal connection considerations 2793 apply for the server. 2795 The differentiation of REDIRECT requests with and without 2796 range headers is to allow for clear and explicit state 2797 handling. As the state in the server needs to be kept until 2798 the point of redirection, the handling becomes more clear 2799 if the client is required to TEARDOWN the session at the 2800 redirect point. 2802 After a REDIRECT request has been processed, a client that wants to 2803 continue to send or receive media for the resource identified by the 2804 Request-URI will have to establish a new session with the designated 2805 host. If the URI given in the Location header is a valid resource 2806 URI, a client SHOULD issue a DESCRIBE request for the URI. 2808 Note: The media resource indicated by the Location header 2809 can be identical, slightly different or totally different. 2810 This is the reason why a new DESCRIBE request SHOULD be 2811 issued. 2813 If the Location header contains only a host address, the client MAY 2814 assume that the media on the new server is identical to the media on 2815 the old server, i.e. all media configuration information from the old 2816 session is still valid except for the host address. 2818 This example request redirects traffic for this session to the new 2819 server at the given absolute time: 2821 S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/1.0 2822 CSeq: 732 2823 Location: rtsp://s2.example.com:8001 2824 Range: npt=0- ;time=19960213T143205Z 2825 Session: uZ3ci0K+Ld-M 2827 11.10 PING 2829 This method is a bi-directional mechanism for server or client 2830 liveness checking. It has no side effects. The issuer of the request 2831 MUST include a session header with the session ID of the session that 2832 is being checked for liveness. 2834 Prior to using this method, an OPTIONS method is RECOMMENDED to be 2835 issued in the direction which the PING method would be used. This 2836 method MUST NOT be used if support is not indicated by the Public 2837 header. Note: That an 501 (Not Implemented) response means that the 2838 keep-alive timer has not been updated. 2840 When a proxy is in use, PING with a * indicates a single-hop liveness 2841 check, whereas PING with an URI including an host address indicates 2842 an end-to-end liveness check. 2844 Example: 2846 C->S: PING * RTSP/1.0 2847 CSeq: 123 2848 Session:12345678 2850 S->C: RTSP/1.0 200 OK 2851 CSeq: 123 2852 Session:12345678 2854 12 Embedded (Interleaved) Binary Data 2856 In order to fulfill certain requirements on the network side, e.g. 2857 in conjunction with firewalls that block RTP traffic, it may be 2858 necessary to interleave RTSP messages and media stream data. This 2859 interleaving should generally be avoided unless necessary since it 2860 complicates client and server operation and imposes additional 2861 overhead. Also head of line blocking may cause problems. Interleaved 2862 binary data SHOULD only be used if RTSP is carried over TCP. 2864 Stream data such as RTP packets is encapsulated by an ASCII dollar 2865 sign (24 decimal), followed by a one-byte channel identifier, 2866 followed by the length of the encapsulated binary data as a binary, 2867 two-byte integer in network byte order. The stream data follows 2868 immediately afterwards, without a CRLF, but including the upper-layer 2869 protocol headers. Each $ block SHALL contain exactly one upper-layer 2870 protocol data unit, e.g., one RTP packet. 2872 0 1 2 3 2873 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2874 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2875 "$" = 24 Channel ID Length in bytes 2876 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2877 : Length number of bytes of binary data : 2878 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2880 The channel identifier is defined in the Transport header with the 2881 interleaved parameter(Section 14.45). 2883 When the transport choice is RTP, RTCP messages are also interleaved 2884 by the server over the TCP connection. The usage of RTCP messages is 2885 indicated by including a range containing a second channel in the 2886 interleaved parameter of the Transport header, see section 14.45. If 2887 RTCP is used, packets SHALL be sent on the first available channel 2888 higher than the RTP channel. The channels are bi-directional and 2889 therefore RTCP traffic are sent on the second channel in both 2890 directions. 2892 RTCP is needed for synchronization when two or more streams 2893 are interleaved in such a fashion. Also, this provides a 2894 convenient way to tunnel RTP/RTCP packets through the TCP 2895 control connection when required by the network 2896 configuration and transfer them onto UDP when possible. 2898 C->S: SETUP rtsp://example.com/bar.file RTSP/1.0 2899 CSeq: 2 2900 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 2902 S->C: RTSP/1.0 200 OK 2903 CSeq: 2 2904 Date: 05 Jun 1997 18:57:18 GMT 2905 Transport: RTP/AVP/TCP;unicast;interleaved=5-6 2906 Session: 12345678 2908 C->S: PLAY rtsp://example.com/bar.file RTSP/1.0 2909 CSeq: 3 2910 Session: 12345678 2912 S->C: RTSP/1.0 200 OK 2913 CSeq: 3 2914 Session: 12345678 2915 Date: 05 Jun 1997 18:59:15 GMT 2916 RTP-Info: url=rtsp://example.com/bar.file; 2917 seq=232433;rtptime=972948234 2919 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 2920 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 2921 S->C: $006{2 byte length}{"length" bytes RTCP packet} 2923 13 Status Code Definitions 2925 Where applicable, HTTP status [H10] codes are reused. Status codes 2926 that have the same meaning are not repeated here. See Table 4 for a 2927 listing of which status codes may be returned by which requests. All 2928 error messages, 4xx and 5xx MAY return a body containing further 2929 information about the error. 2931 13.1 Success 1xx 2933 13.1.1 100 Continue 2935 See, [H10.1.1]. 2937 13.2 Success 2xx 2938 13.3 Redirection 3xx 2940 The notation "3rr" indicates response codes from 300 to 399 inclusive 2941 which are meant for redirection. The response code 304 is excluded 2942 from this set, as it is not used for redirection. 2944 See [H10.3] for definition of status code 300 to 305. However 2945 comments are given for some to how they apply to RTSP. 2947 Within RTSP, redirection may be used for load balancing or 2948 redirecting stream requests to a server topologically closer to the 2949 client. Mechanisms to determine topological proximity are beyond the 2950 scope of this specification. 2952 A 3rr code MAY be used to respond to any request. It is RECOMMENDED 2953 that they are used if necessary before a session is established, i.e. 2954 in response to DESCRIBE or SETUP. However in cases where a server is 2955 not able to send a REDIRECT request to the client, the server MAY 2956 need to resort to using 3rr responses to inform a client with a 2957 established session about the need for redirecting the session. If an 2958 3rr response is received for an request in relation to a established 2959 session, the client SHOULD send a TEARDOWN request for the session, 2960 and MAY reestablish the session using the resource indicated by the 2961 Location. 2963 If the the Location header is used in a response it SHALL contain an 2964 absolute URI pointing out the media resource the client is redirected 2965 to, the URI SHALL NOT only contain the host name. 2967 13.3.1 300 Multiple Choices 2969 See [H10.3.1] [TBW] 2971 13.3.2 301 Moved Permanently 2973 The request resource are moved permanently and resides now at the URI 2974 given by the location header. The user client SHOULD redirect 2975 automatically to the given URI. This response MUST NOT contain a 2976 message-body. 2978 13.3.3 302 Found 2980 The requested resource reside temporarily at the URI given by the 2981 Location header. The Location header MUST be included in the 2982 response. Is intended to be used for many types of temporary 2983 redirects, e.g. load balancing. It is RECOMMENDED that one set the 2984 reason phrase to something more meaningful than "Found" in these 2985 cases. The user client SHOULD redirect automatically to the given 2986 URI. This response MUST NOT contain a message-body. 2988 13.3.4 303 See Other 2990 This status code SHALL NOT be used in RTSP. However as it was allowed 2991 to use in RFC 2326 it is possible that such response may be received, 2992 in which case the behavior is undefined. 2994 13.3.5 304 Not Modified 2996 If the client has performed a conditional DESCRIBE or SETUP (see 2997 14.26) and the requested resource has not been modified, the server 2998 SHOULD send a 304 response. This response MUST NOT contain a 2999 message-body. 3001 The response MUST include the following header fields: 3003 o Date 3005 o ETag and/or Content-Location, if the header would have been 3006 sent in a 200 response to the same request. 3008 o Expires, Cache-Control, and/or Vary, if the field-value might 3009 differ from that sent in any previous response for the same 3010 variant. 3012 This response is independent for the DESCRIBE and SETUP requests. 3013 That is, a 304 response to DESCRIBE does NOT imply that the resource 3014 content is unchanged and a 304 response to SETUP does NOT imply that 3015 the resource description is unchanged. The ETag and If-Match headers 3016 may be used to link the DESCRIBE and SETUP in this manner. 3018 13.3.6 305 Use Proxy 3020 See [H10.3.6]. 3022 13.4 Client Error 4xx 3024 13.4.1 400 Bad Request 3026 The request could not be understood by the server due to malformed 3027 syntax. The client SHOULD NOT repeat the request without 3028 modifications [H10.4.1]. If the request does not have a CSeq header, 3029 the server MUST NOT include a CSeq in the response. 3031 13.4.2 405 Method Not Allowed 3033 The method specified in the request is not allowed for the resource 3034 identified by the Request-URI. The response MUST include an Allow 3035 header containing a list of valid methods for the requested resource. 3036 This status code is also to be used if a request attempts to use a 3037 method not indicated during SETUP, e.g., if a RECORD request is 3038 issued even though the mode parameter in the Transport header only 3039 specified PLAY. 3041 13.4.3 451 Parameter Not Understood 3043 The recipient of the request does not support one or more parameters 3044 contained in the request. When returning this error message the 3045 sender SHOULD return a entity body containing the offending 3046 parameter(s). 3048 13.4.4 452 reserved 3050 This error code was removed from RFC 2326 [23] and is obsolete. 3052 13.4.5 453 Not Enough Bandwidth 3054 The request was refused because there was insufficient bandwidth. 3055 This may, for example, be the result of a resource reservation 3056 failure. 3058 13.4.6 454 Session Not Found 3060 The RTSP session identifier in the Session header is missing, 3061 invalid, or has timed out. 3063 13.4.7 455 Method Not Valid in This State 3065 The client or server cannot process this request in its current 3066 state. The response SHOULD contain an Allow header to make error 3067 recovery easier. 3069 13.4.8 456 Header Field Not Valid for Resource 3071 The server could not act on a required request header. For example, 3072 if PLAY contains the Range header field but the stream does not allow 3073 seeking. This error message may also be used for specifying when the 3074 time format in Range is impossible for the resource. In that case the 3075 Accept-Ranges header SHOULD be returned to inform the client of which 3076 format(s) that are allowed. 3078 13.4.9 457 Invalid Range 3080 The Range value given is out of bounds, e.g., beyond the end of the 3081 presentation. 3083 13.4.10 458 Parameter Is Read-Only 3085 The parameter to be set by SET_PARAMETER can be read but not 3086 modified. When returning this error message the sender SHOULD return 3087 a entity body containing the offending parameter(s). 3089 13.4.11 459 Aggregate Operation Not Allowed 3091 The requested method may not be applied on the URI in question since 3092 it is an aggregate (presentation) URI. The method may be applied on a 3093 media URI. 3095 13.4.12 460 Only Aggregate Operation Allowed 3097 The requested method may not be applied on the URI in question since 3098 it is not an aggregate control (presentation) URI. The method may be 3099 applied on the aggregate control URI. 3101 13.4.13 461 Unsupported Transport 3103 The Transport field did not contain a supported transport 3104 specification. 3106 13.4.14 462 Destination Unreachable 3108 The data transmission channel could not be established because the 3109 client address could not be reached. This error will most likely be 3110 the result of a client attempt to place an invalid Destination 3111 parameter in the Transport field. 3113 13.4.15 470 Connection Authorization Required 3115 The secured connection attempt need user or client authorization 3116 before proceeding. The next hops certificate is included in this 3117 response in the Accept-Credentials header. 3119 13.4.16 471 Connection Credentials not accepted 3121 When performing a secure connection over multiple connections, a 3122 intermediary has refused to connect to the next hop and carry out the 3123 request due to unacceptable credentials for the used policy. 3125 13.5 Server Error 5xx 3127 13.5.1 551 Option not supported 3129 A feature-tag given in the Require or the Proxy-Require fields was 3130 not supported. The Unsupported header SHOULD be returned stating the 3131 feature for which there is no support. 3133 14 Header Field Definitions 3135 method direction object acronym Body 3136 _________________________________________________ 3137 DESCRIBE C -> S P,S DES r 3138 GET_PARAMETER C -> S, S -> C P,S GPR R,r 3139 OPTIONS C -> S P,S OPT 3140 S -> C 3141 PAUSE C -> S P,S PSE 3142 PING C -> S, S -> C P,S PNG 3143 PLAY C -> S P,S PLY 3144 REDIRECT S -> C P,S RDR 3145 SETUP C -> S S STP 3146 SET_PARAMETER C -> S, S -> C P,S SPR R,r 3147 TEARDOWN C -> S P,S TRD 3149 Table 8: Overview of RTSP methods, their direction, and what objects 3150 (P: presentation, S: stream) they operate on. Body notes if a method 3151 is allowed to carry body and in which direction, R = Request, 3152 r=response. Note: It is allowed for all error messages 4xx and 5xx to 3153 have a body 3155 The general syntax for header fields is covered in Section 4.2 This 3156 section lists the full set of header fields along with notes on 3157 meaning, and usage. The syntax definition for headers are present in 3158 section 18.2.3. Throughout this section, we use [HX.Y] to refer to 3159 Section X.Y of the current HTTP/1.1 specification RFC 2616 [3]. 3160 Examples of each header field are given. 3162 Information about header fields in relation to methods and proxy 3163 processing is summarized in Tables 9, 10, 11, and 12. 3165 The "where" column describes the request and response types in which 3166 the header field can be used. Values in this column are: 3168 R: header field may only appear in requests; 3170 r: header field may only appear in responses; 3172 2xx, 4xx, etc.: A numerical value or range indicates response 3173 codes with which the header field can be used; 3175 c: header field is copied from the request to the response. 3177 An empty entry in the "where" column indicates that the header field 3178 may be present in all requests and responses. 3180 The "proxy" column describes the operations a proxy may perform on a 3181 header field. An empty proxy column indicates that the proxy SHALL 3182 NOT do any changes to that header, all allowed operations are 3183 explicitly stated: 3185 a: A proxy can add or concatenate the header field if not 3186 present. 3188 m: A proxy can modify an existing header field value. 3190 d: A proxy can delete a header field value. 3192 r: A proxy needs to be able to read the header field, and thus 3193 this header field cannot be encrypted. 3195 The rest of the columns relate to the presence of a header field in a 3196 method. The method names when abbreviated, are according to table 8: 3198 c: Conditional; requirements on the header field depend on the 3199 context of the message. 3201 m: The header field is mandatory. 3203 m*: The header field SHOULD be sent, but clients/servers need to 3204 be prepared to receive messages without that header field. 3206 o: The header field is optional. 3208 *: The header field is SHALL be present if the message body is 3209 not empty. See sections 14.16, 14.18 and 4.3 for details. 3211 -: The header field is not applicable. 3213 "Optional" means that a Client/Server MAY include the header field in 3214 a request or response. The Client/Server behavior when receiving such 3215 headers varies, for some it may ignore the header field, in other 3216 case it is request to process the header. This is regulated by the 3217 method and header descriptions. Example of such headers that require 3218 processing are the Require and Proxy-Require header fields discussed 3219 in 14.37 and 14.31. A "mandatory" header field MUST be present in a 3220 request, and MUST be understood by the Client/Server receiving the 3221 request. A mandatory response header field MUST be present in the 3222 response, and the header field MUST be understood by the 3223 Client/Server processing the response. "Not applicable" means that 3224 the header field MUST NOT be present in a request. If one is placed 3225 in a request by mistake, it MUST be ignored by the Client/Server 3226 receiving the request. Similarly, a header field labeled "not 3227 applicable" for a response means that the Client/Server MUST NOT 3228 place the header field in the response, and the Client/Server MUST 3229 ignore the header field in the response. 3231 A Client/Server SHOULD ignore extension header parameters that are 3232 not understood. 3234 The From, Location, and RTP-Info header fields contain an URI. If the 3235 URI contains a comma, or semicolon, the URI MUST be enclosed in 3236 double quotas ("). Any URI parameters are contained within these 3237 quotas. If the URI is not enclosed in double quotas, any semicolon- 3238 delimited parameters are header-parameters, not URI parameters. 3240 14.1 Accept 3242 The Accept request-header field can be used to specify certain 3243 presentation description content types which are acceptable for the 3244 response. 3246 The "level" parameter for presentation descriptions is 3247 properly defined as part of the MIME type registration, not 3248 here. 3250 See [H14.1] for syntax. 3252 Example of use: 3254 Accept: application/rtsl q=1.0, application/sdp 3256 14.2 Accept-Credentials 3258 The Accept-Credentials header is a request header used to indicate to 3259 any trusted intermediary how to handle further secured connections to 3260 proxies or servers. See section 17 for the usage of this header. It 3261 SHALL only be included in client to server requests. 3263 In a request the header SHALL contain the method (User, Proxy, or 3264 Any) for approving credentials selected by the requestor. The method 3265 SHALL NOT be changed by any proxy. If the method is "User" the header 3266 Header Where Proxy DES OPT SETUP PLAY PAUSE TRD 3267 _________________________________________________________________ 3268 Accept R o - - - - - 3269 Accept-Credentials R r o o o o o o 3270 Accept-Encoding R r o - - - - - 3271 Accept-Language R r o - - - - - 3272 Accept-Ranges r r - - o - - - 3273 Accept-Ranges 456 r - - - o o - 3274 Allow r - o - - - - 3275 Allow 405 m m m m m m 3276 Authorization R o o o o o o 3277 Bandwidth R o o o o - - 3278 Blocksize R o - o o - - 3279 Cache-Control r - - o - - - 3280 Connection o o o o o o 3281 Connection-Credentials 470,407 ar o o o o o o 3282 Content-Base r o - - - - - 3283 Content-Base 4xx o o o o o o 3284 Content-Encoding R r - - - - - - 3285 Content-Encoding r r o - - - - - 3286 Content-Encoding 4xx r o o o o o o 3287 Content-Language R r - - - - - - 3288 Content-Language r r o - - - - - 3289 Content-Language 4xx r o o o o o o 3290 Content-Length r r * - - - - - 3291 Content-Length 4xx r * * * * * * 3292 Content-Location r o - - - - - 3293 Content-Location 4xx o o o o o o 3294 Content-Type r * - - - - - 3295 Content-Type 4xx * * * * * * 3296 CSeq Rc m m m m m m 3297 Date am o o o o o o 3298 ETag r r o - o - - - 3299 Expires r r o - - - - - 3300 From R r o o o o o o 3301 Host - - - - - - 3302 If-Match R r - - o - - - 3303 If-Modified-Since R r o - o - - - 3304 If-None-Match R r o - - - - - 3305 Last-Modified r r o - - - - - 3306 Location 3rr o o o o o o 3308 Table 9: Overview of RTSP header fields (A-L) related to methods 3309 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 3311 Header Where Proxy DES OPT SETUP PLAY PAUSE TRD 3312 _____________________________________________________________ 3313 Proxy-Authenticate 407 amr m m m m m m 3314 Proxy-Require R ar o o o o o o 3315 Proxy-Supported R amr oc oc oc oc oc oc 3316 Proxy-Supported r c c c c c c 3317 Public r admr - m* - - - - 3318 Public 501 admr m* m* m* m* m* m* 3319 Range R - - - o o - 3320 Range r - - c m* m* - 3321 Referer R o o o o o o 3322 Require R o o o o o o 3323 Retry-After 3rr,503 o o o - - - 3324 RTP-Info r - - o c - - 3325 Scale - - - o - - 3326 Session R - o o m m m 3327 Session r - c m m m o 3328 Server R - o - - - - 3329 Server r o o o o o o 3330 Speed - - - o - - 3331 Supported R o o o o o o 3332 Supported r c c c c c c 3333 Timestamp R o o o o o o 3334 Timestamp c m m m m m m 3335 Transport - - m - - - 3336 Unsupported r c c c c c c 3337 User-Agent R m* m* m* m* m* m* 3338 Vary r c c c c c c 3339 Via R amr o o o o o o 3340 Via c dr m m m m m m 3341 WWW-Authenticate 401 m m m m m m 3343 _____________________________________________________________ 3344 Header Where Proxy DES OPT SETUP PLAY PAUSE TRD 3346 Table 10: Overview of RTSP header fields (P-W) related to methods 3347 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 3349 contains zero or more of credentials that the client accept. Each 3350 credential SHALL consist of one URI identifying the proxy or server, 3351 and the SHA-1 [14] hash computed over that entity's DER encoded 3352 certificate [15] in Base64 [37]. 3354 Example: 3356 Header Where Proxy GPR SPR RDR PNG 3357 ______________________________________________________ 3358 Accept-Credentials R r o o o o 3359 Allow 405 m m m m 3360 Authorization R o o o o 3361 Bandwidth R - o - - 3362 Blocksize R - o - - 3363 Connection o o o - 3364 Connection-Credentials 470,407 ar o o o o 3365 Content-Base R o o - - 3366 Content-Base r o o - - 3367 Content-Base 4xx o o o - 3368 Content-Encoding R r o o - - 3369 Content-Encoding r r o o - - 3370 Content-Encoding 4xx r o o o - 3371 Content-Language R r o o - - 3372 Content-Language r r o o - - 3373 Content-Language 4xx r o o o - 3374 Content-Length R r * * - - 3375 Content-Length r r * * - - 3376 Content-Length 4xx r * * * - 3377 Content-Location R o o - - 3378 Content-Location r o o - - 3379 Content-Location 4xx o o o - 3380 Content-Type R * * - - 3381 Content-Type r * * - - 3382 Content-Type 4xx * * * - 3383 CSeq Rc m m m m 3384 Date am o o o o 3385 From R r o o o o 3386 Host - - - - 3387 Last-Modified R r - - - - 3388 Last-Modified r r o - - - 3389 Location 3rr o o o o 3390 Location R - - m - 3391 Proxy-Authenticate 407 amr m m m m 3392 Proxy-Require R ar o o o o 3393 Proxy-Supported R amr oc oc oc oc 3394 Proxy-Supported r c c c c 3395 Public 501 admr m* m* m* m* 3397 ______________________________________________________ 3398 Header Where Proxy GPR SPR RDR PNG 3400 Table 11: Overview of RTSP header fields (A-P) related to methods 3401 GET_PARAMETER, SET_PARAMETER, REDIRECT, and PING. 3403 Header Where Proxy GPR SPR RDR PNG 3404 ________________________________________________ 3405 Range R - - o - 3406 Referer R o o o - 3407 Require R o o o o 3408 Retry-After 3rr,503 o o - - 3409 Scale - - - - 3410 Session R o o o m 3411 Session r c c o m 3412 Server R o o o o 3413 Server r o o - o 3414 Supported R o o o o 3415 Supported r c c c c 3416 Timestamp R o o o o 3417 Timestamp c m m m m 3418 Unsupported r c c c c 3419 User-Agent R m* m* - m* 3420 User-Agent r - - m* - 3421 Vary r c c - - 3422 Via R amr o o o o 3423 Via c dr m m m m 3424 WWW-Authenticate 401 m m m m 3426 ________________________________________________ 3427 Header Where Proxy GPR SPR RDR PNG 3429 Table 12: Overview of RTSP header fields (R-W) related to methods 3430 GET_PARAMETER, SET_PARAMETER, REDIRECT, and PING. 3432 "rtsps://server.example.com/";lurbjj5khhB0NhIuOXtt4bBRH1M= 3434 14.3 Accept-Encoding 3436 See [H14.3] 3438 14.4 Accept-Language 3440 See [H14.4]. Note that the language specified applies to the 3441 presentation description and any reason phrases, not the media 3442 content. 3444 14.5 Accept-Ranges 3446 The Accept-Ranges response-header field allows the server to indicate 3447 its acceptance of range requests and possible formats for a resource: 3449 Accept-Ranges: NPT, SMPTE 3451 This header has the same syntax as [H14.5] and the syntax is defined 3452 in 18.2.3. However, new range-units are defined. Inclusion of any of 3453 the time formats indicates acceptance by the server for PLAY and 3454 PAUSE requests with this format. The headers value is valid for the 3455 resource specified by the URI in the request, this response 3456 corresponds to. A server SHOULD use this header in SETUP responses to 3457 indicate to the client which range time formats the media supports. 3458 The header SHOULD also be included in "456" responses which is a 3459 result of use of unsupported range formats. 3461 14.6 Allow 3463 The Allow entity-header field lists the methods supported by the 3464 resource identified by the Request-URI. The purpose of this field is 3465 to strictly inform the recipient of valid methods associated with the 3466 resource. An Allow header field MUST be present in a 405 (Method Not 3467 Allowed) response. See [H14.7] for syntax definition. 3469 Example of use: 3471 Allow: SETUP, PLAY, SET_PARAMETER 3473 14.7 Authorization 3475 See [H14.8] 3477 14.8 Bandwidth 3479 The Bandwidth request-header field describes the estimated bandwidth 3480 available to the client, expressed as a positive integer and measured 3481 in bits per second. The bandwidth available to the client may change 3482 during an RTSP session, e.g., due to mobility. 3484 Example: 3486 Bandwidth: 4000 3488 14.9 Blocksize 3490 The Blocksize request-header field is sent from the client to the 3491 media server asking the server for a particular media packet size. 3492 This packet size does not include lower-layer headers such as IP, 3493 UDP, or RTP. The server is free to use a blocksize which is lower 3494 than the one requested. The server MAY truncate this packet size to 3495 the closest multiple of the minimum, media-specific block size, or 3496 override it with the media-specific size if necessary. The block size 3497 MUST be a positive decimal number, measured in octets. The server 3498 only returns an error (4xx) if the value is syntactically invalid. 3500 14.10 Cache-Control 3502 The Cache-Control general-header field is used to specify directives 3503 that MUST be obeyed by all caching mechanisms along the 3504 request/response chain. 3506 Cache directives MUST be passed through by a proxy or gateway 3507 application, regardless of their significance to that application, 3508 since the directives may be applicable to all recipients along the 3509 request/response chain. It is not possible to specify a cache- 3510 directive for a specific cache. 3512 Cache-Control should only be specified in a SETUP request and its 3513 response. Note: Cache-Control does not govern the caching of 3514 responses as for HTTP, instead it applies to the media stream 3515 identified by the SETUP request. The caching of RTSP requests are 3516 generally not cacheable, for further information see 15. Below is the 3517 description of the cache directives that can be included in the 3518 Cache-Control header. 3520 no-cache: Indicates that the media stream MUST NOT be cached 3521 anywhere. This allows an origin server to prevent caching 3522 even by caches that have been configured to return stale 3523 responses to client requests. 3525 public: Indicates that the media stream is cacheable by any 3526 cache. 3528 private: Indicates that the media stream is intended for a 3529 single user and MUST NOT be cached by a shared cache. A 3530 private (non-shared) cache may cache the media stream. 3532 no-transform: An intermediate cache (proxy) may find it useful 3533 to convert the media type of a certain stream. A proxy 3534 might, for example, convert between video formats to save 3535 cache space or to reduce the amount of traffic on a slow 3536 link. Serious operational problems may occur, however, 3537 when these transformations have been applied to streams 3538 intended for certain kinds of applications. For example, 3539 applications for medical imaging, scientific data analysis 3540 and those using end-to-end authentication all depend on 3541 receiving a stream that is bit-for-bit identical to the 3542 original media stream. Therefore, if a response includes 3543 the no-transform directive, an intermediate cache or proxy 3544 MUST NOT change the encoding of the stream. Unlike HTTP, 3545 RTSP does not provide for partial transformation at this 3546 point, e.g., allowing translation into a different 3547 language. 3549 only-if-cached: In some cases, such as times of extremely poor 3550 network connectivity, a client may want a cache to return 3551 only those media streams that it currently has stored, and 3552 not to receive these from the origin server. To do this, 3553 the client may include the only-if-cached directive in a 3554 request. If it receives this directive, a cache SHOULD 3555 either respond using a cached media stream that is 3556 consistent with the other constraints of the request, or 3557 respond with a 504 (Gateway Timeout) status. However, if a 3558 group of caches is being operated as a unified system with 3559 good internal connectivity, such a request MAY be forwarded 3560 within that group of caches. 3562 max-stale: Indicates that the client is willing to accept a 3563 media stream that has exceeded its expiration time. If 3564 max-stale is assigned a value, then the client is willing 3565 to accept a response that has exceeded its expiration time 3566 by no more than the specified number of seconds. If no 3567 value is assigned to max-stale, then the client is willing 3568 to accept a stale response of any age. 3570 min-fresh: Indicates that the client is willing to accept a 3571 media stream whose freshness lifetime is no less than its 3572 current age plus the specified time in seconds. That is, 3573 the client wants a response that will still be fresh for at 3574 least the specified number of seconds. 3576 must-revalidate: When the must-revalidate directive is present 3577 in a SETUP response received by a cache, that cache MUST 3578 NOT use the entry after it becomes stale to respond to a 3579 subsequent request without first revalidating it with the 3580 origin server. That is, the cache is required to do an 3581 end-to-end revalidation every time, if, based solely on the 3582 origin server's Expires, the cached response is stale.) 3584 proxy-revalidate: The proxy-revalidate directive has the same 3585 meaning as the must-revalidate directive, except that it 3586 does not apply to non-shared user agent caches. It can be 3587 used on a response to an authenticated request to permit 3588 the user's cache to store and later return the response 3589 without needing to revalidate it (since it has already been 3590 authenticated once by that user), while still requiring 3591 proxies that service many users to revalidate each time (in 3592 order to make sure that each user has been authenticated). 3593 Note that such authenticated responses also need the public 3594 cache control directive in order to allow them to be cached 3595 at all. 3597 max-age: When an intermediate cache is forced, by means of a 3598 max-age=0 directive, to revalidate its own cache entry, and 3599 the client has supplied its own validator in the request, 3600 the supplied validator might differ from the validator 3601 currently stored with the cache entry. In this case, the 3602 cache MAY use either validator in making its own request 3603 without affecting semantic transparency. 3605 However, the choice of validator might affect performance. 3606 The best approach is for the intermediate cache to use its 3607 own validator when making its request. If the server 3608 replies with 304 (Not Modified), then the cache can return 3609 its now validated copy to the client with a 200 (OK) 3610 response. If the server replies with a new entity and cache 3611 validator, however, the intermediate cache can compare the 3612 returned validator with the one provided in the client's 3613 request, using the strong comparison function. If the 3614 client's validator is equal to the origin server's, then 3615 the intermediate cache simply returns 304 (Not Modified). 3616 Otherwise, it returns the new entity with a 200 (OK) 3617 response. 3619 14.11 Connection 3621 See [H14.10]. The use of the connection option "close" in RTSP 3622 messages SHOULD be limited to error messages when the server is 3623 unable to recover and therefore see it necessary to close the 3624 connection. The reason is that the client has the choice of 3625 continuing using a connection indefinitely, as long as it sends valid 3626 messages. 3628 14.12 Connection-Credentials 3630 The Connection-Credentials response header is used to carry the 3631 credentials of any next hop that need to be approved by the 3632 requestor. It SHALL only be used in server to client responses. 3634 The Connection-Credentials header in an RTSP response SHALL, if 3635 included, contain the credentials information of the next hop that an 3636 intermediary needs to securely connect to. The credential MUST 3637 include the URI of the next proxy or server and the DER encoded 3638 X.509v3 [15] certificate in base64 [37]. 3640 Example: 3641 Accept-Credentials:"rtsps://proxy2.example.com/";MIIDNTCCAp6gA... 3643 14.13 Content-Base 3645 The Content-Base entity-header field may be used to specify the base 3646 URI for resolving relative URIs within the entity. 3648 Content-Base: rtsp://media.example.com/movie/twister 3650 If no Content-Base field is present, the base URI of an entity is 3651 defined either by its Content-Location (if that Content-Location URI 3652 is an absolute URI) or the URI used to initiate the request, in that 3653 order of precedence. Note, however, that the base URI of the contents 3654 within the entity-body may be redefined within that entity-body. 3656 14.14 Content-Encoding 3658 See [H14.11] 3660 14.15 Content-Language 3662 See [H14.12] 3664 14.16 Content-Length 3666 The Content-Length general-header field contains the length of the 3667 content of the method (i.e. after the double CRLF following the last 3668 header). Unlike HTTP, it MUST be included in all messages that carry 3669 content beyond the header portion of the message. If it is missing, a 3670 default value of zero is assumed. It is interpreted according to 3671 [H14.13]. 3673 14.17 Content-Location 3675 See [H14.14] 3677 14.18 Content-Type 3678 See [H14.17]. Note that the content types suitable for RTSP are 3679 likely to be restricted in practice to presentation descriptions and 3680 parameter-value types. 3682 14.19 CSeq 3684 The CSeq general-header field specifies the sequence number for an 3685 RTSP request-response pair. This field MUST be present in all 3686 requests and responses. For every RTSP request containing the given 3687 sequence number, the corresponding response will have the same 3688 number. Any retransmitted request MUST contain the same sequence 3689 number as the original (i.e. the sequence number is not incremented 3690 for retransmissions of the same request). For each new RTSP request 3691 the CSeq value SHALL be incremented by one. The initial sequence 3692 number MAY be any number, however it is RECOMMENDED to start at 0. 3693 Each sequence number series is unique between each requester and 3694 responder, i.e. the client has one series for its request to a 3695 server and the server has another when sending request to the client. 3696 Each requester and responder is identified with its network address. 3698 Example: 3700 CSeq: 239 3702 14.20 Date 3704 See [H14.18]. An RTSP message containing a body MUST include a Date 3705 header if the sending host has a clock. Servers SHOULD include a Date 3706 header in all other RTSP messages. 3708 14.21 ETag 3710 The ETag response header MAY be included in DESCRIBE or SETUP 3711 responses. The entity tag returned in a DESCRIBE response is for the 3712 included entity, while for SETUP it refers to the media resource just 3713 set up. This differentiation allows for cache validation of both 3714 session description and the media resource associated with the 3715 description. If the ETag is provided both inside the entity, e.g. 3716 within the "a=etag" attribute in SDP, and in the response message, 3717 then both tags SHALL be identical. It is RECOMMENDED that the ETag is 3718 primarily given in the RTSP response message, to ensure that caches 3719 can use the ETag without requiring content inspection. 3721 SETUP and DESCRIBE requests can be made conditional upon the ETag 3722 using the headers If-Match (Section 14.25) and If-None-Match (Section 3723 14.27). 3725 14.22 Expires 3727 The Expires entity-header field gives a date and time after which the 3728 description or media-stream should be considered stale. The 3729 interpretation depends on the method: 3731 DESCRIBE response: The Expires header indicates a date and time 3732 after which the description SHOULD be considered stale. 3734 SETUP response: The Expires header indicate a date and time 3735 after which the media stream SHOULD be considered stale. 3737 A stale cache entry may not normally be returned by a cache (either a 3738 proxy cache or an user agent cache) unless it is first validated with 3739 the origin server (or with an intermediate cache that has a fresh 3740 copy of the entity). See section 15 for further discussion of the 3741 expiration model. 3743 The presence of an Expires field does not imply that the original 3744 resource will change or cease to exist at, before, or after that 3745 time. 3747 The format is an absolute date and time as defined by HTTP-date in 3748 [H3.3]; it MUST be in RFC1123-date format: 3750 An example of its use is 3752 Expires: Thu, 01 Dec 1994 16:00:00 GMT 3754 RTSP/1.0 clients and caches MUST treat other invalid date formats, 3755 especially including the value "0", as having occurred in the past 3756 (i.e., already expired). 3758 To mark a response as "already expired," an origin server should use 3759 an Expires date that is equal to the Date header value. To mark a 3760 response as "never expires," an origin server SHOULD use an Expires 3761 date approximately one year from the time the response is sent. 3762 RTSP/1.0 servers SHOULD NOT send Expires dates more than one year in 3763 the future. 3765 The presence of an Expires header field with a date value of some 3766 time in the future on a media stream that otherwise would by default 3767 be non-cacheable indicates that the media stream is cacheable, unless 3768 indicated otherwise by a Cache-Control header field (Section 14.10). 3770 14.23 From 3771 See [H14.22]. 3773 14.24 Host 3775 The Host HTTP request header field [H14.23] is not needed for RTSP, 3776 and SHALL NOT be sent. It SHALL be silently ignored if received. 3778 14.25 If-Match 3780 See [H14.24]. 3782 The If-Match request-header field is especially useful for ensuring 3783 the integrity of the presentation description, in both the case where 3784 it is fetched via means external to RTSP (such as HTTP), or in the 3785 case where the server implementation is guaranteeing the integrity of 3786 the description between the time of the DESCRIBE message and the 3787 SETUP message. By including the ETag given in or with the session 3788 description in a SETUP request, the client ensures that resources set 3789 up are matching the description. A SETUP request for which the ETag 3790 validation check fails, SHALL responde using 412 (Precondition 3791 Failed). 3793 This validation check is also very useful if a session has been 3794 redirected from one server to another. 3796 14.26 If-Modified-Since 3798 The If-Modified-Since request-header field is used with the DESCRIBE 3799 and SETUP methods to make them conditional. If the requested variant 3800 has not been modified since the time specified in this field, a 3801 description will not be returned from the server (DESCRIBE) or a 3802 stream will not be set up (SETUP). Instead, a 304 (Not Modified) 3803 response SHALL be returned without any message-body. 3805 An example of the field is: 3807 If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT 3809 14.27 If-None-Match 3811 See [H14.26]. 3813 This request header can be used with entity tags to make DESCRIBE 3814 requests conditional. A new session description is retrieved only if 3815 another entity than the already available would be included. If the 3816 entity available for delivery is matching the one the client already 3817 has, then a 304 (Not Modified) response is given. 3819 14.28 Last-Modified 3821 The Last-Modified entity-header field indicates the date and time at 3822 which the origin server believes the presentation description or 3823 media stream was last modified. See [H14.29]. For the methods 3824 DESCRIBE, the header field indicates the last modification date and 3825 time of the description, for SETUP that of the media stream. 3827 14.29 Location 3829 See [H14.30]. 3831 14.30 Proxy-Authenticate 3833 See [H14.33]. 3835 14.31 Proxy-Require 3837 The Proxy-Require request-header field is used to indicate proxy- 3838 sensitive features that MUST be supported by the proxy. Any Proxy- 3839 Require header features that are not supported by the proxy MUST be 3840 negatively acknowledged by the proxy to the client using the 3841 Unsupported header. The proxy SHALL use the 551 (Option Not 3842 Supported) status code in the response. Any feature tag included in 3843 the Proxy-Require does not apply to the end-point (server or client). 3844 To ensure that a feature is supported by both proxies and servers the 3845 tag needs to be included in also a Require header. 3847 See Section 14.37 for more details on the mechanics of this message 3848 and a usage example. 3850 Example of use: 3852 Proxy-Require: play.basic 3854 14.32 Proxy-Supported 3856 The Proxy-Supported header field enumerates all the extensions 3857 supported by the proxy using feature tags. The header carries the 3858 intersection of extensions supported by the forwarding proxies. The 3859 Proxy-Supported header MAY be included in any request by a proxy. It 3860 SHALL be added by any proxy if the Supported header is present in a 3861 request. When present in a request, the receiver MUST in the response 3862 copy the received Proxy-Supported header. 3864 The Proxy-Supported header field contains a list of feature-tags 3865 applicable to proxies, as described in Section 3.7. The list are the 3866 intersection of all feature-tags understood by the proxies. To 3867 achieve an intersection, the proxy adding the Proxy-Supported header 3868 includes all proxy feature-tags it understands. Any proxy receiving a 3869 request with the header, checks the list and removes any feature tag 3870 it do not support. A Proxy-Supported header present in the response 3871 SHALL NOT be touched by the proxies. 3873 Example: 3875 C->P1: OPTIONS rtsp://example.com/ RTSP/1.0 3876 Supported: foo, bar, blech 3878 P1->P2: OPTIONS rtsp://example.com/ RTSP/1.0 3879 Supported: foo, bar, blech 3880 Proxy-Supported: proxy-foo, proxy-bar, proxy-blech 3881 Via: 1.0 prox1.example.com 3883 P2->S: OPTIONS rtsp://example.com/ RTSP/1.0 3884 Supported: foo, bar, blech 3885 Proxy-Supported: proxy-foo, proxy-blech 3886 Via: 1.0 prox1.example.com, 1.0 prox2.example.com 3888 S->C: RTSP/1.0 200 OK 3889 Supported: foo, bar, baz 3890 Proxy-Supported: proxy-foo, proxy-blech 3891 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 3892 Via: 1.0 prox1.example.com, 1.0 prox2.example.com 3894 14.33 Public 3896 The Public response header field lists the set of methods supported 3897 by the response sender. This header applies to the general 3898 capabilities of the sender and its only purpose is to indicate the 3899 sender's capabilities to the recipient. The methods listed may or may 3900 not be applicable to the Request-URI; the Allow header field (section 3901 14.7) MAY be used to indicate methods allowed for a particular URI. 3903 Example of use: 3905 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 3907 In the event that there are proxies between the sender and the 3908 recipient of a response, each intervening proxy MUST modify the 3909 Public header field to remove any methods that are not supported via 3910 that proxy. The resulting Public header field will contain an 3911 intersection of the sender's methods and the methods allowed through 3912 by the intervening proxies. 3914 In general proxies should allow all methods to 3915 transparently pass through from the sending RTSP agent to 3916 the receiving RTSP agent, but there may be cases where this 3917 is not desirable for a given proxy. Modification of the 3918 Public response header field by the intervening proxies 3919 ensures that the request sender gets an accurate response 3920 indicating the methods that can be used on the target agent 3921 via the proxy chain. 3923 14.34 Range 3925 The Range header specifies a time range in PLAY (Section 11.4), PAUSE 3926 (Section 11.5), SETUP (Section 11.3), and REDIRECT (Section 11.9) 3927 requests and/or responses. 3929 The range can be specified in a number of units. This specification 3930 defines smpte (Section 3.4), npt (Section 3.5), and clock (Section 3931 3.6) range units. While byte ranges [H14.35.1] and other extended 3932 units MAY be used, their behavior is unspecified since they are not 3933 normally meaningful in RTSP. Servers supporting the Range header MUST 3934 understand the NPT range format and SHOULD understand the SMPTE range 3935 format. If the Range header is sent in a time format that is not 3936 understood, the recipient SHOULD return 456 (Header Field Not Valid 3937 for Resource) and include an Accept-Ranges header indicating the 3938 supported time formats for the given resource. 3940 The Range header MAY contain a time parameter in UTC, specifying the 3941 time at which the operation is to be made effective. This 3942 functionality SHALL be used only with the REDIRECT method. 3944 Ranges are half-open intervals, including the first point, but 3945 excluding the second point. In other words, a range of A-B starts 3946 exactly at time A, but stops just before B. Only the start time of a 3947 media unit such as a video or audio frame is relevant. For example, 3948 assume that video frames are generated every 40 ms. A range of 3949 10.0-10.1 would include a video frame starting at 10.0 or later time 3950 and would include a video frame starting at 10.08, even though it 3951 lasted beyond the interval. A range of 10.0-10.08, on the other hand, 3952 would exclude the frame at 10.08. 3954 Example: 3956 Range: clock=19960213T143205Z-;time=19970123T143720Z 3958 The notation is similar to that used for the HTTP/1.1 [3] 3959 byte-range header. It allows clients to select an excerpt 3960 from the media object, and to play from a given point to 3961 the end as well as from the current location to a given 3962 point. The start of playback can be scheduled for any time 3963 in the future, although a server may refuse to keep server 3964 resources for extended idle periods. 3966 By default, range intervals increase, where the second point is 3967 larger than the first point. 3969 Example: 3971 Range: npt=10-15 3973 However, range intervals can also decrease if the Scale header (see 3974 section 14.39) indicates a negative scale value. For example, this 3975 would be the case when a playback in reverse is desired. 3977 Example: 3979 Scale: -1 3980 Range: npt=15-10 3982 Decreasing ranges are still half open intervals as described above. 3983 Thus, for range A-B, A is closed and B is open. In the above example, 3984 15 is closed and 10 is open. An exception to this rule is the case 3985 when B=0 in a decreasing range. In this case, the range is closed on 3986 both ends, as otherwise there would be no way to reach 0 on a reverse 3987 playback. 3989 Example: 3991 Scale: -1 3992 Range: npt=15-0 3994 In this range both 15 and 0 are closed. 3996 A decreasing range interval without a corresponding negative Scale 3997 header is not valid. 3999 14.35 Referer 4001 See [H14.36]. The URI refers to that of the presentation description, 4002 typically retrieved via HTTP. 4004 14.36 Retry-After 4006 See [H14.37]. 4008 14.37 Require 4010 The Require request-header field is used by clients or servers to 4011 ensure that the other end-point supports features that are required 4012 in respect to this request. It can also be used to query if the other 4013 end-point supports certain features, however the use of the Supported 4014 (Section 14.43) is much more effective in this purpose. The server 4015 MUST respond to this header by using the Unsupported header to 4016 negatively acknowledge those feature-tags which are NOT supported. 4017 The response SHALL use the error code 551 (Option Not Supported). 4018 This header does not apply to proxies, for the same functionality in 4019 respect to proxies see, header Proxy-Require (Section 14.31). 4021 This is to make sure that the client-server interaction 4022 will proceed without delay when all features are understood 4023 by both sides, and only slow down if features are not 4024 understood (as in the example below). For a well-matched 4025 client-server pair, the interaction proceeds quickly, 4026 saving a round-trip often required by negotiation 4027 mechanisms. In addition, it also removes state ambiguity 4028 when the client requires features that the server does not 4029 understand. 4031 Example: 4033 C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0 4034 CSeq: 302 4035 Require: funky-feature 4036 Funky-Parameter: funkystuff 4038 S->C: RTSP/1.0 551 Option not supported 4039 CSeq: 302 4040 Unsupported: funky-feature 4042 In this example, "funky-feature" is the feature-tag which indicates 4043 to the client that the fictional Funky-Parameter field is required. 4044 The relationship between "funky-feature" and Funky-Parameter is not 4045 communicated via the RTSP exchange, since that relationship is an 4046 immutable property of "funky-feature" and thus should not be 4047 transmitted with every exchange. 4049 Proxies and other intermediary devices SHALL ignore this header. If a 4050 particular extension requires that intermediate devices support it, 4051 the extension should be tagged in the Proxy-Require field instead 4052 (see Section 14.31). 4054 14.38 RTP-Info 4056 The RTP-Info response-header field is used to set RTP-specific 4057 parameters in the PLAY response. These parameters correspond to the 4058 synchronization source identified by the first value of the ssrc 4059 parameter of the Transport response header in the SETUP response. For 4060 streams using RTP as transport protocol the RTP-Info header SHOULD be 4061 part of a 200 response to PLAY. 4063 The exclusion of the RTP-Info in a PLAY response for RTP 4064 transported media will result in that a client needs to 4065 synchronize the media streams using RTCP. This may have 4066 negative impact as the RTCP can be lost, and does not need 4067 to be particulary timely in their arrival. Also 4068 functionality as informing the client from which packet a 4069 seek has occurred is affected. 4071 The RTP-Info MAY also be included in SETUP responses to provide 4072 synchronization information when changing transport parameters, see 4073 11.3. 4075 The header can carry the following parameters: 4077 url: Indicates the stream URI which for which the following RTP 4078 parameters correspond, this URI MUST be the same used in 4079 the SETUP request for this media stream. Any relative URI 4080 SHALL use the Request-URI as base URI. This parameter SHALL 4081 be present. 4083 seq: Indicates the sequence number of the first packet of the 4084 stream that is direct result of the request. This allows 4085 clients to gracefully deal with packets when seeking. The 4086 client uses this value to differentiate packets that 4087 originated before the seek from packets that originated 4088 after the seek. Note that a client may not receive the 4089 packet with the expressed sequence number, and instead 4090 packets with a higher sequence number, due to packet loss 4091 or reordering. This parameter is RECOMMENDED to be present. 4093 rtptime: SHALL indicate the RTP timestamp value corresponding to 4094 the start time value in the Range response header, or if 4095 not explicitly given the implied start point. The client 4096 uses this value to calculate the mapping of RTP time to NPT 4097 or other media timescale. This parameter SHOULD be present 4098 to ensure inter-media synchronization is achieved. There 4099 exist no requirement that any received RTP packet will have 4100 the same RTP timestamp value as the one in the parameter 4101 used to establish synchronization. 4103 A mapping from RTP timestamps to NTP timestamps (wall 4104 clock) is available via RTCP. However, this information is 4105 not sufficient to generate a mapping from RTP timestamps to 4106 media clock time (NPT, etc.). Furthermore, in order to 4107 ensure that this information is available at the necessary 4108 time (immediately at startup or after a seek), and that it 4109 is delivered reliably, this mapping is placed in the RTSP 4110 control channel. 4112 In order to compensate for drift for long, uninterrupted 4113 presentations, RTSP clients should additionally map NPT to NTP, using 4114 initial RTCP sender reports to do the mapping, and later reports to 4115 check drift against the mapping. 4117 Example: 4119 Range:npt=3.25-15 4120 RTP-Info:url=rtsp://example.com/foo/audio;seq=45102;rtptime=12345678, 4121 url=rtsp://example.com/foo/video;seq=30211;rtptime=29567112 4123 Lets assume that audio uses a 16kHz RTP timestamp clock and Video 4124 a 90kHz RTP timestamp clock. Then the media synchronization is 4125 depicted in the following way. 4127 NPT 3.0---3.1---3.2-X-3.3---3.4---3.5---3.6 4128 Audio PA A 4129 Video V PV 4131 X: NPT time value = 3.25, from Range header. 4132 A: RTP timestamp value for Audio from RTP-Info header (12345678). 4133 V: RTP timestamp value for Video from RTP-Info header (29567112). 4134 PA: RTP audio packet carrying an RTP timestamp of 12344878. Which 4135 corresponds to NPT = (12344878 - A) / 16000 + 3.25 = 3.2 4136 PV: RTP video packet carrying an RTP timestamp of 29573412. Which 4137 corresponds to NPT = (29573412 - V) / 90000 + 3.25 = 3.32 4139 Additionally, the RTP-Info header parameter fields only apply to a 4140 single SSRC within a stream (the first SSRC reported in the transport 4141 response header; see section 14.45). If there are multiple 4142 synchronization sources (SSRCs) present within a RTP session 4143 transmitting media, RTCP needs to be used to map RTP and NTP 4144 timestamps for those sources, for both synchronization and drift- 4145 checking. Due to backwards compatibility reasons these shortcomings 4146 can't be fixed without defining a new header, which is for future 4147 work if needed. 4149 Additional constraint: The syntax element "safe-url" (see section 4150 18.2.3) MUST NOT contain the semicolon (";") or comma (",") 4151 characters. The quoted-url form SHOULD only be used when an URI does 4152 not meet the safe-url constraint, in order to ensure compatibility 4153 with implementations conformant to RFC 2326 [23]. 4155 14.39 Scale 4157 A scale value of 1 indicates normal play at the normal forward 4158 viewing rate. If not 1, the value corresponds to the rate with 4159 respect to normal viewing rate. For example, a ratio of 2 indicates 4160 twice the normal viewing rate ("fast forward") and a ratio of 0.5 4161 indicates half the normal viewing rate. In other words, a ratio of 2 4162 has normal play time increase at twice the wallclock rate. For every 4163 second of elapsed (wallclock) time, 2 seconds of content will be 4164 delivered. A negative value indicates reverse direction. For certain 4165 media transports this may require certain considerations to work 4166 consistent, see section B.1 for description on how RTP handles this. 4168 Unless requested otherwise by the Speed parameter, the data rate 4169 SHOULD not be changed. Implementation of scale changes depends on the 4170 server and media type. For video, a server may, for example, deliver 4171 only key frames or selected key frames. For audio, it may time-scale 4172 the audio while preserving pitch or, less desirably, deliver 4173 fragments of audio. 4175 The server should try to approximate the viewing rate, but may 4176 restrict the range of scale values that it supports. The response 4177 MUST contain the actual scale value chosen by the server. 4179 If the server does not implement the possibility to scale, it will 4180 not return a Scale header. A server supporting Scale operations for 4181 PLAY SHALL indicate this with the use of the "play.scale" feature- 4182 tags. 4184 When indicating a negative scale for a reverse playback, the Range 4185 header MUST indicate a decreasing range as described in section 4186 14.34. 4188 Example of playing in reverse at 3.5 times normal rate: 4190 Scale: -3.5 4191 Range: npt=15-10 4193 14.40 Speed 4195 The Speed request-header field requests the server to deliver data to 4196 the client at a particular speed, contingent on the server's ability 4197 and desire to serve the media stream at the given speed. 4198 Implementation by the server is OPTIONAL. The default is the bit rate 4199 of the stream. 4201 The parameter value is expressed as a decimal ratio, e.g., a value of 4202 2.0 indicates that data is to be delivered twice as fast as normal. A 4203 speed of zero is invalid. All speeds may not be possible to support. 4204 Therefore the actual used speed MUST be included in the response. The 4205 lack of a response header is indication of lack of support from the 4206 server of this functionality. Support of the speed functionality are 4207 indicated by the "play.speed" featuretag. 4209 Example: 4211 Speed: 2.5 4213 Use of this field changes the bandwidth used for data delivery. It is 4214 meant for use in specific circumstances where preview of the 4215 presentation at a higher or lower rate is necessary. Implementors 4216 should keep in mind that bandwidth for the session may be negotiated 4217 beforehand (by means other than RTSP), and therefore re-negotiation 4218 may be necessary. When data is delivered over UDP, it is highly 4219 recommended that means such as RTCP be used to track packet loss 4220 rates. If the data transport is performed over public best-effort 4221 networks the sender SHOULD perform congestion control of the 4222 stream(s). This can result in that the communicated speed is 4223 impossible to maintain. 4225 14.41 Server 4227 See [H14.38], however the header syntax is corrected in section 4228 18.2.3. 4230 14.42 Session 4232 The Session request-header and response-header field identifies an 4233 RTSP session. An RTSP session is created by the server as a result of 4234 a successful SETUP request and in the response the session identifier 4235 is given to the client. The RTSP session exist until destroyed by a 4236 TEARDOWN or timed out by the server. 4238 The session identifier is chosen by the server (see Section 3.3) and 4239 MUST be returned in the SETUP response. Once a client receives a 4240 session identifier, it SHALL be included in any request related to 4241 that session. This means that the Session header MUST be included in 4242 a request using the following methods: PLAY, PAUSE, PING, and 4243 TEARDOWN, and MAY be included in SETUP, OPTIONS, SET_PARAMETER, 4244 GET_PARAMETER, and REDIRECT, and SHALL NOT be included in DESCRIBE. 4245 In an RTSP response the session header SHALL be included in methods, 4246 SETUP, PING, PLAY, and PAUSE, and MAY be included in methods, 4247 TEARDOWN, and REDIRECT, and if included in the request of the 4248 following methods it SHALL also be included in the response, OPTIONS, 4249 GET_PARAMETER, and SET_PARAMETER, and SHALL NOT be included in 4250 DESCRIBE. 4252 Note that RFC 2326 servers and client may in some cases not include 4253 or return a Session header when expected according to the above text. 4254 Any client or server is RECOMMENDED to be forgiving of this error if 4255 possible (which it is in many cases). 4257 The timeout parameter MAY be included in a SETUP response, and SHALL 4258 NOT be included in requests. The server uses it to indicate to the 4259 client how long the server is prepared to wait between RTSP commands 4260 or other signs of life before closing the session due to lack of 4261 activity (see below and Section A). The timeout is measured in 4262 seconds, with a default of 60 seconds (1 minute). The length of the 4263 session timeout SHALL NOT be changed in a established session. 4265 The mechanisms for showing liveness of the client is, any RTSP 4266 request with a Session header, if RTP & RTCP is used an RTCP message, 4267 or through any other used media protocol capable of indicating 4268 liveness of the RTSP client. It is RECOMMENDED that a client does not 4269 wait to the last second of the timeout before trying to send a 4270 liveness message. The RTSP message may be lost or when using reliable 4271 protocols, such as TCP, the message may take some time to arrive 4272 safely at the receiver. To show liveness between RTSP request issued 4273 to accomplish other things, the following mechanisms can be used, in 4274 descending order of preference: 4276 RTCP: If RTP is used for media transport RTCP SHOULD be used. If 4277 RTCP is used to report transport statistics, it SHALL also 4278 work as keep alive. The server can determine the client by 4279 used network address and port together with the fact that 4280 the client is reporting on the servers SSRC(s). A downside 4281 of using RTCP is that it only gives statistical guarantees 4282 to reach the server. However that probability is so low 4283 that it can be ignored in most cases. For example, a 4284 session with 60 seconds timeout and enough bitrate assigned 4285 to RTCP messages to send a message from client to server on 4286 average every 5 seconds. That client have for a network 4287 with 5 % packet loss, the probability to fail showing 4288 liveness sign in that session within the timeout interval 4289 of 2.4*E-16. In sessions with shorter timeout times, or 4290 much higher packet loss, or small RTCP bandwidths SHOULD 4291 also use any of the mechanisms below. 4293 PING: The use of the PING method is the best of the RTSP based 4294 methods. It has no other effects than updating the timeout 4295 timer. In that way it will be a minimal message, that also 4296 does not cause any extra processing for the server. The 4297 downside is that it may not be implemented. A client SHOULD 4298 use a OPTIONS request to verify support of the PING at the 4299 server. It is also possible to detect support by sending a 4300 PING to the server. If a 200 (OK) message is received the 4301 server supports it. In case a 501 (Not Implemented) is 4302 received it does not support PING and there is no meaning 4303 in continue trying. Also the reception of a error message 4304 will also mean that the liveness timer has not been 4305 updated. 4307 SET_PARAMETER: When using SET_PARAMETER for keep alive, no body 4308 SHOULD be included. This method is basically as good as 4309 PING, however the implementation support of the method is 4310 today limited. The same considerations as for PING apply 4311 regarding checking of support in server and proxies. 4313 OPTIONS: This method does also work. However it causes the 4314 server to perform unnecessary processing and result in 4315 bigger responses than necessary for the task. The reason 4316 for this is that the Public is always included creating 4317 overhead. 4319 Note that a session identifier identifies an RTSP session across 4320 transport sessions or connections. RTSP requests for a given session 4321 can use different URIs (Presentation and media URIs). Note, that 4322 there are restrictions depending on the session which URIs that are 4323 acceptable for a given method. However, multiple "user" sessions for 4324 the same URI from the same client will require use of different 4325 session identifiers. 4327 The session identifier is needed to distinguish several 4328 delivery requests for the same URI coming from the same 4329 client. 4331 The response 454 (Session Not Found) SHALL be returned if the session 4332 identifier is invalid. 4334 14.43 Supported 4336 The Supported header field enumerates all the extensions supported by 4337 the client or server using feature tags. The header carries the 4338 extensions supported by the message sending entity. The Supported 4339 header MAY be included in any request. When present in a request, 4340 the receiver MUST respond with its corresponding Supported header. 4341 Note, also in 4xx and 5xx responses is the supported header included. 4343 The Supported header field contains a list of feature-tags, described 4344 in Section 3.7, that are understood by the client or server. 4346 Example: 4348 C->S: OPTIONS rtsp://example.com/ RTSP/1.0 4349 Supported: foo, bar, blech 4351 S->C: RTSP/1.0 200 OK 4352 Supported: bar, blech, baz 4354 14.44 Timestamp 4356 The Timestamp general-header field describes when the client sent the 4357 request to the server. The value of the timestamp is of significance 4358 only to the client and may use any timescale. The server MUST echo 4359 the exact same value and MAY, if it has accurate information about 4360 this, add a floating point number indicating the number of seconds 4361 that has elapsed since it has received the request. The timestamp is 4362 used by the client to compute the round-trip time to the server so 4363 that it can adjust the timeout value for retransmissions. It also 4364 resolves retransmission ambiguities for unreliable transport of RTSP. 4366 14.45 Transport 4367 The Transport request and response header field indicates which 4368 transport protocol is to be used and configures its parameters such 4369 as destination address, compression, multicast time-to-live and 4370 destination port for a single stream. It sets those values not 4371 already determined by a presentation description. 4373 Transports are comma separated, listed in order of preference. 4374 Parameters may be added to each transport, separated by a semicolon. 4375 The server SHOULD return a Transport response-header field in the 4376 response to indicate the values actually chosen. The Transport header 4377 field MAY also be used to change certain transport parameters. A 4378 server MAY refuse to change parameters of an existing stream. 4380 A Transport request header field MAY contain a list of transport 4381 options acceptable to the client, in the form of multiple 4382 transportspec entries. In that case, the server MUST return the 4383 single option (transport-spec) which was actually chosen. The number 4384 of transportspec entries is expected to be limited as the client will 4385 get guidance on what configurations that are possible from the 4386 presentation description. 4388 A transport-spec transport option may only contain one of any given 4389 parameter within it. Parameters may be given in any order. 4390 Additionally, it may only contain the unicast or multicast transport 4391 type parameter. Unknown transport parameters SHALL be ignored. The 4392 requester need to ensure that the responder understands the 4393 parameters through the use of feature tags and the Require header. 4395 A request or a response including a transport header with any 4396 parameter not defined in RFC 2326 SHOULD use the Require header and 4397 the "play.basic" feature tag. This is to ensure consistent behavior 4398 with the new parameters. Any parameters part of future extensions 4399 requires clarification if they are safe to ignore in accordance to 4400 this specification, or is required to be understood. If a parameter 4401 is required to be understood, then a feature tag MUST be defined and 4402 used in the Require and/or Proxy-Require headers. 4404 The Transport header field is restricted to describing a 4405 single media stream. (RTSP can also control multiple 4406 streams as a single entity.) Making it part of RTSP rather 4407 than relying on a multitude of session description formats 4408 greatly simplifies designs of firewalls. 4410 The syntax for the transport specifier is 4412 transport/profile/lower-transport. 4414 The default value for the "lower-transport" parameters is specific to 4415 the profile. For RTP/AVP, the default is UDP. 4417 There is three different methods for how to specify where the media 4418 should be delivered: 4420 o The presence of this parameter and its values indicates 4421 address and port pairs for one or more IP flow necessary for 4422 the media transport. This is an improved version of the 4423 Destination parameter. 4425 o The presence of this parameter and its value indicates what IP 4426 address the media SHALL be delivered to. This method is kept 4427 for backwards compatibility reasons, dest_addr is a better 4428 choice. 4430 o The lack of of both of the above parameters indicates that the 4431 server SHALL send media to same address for which the RTSP 4432 messages originates. 4434 The choice of method for indicating where the media is to be 4435 delivered depends on the use case. In many case the only allowed 4436 method will be to use no explicit indication and have the server 4437 deliver media to the source of the RTSP messages. 4439 An RTSP proxy will also need to take care. If the media is not 4440 desired to be routed through the proxy, the proxy will need to 4441 introduce the destination indication. 4443 Below are the configuration parameters associated with transport: 4445 General parameters: 4447 unicast / multicast: This parameter is a mutually exclusive 4448 indication of whether unicast or multicast delivery will be 4449 attempted. One of the two values MUST be specified. Clients 4450 that are capable of handling both unicast and multicast 4451 transmission MUST indicate such capability by including two 4452 full transport-specs with separate parameters for each. 4454 destination: The address of the stream recipient to which a 4455 stream will be sent. The client originating the RTSP 4456 request may specify the destination address of the stream 4457 recipient with the destination parameter. When the 4458 destination field is specified, the recipient may be a 4459 different party than the originator of the request. To 4460 avoid becoming the unwitting perpetrator of a remote- 4461 controlled denial-of-service attack, a server SHOULD 4462 authenticate the client originating the request and SHOULD 4463 log such attempts before allowing the client to direct a 4464 media stream to a recipient address not chosen by the 4465 server. Implementations cannot rely on TCP as reliable 4466 means of client identification. 4468 The server SHOULD NOT allow the destination field to be set 4469 unless a mechanism exists in the system to authorize the 4470 request originator to direct streams to the recipient. It 4471 is preferred that this authorization be performed by the 4472 recipient itself and the credentials passed along to the 4473 server. However, in certain cases, such as when recipient 4474 address is a multicast group, or when the recipient is 4475 unable to communicate with the server in an out-of-band 4476 manner, this may not be possible. In these cases server may 4477 chose another method such as a server-resident 4478 authorization list to ensure that the request originator 4479 has the proper credentials to request stream delivery to 4480 the recipient. 4482 This parameter SHALL NOT be used when src_addr and 4483 dest_addr is used in a transport declaration. For IPv6 4484 addresses it is RECOMMENDED that they be given as fully 4485 qualified domain to make it backwards compatible with RFC 4486 2326 implementations. 4488 source: If the source address for the stream is different than 4489 can be derived from the RTSP end-point address (the server 4490 in playback), the source address SHOULD be specified. To 4491 maintain backwards compatibility with RFC 2326, any IPv6 4492 host's address needs to be given as a fully qualified 4493 domain name. This parameter SHALL NOT be used when src_addr 4494 and dest_addr is used in a transport declaration. 4496 This information may also be available through SDP. 4497 However, since this is more a feature of transport 4498 than media initialization, the authoritative source 4499 for this information should be in the SETUP response. 4501 layers: The number of multicast layers to be used for this media 4502 stream. The layers are sent to consecutive addresses 4503 starting at the destination address. 4505 dest_addr: A general destination address parameter that can 4506 contain one or more address and port pair. For each 4507 combination of Protocol/Profile/Lower Transport the 4508 interpretation of the address or addresses needs to be 4509 defined. The host address part of the tuple MAY be empty, 4510 for example ":8000", in cases when only destination port is 4511 desired to be specified. 4513 The client or server SHALL NOT use this parameter unless 4514 both client and server has shown support. This parameter 4515 MUST be supported by client and servers that implements 4516 this specification. Support is indicated by the use of the 4517 feature-tag "play.basic". This parameter SHALL NOT be used 4518 in the same transport specification as any of the 4519 parameters "destination", "source", "port", "client_port", 4520 and "server_port". 4522 The same security consideration that are given for the 4523 "Destination" parameter does also applies to this 4524 parameter. This parameter can be used for redirecting 4525 traffic to recipient not desiring the media traffic. 4527 src_addr: A general source address parameter that can contain 4528 one or more address and port pairs. For each combination of 4529 Protocol/Profile/Lower Transport the interpretation of the 4530 address or addresses needs to be defined. The client or 4531 server SHALL NOT use this parameter unless both client and 4532 server have shown support. This parameter MUST be supported 4533 by client and servers that implement this specification. 4534 Support is indicated by the use the feature-tag 4535 "play.basic". This parameter SHALL NOT be used in the same 4536 transport specification as any of the parameters 4537 "destination", "source", "port", "client_port", and 4538 "server_port". 4540 This parameter MUST be specified by the server if it 4541 transmits media packets from another address than the one 4542 RTSP messages are sent to. This will allow the client to 4543 verify source address and give it a destination address for 4544 its RTCP feedback packets if RTP is used. The address or 4545 addresses indicated in the src_addr parameter SHOULD be 4546 used both for sending and receiving of the media streams 4547 data packets. The main reasons are threefold: First, 4548 indicating the port and source address(s) lets the receiver 4549 know where from the packets is expected to originate. 4550 Secondly, traversal of NATs are greatly simplified when 4551 traffic is flowing symmetrically over a NAT binding. 4552 Thirdly, certain NAT traversal mechanisms, needs to know to 4553 which address and port to send so called "binding packets" 4554 from the receiver to the sender, thus creating a address 4555 binding in the NAT that the sender to receiver packet flow 4556 can use. 4558 mode: The mode parameter indicates the methods to be supported 4559 for this session. Valid values are PLAY and RECORD. If not 4560 provided, the default is PLAY. The RECORD value was 4561 defined in RFC 2326 and is deprecated in this 4562 specification. 4564 append: The append parameter was used together with RECORD and 4565 is now deprecated. 4567 interleaved: The interleaved parameter implies mixing the media 4568 stream with the control stream in whatever protocol is 4569 being used by the control stream, using the mechanism 4570 defined in Section 12. The argument provides the channel 4571 number to be used in the $ statement and MUST be present. 4572 This parameter MAY be specified as a range, e.g., 4573 interleaved=4-5 in cases where the transport choice for the 4574 media stream requires it, e.g. for RTP with RTCP. The 4575 channel number given in the request are only a guidance 4576 from the client to the server on what channel number(s) to 4577 use. The server MAY set any valid channel number in the 4578 response. The declared channel(s) are bi-directional, so 4579 both end-parties MAY send data on the given channel. One 4580 example of such usage is the second channel used for RTCP, 4581 where both server and client sends RTCP packets on the same 4582 channel. 4584 This allows RTP/RTCP to be handled similarly to the 4585 way that it is done with UDP, i.e., one channel for 4586 RTP and the other for RTCP. 4588 Multicast-specific: 4590 ttl: multicast time-to-live. 4592 RTP-specific: 4594 These parameters are MAY only be used if the media transport protocol 4595 is RTP. 4597 port: This parameter provides the RTP/RTCP port pair for a 4598 multicast session. It is should be specified as a range, 4599 e.g., port=3456-3457 4601 client_port: This parameter provides the unicast RTP/RTCP port 4602 pair on the client where media data and control information 4603 is to be sent. It is specified as a range, e.g., 4604 port=3456-3457. This parameter SHALL NOT be used when 4605 src_addr and dest_addr is used in a transport declaration. 4607 server_port: This parameter provides the unicast RTP/RTCP port 4608 pair on the server where media data and control information 4609 is to be sent. It is specified as a range, e.g., 4610 port=3456-3457. This parameter SHALL NOT be used when 4611 src_addr and dest_addr is used in a transport declaration. 4613 ssrc: The ssrc parameter, if included in a SETUP response, 4614 indicates the RTP SSRC [16] value(s) that will be used by 4615 the media server for RTP packets within the stream. It is 4616 expressed as an eight digit hexadecimal value. If the 4617 client has indicated support for a minimal implementation 4618 of this specification (Section 10), a list of SSRC values 4619 MAY be specified by the server. The first value listed 4620 should correspond to the source whose synchronization 4621 information is provided in the RTP-Info header. Regardless, 4622 there may be other sources not listed whose ssrc's must be 4623 deduced from the actual RTP/RTCP stream. 4625 If a client does not support a minimal implementation of 4626 this specification, a server SHALL include only a single 4627 value for the ssrc parameter. Under this circumstance, if 4628 the server does not act as a synchronization source for 4629 stream data (for instance, server is a translator, 4630 reflector, etc.), the value will be the "packet sender's 4631 SSRC" that would have been used in the RTCP Receiver 4632 Reports generated by the server, regardless of whether the 4633 server actually generates RTCP RRs. 4635 The functionality of specifying the ssrc parameter in a 4636 SETUP request is deprecated as it is incompatible with the 4637 specification of RTP in RFC 3550 [16]. If the parameter is 4638 included in the Transport header of a SETUP request, the 4639 server MAY ignore it, and choose an appropriate SSRC for 4640 the stream. The server MAY set the ssrc parameter in the 4641 Transport header of the response. 4643 The combination of transport protocol, profile and lower transport 4644 needs to be defined. A number of combinations are defined in the 4645 appendix B. 4647 Below is a usage example, showing a client advertising the capability 4648 to handle multicast or unicast, preferring multicast. Since this is 4649 a unicast-only stream, the server responds with the proper transport 4650 parameters for unicast. 4652 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0 4653 CSeq: 302 4654 Transport: RTP/AVP;multicast;mode="PLAY", 4655 RTP/AVP;unicast;client_port=3456-3457;mode="PLAY" 4657 S->C: RTSP/1.0 200 OK 4658 CSeq: 302 4659 Date: 23 Jan 1997 15:35:06 GMT 4660 Session: 47112344 4661 Transport: RTP/AVP;unicast;client_port=3456-3457; 4662 server_port=6256-6257;mode="PLAY" 4664 14.46 Unsupported 4666 The Unsupported response-header field lists the features not 4667 supported by the server. In the case where the feature was specified 4668 via the Proxy-Require field (Section 14.31), if there is a proxy on 4669 the path between the client and the server, the proxy MUST send a 4670 response message with a status code of 551 (Option Not Supported). 4671 The request SHALL NOT be forwarded. 4673 See Section 14.37 for a usage example. 4675 14.47 User-Agent 4677 See [H14.43] for explanation, however the syntax is clarified due to 4678 an error in RFC 2616. A Client SHOULD include this header in all RTSP 4679 messages it sends. 4681 14.48 Vary 4683 See [H14.44] 4685 14.49 Via 4687 See [H14.45]. 4689 14.50 WWW-Authenticate 4691 See [H14.47]. 4693 15 Caching 4695 In HTTP, response-request pairs are cached. RTSP differs 4696 significantly in that respect. Responses are not cacheable, with the 4697 exception of the presentation description returned by DESCRIBE. 4699 (Since the responses for anything but DESCRIBE and GET_PARAMETER do 4700 not return any data, caching is not really an issue for these 4701 requests.) However, it is desirable for the continuous media data, 4702 typically delivered out-of-band with respect to RTSP, to be cached, 4703 as well as the session description. 4705 On receiving a SETUP or PLAY request, a proxy ascertains whether it 4706 has an up-to-date copy of the continuous media content and its 4707 description. It can determine whether the copy is up-to-date by 4708 issuing a SETUP or DESCRIBE request, respectively, and comparing the 4709 Last-Modified header with that of the cached copy. If the copy is not 4710 up-to-date, it modifies the SETUP transport parameters as appropriate 4711 and forwards the request to the origin server. Subsequent control 4712 commands such as PLAY or PAUSE then pass the proxy unmodified. The 4713 proxy delivers the continuous media data to the client, while 4714 possibly making a local copy for later reuse. The exact behavior 4715 allowed to the cache is given by the cache-response directives 4716 described in Section 14.10. A cache MUST answer any DESCRIBE requests 4717 if it is currently serving the stream to the requestor, as it is 4718 possible that low-level details of the stream description may have 4719 changed on the origin-server. 4721 Note that an RTSP cache, unlike the HTTP cache, is of the "cut- 4722 through" variety. Rather than retrieving the whole resource from the 4723 origin server, the cache simply copies the streaming data as it 4724 passes by on its way to the client. Thus, it does not introduce 4725 additional latency. 4727 To the client, an RTSP proxy cache appears like a regular media 4728 server, to the media origin server like a client. Just as an HTTP 4729 cache has to store the content type, content language, and so on for 4730 the objects it caches, a media cache has to store the presentation 4731 description. Typically, a cache eliminates all transport-references 4732 (that is, multicast information) from the presentation description, 4733 since these are independent of the data delivery from the cache to 4734 the client. Information on the encodings remains the same. If the 4735 cache is able to translate the cached media data, it would create a 4736 new presentation description with all the encoding possibilities it 4737 can offer. 4739 16 Examples 4741 This section contains several different examples trying to illustrate 4742 possible ways of using RTSP. The examples can also help with the 4743 understanding of how functions of RTSP work. However remember that 4744 this is examples and the normative and syntax description in the 4745 other sections takes precedence. Please also note that many of the 4746 example MAY contain syntax illegal line breaks to accommodate the 4747 formatting restriction that the RFC series impose. 4749 16.1 Media on Demand (Unicast) 4751 Client C requests a movie distributed from two different media 4752 servers A (audio.example.com ) and V (video.example.com ). The media 4753 description is stored on a web server W. The media description 4754 contains descriptions of the presentation and all its streams, 4755 including the codecs that are available, dynamic RTP payload types, 4756 the protocol stack, and content information such as language or 4757 copyright restrictions. It may also give an indication about the 4758 timeline of the movie. 4760 In this example, the client is only interested in the last part of 4761 the movie. 4763 C->W: GET /twister.sdp HTTP/1.1 4764 Host: www.example.com 4765 Accept: application/sdp 4767 W->C: HTTP/1.0 200 OK 4768 Date: 23 Jan 1997 15:35:06 GMT 4769 Content-Type: application/sdp 4770 Content-Length: 255 4771 Expires: 23 Jan 1998 15:35:06 GMT 4773 v=0 4774 o=- 2890844526 2890842807 IN IP4 192.16.24.202 4775 s=RTSP Session 4776 e=adm@example.com 4777 a=range:npt=0-1:49:34 4778 t=0 0 4779 m=audio 0 RTP/AVP 0 4780 a=control:rtsp://audio.example.com/twister/audio.en 4781 m=video 0 RTP/AVP 31 4782 a=control:rtsp://video.example.com/twister/video 4784 C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 4785 CSeq: 1 4786 User-Agent: PhonyClient/1.2 4787 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057, 4788 RTP/AVP/TCP;unicast;interleaved=0-1 4790 A->C: RTSP/1.0 200 OK 4791 CSeq: 1 4792 Session: 12345678 4793 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057; 4794 server_port=5000-5001 4795 Date: 23 Jan 1997 15:35:12 GMT 4796 Server: PhonyServer/1.0 4797 Expires: 24 Jan 1997 15:35:12 GMT 4798 Cache-Control: public 4799 Accept-Ranges: NPT, SMPTE 4801 C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0 4802 CSeq: 1 4803 User-Agent: PhonyClient/1.2 4804 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059, 4805 RTP/AVP/TCP;unicast;interleaved=0-1 4807 V->C: RTSP/1.0 200 OK 4808 CSeq: 1 4809 Session: 23456789 4810 Transport: RTP/AVP/UDP;unicast;client_port=3058-3059; 4811 server_port=5002-5003 4812 Date: 23 Jan 1997 15:35:12 GMT 4813 Server: PhonyServer/1.0 4814 Cache-Control: public 4815 Expires: 24 Jan 1997 15:35:12 GMT 4816 Accept-Ranges: NPT, SMPTE 4818 C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0 4819 CSeq: 2 4820 User-Agent: PhonyClient/1.2 4821 Session: 23456789 4822 Range: smpte=0:10:00- 4824 V->C: RTSP/1.0 200 OK 4825 CSeq: 2 4826 Session: 23456789 4827 Range: smpte=0:10:00-1:49:23 4828 RTP-Info: url=rtsp://video.example.com/twister/video; 4829 seq=12312232;rtptime=78712811 4830 Server: PhonyServer/2.0 4831 Date: 23 Jan 1997 15:35:13 GMT 4833 C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 4834 CSeq: 2 4835 User-Agent: PhonyClient/1.2 4836 Session: 12345678 4837 Range: smpte=0:10:00- 4839 A->C: RTSP/1.0 200 OK 4840 CSeq: 2 4841 Session: 12345678 4842 Range: smpte=0:10:00-1:49:23 4843 RTP-Info: url=rtsp://audio.example.com/twister/audio.en; 4844 seq=876655;rtptime=1032181 4845 Server: PhonyServer/1.0 4846 Date: 23 Jan 1997 15:35:13 GMT 4848 C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0 4849 CSeq: 3 4850 User-Agent: PhonyClient/1.2 4851 Session: 12345678 4853 A->C: RTSP/1.0 200 OK 4854 CSeq: 3 4855 Server: PhonyServer/1.0 4856 Date: 23 Jan 1997 15:36:52 GMT 4858 C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 4859 CSeq: 3 4860 User-Agent: PhonyClient/1.2 4861 Session: 23456789 4863 V->C: RTSP/1.0 200 OK 4864 CSeq: 3 4865 Server: PhonyServer/2.0 4866 Date: 23 Jan 1997 15:36:52 GMT 4868 Even though the audio and video track are on two different servers, 4869 may start at slightly different times, and may drift with respect to 4870 each other, the client can synchronize the two using standard RTP 4871 methods, in particular the time scale contained in the RTCP sender 4872 reports. Initial synchronization is achieved through the RTP-Info and 4873 Range headers information in the PLAY response. 4875 16.2 Streaming of a Container file 4877 For purposes of this example, a container file is a storage entity in 4878 which multiple continuous media types pertaining to the same end-user 4879 presentation are present. In effect, the container file represents an 4880 RTSP presentation, with each of its components being RTSP streams. 4881 Container files are a widely used means to store such presentations. 4882 While the components are transported as independent streams, it is 4883 desirable to maintain a common context for those streams at the 4884 server end. 4886 This enables the server to keep a single storage handle 4887 open easily. It also allows treating all the streams 4888 equally in case of any prioritization of streams by the 4889 server. 4891 It is also possible that the presentation author may wish to prevent 4892 selective retrieval of the streams by the client in order to preserve 4893 the artistic effect of the combined media presentation. Similarly, in 4894 such a tightly bound presentation, it is desirable to be able to 4895 control all the streams via a single control message using an 4896 aggregate URI. 4898 The following is an example of using a single RTSP session to control 4899 multiple streams. It also illustrates the use of aggregate URIs. In a 4900 container file it is also desirable to not write any URI parts which 4901 is not kept, when the container is distributed, like the host and 4902 most of the path element. Therefore this example also uses the "*" 4903 and relative URI in the delivered SDP. 4905 Client C requests a presentation from media server M. The movie is 4906 stored in a container file. The client has obtained an RTSP URI to 4907 the container file. 4909 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/1.0 4910 CSeq: 1 4911 User-Agent: PhonyClient/1.2 4913 M->C: RTSP/1.0 200 OK 4914 CSeq: 1 4915 Server: PhonyServer/1.0 4916 Date: 23 Jan 1997 15:35:06 GMT 4917 Content-Type: application/sdp 4918 Content-Length: 257 4919 Content-Base: rtsp://example.com/twister.3gp/ 4920 Expires: 24 Jan 1997 15:35:06 GMT 4922 v=0 4923 o=- 2890844256 2890842807 IN IP4 172.16.2.93 4924 s=RTSP Session 4925 i=An Example of RTSP Session Usage 4926 e=adm@example.com 4927 a=control: * 4928 a=range: npt=0-0:10:34.10 4929 t=0 0 4930 m=audio 0 RTP/AVP 0 4931 a=control: trackID=1 4932 m=video 0 RTP/AVP 26 4933 a=control: trackID=4 4935 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/1.0 4936 CSeq: 2 4937 User-Agent: PhonyClient/1.2 4938 Require: play.basic 4939 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 4941 M->C: RTSP/1.0 200 OK 4942 CSeq: 2 4943 Server: PhonyServer/1.0 4944 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001; 4945 src_addr="172.16.2.93:9000"/"172.16.2.93:9001" 4946 ssrc=93CB001E 4947 Session: 12345678 4948 Expires: 24 Jan 1997 15:35:12 GMT 4949 Date: 23 Jan 1997 15:35:12 GMT 4950 Accept-Ranges: NPT 4952 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/1.0 4953 CSeq: 3 4954 User-Agent: PhonyClient/1.2 4955 Require: play.basic 4956 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 4957 Session: 12345678 4959 M->C: RTSP/1.0 200 OK 4960 CSeq: 3 4961 Server: PhonyServer/1.0 4962 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003; 4963 src_addr="172.16.2.93:9002"/"172.16.2.93:9003"; 4964 ssrc=A813FC13 4965 Session: 12345678 4966 Expires: 24 Jan 1997 15:35:13 GMT 4967 Date: 23 Jan 1997 15:35:13 GMT 4968 Accept-Range: NPT 4970 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/1.0 4971 CSeq: 4 4972 User-Agent: PhonyClient/1.2 4973 Range: npt=0-10, npt=30- 4974 Session: 12345678 4976 M->C: RTSP/1.0 200 OK 4977 CSeq: 4 4978 Server: PhonyServer/1.0 4979 Date: 23 Jan 1997 15:35:14 GMT 4980 Session: 12345678 4981 Range: npt=0-10, npt=30-623.10 4982 RTP-Info: url=rtsp://example.com/twister.3gp/trackID=4; 4983 seq=12345;rtptime=3450012, 4984 url=rtsp://example.com/twister.3gp/trackID=1; 4985 seq=54321;rtptime=2876889 4987 C->M: PAUSE rtsp://example.com/twister.3gp/ RTSP/1.0 4988 CSeq: 5 4989 User-Agent: PhonyClient/1.2 4990 Session: 12345678 4992 M->C: RTSP/1.0 200 OK 4993 CSeq: 5 4994 Server: PhonyServer/1.0 4995 Date: 23 Jan 1997 15:36:01 GMT 4996 Session: 12345678 4997 Range: npt=34.57-623.10 4999 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/1.0 5000 CSeq: 6 5001 User-Agent: PhonyClient/1.2 5002 Range: npt=34.57-623.10 5003 Session: 12345678 5005 M->C: RTSP/1.0 200 OK 5006 CSeq: 6 5007 Server: PhonyServer/1.0 5008 Date: 23 Jan 1997 15:36:01 GMT 5009 Session: 12345678 5010 Range: npt=34.57-623.10 5011 RTP-Info: url=rtsp://example.com/twister.3gp/trackID=4; 5012 seq=12555;rtptime=6330012, 5013 url=rtsp://example.com/twister.3gp/trackID=1; 5014 seq=55021;rtptime=3132889 5016 16.3 Single Stream Container Files 5018 Some RTSP servers may treat all files as though they are "container 5019 files", yet other servers may not support such a concept. Because of 5020 this, clients SHOULD use the rules set forth in the session 5021 description for Request-URIs, rather than assuming that a consistent 5022 URI may always be used throughout. Below are an example of how a 5023 multi-stream server might expect a single-stream file to be served: 5025 C->S: DESCRIBE rtsp://foo.com/test.wav RTSP/1.0 5026 Accept: application/x-rtsp-mh, application/sdp 5027 CSeq: 1 5028 User-Agent: PhonyClient/1.2 5030 S->C: RTSP/1.0 200 OK 5031 CSeq: 1 5032 Content-base: rtsp://foo.com/test.wav/ 5033 Content-type: application/sdp 5034 Content-length: 48 5035 Server: PhonyServer/1.0 5036 Date: 23 Jan 1997 15:35:06 GMT 5037 Expires: 23 Jan 1997 17:00:00 GMT 5039 v=0 5040 o=- 872653257 872653257 IN IP4 172.16.2.187 5041 s=mu-law wave file 5042 i=audio test 5043 t=0 0 5044 a=control: * 5045 m=audio 0 RTP/AVP 0 5046 a=control:streamid=0 5048 C->S: SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/1.0 5049 Transport: RTP/AVP/UDP;unicast; 5050 client_port=6970-6971;mode="PLAY" 5051 CSeq: 2 5052 User-Agent: PhonyClient/1.2 5054 S->C: RTSP/1.0 200 OK 5055 Transport: RTP/AVP/UDP;unicast;client_port=6970-6971; 5056 server_port=6970-6971;mode="PLAY";ssrc=EAB98712 5057 CSeq: 2 5058 Session: 2034820394 5059 Expires: 23 Jan 1997 16:00:00 GMT 5060 Server: PhonyServer/1.0 5061 Date: 23 Jan 1997 15:35:07 GMT 5063 C->S: PLAY rtsp://foo.com/test.wav/ RTSP/1.0 5064 CSeq: 3 5065 User-Agent: PhonyClient/1.2 5066 Session: 2034820394 5068 S->C: RTSP/1.0 200 OK 5069 CSeq: 3 5070 Server: PhonyServer/1.0 5071 Date: 23 Jan 1997 15:35:08 GMT 5072 Session: 2034820394 5073 Range: npt=0-600 5074 RTP-Info: url=rtsp://foo.com/test.wav/streamid=0; 5075 seq=981888;rtptime=3781123 5077 Note the different URI in the SETUP command, and then the switch back 5078 to the aggregate URI in the PLAY command. This makes complete sense 5079 when there are multiple streams with aggregate control, but is less 5080 than intuitive in the special case where the number of streams is 5081 one. However the server has declared that the aggregated control URI 5082 in the SDP and therefore this is legal. 5084 In this case, it is also required that servers accept implementations 5085 that use the non-aggregated interpretation and use the individual 5086 media URI, like this: 5088 C->S: PLAY rtsp://example.com/test.wav/streamid=0 RTSP/1.0 5089 CSeq: 3 5090 User-Agent: PhonyClient/1.2 5092 16.4 Live Media Presentation Using Multicast 5094 The media server M chooses the multicast address and port. Here, it 5095 is assumed that the web server only contains a pointer to the full 5096 description, while the media server M maintains the full description. 5098 C->W: GET /sessions.html HTTP/1.1 5099 Host: www.example.com 5101 W->C: HTTP/1.1 200 OK 5102 Content-Type: text/html 5104 5105 ... 5106 5108 ... 5109 5111 C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/1.0 5112 CSeq: 1 5113 Supported: play.basic, play.scale 5115 M->C: RTSP/1.0 200 OK 5116 CSeq: 1 5117 Content-Type: application/sdp 5118 Content-Length: 181 5119 Server: PhonyServer/1.0 5120 Date: 23 Jan 1997 15:35:06 GMT 5121 Supported: play.basic 5123 v=0 5124 o=- 2890844526 2890842807 IN IP4 192.16.24.202 5125 s=RTSP Session 5126 m=audio 3456 RTP/AVP 0 5127 c=IN IP4 224.2.0.1/16 5128 a=control: rtsp://live.example.com/concert/audio 5129 a=range:npt=0- 5131 C->M: SETUP rtsp://live.example.com/concert/audio RTSP/1.0 5132 CSeq: 2 5133 Transport: RTP/AVP;multicast 5135 M->C: RTSP/1.0 200 OK 5136 CSeq: 2 5137 Server: PhonyServer/1.0 5138 Date: 23 Jan 1997 15:35:06 GMT 5139 Transport: RTP/AVP;multicast;destination=224.2.0.1; 5140 port=3456-3457;ttl=16 5141 Session: 0456804596 5142 Accept-Ranges: NPT, UTC 5144 C->M: PLAY rtsp://live.example.com/concert/audio RTSP/1.0 5145 CSeq: 3 5146 Session: 0456804596 5148 M->C: RTSP/1.0 200 OK 5149 CSeq: 3 5150 Server: PhonyServer/1.0 5151 Date: 23 Jan 1997 15:35:07 GMT 5152 Session: 0456804596 5153 Range:npt=1256- 5154 RTP-Info: url=rtsp://live.example.com/concert/audio; 5155 seq=1473; rtptime=80000 5157 16.5 Capability Negotiation 5159 This examples illustrate how the client and server determines their 5160 capability to support a special feature, in this case "play.scale". 5162 The server, through the clients request and the included Supported 5163 header, learns that the client is supporting this updated 5164 specification, and also supports the playback time scaling feature of 5165 RTSP. The server's response contains the following feature related 5166 information to the client; it supports the updated specification 5167 (play.basic), the extended functionality of time scaling of content 5168 (play.scale), and one "example.com" proprietary feature 5169 (example.com.flight). The client also learns the methods supported 5170 (Public header) by the server for the indicated resource. 5172 C->S: OPTIONS rtsp://media.example.com/movie/twister.3gp RTSP/1.0 5173 CSeq: 1 5174 Supported: play.basic, play.scale 5175 User-Agent: PhonyClient/1.2 5177 S->C: RTSP/1.0 200 OK 5178 CSeq: 1 5179 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 5180 Server: PhonyServer/2.0 5181 Supported: play.basic, play.scale, example.com.flight 5183 When the client sends its SETUP request it tells the server that it 5184 is requires support of the play.scale feature for this session by 5185 including the Require header. 5187 C->S: SETUP rtsp://media.example.com/twister.3gp/trackID=1 RTSP/1.0 5188 CSeq: 3 5189 User-Agent: PhonyClient/1.2 5190 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057, 5191 RTP/AVP/TCP;unicast;interleaved=0-1 5192 Require: play.scale 5194 S->C: RTSP/1.0 200 OK 5195 CSeq: 3 5196 Session: 12345678 5197 Transport: RTP/AVP/UDP;unicast;client_port=3056-3057; 5198 server_port=5000-5001 5199 Server: PhonyServer/2.0 5200 Accept-Ranges: NPT, SMPTE 5202 17 Security Framework 5203 The RTSP security framework consists of two high level components: 5204 the pure authentication mechanisms based on HTTP authentication, and 5205 the transport protection based on TLS, which is independent of RTSP. 5206 Because of the similarity in syntax and usage between RTSP servers 5207 and HTTP servers, the security for HTTP is re-used to a large extent. 5209 17.1 RTSP and HTTP Authentication 5211 RTSP and HTTP share common authentication schemes, and thus follow 5212 the same usage guidelines as specified in [7] and also in [H15]. 5213 Servers SHOULD implement both basic and digest [7] authentication. 5215 It should be stressed that using the HTTP authentication alone does 5216 not provide full control message security. Therefore, in environments 5217 requiring tighter security for the control messages, TLS SHOULD be 5218 used, see Section 17.2. 5220 17.2 RTSP over TLS 5222 RTSP SHALL follow the same guidelines with regards to TLS [6] usage 5223 as specified for HTTP, see [17]. RTSP over TLS is separated from 5224 unsecured RTSP both on URI level and port level. Instead of using the 5225 "rtsp" scheme identifier in the URI, the "rtsps" scheme identifier 5226 MUST be used to signal RTSP over TLS. If no port is given in a URI 5227 with the "rtsps" scheme, port 322 SHALL be used for TLS over TCP/IP. 5229 When a client tries to setup an insecure channel to the server (using 5230 the "rtsp" URI), and the policy for the resource requires a secure 5231 channel, the server SHALL redirect the client to the secure service 5232 by sending a 301 redirect response code together with the correct 5233 Location URI (using the "rtsps" scheme). 5235 It should be noted that TLS allows for mutual authentication (when 5236 using both server and client certificates). Still, one of the more 5237 common way TLS is used is to only provide server side authentication 5238 (often to avoid client certificates). TLS is then used in addition to 5239 HTTP authentication, providing transport security and server 5240 authentication, while HTTP Authentication is used to authenticate the 5241 client. 5243 RTSP includes the possibility to keep a TCP session up between the 5244 client and server, throughout the RTSP session lifetime. It may be 5245 convenient to keep the TCP session, not only to save the extra setup 5246 time for TCP, but also the extra setup time for TLS (even if TLS uses 5247 the resume function, there will be almost two extra roundtrips). 5248 Still, when TLS is used, such behavior introduces extra active state 5249 in the server, not only for TCP and RTSP, but also for TLS. This may 5250 increase the vulnerability to DoS attacks. 5252 In addition to these recommendations, Section 17.3 gives further 5253 recommendations of TLS usage with proxies. 5255 17.3 Security and Proxies 5257 The nature of a proxy is often to act as a "man-in-the-middle", while 5258 security is often about preventing the existence of a "man-in-the- 5259 middle". This section provides the clients with the possibility to 5260 use proxies even when applying secure transports (TLS). The client 5261 needs to select between using the below specified procedure or using 5262 a TLS connection directly (by-passing any proxies) to the server. The 5263 choice may be dependent on policies. 5265 There are basically two categories of inspecting proxies, the 5266 transparent proxies (which the client is not aware of) and the non- 5267 transparent proxies (which the client is aware of). An infrastructure 5268 based on proxies requires that the trust model is such that both 5269 client and servers can trust the proxies to handle the RTSP messages 5270 correctly. To be able to trust a proxy, the client and server also 5271 needs to be aware of the proxy. Hence, transparent proxies cannot 5272 generally be seen as trusted and will not work well with security 5273 (unless they work only at transport layer). In the rest of this 5274 section any reference to proxy will be to a non-transparent proxy, 5275 which requires to inspect/manipulate the RTSP messages. 5277 The HTTP Authentication is built on the assumption of proxies and can 5278 provide user-proxy authentication and proxy-proxy/server 5279 authentication in addition to the client-server authentication. 5281 When TLS is applied and a proxy is used, the client will use the 5282 proxy's destination URI address when sending messages. This implies 5283 that for TLS, the client will authenticate the proxy server and not 5284 the end server. Note that, when the client checks the server 5285 certificate in TLS, it MUST check the proxy's identity (URI or 5286 possibly other known identity) against the proxy's identity as 5287 presented in the proxy's Certificate message. 5289 The problem is that for proxy accepted by the client, it needs to be 5290 provided information on which grounds it should accept the next-hop 5291 certificate. Both the proxy and the user may have rules for this, and 5292 the user have the possibility to select the desired behavior. To 5293 handle this case, the Accept-Credentials header (See Section 14.2) is 5294 used, where the client can force the proxy/proxies to relay back the 5295 certificates used by any intermediate proxies as well as the server. 5296 Given the assumption that the proxies are viewed as trusted, it gives 5297 the user a possibility to enforce policies to each trusted proxy of 5298 whether it should accept the next entity in the chain. 5300 A proxy MUST use TLS for the next hop if the RTSP request includes a 5301 "rtsps" URI. TLS MAY be applied on intermediate links (e.g. between 5302 client and proxy, or between proxy and proxy), even if the resource 5303 and the end server does not require to use it. 5305 17.3.1 Accept-Credentials 5307 The Accept-Credentials header can be used by the client to distribute 5308 simple authorization policies to intermediate proxies. The client 5309 includes the Accept-Credentials header to dictate how the proxy 5310 treats the server/next proxy certificate. There are currently three 5311 methods defined: 5313 Any, which means that the proxy (or proxies) SHALL accept 5314 whatever certificate presented. This is of course not a 5315 recommended option to use, but may be useful in certain 5316 circumstances (such as testing). 5318 Proxy, which means that the proxy (or proxies) MUST use its own 5319 policies to validate the certificate and decide whether to 5320 accept it or not. This is convenient in cases where the 5321 user has a strong trust relation with the proxy. Reason why 5322 a strong trust relation may exist are; personal/company 5323 proxy, proxy has a out-of-band policy configuration 5324 mechanism. 5326 User, which means that the proxy (or proxies) MUST send 5327 credential information about the next hop to the client for 5328 authorization. The client can then decide whether the proxy 5329 should accept the certificate or not. See section 17.3.2 5330 for further details. 5332 If the Accept-Credentials header is not included in the RTSP request 5333 from the client, the default method used SHALL be "Proxy". If 5334 something else than the "Proxy" method is used, the Accept- 5335 Credentials header SHALL always be included in the RTSP request from 5336 the client. This is because it cannot be assumed that the proxy 5337 always keeps the TLS state or the users previously preference between 5338 different RTSP messages (in particular if the time interval between 5339 the messages is long). 5341 The "Any" and "Proxy" methods does not require the proxy to provide 5342 any specific response, but only apply the policy as defined for 5343 respectively method. If the policy do not accept the credentials of 5344 the next hop, the entity SHALL respond with a message using status 5345 code 471 (Connection Credentials not accepted). 5347 An RTSP request in the direction server to client MUST NOT include 5348 the Accept-Credential header. As for the non-secured communication, 5349 the possibility for these request depends on the presence of a client 5350 established connection. However if the server to client request is 5351 in relation to a session established over a TLS secured channel, if 5352 MUST be sent in a TLS secured connection. That secured connection 5353 MUST also be the one used by the last client to server request. If no 5354 such transport connection exist at the time when the server desire to 5355 send the request, it silently fails. 5357 Further policies MAY be defined and registered, but should be done so 5358 with caution. 5360 17.3.2 User approved TLS procedure 5362 For the "User" method each proxy MUST perform the the following 5363 procedure for each RTSP request: 5365 o Setup the TLS session to the next hop if not already present 5366 (i.e. run the TLS handshake, but do not send the RTSP 5367 request). 5369 o Extract the peer certificate for the TLS session. 5371 o Check if a matching identity and hash of the peer certificate 5372 is present in the Accept-Credentials header. If present, send 5373 the message to the next hop, and conclude these procedures. If 5374 not, go to the next step. 5376 o The proxy responds to the RTSP request with a 470 or 407 5377 response code. The 407 response code MAY be used when the 5378 proxy requires both user and connection authorization from 5379 user or client. In this message the proxy SHALL include a 5380 Connection-Credentials header, see section 14.12 with the next 5381 hop's identity and certificate. 5383 The client MUST upon receiving a 470 or 407 response with 5384 Connection-Credentials header take the decision on whether to accept 5385 the certificate or not (if it cannot do so, the user SHOULD be 5386 consulted). If the certificate is accepted, the client has to again 5387 send the RTSP request. In that request the client has to include the 5388 Accept-Credentials header including the hash over the DER encoded 5389 certificate for all trusted proxies in the chain. 5391 Example: 5392 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/1.0 5393 CSeq: 2 5394 Transport: RTP/AVP ;unicast ;client_port=4588-4589 5396 P->C: RTSP/1.0 470 Connection Authorization Required 5397 CSeq: 2 5398 Connection-Credentials: "rtsps://test.example.org"; 5399 MIIDNTCCAp... 5401 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/1.0 5402 CSeq: 2 5403 Transport: RTP/AVP ;unicast ;client_port=4588-4589 5404 Accept-Credentials: User "rtsps://test.example.org" ; 5405 dPYD 7txp oGTb AqZZ QJ+v aeOk yH4= ... 5407 One implication of this process is that the connection for secured 5408 RTSP messages may take significantly more round-trip times for the 5409 first message. An complete extra message exchange between the proxy 5410 connecting to the next hop and the client results because of the 5411 process for approval for each hop. However after the first message 5412 exchange the remaining message should not be delayed, if each message 5413 contains the chain of proxies that the requestor accepts. The 5414 procedure of including the credentials in each request rather than 5415 building state in each proxy, avoids the need for revocation 5416 procedures. 5418 18 Syntax 5420 The RTSP syntax is described in an augmented Backus-Naur Form (BNF) 5421 as defined in RFC 2234 [4]. 5423 18.1 Base Syntax 5425 RTSP header field values can be folded onto multiple lines if the 5426 continuation line begins with a space or horizontal tab. All linear 5427 white space, including folding, has the same semantics as SP. A 5428 recipient MAY replace any linear white space with a single SP before 5429 interpreting the field value or forwarding the message downstream. 5430 This is intended to behave exactly as HTTP/1.1 as described in RFC 5431 2616 [8]. The SWS construct is used when linear white space is 5432 optional, generally between tokens and separators. 5434 To separate the header name from the rest of value, a colon is used, 5435 which, by the above rule, allows whitespace before, but no line 5436 break, and whitespace after, including a linebreak. The HCOLON 5437 defines this construct. 5439 OCTET = %x00-FF ; any 8-bit sequence of data 5440 CHAR = %x01-7F ; any US-ASCII character (octets 1 - 127) 5441 UPALPHA = %x41-5A ; any US-ASCII uppercase letter "A".."Z" 5442 LOALPHA = %x61-7A ;any US-ASCII lowercase letter "a".."z" 5443 ALPHA = UPALPHA / LOALPHA 5444 DIGIT = %x30-39 ; any US-ASCII digit "0".."9" 5445 CTL = %x00-1F / %x7F ; any US-ASCII control character 5446 ; (octets 0 - 31) and DEL (127) 5447 CR = %x0D ; US-ASCII CR, carriage return (13 5448 LF = %x0A ; US-ASCII LF, linefeed (10) 5449 SP = %x20 ; US-ASCII SP, space (32) 5450 HT = %x09 ; US-ASCII HT, horizontal-tab (9) 5451 DQUOTE = %x22 ; US-ASCII double-quote mark (34) 5452 BACKSLASH = %x5C ; US-ASCII backslash (92) 5453 CRLF = CR LF 5455 LWS = [CRLF] 1*( SP / HT ) 5456 SWS = [LWS] ; sep whitespace 5457 HCOLON = *( SP / HTAB ) ":" SWS 5458 TEXT = %x20-7D / %x80-FF ; any OCTET except CTLs> 5459 tspecials = "(" / ")" / "<" / ">" / "@" 5460 / "," / ";" / ":" / BACKSLASH / DQUOTE 5461 / "/" / "[" / "]" / "?" / "=" 5462 / "{" / "}" / SP / HT 5463 token = 1*(%x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39 5464 / %x41-5A / %x5E-7A / %x7C / %x7E) 5465 ; 1* 5466 quoted-string = ( DQUOTE *(qdtext) DQUOTE ) 5467 qdtext = %x20-21 / %x23-7D / %x80-FF ; any TEXT except <"> 5468 quoted-pair = BACKSLASH CHAR 5469 ctext = %x20-27 / %x2A-7D / %x80-FF ; any OCTET except CTLs, "(" and ")" 5471 safe = "$" / "-" / "_" / "." / "+" 5472 extra = "!" / "*" / "'" / "(" / ")" / "," 5473 rtsp-extra = "!" / "*" / "'" / "(" / ")" / 5474 hex = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" / 5475 "a" / "b" / "c" / "d" / "e" / "f" 5476 escape = "%" hex hex 5477 reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" 5478 unreserved = alpha / digit / safe / extra 5479 rtsp-unreserved = alpha /digit /safe / rtsp-extra 5480 base64 = 0*base64-unit [base64-pad] 5481 base64-unit = 4base64-char 5482 base64-pad = (2base64-char "==") / (3base64-char "=") 5483 base64-char = ALPHA / DIGIT / "+" / "/" 5484 STAR = SWS "*" SWS ; asterisk 5485 SLASH = SWS "/" SWS ; slash 5486 EQUAL = SWS "=" SWS ; equal 5487 LPAREN = SWS "(" SWS ; left parenthesis 5488 RPAREN = SWS ")" SWS ; right parenthesis 5489 COMMA = SWS "," SWS ; comma 5490 SEMI = SWS ";" SWS ; semicolon 5491 COLON = SWS ":" SWS ; colon 5492 LDQUOT = SWS DQUOTE; open double quotation mark 5493 RDQUOT = DQUOTE SWS ; close double quotation mark 5495 18.2 RTSP Protocol Definition 5497 18.2.1 Generic Protocol elements 5499 URI-reference = RTSP-URI / relative-ref 5500 relative-ref = < As defined in RFC 3986 [18]> 5501 RTSP-URI = rtsp-uri-def / rtsps-uri-def / rtspu-uri-def 5502 rtsp-uri-def = "rtsp:" rtsp-uri-rest 5503 rtsps-uri-def = "rtsps:" rtsp-uri-rest 5504 rtspu-uri-def = "rtspu:" rtsp-uri-rest 5505 rtsp-uri-rest = "//" host [":" port] [abs-path ["?" query]] ["#" fragment] 5506 host = 5507 abs-path = 5508 port = *DIGIT ; Is expected to be 1*5DIGIT 5509 query = 5510 fragment = 5512 smpte-range = smpte-type "=" smpte-range-spec 5513 ;Section 3.4 5514 smpte-range-spec = ( smpte-time "-" [ smpte-time ] ) 5515 / ( "-" smpte-time ) 5516 smpte-type = "smpte" / "smpte-30-drop" 5517 / "smpte-25" / smpte-type-extension 5518 ; other timecodes may be added 5519 smpte-type-extension = token 5520 smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT 5521 [ ":" 1*2DIGIT [ "." 1*2DIGIT ] ] 5523 npt-range = ["npt" "="] npt-range-spec ; Section 3.5 5524 ; implementations SHALL use the "npt=" prefix, 5525 ;but SHOULD be prepared to interoperate with 5526 ; RFC 2326 implementations which don't use it. 5527 npt-range-spec = ( npt-time "-" [ npt-time ] ) / ( "-" npt-time ) 5528 npt-time = "now" / npt-sec / npt-hhmmss 5529 npt-sec = 1*DIGIT [ "." *DIGIT ] 5530 npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ] 5531 npt-hh = 1*DIGIT ; any positive number 5532 npt-mm = 1*2DIGIT ; 0-59 5533 npt-ss = 1*2DIGIT ; 0-59 5535 utc-range = "clock" "=" utc-range-spec ; Section 3.6 5536 utc-range-spec = ( utc-time "-" [ utc-time ] ) / ( "-" utc-time ) 5537 utc-time = utc-date "T" utc-clock "Z" 5538 utc-date = 8DIGIT ; < YYYYMMDD > 5539 utc-clock = 6DIGIT [ "." fraction ]; < HHMMSS.fraction > 5540 fraction = 1*DIGIT 5542 feature-tag = token 5543 session-id = 8*( ALPHA / DIGIT / safe ) 5544 message-header = field-name HCOLON [ field-value ] CRLF 5545 field-name = token 5546 field-value = *( field-content / LWS ) 5547 field-content = 5551 18.2.2 Message Syntax 5553 RTSP-message = Request / Response ; RTSP/1.0 messages 5554 Request = Request-Line ; Section 6.1 5555 *( general-header ; Section 5 5556 / request-header ; Section 6.2 5557 / entity-header ) ; Section 8.1 5558 CRLF 5559 [ message-body ] ; Section 4.3 5560 Response = Status-Line ; Section 7.1 5561 *( general-header ; Section 5 5562 / response-header ; Section 7.1.2 5563 / entity-header ) ; Section 8.1 5564 CRLF 5565 [ message-body ] ; Section 4.3 5567 Request-Line = Method SP Request-URI SP RTSP-Version CRLF 5568 Status-Line = RTSP-Version SP Status-Code SP Reason-Phrase CRLF 5570 Method = "DESCRIBE" ; Section 11.2 5571 / "GET_PARAMETER" ; Section 11.7 5572 / "OPTIONS" ; Section 11.1 5573 / "PAUSE" ; Section 11.5 5574 / "PLAY" ; Section 11.4 5575 / "PING" ; Section 11.10 5576 / "REDIRECT" ; Section 11.9 5577 / "SETUP" ; Section 11.3 5578 / "SET_PARAMETER" ; Section 11.8 5579 / "TEARDOWN" ; Section 11.6 5580 / extension-method 5581 extension-method = token 5583 Request-URI = "*" / RTSP-URI 5584 RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT 5586 Status-Code = "100" ; Continue 5587 / "200" ; OK 5588 / "201" ; Created 5589 / "250" ; Low on Storage Space 5590 / "300" ; Multiple Choices 5591 / "301" ; Moved Permanently 5592 / "302" ; Moved Temporarily 5593 / "303" ; See Other 5594 / "304" ; Not Modified 5595 / "305" ; Use Proxy 5596 / "400" ; Bad Request 5597 / "401" ; Unauthorized 5598 / "402" ; Payment Required 5599 / "403" ; Forbidden 5600 / "404" ; Not Found 5601 / "405" ; Method Not Allowed 5602 / "406" ; Not Acceptable 5603 / "407" ; Proxy Authentication Required 5604 / "408" ; Request Time-out 5605 / "410" ; Gone 5606 / "411" ; Length Required 5607 / "412" ; Precondition Failed 5608 / "413" ; Request Entity Too Large 5609 / "414" ; Request-URI Too Large 5610 / "415" ; Unsupported Media Type 5611 / "451" ; Parameter Not Understood 5612 / "452" ; reserved 5613 / "453" ; Not Enough Bandwidth 5614 / "454" ; Session Not Found 5615 / "455" ; Method Not Valid in This State 5616 / "456" ; Header Field Not Valid for Resource 5617 / "457" ; Invalid Range 5618 / "458" ; Parameter Is Read-Only 5619 / "459" ; Aggregate operation not allowed 5620 / "460" ; Only aggregate operation allowed 5621 / "461" ; Unsupported transport 5622 / "462" ; Destination unreachable 5623 / "470" ; Connection Authorization Required 5624 / "471" ; Connection Credentials not accepted 5625 / "500" ; Internal Server Error 5626 / "501" ; Not Implemented 5627 / "502" ; Bad Gateway 5628 / "503" ; Service Unavailable 5629 / "504" ; Gateway Time-out 5630 / "505" ; RTSP Version not supported 5631 / "551" ; Option not supported 5632 / extension-code 5634 extension-code = 3DIGIT 5635 Reason-Phrase = *TEXT 5637 general-header = Cache-Control ; Section 14.10 5638 / Connection ; Section 14.11 5639 / CSeq ; Section 14.19 5640 / Date ; Section 14.20 5641 / Proxy-Supported ; Section 14.32 5642 / Supported ; Section 14.43 5643 / Timestamp ; Section 14.44 5644 / Via ; Section 14.49 5645 / extension-header 5647 request-header = Accept ; Section 14.1 and [H14.1] 5648 / Accept-Credentials ; Section 14.2 5649 / Accept-Encoding ; Section 14.3 and [H14.3] 5650 / Accept-Language ; Section 14.4 and [H14.4] 5651 / Authorization ; Section 14.7 and [H14.8] 5652 / Bandwidth ; Section 14.8 5653 / Blocksize ; Section 14.9 5654 / From ; Section 14.23 5655 / If-Match ; Section 14.25 5656 / If-Modified-Since ; Section 14.26 and [H14.25] 5657 / If-None-Match ; Section 14.27 5658 / Proxy-Require ; Section 14.31 5659 / Range ; Section 14.34 5660 / Referer ; Section 14.35 5661 / Require ; Section 14.37 5662 / Scale ; Section 14.39 5663 / Session ; Section 14.42 5664 / Speed ; Section 14.40 5665 / Supported ; Section 14.43 5666 / Transport ; Section 14.45 5667 / User-Agent ; Section 14.47 5668 / extension-header 5670 response-header = Accept-Credentials ; Section 14.2 5671 / Accept-Ranges ; Section 14.5 5672 / Connection-creds ; Section 14.12 5673 / ETag ; Section 14.21 5674 / Location ; Section 14.29 5675 / Proxy-Authenticate ; Section 14.30 5676 / Public ; Section 14.33 5677 / Range ; Section 14.34 5678 / Retry-After ; Section 14.36 5679 / RTP-Info ; Section 14.38 5680 / Scale ; Section 14.39 5681 / Session ; Section 14.42 5682 / Server ; Section 14.41 5683 / Speed ; Section 14.40 5684 / Transport ; Section 14.45 5685 / Unsupported ; Section 14.46 5686 / Vary ; Section 14.48 5687 / WWW-Authenticate ; Section 14.50 5688 / extension-header 5690 entity-header = Allow ; Section 14.6 5691 / Content-Base ; Section 14.13 5692 / Content-Encoding ; Section 14.14 5693 / Content-Language ; Section 14.15 5694 / Content-Length ; Section 14.16 5695 / Content-Location ; Section 14.17 5696 / Content-Type ; Section 14.18 5697 / Expires ; Section 14.22 and [H14.21] 5698 / Last-Modified ; Section 14.28 5699 / extension-header 5700 extension-header = message-header 5702 18.2.3 Header Syntax 5704 All header syntaxes not defined in this section are defined in 5705 section 14 of the HTTP 1.1 specification [3]. 5707 accept-credentials = "Accept-Credentials" HCOLON credential-decision CRLF 5708 credential-decision = ("User" COMMA [credential-info]) 5709 / "Proxy" 5710 / "Any" 5711 / token ; For future extensions 5712 credential-info = cred-info-data 0*(COMMA cred-info-data) 5713 cred-info-data = DQUOTE rtsp-URI DQUOTE SEMI base64 5714 Accept-Ranges = "Accept-Ranges" HCOLON acceptable-ranges CRLF 5715 acceptable-ranges = (range-unit *(COMMA range-unit)) 5716 / "none" 5717 range-unit = NPT / SMPTE / UTC / extension-format 5718 extension-format = token 5719 Bandwidth = "Bandwidth" HCOLON 1*DIGIT CRLF 5720 Blocksize = "Blocksize" HCOLON 1*DIGIT CRLF 5722 Cache-Control = "Cache-Control" HCOLON cache-directive CRLF 5723 *(COMMA cache-directive) 5724 cache-directive = cache-request-directive 5725 / cache-response-directive 5726 cache-request-directive = "no-cache" 5727 / "max-stale" [EQUAL delta-seconds] 5728 / "min-fresh" EQUAL delta-seconds 5729 / "only-if-cached" 5730 / cache-extension 5731 cache-response-directive = "public" 5732 / "private" 5733 / "no-cache" 5734 / "no-transform" 5735 / "must-revalidate" 5736 / "proxy-revalidate" 5737 / "max-age" EQUAL delta-seconds 5738 / cache-extension 5739 cache-extension = token [EQUAL (token / quoted-string)] 5740 delta-seconds = 1*DIGIT 5742 connection-creds = "Connection-Credentials" HCOLON credential-info CRLF 5743 connection = "Connection" HCOLON (connection-token) 5744 *(COMMA connection-token) CRLF 5745 connection-token = token 5746 Content-Base = "Content-Base" HCOLON URI-Reference CRLF 5747 CSeq = "Cseq" HCOLON 1*DIGIT CRLF 5748 Proxy-Require = "Proxy-Require" HCOLON feature-tag CRLF 5749 *(COMMA feature-tag) 5750 Proxy-Supported = "Proxy-Supported" HCOLON feature-tag 5751 *(COMMA feature-tag) CRLF 5752 Public = "Public" HCOLON method *(COMMA method) CRLF 5753 Range = "Range" HCOLON ranges-spec *(COMMA ranges-spec) 5754 [ SEMI "time" EQUAL utc-time ] CRLF 5755 ranges-spec = npt-range / utc-range / smpte-range 5756 Require = "Require" HCOLON feature-tag *(COMMA feature-tag) CRLF 5758 RTP-Info = "RTP-Info" HCOLON rtsp-info-spec 5759 *(COMMA rtsp-info-spec) CRLF 5760 rtsp-info-spec = stream-url 1*ri-parameter 5761 stream-url = quoted-url / unquoted-url 5762 unquoted-url = "url" EQUAL safe-url 5763 quoted-url = "url" EQUAL DQUOTE needquote-url DQUOTE 5764 safe-url = URI-reference ; That doesn't contain ";" or "," 5765 needquote-url = URI-reference ; That contains ";" or "," 5766 ri-parameter = SEMI "seq" EQUAL 1*DIGIT 5767 / SEMI "rtptime" EQUAL 1*DIGIT 5769 Scale = "Scale" HCOLON [ "-" ] 1*DIGIT [ "." *DIGIT ] CRLF 5770 Speed = "Speed" HCOLON 1*DIGIT [ "." *DIGIT ] CRLF 5771 Server = "Server" HCOLON ( product / comment ) 5772 *(LWS (product / comment)) CRLF 5773 product = token ["/" product-version] 5774 product-version = token 5775 comment "(" *( ctext / quoted-pair / comment ) ")" 5776 Session = "Session" HCOLON session-id 5777 [ SEMI "timeout" EQUAL delta-seconds ] CRLF 5778 Supported = "Supported" HCOLON [feature-tag *(COMMA feature-tag)] CRLF 5779 Timestamp = "Timestamp" HCOLON *(DIGIT) ["." *(DIGIT)] LWS [delay] 5780 delay = *(DIGIT) [ "." *(DIGIT) ] 5781 Transport = "Transport" HCOLON transport-spec 5782 *(COMMA transport-spec) CRLF 5783 transport-spec = transport-id *tr-parameter 5784 transport-id = trans-id-rtp / other-trans 5785 trans-id-rtp = "RTP" "/" profile ["/" lower-transport] 5786 ; no LWS is allowed inside transport-id 5787 other-trans = token *("/" token) 5788 ; Not guaranteed RFC 2326 compatible 5790 profile = "AVP" / "SAVP" / "AVPF" / token 5791 lower-transport = "TCP" / "UDP" / token 5792 tr-parameter = SEMI ( "unicast" / "multicast" ) 5793 / SEMI "source" EQUAL host 5794 / SEMI "destination" [ EQUAL host ] 5795 / SEMI "interleaved" EQUAL channel [ "-" channel ] 5796 / SEMI "append" 5797 / SEMI "ttl" EQUAL ttl 5798 / SEMI "layers" EQUAL 1*DIGIT 5799 / SEMI "port" EQUAL port-spec 5800 / SEMI "client_port" EQUAL port-spec 5801 / SEMI "server_port" EQUAL port-spec 5802 / SEMI "ssrc" EQUAL ssrc *("/" ssrc) 5803 / SEMI "client_ssrc" EQUAL ssrc 5804 / SEMI "mode" EQUAL mode-spec 5805 / SEMI "dest_addr" EQUAL addr-list 5806 / SEMI "src_addr" EQUAL addr-list 5807 / SEMI trn-param-ext 5808 port-spec = port [ "-" port ] 5809 trn-param-ext = par-name EQUAL trn-par-value 5810 par-name = token 5811 trn-par-value = *(rtsp-unreserved / DQUOTE *TEXT DQUOTE) 5812 ttl = 1*3(DIGIT) 5813 ssrc = 8*8(HEX) 5814 channel = 1*3(DIGIT) 5815 mode-spec = mode / ( DQUOTE mode *(COMMA mode) DQUOTE ) 5816 mode = "PLAY" / "RECORD" / token 5817 addr-list = quoted-host-port *("/" quoted-host-port) 5818 quoted-host-port = DQUOTE host [":" port] DQUOTE 5820 Unsupported = "Unsupported" HCOLON feature-tag *(COMMA feature-tag) CRLF 5821 User-Agent = "User-Agent" HCOLON ( product / comment ) 5822 0*(LWS (product / comment)) CRLF 5824 19 Security Considerations 5826 Because of the similarity in syntax and usage between RTSP servers 5827 and HTTP servers, the security considerations outlined in [H15] 5828 apply. Specifically, please note the following: 5830 Abuse of Server Log Information: RTSP and HTTP servers will 5831 presumably have similar logging mechanisms, and thus should 5832 be equally guarded in protecting the contents of those 5833 logs, thus protecting the privacy of the users of the 5834 servers. See [H15.1.1] for HTTP server recommendations 5835 regarding server logs. 5837 Transfer of Sensitive Information: There is no reason to believe 5838 that information transferred via RTSP may be any less 5839 sensitive than that normally transmitted via HTTP. 5840 Therefore, all of the precautions regarding the protection 5841 of data privacy and user privacy apply to implementors of 5842 RTSP clients, servers, and proxies. See [H15.1.2] for 5843 further details. 5845 Attacks Based On File and Path Names: Though RTSP URIs are 5846 opaque handles that do not necessarily have file system 5847 semantics, it is anticipated that many implementations will 5848 translate portions of the Request-URIs directly to file 5849 system calls. In such cases, file systems SHOULD follow the 5850 precautions outlined in [H15.5], such as checking for ".." 5851 in path components. 5853 Personal Information: RTSP clients are often privy to the same 5854 information that HTTP clients are (user name, location, 5855 etc.) and thus should be equally sensitive. See [H15.1] 5856 for further recommendations. 5858 Privacy Issues Connected to Accept Headers: Since may of the 5859 same "Accept" headers exist in RTSP as in HTTP, the same 5860 caveats outlined in [H15.1.4] with regards to their use 5861 should be followed. 5863 DNS Spoofing: Presumably, given the longer connection times 5864 typically associated to RTSP sessions relative to HTTP 5865 sessions, RTSP client DNS optimizations should be less 5866 prevalent. Nonetheless, the recommendations provided in 5867 [H15.3] are still relevant to any implementation which 5868 attempts to rely on a DNS-to-IP mapping to hold beyond a 5869 single use of the mapping. 5871 Location Headers and Spoofing: If a single server supports 5872 multiple organizations that do not trust each another, then 5873 it needs to check the values of Location and Content- 5874 Location header fields in responses that are generated 5875 under control of said organizations to make sure that they 5876 do not attempt to invalidate resources over which they have 5877 no authority. ([H15.4]) 5879 In addition to the recommendations in the current HTTP specification 5880 (RFC 2616 [3], as of this writing) and also of the previous RFC2068 5881 [19], future HTTP specifications may provide additional guidance on 5882 security issues. 5884 The following are added considerations for RTSP implementations. 5886 Concentrated denial-of-service attack: The protocol offers the 5887 opportunity for a remote-controlled denial-of-service 5888 attack. 5890 The attacker may initiate traffic flows to one or more IP 5891 addresses by specifying them as the destination in SETUP 5892 requests. While the attacker's IP address may be known in 5893 this case, this is not always useful in prevention of more 5894 attacks or ascertaining the attackers identity. Thus, an 5895 RTSP server SHOULD only allow client-specified destinations 5896 for RTSP-initiated traffic flows if the server has verified 5897 the client's identity, either against a database of known 5898 users using RTSP authentication mechanisms (preferably 5899 digest authentication or stronger), or other secure means. 5901 Session hijacking: Since there is no or little relation between 5902 a transport layer connection and an RTSP session, it is 5903 possible for a malicious client to issue requests with 5904 random session identifiers which would affect unsuspecting 5905 clients. The server SHOULD use a large, random and non- 5906 sequential session identifier to minimize the possibility 5907 of this kind of attack. 5909 Authentication: Servers SHOULD implement both basic and digest 5910 [7] authentication. In environments requiring tighter 5911 security for the control messages, the transport layer 5912 mechanism TLS (RFC 2246 [6]) SHOULD be used. 5914 Stream issues: RTSP only provides for stream control. Stream 5915 delivery issues are not covered in this section, nor in the 5916 rest of this draft. RTSP implementations will most likely 5917 rely on other protocols such as RTP, IP multicast, RSVP and 5918 IGMP, and should address security considerations brought up 5919 in those and other applicable specifications. 5921 Persistently suspicious behavior: RTSP servers SHOULD return 5922 error code 403 (Forbidden) upon receiving a single instance 5923 of behavior which is deemed a security risk. RTSP servers 5924 SHOULD also be aware of attempts to probe the server for 5925 weaknesses and entry points and MAY arbitrarily disconnect 5926 and ignore further requests clients which are deemed to be 5927 in violation of local security policy. 5929 20 IANA Considerations 5931 This section set up a number of registers for RTSP that should be 5932 maintained by IANA. For each registry there is a description on what 5933 it is required to contain, what specification is needed when adding a 5934 entry with IANA, and finally the entries that this document needs to 5935 register. See also the section 1.6 "Extending RTSP". There is also an 5936 IANA registration of two SDP attributes. 5938 The sections describing how to register an item uses some of the 5939 requirements level described in RFC 2434 [20], namely " First Come, 5940 First Served", "Specification Required", and "Standards Action". 5942 A registration request to IANA MUST contain the following 5943 information: 5945 o A name of the item to register according to the rules 5946 specified by the intended registry. 5948 o Indication of who has change control over the feature (for 5949 example, IETF, ISO, ITU-T, other international standardization 5950 bodies, a consortium, a particular company or group of 5951 companies, or an individual); 5953 o A reference to a further description, if available, for 5954 example (in order of preference) an RFC, a published standard, 5955 a published paper, a patent filing, a technical report, 5956 documented source code or a computer manual; 5958 o For proprietary features, contact information (postal and 5959 email address); 5961 20.1 Feature-tags 5963 20.1.1 Description 5965 When a client and server try to determine what part and functionality 5966 of the RTSP specification and any future extensions that its counter 5967 part implements there is need for a namespace. This registry 5968 contains named entries representing certain functionality. 5970 The usage of feature-tags is explained in section 10 and 11.1. 5972 20.1.2 Registering New Feature-tags with IANA 5974 The registering of feature-tags is done on a first come, first served 5975 basis. 5977 The name of the feature MUST follow these rules: The name may be of 5978 any length, but SHOULD be no more than twenty characters long. The 5979 name MUST not contain any spaces, or control characters. The 5980 registration SHALL indicate if the feature tag applies to servers 5981 only, proxies only or both server and proxies. Any proprietary 5982 feature SHALL have as the first part of the name a vendor tag, which 5983 identifies the organization. 5985 20.1.3 Registered entries 5987 The following feature-tags are in this specification defined and 5988 hereby registered. The change control belongs to the Authors and the 5989 IETF MMUSIC WG. 5991 play.basic: The minimal implementation for playback operations 5992 according to section D. Applies for both servers and 5993 proxies. 5995 play.scale: Support of scale operations for media playback. 5996 Applies only for servers. 5998 play.speed: Support of the speed functionality for playback. 5999 Applies only for servers 6001 20.2 RTSP Methods 6003 20.2.1 Description 6005 What a method is, is described in section 11. Extending the protocol 6006 with new methods allow for totally new functionality. 6008 20.2.2 Registering New Methods with IANA 6010 A new method MUST be registered through an IETF standard track 6011 document. The reason is that new methods may radically change the 6012 protocols behavior and purpose. 6014 A specification for a new RTSP method MUST consist of the following 6015 items: 6017 o A method name which follows the BNF rules for methods. 6019 o A clear specification on what action and response a request 6020 with the method will result in. Which directions the method is 6021 used, C -> S or S -> C or both. How the use of headers, if 6022 any, modifies the behavior and effect of the method. 6024 o A list or table specifying which of the registered headers 6025 that are allowed to use with the method in request or/and 6026 response. 6028 o Describe how the method relates to network proxies. 6030 20.2.3 Registered Entries 6032 This specification, RFCXXXX, registers 10 methods: DESCRIBE, 6033 GET_PARAMETER, OPTIONS, PAUSE, PING, PLAY, REDIRECT, SETUP, 6034 SET_PARAMETER, and TEARDOWN. 6036 20.3 RTSP Status Codes 6038 20.3.1 Description 6040 A status code is the three digit numbers used to convey information 6041 in RTSP response messages, see 7. The number space is limited and 6042 care should be taken not to fill the space. 6044 20.3.2 Registering New Status Codes with IANA 6046 A new status code can only be registered by an IETF standards track 6047 document. A specification for a new status code MUST specify the 6048 following: 6050 o The requested number. 6052 o A description what the status code means and the expected 6053 behavior of the sender and receiver of the code. 6055 20.3.3 Registered Entries 6057 RFCXXX, registers the numbered status code defined in the BNF entry 6058 "Status-Code" except "extension-code" in section 18.2.2. 6060 20.4 RTSP Headers 6062 20.4.1 Description 6064 By specifying new headers a method(s) can be enhanced in many 6065 different ways. An unknown header will be ignored by the receiving 6066 entity. If the new header is vital for a certain functionality, a 6067 feature-tag for the functionality can be created and demanded to be 6068 used by the counter-part with the inclusion of a Require header 6069 carrying the feature-tag. 6071 20.4.2 Registering New Headers with IANA 6073 A public available specification is required to register a header. 6074 The specification SHOULD be a standards document, preferable an IETF 6075 RFC. 6077 The specification MUST contain the following information: 6079 o The name of the header. 6081 o A BNF specification of the header syntax. 6083 o A list or table specifying when the header may be used, 6084 encompassing all methods, their request or response, the 6085 direction (C -> S or S -> C). 6087 o How the header is to be handled by proxies. 6089 o A description of the purpose of the header. 6091 20.4.3 Registered entries 6093 All headers specified in section 14 in RFCXXXX are to be registered. 6095 Furthermore the following RTSP headers defined in other 6096 specifications are registered: 6098 o x-wap-profile defined in [38]. 6100 o x-wap-profile-diff defined in [38]. 6102 o x-wap-profile-warning defined in [38]. 6104 o x-predecbufsize defined in [38]. 6106 o x-initpredecbufperiod defined in [38]. 6108 o x-initpostdecbufperiod defined in [38]. 6110 The use of "X-" is NOT RECOMMENDED but the above headers in the 6111 register list was defined prior to the clarification. 6113 20.5 Transport Header registries 6114 The transport header contains a number of parameters which have 6115 possibilities for future extensions. Therefore registries for these 6116 needs to be defined. 6118 20.5.1 Transport Protocols 6120 A registry for the parameter transport-protocol SHALL be defined with 6121 the following rules: 6123 o Registering require an public available standards 6124 specification. 6126 o A contact person or organization with address and email. 6128 o A value definition that are following the BNF token 6129 definition. 6131 o A describing text that explains how the registered value are 6132 used in RTSP. 6134 This specification registers 1 value: 6136 o Use of the RTP [16] protocol for media transport. The usage 6137 is explained in RFC XXXX, appendix B.1. 6139 20.5.2 Profile 6141 A registry for the parameter profile SHALL be defined with the 6142 following rules: 6144 o Registering requires public available standards specification. 6146 o A contact person or organization with address and email. 6148 o A value definition that are following the BNF token 6149 definition. 6151 o A definition of which Transport protocol(s) that this profile 6152 is valid for. 6154 o A describing text that explains how the registered value are 6155 used in RTSP. 6157 This specification registers 1 value: 6159 o The "RTP profile for audio and video conferences with minimal 6160 control" [2] MUST only be used when the transport 6161 specification's transport-protocol is "RTP". 6163 20.5.3 Lower Transport 6165 A registry for the parameter lower-transport SHALL be defined with 6166 the following rules: 6168 o Registering requires public available standards specification. 6170 o A contact person or organization with address and email. 6172 o A value definition that are following the BNF token 6173 definition. 6175 o A text describing how the registered value are used in RTSP. 6177 This specification registers 2 values: 6179 UDP: Indicates the use of the "User datagram protocol" [8] for 6180 media transport. 6182 TCP: Indicates the use Transmission control protocol [9] for 6183 media transport. 6185 20.5.4 Transport modes 6187 A registry for the transport parameter mode SHALL be defined with the 6188 following rules: 6190 o Registering requires an IETF standard tracks document. 6192 o A contact person or organization with address and email. 6194 o A value definition that are following the BNF token 6195 definition. 6197 o A describing text that explains how the registered value are 6198 used in RTSP. 6200 This specification registers 2 values: 6202 PLAY: See RFC XXXX. 6204 RECORD: See RFC XXXX. 6206 20.6 Cache Directive Extensions 6208 There exist a number of cache directives which can be sent in the 6209 Cache-Control header. A registry for this cache directives SHALL be 6210 defined with the following rules: 6212 o Registering requires an IETF standard tracks document. 6214 o A registration is required to contain a contact person. 6216 o Name of the directive and a definition of the value, if any. 6218 o Specification if it is an request or response directive. 6220 o A describing text that explains how the cache directive is 6221 used for RTSP controlled media streams. 6223 This specification registers the following values: 6225 no-cache: 6227 public: 6229 private: 6231 no-transform: 6233 only-if-cached: 6235 max-stale: 6237 min-fresh: 6239 must-revalidate: 6241 proxy-revalidate: 6243 max-age: 6245 20.7 Accept-Credentials policies 6247 In section 17.3.1 three policies for how to handle certificates. 6248 Further policies may be defined and SHALL be registered with IANA 6249 using the following rules: 6251 o Registering requires an IETF standard tracks document. 6253 o A registration is required name a contact person. 6255 o Name of the policy. 6257 o A describing text that explains how the policy works for 6258 handling the certificates. 6260 This specification registers the following values: 6262 Any 6264 Proxy 6266 User 6268 20.8 URI Schemes 6270 This specification defines two URI schemes ("rtsp" and "rtsps") and 6271 reserves a third one ("rtspu"). 6273 This will need to be done in accordance with RFC 2717. 6275 20.9 SDP attributes 6277 This specification defines two SDP [1] attributes that it is 6278 requested that IANA register. 6280 SDP Attribute ("att-field"): 6282 Attribute name: range 6283 Long form: Media Range Attribute 6284 Type of name: att-field 6285 Type of attribute: Media and session level 6286 Subject to charset: No 6287 Purpose: RFC XXXX 6288 Reference: RFC XXXX 6289 Values: See ABNF definition. 6291 Attribute name: control 6292 Long form: RTSP control URI 6293 Type of name: att-field 6294 Type of attribute: Media and session level 6295 Subject to charset: No 6296 Purpose: RFC XXXX 6297 Reference: RFC XXXX 6298 Values: Absolute or Relative URIs. 6300 Attribute name: etag 6301 Long form: Entity Tag 6302 Type of name: att-field 6303 Type of attribute: Media and session level 6304 Subject to charset: No 6305 Purpose: RFC XXXX 6306 Reference: RFC XXXX 6307 Values: See ABNF definition 6309 A RTSP Protocol State Machine 6311 The RTSP session state machine describes the behavior of the protocol 6312 from RTSP session initialization through RTSP session termination. 6314 The State machine is defined on a per session basis which is uniquely 6315 identified by the RTSP session identifier. The session may contain 6316 one or more media streams depending on state. If a single media 6317 stream is part of the session it is in non-aggregated control. If two 6318 or more is part of the session it is in aggregated control. 6320 The below state machine is a normative description of the protocols 6321 behavior. However, in case of ambiguity with the earlier parts of 6322 this specification, the description in the earlier parts SHALL take 6323 precedence. 6325 A.1 States 6327 The state machine contains three states, described below. For each 6328 state there exist a table which shows which requests and events that 6329 is allowed and if they will result in a state change. 6331 Init: Initial state no session exist. 6333 Ready: Session is ready to start playing. 6335 Play: Session is playing, i.e. sending media stream data in the 6336 direction S -> C. 6338 A.2 State variables 6340 This representation of the state machine needs more than its state to 6341 work. A small number of variables are also needed and is explained 6342 below. 6344 NRM: The number of media streams part of this session. 6346 RP: Resume point, the point in the presentation time line at 6347 which a request to continue will resume from. A time format 6348 for the variable is not mandated. 6350 A.3 Abbreviations 6352 To make the state tables more compact a number of abbreviations are 6353 used, which are explained below. 6355 IFI: IF Implemented. 6357 md: Media 6359 PP: Pause Point, the point in the presentation time line at 6360 which the presentation was paused. 6362 Prs: Presentation, the complete multimedia presentation. 6364 RedP: Redirect Point, the point in the presentation time line at 6365 which a REDIRECT was specified to occur. 6367 SES: Session. 6369 A.4 State Tables 6371 This section contains a table for each state. The table contains all 6372 the requests and events that this state is allowed to act on. The 6373 events which is method names are, unless noted, requests with the 6374 given method in the direction client to server (C -> S). In some 6375 cases there exist one or more requisite. The response column tells 6376 what type of response actions should be performed. Possible actions 6377 that is requested for an event includes: response codes, e.g. 200, 6378 headers that MUST be included in the response, setting of state 6379 variables, or setting of other session related parameters. The new 6380 state column tells which state the state machine changes to. 6382 The response to valid request meeting the requisites is normally a 6383 2xx (SUCCESS) unless other noted in the response column. The 6384 exceptions needs to be given a response according to the response 6385 column. If the request does not meet the requisite, is erroneous or 6386 some other type of error occur the appropriate response code MUST be 6387 sent. If the response code is a 4xx the session state is unchanged. A 6388 response code of 3rr will result in that the session is ended and its 6389 state is changed to Init. A response code of 304 results in no state 6390 change. However there exist restrictions to when a 3xx response may 6391 be used. A 5xx response SHALL not result in any change of the session 6392 state, except if the error is not possible to recover from. A 6393 unrecoverable error SHALL result the ending of the session. As it in 6394 the general case can't be determined if it was a unrecoverable error 6395 or not the client will be required to test. In the case that the next 6396 request after a 5xx is responded with 454 (Session Not Found) the 6397 client knows that the session has ended. 6399 The server will timeout the session after the period of time 6400 specified in the SETUP response, if no activity from the client is 6401 detected. Therefore there exist a timeout event for all states 6402 except Init. 6404 In the case that NRM=1 the presentation URI is equal to the media 6405 URI. For NRM>1 the presentation URI MUST be other than any of the 6406 medias that are part of the session. This applies to all states. 6408 Event Prerequisite Response 6409 ______________________________________________________________ 6410 DESCRIBE Needs REDIRECT 3rr Redirect 6411 DESCRIBE 200, Session description 6412 OPTIONS Session ID 200, Reset session timeout timer 6413 OPTIONS 200 6414 SET_PARAMETER Valid parameter 200, change value of parameter 6415 GET_PARAMETER Valid parameter 200, return value of parameter 6417 Table 13: None state-machine changing events 6419 The methods in Table 13 do not have any effect on the state machine 6420 or the state variables. However some methods do change other session 6421 related parameters, for example SET_PARAMETER which will set the 6422 parameter(s) specified in its body. 6424 Action Requisite New State Response 6426 _____________________________________________________________ 6427 SETUP Ready NRM=1, RP=0.0 6428 SETUP Needs Redirect Init 3rr Redirect 6429 S -> C:REDIRECT No Session hdr Init Terminate all SES 6431 Table 14: State: Init 6433 The initial state of the state machine, see Table 14 can only be left 6434 by processing a correct SETUP request. As seen in the table the two 6435 state variables are also set by a correct request. This table also 6436 shows that a correct SETUP can in some cases be redirected to another 6437 URI and/or server by a 3rr response. 6439 Action Requisite New State Response 6440 _____________________________________________________________________ 6441 SETUP New URI Ready NRM+=1 6442 SETUP Setten up URI Ready Change transport param 6443 TEARDOWN Prs URI,NRM>1 Init No session hdr 6444 TEARDOWN md URI,NRM=1 Init No Session hdr, NRM=0 6445 TEARDOWN md URI,NRM>1 Ready Session hdr, NRM-=1 6446 PLAY Prs URI, No range Play Play from RP 6447 PLAY Prs URI, Range Play according to range 6448 PAUSE Prs URI Ready Return PP 6449 S -> C:REDIRECT Range hdr Ready Set RedP 6450 S -> C:REDIRECT no range hdr Init Session is removed 6451 Timeout Init 6452 RedP reached Ready TEARDOWN of session 6454 Table 15: State: Ready 6456 In the Ready state, see Table 15, some of the actions are depending 6457 on the number of media streams (NRM) in the session, i.e. aggregated 6458 or non-aggregated control. A setup request in the ready state can 6459 either add one more media stream to the session or if the media 6460 stream (same URI) already is part of the session change the transport 6461 parameters. TEARDOWN is depending on both the Request-URI and the 6462 number of media stream within the session. If the Request-URI is the 6463 presentations URI the whole session is torn down. If a media URI is 6464 used in the TEARDOWN request and more than one media exist in the 6465 session, the session will remain and a session header MUST be 6466 returned in the response. If only a single media stream remains in 6467 the session when performing a TEARDOWN with a media URI the session 6468 is removed. The number of media streams remaining after tearing down 6469 a media stream determines the new state. 6471 The Play state table, see Table 16, is the largest. The table 6472 contains an number of requests that has presentation URI as a 6473 prerequisite on the Request-URI, this is due to the exclusion of 6474 non-aggregated stream control in sessions with more than one media 6475 stream. 6477 To avoid inconsistencies between the client and server, automatic 6478 state transitions are avoided. This can be seen at for example "End 6479 of media" event when all media has finished playing, the session 6480 still remain in Play state. An explicit PAUSE request MUST be sent to 6481 change the state to Ready. It may appear that there exist two 6482 automatic transitions in "RedP reached" and "PP reached", however 6483 they are requested and acknowledge before they take place. The time 6484 at which the transition will happen is known by looking at the range 6485 Action Requisite New State Response 6486 ______________________________________________________________________ 6487 PAUSE PrsURI,No range Ready Set RP to present point 6488 PAUSE PrsURI,Range>now Play Set RP & PP to given p. 6489 PAUSE PrsURI,Range1 Media plays Play No action 6493 End of range Play Set RP = End of range 6494 SETUP New URI Play 455 6495 SETUP Setuped URI Play 455 6496 SETUP Setuped URI, IFI Play Change transport param. 6497 TEARDOWN Prs URI,NRM>1 Init No session hdr 6498 TEARDOWN md URI,NRM=1 Init No Session hdr, NRM=0 6499 TEARDOWN md URI Play 455 6500 S -> C:REDIRECT Range hdr Play Set RedP 6501 S -> C:REDIRECT no range hdr Init Session is removed 6502 RedP reached Play TEARDOWN of session 6503 Timeout Init Stop Media playout 6505 Table 16: State: Play 6507 header. If the client sends request close in time to these 6508 transitions it needs to be prepared for getting error message as the 6509 state may or may not have changed. 6511 B Media Transport Alternatives 6513 This section defines how certain combinations of protocols, profiles 6514 and lower transports are used. This includes the usage of the 6515 Transport header's general source and destination parameters 6516 "src_addr" and "dest_addr". 6518 B.1 RTP 6520 This section defines the interaction of RTSP with respect to the RTP 6521 protocol [16]. It also defines any necessary media transport 6522 signalling with regards to RTP. 6524 The available RTP profiles and lower layer transports are described 6525 below along with rules on signalling the available combinations. 6527 B.1.1 AVP 6529 The usage of the "RTP Profile for Audio and Video Conferences with 6530 Minimal Control" [2] when using RTP for media transport over 6531 different lower layer transport protocols is defined below in regards 6532 to RTSP. 6534 One such case is defined within this document, the use of embedded 6535 (interleaved) binary data as defined in section 12. The usage of 6536 this method is indicated by include the "interleaved" parameter. 6538 When using embedded binary data the "src_addr" and "dest_addr" SHALL 6539 NOT be used. This addressing and multiplexing is used as defined with 6540 use of channel numbers and the interleaved parameter. 6542 B.1.2 AVP/UDP 6544 This part describes sending of RTP [16] over lower transport layer 6545 UDP [8] according to the profile "RTP Profile for Audio and Video 6546 Conferences with Minimal Control" defined in RFC 3551 [2]. This 6547 profiles requires one or two uni- or bi-directional UDP flows per 6548 media stream. The first UDP flow is for RTP and the second is for 6549 RTCP. Embedding of RTP data with the RTSP messages, in accordance 6550 with section 12, SHOULD NOT be performed when RTSP messages are 6551 transported over unreliable transport protocols, like UDP [8]. 6553 The RTP/UDP and RTCP/UDP flows can be established in two ways using 6554 the Transport header's parameters. The way provided in RFC 2326 was 6555 to use the necessary parameters from the set of "source", 6556 "destination", "client_port", and "server_port". This has the 6557 advantage of being compatible with all RTP capable RTSP servers and 6558 clients. However this method does not provide the means to specify 6559 non-continues port ranges for RTP and RTCP. The other way is to use 6560 the parameters "src_addr", and "dest_addr". This method provides 6561 total flexibility in specifying address and port number for each 6562 transport flow. However the disadvantage is that it is not supported 6563 by non-updated clients, i.e. clients not supporting the "play.basic" 6564 feature-tag. 6566 When using the "source", "destination", "client_port", and 6567 "server_port" the packets are be addressed in the following way for 6568 media playback: 6570 o RTP/UDP packet from the server to the client SHALL be sent to 6571 the address specified in the "destination" parameter and first 6572 even port number given in client_port range. If only an RTP 6573 port is to be specified, then only that even port number SHALL 6574 be given, i.e. no range including an odd number SHALL be used. 6576 o The server SHOULD send its RTP/UDP packets from the address 6577 specified in "source" parameter and from the first even port 6578 number specified in "server_port" parameter. 6580 o When the range specified in the "client_port" parameter 6581 contains at least two port numbers, the RTCP/UDP packets from 6582 server to client SHALL be sent to the address specified in the 6583 "destination" parameter and using the first odd port number 6584 belonging to the range specified in the client_port parameter. 6586 o The Server SHOULD send its RTCP/UDP packets from the address 6587 specified in "source" parameter and from the first odd port 6588 number greater than the RTP port number specified in 6589 "server_port" parameter. 6591 o RTCP/UDP packets from the client to the server SHALL be sent 6592 to the address specified in the "source" parameter and first 6593 odd port number greater than the RTP port number given in 6594 server_port range. 6596 o The client SHOULD send its RTCP/UDP packets from the address 6597 specified in "destination" parameter and from the first odd 6598 port number specified in client_port" parameter. 6600 The usage of "src_addr" and "dest_addr" parameters to specify the 6601 address and port numbers is performed in the following way for media 6602 playback, i.e. Mode=PLAY: 6604 o The "src_addr" and "dest_addr" parameters MUST contain either 6605 1 or 2 address and port pairs. 6607 o Each address and port pair MUST contain both and address and a 6608 port number. 6610 o The first address and port pair given in either of the 6611 parameters applies to the RTP stream. The second address and 6612 port pair if present applies to the RTCP stream. 6614 o The RTP/UDP packets from the server to the client SHALL be 6615 sent to the address and port given by first address and port 6616 pair of the "dest_addr" parameter. 6618 o The RTCP/UDP packets from the server to the client SHALL be 6619 sent to the address and port given by the second address and 6620 port pair of the "dest_addr" parameter. If no second pair is 6621 given RTCP SHALL NOT be sent. 6623 o The RTCP/UDP packets from the client to the server SHALL be 6624 sent to the address and port given by the second address and 6625 port pair of the "src_addr" parameter. If no second pair is 6626 given RTCP SHALL NOT be sent. 6628 o RTP and RTCP Packets SHOULD be sent from the corresponding 6629 receiver port, i.e. RTCP packets from server should be sent 6630 from the "src_addr" parameters second address port pair. 6632 B.1.3 AVP/TCP 6634 Note that this combination is not yet defined using sperate TCP 6635 connections. However the use of embedded (interleaved) binary data 6636 transported on the RTSP connection is possible as specified in 6637 section 12. When using this declared combination of interleaved 6638 binary data the RTSP messages MUST be transported over TCP. 6640 A possible future for this profile would be to define the 6641 use of a combination of the two drafts "Connection-Oriented 6642 Media Transport in SDP" [39] and "Framing RTP and RTCP 6643 Packets over Connection-Oriented Transport" [40]. However 6644 as this work is not finished, this functionality is 6645 unspecified. 6647 B.1.4 Handling NPT Jumps in the RTP Media Layer 6649 RTSP allows media clients to control selected, non-contiguous 6650 sections of media presentations, rendering those streams with an RTP 6651 media layer[16]. Such control allows jumps to be created in NPT 6652 timeline of the RTSP session. For example, jumps in NPT can be caused 6653 by multiple ranges in the range specifier of a PLAY request or 6654 through a "seek" opertaion on an RTSP session which involves a PLAY, 6655 PAUSE, PLAY scenario where a new NPT is set for the session. The 6656 media layer rendering the RTP stream should not be affected by jumps 6657 in NPT. Thus, both RTP sequence numbers and RTP timestamps MUST be 6658 continuous and monotonic across jumps of NPT. 6660 We cannot assume that the RTSP client can communicate with 6661 the RTP media agent, as the two may be independent 6662 processes. If the RTP timestamp shows the same gap as the 6663 NPT, the media agent will assume that there is a pause in 6664 the presentation. If the jump in NPT is large enough, the 6665 RTP timestamp may roll over and the media agent may believe 6666 later packets to be duplicates of packets just played out. 6668 As an example, assume a clock frequency of 8000 Hz, a packetization 6669 interval of 100 ms and an initial sequence number and timestamp of 6670 zero. 6672 C->S: PLAY rtsp://xyz/fizzle RTSP/1.0 6673 CSeq: 4 6674 Session: abcdefg 6675 Range: npt=10-15 6677 S->C: RTSP/1.0 200 OK 6678 CSeq: 4 6679 Session: abcdefg 6680 Range: npt=10-15 6681 RTP-Info: url= rtsp://xyz/fizzle/audiotrack;seq=0; 6682 rtptime=0 6684 The ensuing RTP data stream is depicted below: 6686 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 6687 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 6688 . . . 6689 S -> C: RTP packet - seq = 49, rtptime = 39200, NPT time = 14.9s 6691 Immediately after the end of the play range, the client follows up 6692 with a request to PLAY from a new NPT. 6694 C->S: PAUSE rtsp://xyz/fizzle RTSP/1.0 6695 CSeq: 5 6696 Session: abcdefg 6698 S->C: RTSP/1.0 200 OK 6699 CSeq: 5 6700 Session: abcdefg 6701 Range: npt=15-15 6703 C->S: PLAY rtsp://xyz/fizzle RTSP/1.0 6704 CSeq: 6 6705 Session: abcdefg 6706 Range: npt=18-20; 6708 S->C: RTSP/1.0 200 OK 6709 CSeq: 6 6710 Session: abcdefg 6711 Range: npt=18-20 6712 RTP-Info: url= rtsp://xyz/fizzle/audiotrack;seq=50; 6713 rtptime=40100 6715 The ensuing RTP data stream is depicted below: 6717 S->C: RTP packet - seq = 50, rtptime = 40100, NPT time = 18s 6718 S->C: RTP packet - seq = 51, rtptime = 40900, NPT time = 18.1s 6719 . . . 6720 S->C: RTP packet - seq = 69, rtptime = 55300, NPT time = 19.9s 6722 In this example, first, NPT 10 through 15 is played, then the client 6723 request the server to skip ahead and play NPT 18 through 20. The 6724 first segment is presented as RTP packets with sequence numbers 0 6725 through 49 and timestamp 0 through 39,200. The second segment 6726 consists of RTP packets with sequence number 50 through 69, with 6727 timestamps 40,100 through 55,200. While there is a gap in the NPT, 6728 there is no gap in the sequence number space of the RTP data stream. 6730 The RTP timestamp gap is present in the above example due to the time 6731 it takes to perform the second play request, in this case 12.5 ms 6732 (100/8000). To avoid this gap in playback due to the time it takes to 6733 perform RTSP requests, a PLAY request with multiple ranges needs to 6734 be specified. That would result in the following example: 6736 C->S: PLAY rtsp://xyz/fizzle RTSP/1.0 6737 CSeq: 4 6738 Session: abcdefg 6739 Range: npt=10-15;npt=18-20 6741 S->C: RTSP/1.0 200 OK 6742 CSeq: 4 6743 Session: abcdefg 6744 Range: npt=10-15 6745 RTP-Info: url= rtsp://xyz/fizzle/audiotrack;seq=0; 6746 rtptime=0 6748 The ensuing RTP data stream is depicted below: 6750 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 6751 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 6752 . . . 6753 S -> C: RTP packet - seq = 49, rtptime = 39200, NPT time = 14.9s 6754 S -> C: RTP packet - seq = 50, rtptime = 40100, NPT time = 18s 6755 S -> C: RTP packet - seq = 51, rtptime = 40900, NPT time = 18.1s 6756 . . . 6757 S -> C: RTP packet - seq = 69, rtptime = 55300, NPT time = 19.9s 6759 B.1.5 Handling RTP Timestamps after PAUSE 6761 During a PAUSE / PLAY interaction in an RTSP session, the duration of 6762 time for which the RTP transmission was halted MUST be reflected in 6763 the RTP timestamp of each RTP stream. The duration can be calculated 6764 for each RTP stream as the time elapsed from when the last RTP packet 6765 was sent before the PAUSE request was received and when the first RTP 6766 packet was sent after the subsequent PLAY request was received. The 6767 duration includes all latency incurred and processing time required 6768 to complete the request. 6770 The RTP RFC [16] states that: The RTP timestamp for each 6771 unit[packet] would be related to the wallclock time at 6772 which the unit becomes current on the virtual presentation 6773 timeline. 6775 In order to satisfy the requirements of [16], the RTP timestamp space 6776 needs to increase continuously with real time. While this is not 6777 optimal for stored media, it is required for RTP and RTCP to function 6778 as intended. Using a continuous RTP timestamp space allows the same 6779 timestamp model for both stored and live media and allows better 6780 opportunity to integrate both types of media under a single control. 6782 As an example, assume a clock frequency of 8000 Hz, a packetization 6783 interval of 100 ms and an initial sequence number and timestamp of 6784 zero. 6786 C->S: PLAY rtsp://xyz/fizzle RTSP/1.0 6787 CSeq: 4 6788 Session: abcdefg 6789 Range: npt=10-15; 6791 S->C: RTSP/1.0 200 OK 6792 CSeq: 4 6793 Session: abcdefg 6794 Range: npt=10-15 6795 RTP-Info: url= rtsp://xyz/fizzle/audiotrack;seq=0; 6796 rtptime=0 6798 The ensuing RTP data stream is depicted below: 6800 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 6801 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 6802 S -> C: RTP packet - seq = 2, rtptime = 1600, NPT time = 10.2s 6803 S -> C: RTP packet - seq = 3, rtptime = 2400, NPT time = 10.3s 6805 The client then sends a PAUSE request: 6807 C->S: PAUSE rtsp://xyz/fizzle RTSP/1.0 6808 CSeq: 5 6809 Session: abdcdefg 6811 S->C: RTSP/1.0 200 OK 6812 CSeq: 5 6813 Session: abcdefg 6814 Range: npt=10.4-15 6816 20 seconds elapse and then the client sends a PLAY request. In 6817 addition the server requires 15 ms to process the request: 6819 C->S: PLAY rtsp://xyz/fizzle RTSP/1.0 6820 CSeq: 6 6821 Session: abcdefg 6823 S->C: RTSP/1.0 200 OK 6824 CSeq: 6 6825 Session: abcdefg 6826 Range: npt=10.4-15 6827 RTP-Info: url= rtsp://xyz/fizzle/audiotrack;seq=4; 6828 rtptime=164400 6830 The ensuing RTP data stream is depicted below: 6832 S -> C: RTP packet - seq = 4, rtptime = 164400, NPT time = 10.4s 6833 S -> C: RTP packet - seq = 5, rtptime = 165200, NPT time = 10.5s 6834 S -> C: RTP packet - seq = 6, rtptime = 166000, NPT time = 10.6s 6836 First, NPT 10 through 10.3 is played, then a PAUSE is received by the 6837 server. After 20 seconds a PLAY is received by the server which take 6838 15ms to process. The duration of time for which the session was 6839 paused is reflected in the RTP timestamp of the RTP packets sent 6840 after this PLAY request. 6842 A client can use the RTSP range header and RTP-Info header to map NPT 6843 time of a presentation with the RTP timestamp. 6845 Note: In RFC 2326 [23], this matter was not clearly defined and was 6846 misunderstood commonly. Therefore, clients SHOULD expect servers to 6847 break the continuity of the RTP timestamp space in various arbitrary 6848 manners after a PAUSE request. In these cases, it is RECOMMENDED that 6849 clients accept the RTP stream after the pause with appropriate 6850 mappings provided by the RTP-Info and Range headers. 6852 B.1.6 RTSP / RTP Integration 6854 For certain datatypes, tight integration between the RTSP layer and 6855 the RTP layer will be necessary. This by no means precludes the above 6856 restrictions. Combined RTSP/RTP media clients should use the RTP-Info 6857 field to determine whether incoming RTP packets were sent before or 6858 after a seek or before or after a PAUSE. 6860 B.1.7 Scaling with RTP 6862 For scaling (see Section 14.39), RTP timestamps should correspond to 6863 the playback timing. For example, when playing video recorded at 30 6864 frames/second at a scale of two and speed (Section 14.40) of one, the 6865 server would drop every second frame to maintain and deliver video 6866 packets with the normal timestamp spacing of 3,000 per frame, but NPT 6867 would increase by 1/15 second for each video frame. 6869 Note: The above scaling puts requirements on the media 6870 codec or a media stream to support it. For example motion 6871 JPEG or other non-predictive video coding can easier handle 6872 the above example. 6874 B.1.8 Maintaining NPT synchronization with RTP timestamps 6876 The client can maintain a correct display of NPT by noting the RTP 6877 timestamp value of the first packet arriving after repositioning. 6878 The sequence parameter of the RTP-Info (Section 14.38) header 6879 provides the first sequence number of the next segment. 6881 B.1.9 Continuous Audio 6882 For continuous audio, the server SHOULD set the RTP marker bit at the 6883 beginning of serving a new PLAY request. This allows the client to 6884 perform playout delay adaptation. 6886 B.1.10 Multiple Sources in an RTP Session 6888 Note that more than one SSRC MAY be sent in the media stream. 6889 However, without further extensions RTSP can't synchronize more than 6890 the single one indicated in the Transport header. In these cases RTCP 6891 needs to be used for synchronization. 6893 B.1.11 Usage of SSRCs and the RTCP BYE Message During an RTSP Session 6895 The RTCP BYE message indicates the end of use of a given SSRC. If all 6896 sources leave an RTP session, it can, in most cases, be assumed to 6897 have ended. Therefore, a client or server SHALL NOT send a RTCP BYE 6898 message until it has finished using a SSRC. A server SHOULD keep 6899 using a SSRC until the RTP session is terminated. Prologing the use 6900 of a SSRC allows the established synchronization context associated 6901 with that SSRC to be used to sychronize subsequent PLAY requests even 6902 if the PLAY response is late. Additionally, changing the server side 6903 SSRC will prevent the server from synchronizing the new SSRC within 6904 RTSP as it is connected to the one declared in the ssrc parameter in 6905 the Transport header. 6907 An SSRC collision with the SSRC that transmits media does also have 6908 consequences, as it will force the media sender to change its SSRC in 6909 accordance with the RTP specification [16]. This will result in a 6910 loss of synchronization context, and require any receiver to wait for 6911 RTCP sender reports for all media requiring synchronization before 6912 being able to play out synchronized. Due to these reasons a client 6913 joining a session should take care to not select the same SSRC as the 6914 server. Any SSRC signalled in the Transport header SHOULD be avoided. 6915 Also a client detecting a collision prior to sending any RTP or RTCP 6916 messages can also select a new SSRC. 6918 B.2 Future Additions 6920 It is the intention that any future protocol or profile regarding 6921 both for media delivery and lower transport should be easy to add to 6922 RTSP. This section provides the necessary steps that needs to be 6923 meet. 6925 The following things needs to be considered when adding a new 6926 protocol of profile for use with RTSP: 6928 o The protocol or profile needs to define a name tag 6929 representing it. This tag is required to be a ABNF "token" to 6930 be possible to use in the Transport header specification. 6932 o The useful combinations of protocol/profile/lower-layer needs 6933 to be defined and for each combination declare the necessary 6934 parameters to use in the Transport header. 6936 o For new media protocols the interaction with RTSP needs to be 6937 addressed. One important factor will be the media 6938 synchronization. 6940 See the IANA section (20) for information how to register new 6941 attributes. 6943 C Use of SDP for RTSP Session Descriptions 6945 The Session Description Protocol (SDP, RFC 2327 [1]) may be used to 6946 describe streams or presentations in RTSP. This description is 6947 typically returned in reply to a DESCRIBE request on an URI from a 6948 server to a client, or received via HTTP from a server to a client. 6950 This appendix describes how an SDP file determines the operation of 6951 an RTSP session. SDP as is provides no mechanism by which a client 6952 can distinguish, without human guidance, between several media 6953 streams to be rendered simultaneously and a set of alternatives 6954 (e.g., two audio streams spoken in different languages). However the 6955 SDP extension "Grouping of Media Lines in the Session Description 6956 Protocol (SDP)" [41] may provide such functionality depending on 6957 need. Also future grouping semantics may in the future be developed. 6959 C.1 Definitions 6961 The terms "session-level", "media-level" and other key/attribute 6962 names and values used in this appendix are to be used as defined in 6963 SDP (RFC 2327 [1]): 6965 C.1.1 Control URI 6967 The "a=control:" attribute is used to convey the control URI. This 6968 attribute is used both for the session and media descriptions. If 6969 used for individual media, it indicates the URI to be used for 6970 controlling that particular media stream. If found at the session 6971 level, the attribute indicates the URI for aggregate control 6972 (presentation URI). The session level URI SHALL be different from any 6973 media level URI. The presence of a session level control attribute 6974 SHALL be interpreted as support for aggregated control. The control 6975 attribute SHALL be present on media level unless the presentation 6976 only contains a single media stream, in which case the attribute MAY 6977 only be present on the session level. 6979 control-attribute = "a=" "control" ":" url 6981 Example: 6983 a=control:rtsp://example.com/foo 6985 This attribute MAY contain either relative and absolute URIs, 6986 following the rules and conventions set out in RFC 3986 [18]. 6987 Implementations SHALL look for a base URI in the following order: 6989 1. the RTSP Content-Base field; .IP 2. the RTSP Content- 6990 Location field; .IP 3. the RTSP Request-URI. 6992 If this attribute contains only an asterisk (*), then the URI SHALL 6993 be treated as if it were an empty embedded URI, and thus inherit the 6994 entire base URI. 6996 The URI handling for SDPs from container files need special 6997 consideration. For example in a container file with the URI: 6998 "rtsp://example.com/container.mp4". Lets assume this URI as base URI, 6999 and a media level URI: "rtsp://example.com/container.mp4/trackID=2". 7000 A relative media level URI that resolves in accordance with RFC 3986 7001 [18] to the above given media URI are: "container.mp4/trackID=2". It 7002 is usually not desirable to need to include in or modify the SDP 7003 stored within the container file with the server local name of the 7004 container file. To avoid this, one can modify the base URI used to 7005 include a trailing slash, e.g. "rtsp://example.com/container.mp4/". 7006 In this case the relative URI for the media will only need to be: 7007 "trackID=2". However this will also mean that using "*" in the SDP 7008 will result in control URI including the trailing slash, i.e. 7009 "rtsp://example.com/container.mp4/". 7011 C.1.2 Media Streams 7013 The "m=" field is used to enumerate the streams. It is expected that 7014 all the specified streams will be rendered with appropriate 7015 synchronization. If the session is a multicast, the port number 7016 indicated SHOULD be used for reception. The client MAY try to 7017 override the destination port, through the Transport header. The 7018 servers MAY allow this, the response will indicate if allowed or not. 7019 If the session is unicast, the port number is the ones RECOMMENDED by 7020 the server to the client, about which receiver ports to use; the 7021 client MUST still include its receiver ports in its SETUP request. 7022 The client MAY ignore this recommendation. If the server has no 7023 preference, it SHOULD set the port number value to zero. 7025 The "m=" lines contain information about what transport protocol, 7026 profile, and possibly lower-layer is to be used for the media stream. 7027 The combination of transport, profile and lower layer, like 7028 RTP/AVP/UDP needs to be defined for how to be used with RTSP. The 7029 currently defined combinations are defined in section B, further 7030 combinations MAY be specified. 7032 TODO: Write something about the usage of Grouping of media line, RFC 7033 3388 [41]. 7035 Example: 7037 m=audio 0 RTP/AVP 31 7039 C.1.3 Payload Type(s) 7041 The payload type(s) are specified in the "m=" field. In case the 7042 payload type is a static payload type from RFC 3551 [2], no other 7043 information may be required. In case it is a dynamic payload type, 7044 the media attribute "rtpmap" is used to specify what the media is. 7045 The "encoding name" within the "rtpmap" attribute may be one of those 7046 specified in RFC 3551 (Sections 5 and 6), or an MIME type registered 7047 with IANA, or an experimental encoding as specified in SDP (RFC 2327 7048 [1]). Codec-specific parameters are not specified in this field, but 7049 rather in the "fmtp" attribute described below. 7051 C.1.4 Format-Specific Parameters 7053 Format-specific parameters are conveyed using the "fmtp" media 7054 attribute. The syntax of the "fmtp" attribute is specific to the 7055 encoding(s) that the attribute refers to. Note that some of the 7056 format specific parameters may be specified outside of the fmtp 7057 parameters, like for example the "ptime" attribute for most audio 7058 encodings. 7060 C.1.5 Range of Presentation 7062 The "a=range" attribute defines the total time range of the stored 7063 session or an individual media. Non-seekable live sessions can be 7064 indicated, while the length of live sessions can be deduced from the 7065 "t" and "r" SDP parameters. 7067 The attribute is both a session and a media level attribute. For 7068 presentations that contains media streams of the same durations, the 7069 range attribute SHOULD only be used at session-level. In case of 7070 different length the range attribute MUST be given at media level for 7071 all media, and SHOULD NOT be given at session level. If the attribute 7072 is present at both media level and session level the media level 7073 values SHALL be used. 7075 The unit is specified first, followed by the value range. The units 7076 and their values are as defined in Section 3.4, 3.5 and 3.6 and MAY 7077 be extended with further formats. Any open ended range (start-), i.e. 7078 without stop range, is of unspecified duration and SHALL be 7079 considered as non-seekable content unless this property is 7080 overridden. 7082 This attribute is defined in ABNF [4] as: 7084 a-range-def = "a" "=" "range" ":" ranges-specifier CRLF 7086 Examples: 7088 a=range:npt=0-34.4368 7089 a=range:clock=19971113T2115-19971113T2203 7090 Non seekable stream of unknown duration: 7091 a=range:npt=0- 7093 C.1.6 Time of Availability 7095 The "t=" field MUST contain suitable values for the start and stop 7096 times for both aggregate and non-aggregate stream control. The 7097 server SHOULD indicate a stop time value for which it guarantees the 7098 description to be valid, and a start time that is equal to or before 7099 the time at which the DESCRIBE request was received. It MAY also 7100 indicate start and stop times of 0, meaning that the session is 7101 always available. 7103 For sessions that are of live type, i.e. specific start time, unknown 7104 stop time, likely unseekable, the "t=" and "r=" field SHOULD be used 7105 to indicate the start time of the event. The stop time SHOULD be 7106 given so that the live event will with high probability have ended at 7107 that time, while still not be unnecessary long into the future. 7109 C.1.7 Connection Information 7111 In SDP, the "c=" field contains the destination address for the media 7112 stream. For a media destination address that is a IPv6 one, the SDP 7113 extension defined in [21] needs to be used. For on-demand unicast 7114 streams and some multicast streams, the destination address MAY be 7115 specified by the client via the SETUP request, thus overriding any 7116 specified address. To identify streams without a fixed destination 7117 address, where the client is required to specify a destination 7118 address, the "c=" field SHOULD be set to a null value. For addresses 7119 of type "IP4", this value SHALL be "0.0.0.0", and for type "IP6", 7120 this value SHALL be "0:0:0:0:0:0:0:0", i.e. the unspecified address 7121 according to RFC 3513 [22]. 7123 C.1.8 Entity Tag 7125 The optional "a=etag" attribute identifies a version of the session 7126 description. It is opaque to the client. SETUP requests may include 7127 this identifier in the If-Match field (see section 14.25) to only 7128 allow session establishment if this attribute value still corresponds 7129 to that of the current description. The attribute value is opaque 7130 and may contain any character allowed within SDP attribute values. 7132 a-etag-def = "a" "=" "etag" ":" etag-string CRLF 7133 etag-string = 1*(%x01-09/%x0B-0C/%x0E-FF) 7135 Example: 7137 a=etag:158bb3e7c7fd62ce67f12b533f06b83a 7139 One could argue that the "o=" field provides identical 7140 functionality. However, it does so in a manner that would 7141 put constraints on servers that need to support multiple 7142 session description types other than SDP for the same piece 7143 of media content. 7145 C.2 Aggregate Control Not Available 7147 If a presentation does not support aggregate control no session level 7148 "a=control:" attribute is specified. For a SDP with multiple media 7149 sections specified, each section will have its own control URI 7150 specified via the "a=control:" attribute. 7152 Example: 7154 v=0 7155 o=- 2890844256 2890842807 IN IP4 204.34.34.32 7156 s=I came from a web page 7157 e=adm@example.com 7158 c=IN IP4 0.0.0.0 7159 t=0 0 7160 m=video 8002 RTP/AVP 31 7161 a=control:rtsp://audio.com/movie.aud 7162 m=audio 8004 RTP/AVP 3 7163 a=control:rtsp://video.com/movie.vid 7165 Note that the position of the control URI in the description implies 7166 that the client establishes separate RTSP control sessions to the 7167 servers audio.com and video.com 7169 It is recommended that an SDP file contains the complete media 7170 initialization information even if it is delivered to the media 7171 client through non-RTSP means. This is necessary as there is no 7172 mechanism to indicate that the client should request more detailed 7173 media stream information via DESCRIBE. 7175 C.3 Aggregate Control Available 7177 In this scenario, the server has multiple streams that can be 7178 controlled as a whole. In this case, there are both a media-level 7179 "a=control:" attributes, which are used to specify the stream URIs, 7180 and a session-level "a=control:" attribute which is used as the 7181 Request-URI for aggregate control. If the media-level URI is 7182 relative, it is resolved to absolute URIs according to Section C.1.1 7183 above. 7185 Example: 7187 C->M: DESCRIBE rtsp://example.com/movie RTSP/1.0 7188 CSeq: 1 7190 M->C: RTSP/1.0 200 OK 7191 CSeq: 1 7192 Date: 23 Jan 1997 15:35:06 GMT 7193 Content-Type: application/sdp 7194 Content-Base: rtsp://example.com/movie/ 7195 Content-Length: 164 7197 v=0 7198 o=- 2890844256 2890842807 IN IP4 204.34.34.32 7199 s=I contain 7200 i= 7201 e=adm@example.com 7202 c=IN IP4 0.0.0.0 7203 t=0 0 7204 a=control:* 7205 m=video 8002 RTP/AVP 31 7206 a=control:trackID=1 7207 m=audio 8004 RTP/AVP 3 7208 a=control:trackID=2 7210 In this example, the client is required to establish a single RTSP 7211 session to the server, and uses the URIs 7212 rtsp://example.com/movie/trackID=1 and 7213 rtsp://example.com/movie/trackID=2 to set up the video and audio 7214 streams, respectively. The URI rtsp://example.com/movie/ , which is 7215 resolved from the "*", controls the whole presentation (movie). 7217 A client is not required to issues SETUP requests for all streams 7218 within an aggregate object. Servers should allow the client to ask 7219 for only a subset of the streams. 7221 C.4 RTSP external SDP delivery 7223 There are some considerations that needs to be made when the session 7224 description is delivered to client outside of RTSP, for example in 7225 HTTP or email. 7227 First of all the SDP needs to contain absolute URIs, relative will in 7228 most cases not work as the delivery will not correctly forward the 7229 base URI. And as SDP might be temporarily stored on file system 7230 before being loaded into an RTSP capable client, thus if possible to 7231 transport the base URI it still would need to be merged into the 7232 file. 7234 The writing of the SDP session availability information, i.e. "t=" 7235 and "r=", needs to be carefully considered. When the SDP is fetched 7236 by the DESCRIBE method it is with very high probability that the it 7237 is valid. However the same are much less certain for SDPs distributed 7238 using other methods. Therefore the publisher of the SDP should take 7239 care to follow the recommendations about availability in the SDP 7240 specification [1]. 7242 D Minimal RTSP implementation 7244 D.1 Client 7246 A client implementation MUST be able to do the following : 7248 o Generate the following requests: SETUP, TEARDOWN, PLAY. 7250 o Include the following headers in requests: CSeq, Connection, 7251 Session, Transport. 7253 o Parse and understand the following headers in responses: 7254 CSeq, Connection, Session, Transport, Content-Language, 7255 Content-Encoding, Content-Length, Content-Type. 7257 o Understand the class of each error code received and notify 7258 the end-user, if one is present, of error codes in classes 4xx 7259 and 5xx. The notification requirement may be relaxed if the 7260 end-user explicitly does not want it for one or all status 7261 codes. 7263 o Expect and respond to asynchronous requests from the server, 7264 such as REDIRECT. This does not necessarily mean that it 7265 should implement the REDIRECT method, merely that it MUST 7266 respond positively or negatively to any request received from 7267 the server. 7269 Though not required, the following are RECOMMENDED. 7271 o Implement RTP/AVP/UDP as a valid transport. 7273 o Inclusion of the User-Agent header. 7275 o Understand SDP session descriptions as defined in Appendix C 7277 o Accept media initialization formats (such as SDP) from 7278 standard input, command line, or other means appropriate to 7279 the operating environment to act as a "helper application" for 7280 other applications (such as web browsers). 7282 There may be RTSP applications different from those 7283 initially envisioned by the contributors to the RTSP 7284 specification for which the requirements above do not make 7285 sense. Therefore, the recommendations above serve only as 7286 guidelines instead of strict requirements. 7288 D.1.1 Basic Playback 7290 To support on-demand playback of media streams, the client MUST 7291 additionally be able to do the following: 7293 o generate the PAUSE request; 7295 o implement the REDIRECT method, and the Location header. 7297 D.1.2 Authentication-enabled 7299 In order to access media presentations from RTSP servers that require 7300 authentication, the client MUST additionally be able to do the 7301 following: 7303 o recognize the 401 (Unauthorized) status code; 7305 o parse and include the WWW-Authenticate header; 7307 o implement Basic Authentication and Digest Authentication. 7309 D.2 Server 7311 A minimal server implementation MUST be able to do the following: 7313 o Implement the following methods: SETUP, TEARDOWN, OPTIONS and 7314 PLAY. 7316 o Include the following headers in responses: Connection, 7317 Content-Length, Content-Type, Content-Language, Content- 7318 Encoding, Timestamp, Transport, Proxy-Supported, Public, and 7319 Via, and Unsupported. RTP-compliant implementations MUST also 7320 implement the RTP-Info field. 7322 o Parse and respond appropriately to the following headers in 7323 requests: Connection, Proxy-Require, Session, Transport, and 7324 Require. 7326 Though not required, the following are highly recommended at the time 7327 of publication for practical interoperability with initial 7328 implementations and/or to be a "good citizen". 7330 o Implement RTP/AVP/UDP as a valid transport. 7332 o Inclusion of the Server, Cache-Control Date, and Expires 7333 headers. 7335 o Implement the DESCRIBE method. 7337 o Generate SDP session descriptions as defined in Appendix C 7339 There may be RTSP applications different from those 7340 initially envisioned by the contributors to the RTSP 7341 specification for which the requirements above do not make 7342 sense. Therefore, the recommendations above serve only as 7343 guidelines instead of strict requirements. 7345 D.2.1 Basic Playback 7347 To support on-demand playback of media streams, the server MUST 7348 additionally be able to do the following: 7350 o Recognize the Range header, and return an error if seeking is 7351 not supported. 7353 o Implement the PAUSE method. 7355 In addition, in order to support commonly-accepted user interface 7356 features, the following are highly recommended for on-demand media 7357 servers: 7359 o Include and parse the Range header, with NPT units. 7360 Implementation of SMPTE units is recommended. 7362 o Include the length of the media presentation in the media 7363 initialization information. 7365 o Include mappings from data-specific timestamps to NPT. When 7366 RTP is used, the rtptime portion of the RTP-Info field may be 7367 used to map RTP timestamps to NPT. 7369 Client implementations may use the presence of length 7370 information to determine if the clip is seekable, and 7371 visably disable seeking features for clips for which the 7372 length information is unavailable. A common use of the 7373 presentation length is to implement a "slider bar" which 7374 serves as both a progress indicator and a timeline 7375 positioning tool. 7377 Mappings from RTP timestamps to NPT are necessary to ensure correct 7378 positioning of the slider bar. 7380 D.2.2 Authentication-enabled 7382 In order to correctly handle client authentication, the server MUST 7383 additionally be able to do the following: 7385 o Generate the 401 (Unauthorized) status code when 7386 authentication is required for the resource. 7388 o Parse and include the WWW-Authenticate header 7390 o Implement Basic Authentication and Digest Authentication 7392 E Requirements for Unreliable Transport of RTSP messages 7394 This section provides any one intending to define how to transport of 7395 RTSP messages over a unreliable transport protocol with some 7396 information learned by the attempt in RFC 2326 [23]. RFC 2326 define 7397 both an URI scheme and some basic functionality for transport of RTSP 7398 messages over UDP, however it was not sufficient for reliable usage 7399 and successful interoperability. 7401 The RTSP scheme defined for unreliable transport of RTSP messages was 7402 "rtspu". It has been reserved by this specification as at least one 7403 commercial implementation exist, thus avoiding any collisions in the 7404 name space. 7406 The following considerations should exist for operation of RTSP over 7407 an unreliable transport protocol: 7409 o Request shall be acknowledged by the receiver. If there is no 7410 acknowledgement, the sender may resend the same message after 7411 a timeout of one round-trip time (RTT). Any retransmissions 7412 due to lack of acknowledgement must carry the same sequence 7413 number as the original request. 7415 o The round-trip time can be estimated as in TCP (RFC 1123) 7416 [42], with an initial round-trip value of 500 ms. An 7417 implementation may cache the last RTT measurement as the 7418 initial value for future connections. 7420 o If RTSP is used over a small-RTT LAN, standard procedures for 7421 optimizing initial TCP round trip estimates, such as those 7422 used in T/TCP (RFC 1644) [43], can be beneficial. 7424 o The Timestamp header (Section 14.44) is used to avoid the 7425 retransmission ambiguity problem [44] and obviates the need 7426 for Karn's algorithm. 7428 o The registered default port for UDP for the RTSP server is 7429 554. 7431 o RTSP messages can be carried over any lower-layer transport 7432 protocol that is 8-bit clean. 7434 o RTSP messages are vulnerable to bit errors and SHOULD NOT be 7435 subjected to them. 7437 o Source authentication, or at least validation that RTSP 7438 messages comes from the same entity becomes extremely 7439 important, as session hijacking may be substantially easier 7440 for RTSP message transport using an unreliable protocol like 7441 UDP than for TCP. 7443 There exist two RTSP headers thats primarily are intended for being 7444 used by the unreliable handling of RTSP messages and which will be 7445 maintained: 7447 CSeq See section 14.19 7449 Timestamp See section 14.44 7451 F Backwards Compatibility Considerations 7453 This section contains notes on issues about backwards compatibility 7454 with clients or servers being implemented according to RFC 2326 [23]. 7455 Any mechanism described in this section is intended for a migration 7456 period and is expected to be phased out in the future. 7458 F.1 Requirement on Pause before Play in Play mode 7460 The behavior in Play mode after having run to the end of a media 7461 stream has been changed (Section 11.4). For state handling 7462 consistency, a client is now required to issue a PAUSE request prior 7463 to a PLAY request. However as this could make an RFC 2326 client 7464 become stuck after having played a media stream to its end. The 7465 following mitigation is suggested: 7467 If a server receives a PLAY request when in play state and all media 7468 has finished the requested play out, the server MAY interpret this as 7469 a PLAY request received in ready state. 7471 However the server SHALL NOT do the above if the client has shown any 7472 support for this or newer specifications, for example, by sending a 7473 Supported header with the "play.basic" feature tag. 7475 F.2 Using Persistent Connections 7477 Some server implementations of RFC 2326 maintain a one-to-one 7478 relationship between a connection and an RTSP session. Such 7479 implementations require clients to use a persistent connection to 7480 communicate with the server and when a client closes its connection, 7481 the server may remove the RTSP session. To achieve interoperability 7482 with such older implementations, client implementations of this 7483 specification SHOULD use persistent connections. 7485 G Open Issues 7487 This section contains a list of open issues that still needs to be 7488 resolved. However also any open issues in the bug tracker at 7489 http://rtspspec.sourceforge.net should also be considered. 7491 1. Is the example in Section 16.4 valid? 7493 2. Should the SDP appendix contain any text in regards to the 7494 grouping of media line? 7496 3. Following resolved Issue needs text: "Should refusal by 7497 server to perform media redirection have its own error 7498 code?" http://rtsp.org/bug991609. 7500 4. Need to shape up language in relation to the following 7501 issue: "Is current methods to prevent undesired media 7502 redirection sufficient." http://rtsp.org/bug889699 7504 5. Shape up language to what was decided in San Diego on 7505 issue: "Lacking Specification text for "Implicit 7506 Redirect?"" http://rtsp.org/bug742348 7508 6. Need write up on issue: "Should further explanation on 7509 proxies be written?" http://rtsp.org/bug631148 7511 7. Needs to add explicit white spacing for the syntax. 7512 Consider to copy the RFC 3261 concept to include white 7513 spacing in separators a COLON, SEMI, etc. 7515 8. ABNF Syntax needs to be run through verifier. 7517 9. The proxy indications in the two header tables in section 7518 14 needs review. 7520 10. Should the Allow header be possible to use optional in 7521 request or responses besides the now specified 405 error 7522 code? 7524 11. The minimal implementation needs to be checked to see if it 7525 complies with the specification. All shall, must and 7526 shoulds needs to be included in the minimal. Feature-tags 7527 for these needs to be defined. Further feature-tags needs 7528 to be discussed. 7530 12. The list specifying which status codes are allowed on which 7531 request methods seem to be in error and need review. 7533 13. There is need for clearer rule in regards to Transport 7534 parameters changes in mid session. It needs to be 7535 determined if there should be any clarification on how and 7536 which Transport header parameters that may be changed. 7538 14. Normative suggestion is needed for doing RTSP session keep 7539 alives. Currently there are too many options being 7540 suggested by RTSP such as OPTIONS with Session ID, PING, 7541 SET_PARAMETER. This leads to interoperability problems, 7542 maintenance issues and additional development for 7543 implementers for little gain. 7545 H Changes 7547 H.1 Issues Addressed 7549 Compared to RFC 2326, the following issues has been addressed: 7551 o The Transport header has been changed in the following way: 7553 - The ABNF has been changed to define that extensions are 7554 possible, and that unknown extension parameters are to be 7555 ignored. 7557 - To prevent backwards compatibility issues, any extension or 7558 new parameter requires the usage of a feature tag combined 7559 with the Require header. 7561 - Syntax unclarities with the Mode parameter has been 7562 resolved. 7564 - Syntax error with ";" for multicast and unicast has been 7565 resolved. 7567 - Two new addressing parameters has been defined, src_addr and 7568 dest_addr. These allow one to specify more than one complete 7569 address and port tuple if needed. 7571 - Support for IPv6 explicit addresses in all address fields 7572 has been included. 7574 - To handle URI definitions that contain ";" or "," a quoted 7575 URI format has been introduced. 7577 - Defined IANA registries for the transport headers 7578 parameters, transport-protocol, profile, lower-transport, 7579 and mode. 7581 - The transport headers interleaved parameter's text was made 7582 more strict and use formal requirements levels. However no 7583 change on how it is used was made. 7585 - It has been clarified that the client can't request of the 7586 server to use a certain RTP SSRC, using a request with the 7587 transport parameter SSRC. 7589 - Syntax definition for SSRC has been clarified to require 8*8 7590 HEX. It has also been extend to allow multiple values for 7591 clients supporting this version. 7593 - Updated the text on the transport headers "destination" and 7594 "dest_addr" parameters regarding what security precautions 7595 the server is required to perform. 7597 - The embedded (interleaved) binary data and its transport 7598 parameter was clarified to being symmetric and that it is 7599 the server that sets the channel numbers. 7601 H.2 Changes made to the protocol and specification 7603 o The Range formats has been changed in the following way: 7605 - The NPT format has been given a initial NPT identifier that should 7606 be used, if missing NPT is assumed. 7608 - All formats now support initial open ended formats of type "npt=- 7609 10". 7611 o RTSP message handling has been changed in the following way: 7613 - RTSP messages now uses URIs rather then URLs. 7615 - It has been clarified that a 4xx message due to missing CSeq header 7616 shall be returned without a CSeq header. 7618 - Rules for how to handle timing out RTSP messages has been added. 7620 o The HTTP references has been updated to RFC 2616 and RFC 2617. This 7621 has resulted in that the Public, and the Content-Base header needed 7622 to be defined in the RTSP specification. Known effects on RTSP due to 7623 HTTP clarifications: 7625 - Content-Encoding header can include encoding of type "identity". 7627 o The state machine section has completely been rewritten. It includes 7628 now more details and are also more clear about the model used. 7630 o A IANA section has been included with contains a number of registries 7631 and their rules. This will allow us to use IANA to keep track of all 7632 RTSP extensions. 7634 o Than transport of RTSP messages has seen the following changes: 7636 - The use of UDP for RTSP message transport has been deprecated due 7637 to missing interest and to broken specification. 7639 - The rules for how TCP connections is to be handled has been 7640 clarified. Now it is made clear that servers should not close the 7641 TCP connection unless they have been unused for significant time. 7643 - Strong recommendations why server and clients should use persistent 7644 connections has also been added. 7646 - There is now a requirement to handle non-persistent connections as 7647 this provides great fault tolerance. 7649 - Added wording on the usage of Connection:Close for RTSP. 7651 - specified usage of TLS for RTSP messages, including a scheme to 7652 approve a proxies TLS connection to the next hop. 7654 o The following header related changes have been made: 7656 - Accept-Ranges response header is added. This header clarifies which 7657 range formats that can be used for a resource. 7659 - Clarified that Range header allows multiple ranges to allow for 7660 creating editing list. 7662 - Fixed the missing definitions for the Cache-Control header. Also 7663 added to the syntax definition the missing delta-seconds for max- 7664 stale and min-fresh parameters. 7666 - Put requirement on CSeq header that the value is increased by one 7667 for each new RTSP request. A Recommendation to start at 1 has also 7668 been added. 7670 - Added requirement that the Date header must be used for all 7671 messages with entity. Also the Server should always include it. 7673 - Removed possibility of using Range header with Scale header to 7674 indicate when it is to be activated, since it can't work as 7675 defined. Also added rule that lack of Scale header in response 7676 indicates lack of support for the header. Feature-tags for scaled 7677 playback has been defined. 7679 - The Speed header must now be responded to indicate support and the 7680 actual speed going to be used. A feature-tag is defined. Notes on 7681 congestion control was also added. 7683 - The Supported header was borrowed from SIP to help with the feature 7684 negotiation in RTSP. 7686 - Clarified that the Timestamp header can be used to resolve 7687 retransmission ambiguities. 7689 - The Session header text has been expanded with a explanation on 7690 keep alive and which methods to use. 7692 - It has been clarified how the Range header formats is used to 7693 indicate pause points. 7695 - Clarified that RTP-Info URIs that are relative, uses the Request- 7696 URI as base URI. Also clarified that the URI that must be used is 7697 the SETUP. 7699 - Added text that requires the Range to always be present in PLAY 7700 responses. Clarified what should be sent in case of live streams. 7702 - The quoted URI format may also be used with the RTP-Info header. 7703 Backwards compatibility issues exist with such usage, thus it can 7704 only be used for implementations following this specification. 7706 - The headers table has been updated using a structured borrowed from 7707 SIP. This table carries much more information and should provide a 7708 good overview of the available headers. 7710 - It has been is clarified that any message with a message body is 7711 required to have a Content-Length header. This was the case in RFC 7712 2326 but could be misinterpreted. 7714 - To resolve functionality around ETag. The ETag and If-None-Match 7715 header has been added from HTTP with necessary clarification in 7716 regards to RTSP operation. 7718 - Imported the Public header from HTTP RFC 2068 [19] since it has 7719 been removed from HTTP due to lack of use. Public is used quite 7720 frequently in RTSP. 7722 - Clarified rules for populating the Public header so that it is an 7723 intersection of the capabilities of all the RTSP agents in a chain. 7725 o The minimal implementation specification has been changed: 7727 - Required Timestamp, Via, and Unsupported headers for a minimal 7728 server implementation. 7730 - Recommended that Cache-Control, Expires and Date headers be 7731 supported by server implementations. 7733 o The Protocol Syntax has been changed in the following way: 7735 - All BNF definitions are updated according to the rules defined in 7736 RFC 2234 [4] and has been gathered in a separate section 18. 7738 - The BNF for the User-Agent and Server headers has been corrected so 7739 now only the description is in the HTTP specification. 7741 - The definition in the introduction of the RTSP session has been 7742 changed. 7744 - The protocol has been made fully IPv6 capable. Certain of the 7745 functionality, like using explicit IPv6 addresses in fields 7746 requires that the protocol support this updated specification. 7748 - Added a fragment part to the RTSP URI. This seem to be indicated by 7749 the note below the definition however it was not part of the BNF. 7751 - The CHAR rule has been changed to exclude NULL. 7753 o The Status codes has been changed in the following way: 7755 - The use of status code 303 "See Other" has been deprecated as it 7756 does not make sense to use in RTSP. 7758 - When sending response 451 and 458 the response body should contain 7759 the offending parameters. 7761 - Clarification on when a 3rr redirect status code can be received 7762 has been added. This includes receiving 3rr as a result of request 7763 within a established session. This provides clarification to a 7764 previous unspecified behavior. 7766 - Removed the 250 (Low On Storage Space) status code as it only is 7767 relevant to recording which is deprecated. 7769 o The following functionality has been deprecated from the protocol: 7771 - The use of Queued Play. 7773 - The use of PLAY method for keep-alive in play state. 7775 - The RECORD and ANNOUNCE methods and all related functionality. Some 7776 of the syntax has been removed. 7778 - The possibility to use timed execution of methods with the time 7779 parameter in the Range header. 7781 - The description on how rtspu works is not part of the core 7782 specification and will require external description. Only that it 7783 exist is defined here and some requirements for the the transport 7784 is provided. 7786 o Text specifying the special behavior of PLAY for live content. 7788 o The following changes has been made in relation to methods: 7790 - The OPTIONS method has been clarified with regards to the use of 7791 the Public and Allow headers. 7793 - The RECORD and ANNOUNCE methods are removed as they are lacking 7794 implementation and not considered necessary in the core 7795 specification. Any work on these methods should be done as a 7796 extension document to RTSP. 7798 - Added text clarifying the usage of SET_PARAMETER for keep-alive and 7799 usage without any body. 7801 - Added a backwards compatibility resolution for how to handle the 7802 new state machine without automatic state transition, for example 7803 for returning to ready when finished playing. 7805 o Wrote a new section about how to setup different media transport 7806 alternatives and their profiles, and lower layer protocols. This 7807 resulted that the appendix on RTP interaction was moved there instead 7808 in the part describing RTP. The section also includes guidelines what 7809 to think of when writing usage guidelines for new protocols and 7810 profiles. 7812 o Added a new section describing the available mechanisms to determine 7813 if functionality is supported, called "Capability Handling". Renamed 7814 option-tags to feature-tags. 7816 o Added a contributors section with people who has contribute actual 7817 text to the specification. 7819 o Added a section Use Cases that describes the major use cases for 7820 RTSP. 7822 o Clarified the usage of a=range and how to indicate live content that 7823 are not seekable with this header. 7825 Note that this list does not reflect minor changes in wording or 7826 correction of typographical errors. 7828 A word-by-word diff from RFC 2326 can be found at http://rtsp.org/ 7830 I Author Addresses 7832 Henning Schulzrinne 7833 Dept. of Computer Science 7834 Columbia University 7835 1214 Amsterdam Avenue 7836 New York, NY 10027 7837 USA 7838 electronic mail: schulzrinne@cs.columbia.edu 7840 Anup Rao 7841 Cisco 7842 USA 7843 electronic mail: anrao@cisco.com 7845 Robert Lanphier 7846 RealNetworks 7847 P.O. Box 91123 7848 Seattle, WA 98111-9223 7849 USA 7850 electronic mail: robla@real.com 7852 Magnus Westerlund 7853 Ericsson AB, EAB/TVA/A 7854 Torshamsgatan 23 7855 SE-164 80 STOCKHOLM 7856 SWEDEN 7857 electronic mail: magnus.westerlund@ericsson.com 7859 Aravind Narasimhan 7860 Overture Computing Corp., 7861 East Windsor, NJ 08520 7862 USA 7863 electronic mail: aravind.narasimhan@gmail.com 7865 J Contributors 7867 The following people have made written contributions that were 7868 included in the specification: 7870 o Tom Marshall contributed text on the usage of 3rr status 7871 codes. 7873 o Thomas Zheng contributed text on the usage of the Range in 7874 PLAY responses. 7876 o Sean Sheedy contributed text on the timeout behavior of RTSP 7877 messages and connections. 7879 o Fredrik Lindholm contributed text about the RTSP security 7880 framework. 7882 The following people have provided detailed comments on updated 7883 versions of this specification: 7885 o Stephan Wenger 7887 K Acknowledgements 7889 This draft is based on the functionality of the original RTSP draft 7890 submitted in October 1996. It also borrows format and descriptions 7891 from HTTP/1.1. 7893 This document has benefited greatly from the comments of all those 7894 participating in the MMUSIC-WG. In addition to those already 7895 mentioned, the following individuals have contributed to this 7896 specification: 7898 Rahul Agarwal, Jeff Ayars, Milko Boic, Torsten Braun, Brent Browning, 7899 Bruce Butterfield, Steve Casner, Francisco Cortes, Kelly Djahandari, 7900 Martin Dunsmuir, Eric Fleischman, Jay Geagan, Andy Grignon, V. 7901 Guruprasad, Peter Haight, Mark Handley, Brad Hefta-Gaub, Volker Hilt, 7902 John K. Ho, Go Hori, Philipp Hoschka, Anne Jones, Anders Klemets, 7903 Ruth Lang, Stephanie Leif, Jonathan Lennox, Eduardo F. Llach, Thomas 7904 Marshall, Rob McCool, David Oran, Joerg Ott, Maria Papadopouli, Sujal 7905 Patel, Ema Patki, Alagu Periyannan, Colin Perkins, Igor Plotnikov, 7906 Jonathan Sergent, Pinaki Shah, David Singer, Lior Sion, Jeff Smith, 7907 Alexander Sokolsky, Dale Stammen, John Francis Stracke, Maureen 7908 Chesire, David Walker, Geetha Srikantan, Stephan Wenger, Pekka Pessi, 7909 and Mela Martti. 7911 L Normative References 7913 [1] M. Handley and V. Jacobson, "SDP: session description protocol," 7914 RFC 2327, Internet Engineering Task Force, Apr. 1998. 7916 [2] H. Schulzrinne and S. Casner, "RTP profile for audio and video 7917 conferences with minimal control," RFC 3551, Internet Engineering 7918 Task Force, July 2003. 7920 [3] R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk, L. Masinter, P. 7922 J. Leach, and T. Berners-Lee, "Hypertext transfer protocol -- 7923 HTTP/1.1," RFC 2616, Internet Engineering Task Force, June 1999. 7925 [4] "Augmented BNF for syntax specifications: ABNF," RFC 2234, 7926 Internet Engineering Task Force, Nov. 1997. 7928 [5] S. Bradner, "Key words for use in RFCs to indicate requirement 7929 levels," RFC 2119, Internet Engineering Task Force, Mar. 1997. 7931 [6] T. Dierks and C. Allen, "The TLS protocol version 1.0," RFC 2246, 7932 Internet Engineering Task Force, Jan. 1999. 7934 [7] J. Franks, P. Hallam-Baker, J. Hostetler, S. Lawrence, P. J. 7935 Leach, A. Luotonen, and L. Stewart, "HTTP authentication: Basic and 7936 digest access authentication," RFC 2617, Internet Engineering Task 7937 Force, June 1999. 7939 [8] J. B. Postel, "User datagram protocol," RFC 768, Internet 7940 Engineering Task Force, Aug. 1980. 7942 [9] J. B. Postel, "Transmission control protocol," RFC 793, Internet 7943 Engineering Task Force, Sept. 1981. 7945 [10] R. Elz, "A compact representation of IPv6 addresses," RFC 1924, 7946 Internet Engineering Task Force, Apr. 1996. 7948 [11] R. Hinden, B. E. Carpenter, and L. Masinter, "Format for literal 7949 IPv6 addresses in URL's," RFC 2732, Internet Engineering Task Force, 7950 Dec. 1999. 7952 [12] T. Berners-Lee, R. Fielding, and L. Masinter, "Uniform resource 7953 identifiers (URI): generic syntax," RFC 2396, Internet Engineering 7954 Task Force, Aug. 1998. 7956 [13] F. Yergeau, "UTF-8, a transformation format of ISO 10646," RFC 7957 2279, Internet Engineering Task Force, Jan. 1998. 7959 [14] NIST, "Fips pub 180-1:secure hash standard," tech. rep., 7960 National Institute of Standards and Technology, Apr. 1995. 7962 [15] R. Housley, W. Polk, W. Ford, and D. Solo, "Internet X.509 7963 public key infrastructure certificate and certificate revocation list 7964 (CRL) profile," RFC 3280, Internet Engineering Task Force, Apr. 2002. 7966 [16] H. Schulzrinne, S. Casner, R. Frederick, and V. Jacobson, "RTP: 7967 a transport protocol for real-time applications," RFC 3550, Internet 7968 Engineering Task Force, July 2003. 7970 [17] E. Rescorla, "HTTP over TLS," RFC 2818, Internet Engineering 7971 Task Force, May 2000. 7973 [18] R. F. T. Berners-Lee and L. Masinter, "Uniform resource 7974 identifier (uri): Generic syntax," RFC 3986, Internet Engineering 7975 Task Force, Jan. 2005. 7977 [19] R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk, and T. 7978 Berners-Lee, "Hypertext transfer protocol -- HTTP/1.1," RFC 2068, 7979 Internet Engineering Task Force, Jan. 1997. 7981 [20] T. Narten and H. Alvestrand, "Guidelines for writing an IANA 7982 considerations section in RFCs," RFC 2434, Internet Engineering Task 7983 Force, Oct. 1998. 7985 [21] S. Olson, G. Camarillo, and A. B. Roach, "Support for IPv6 in 7986 session description protocol (SDP)," RFC 3266, Internet Engineering 7987 Task Force, June 2002. 7989 [22] R. Hinden and S. E. Deering, "Internet protocol version 6 (ipv6) 7990 addressing architecture," RFC 3513, Internet Engineering Task Force, 7991 Apr. 2003. 7993 M Informative References 7995 [23] H. Schulzrinne, A. Rao, and R. Lanphier, "Real time streaming 7996 protocol (RTSP)," RFC 2326, Internet Engineering Task Force, Apr. 7997 1998. 7999 [24] T. Z. M. Westerlund, "How to make real-time streaming protocol 8000 (rtsp) traverse network address translators (nat) and interact with 8001 firewalls.," internet draft, Internet Engineering Task Force, Feb. 8002 2004. Work in progress. 8004 [25] A. Narasimhan, "Mute and unmute extension to rtsp," internet 8005 draft, Internet Engineering Task Force, Feb. 2002. Work in progress. 8007 [26] P. Gentric, "Rtsp stream switching," internet draft, Internet 8008 Engineering Task Force, Jan. 2004. Work in progress. 8010 [27] A. L. G. Srikantan, J. Murata, "Streaming relays," internet 8011 draft, Internet Engineering Task Force, Dec. 2003. Work in progress. 8013 [28] F. Yergeau, G. Nicol, G. C. Adams, and M. Duerst, 8014 "Internationalization of the hypertext markup language," RFC 2070, 8015 Internet Engineering Task Force, Jan. 1997. 8017 [29] H. Schulzrinne, "A comprehensive multimedia control architecture 8018 for the Internet," in Proc. International Workshop on Network and 8019 Operating System Support for Digital Audio and Video (NOSSDAV), (St. 8020 Louis, Missouri), May 1997. 8022 [30] International Telecommunication Union, "Visual telephone systems 8023 and equipment for local area networks which provide a non-guaranteed 8024 quality of service," Recommendation H.323, Telecommunication 8025 Standardization Sector of ITU, Geneva, Switzerland, May 1996. 8027 [31] P. McMahon, "GSS-API authentication method for SOCKS version 5," 8028 RFC 1961, Internet Engineering Task Force, June 1996. 8030 [32] J. Miller, P. Resnick, and D. Singer, "Rating services and 8031 rating systems (and their machine readable descriptions)," 8032 Recommendation REC-PICS-services-961031, W3C (World Wide Web 8033 Consortium), Boston, Massachusetts, Oct. 1996. 8035 [33] J. Miller, T. Krauskopf, P. Resnick, and W. Treese, "PICS label 8036 distribution label syntax and communication protocols," 8037 Recommendation REC-PICS-labels-961031, W3C (World Wide Web 8038 Consortium), Boston, Massachusetts, Oct. 1996. 8040 [34] D. L. Mills, "Network time protocol (version 3) specification, 8041 implementation," RFC 1305, Internet Engineering Task Force, Mar. 8042 1992. 8044 [35] ISO/IEC, "Information technology -- generic coding of moving 8045 pictures and associated audio informaiton -- part 6: extension for 8046 digital storage media and control," Draft International Standard ISO 8047 13818-6, International Organization for Standardization ISO/IEC 8048 JTC1/SC29/WG11, Geneva, Switzerland, Nov. 1995. 8050 [36] ISO/IEC, "Data elements and interchange formats -- information 8051 interchange -- representation of dates and times," Published standard 8052 ISO 8601, International Organization for Standardization ISO/IEC, 8053 Geneva, Switzerland, Dec. 2000. 8055 [37] S. Josefsson and I. W. Ed., "The base16, base32, and base64 data 8056 encodings," RFC 3548, Internet Engineering Task Force, July 2003. 8058 [38] Third Generation Partnership Project (3GPP), "Transparent end- 8059 to-end packet-switched streaming service (pss); protocols and 8060 codecs," Technical Specification 26.234, Third Generation Partnership 8061 Project (3GPP), Dec. 2002. 8063 [39] D. Yon, "Connection-oriented media transport in sdp," internet 8064 draft, Internet Engineering Task Force, Mar. 2003. Work in progress. 8066 [40] J. Lazzaro, "Framing rtp and rtcp packets over connection- 8067 oriented transport," internet draft, Internet Engineering Task Force, 8068 Oct. 2003. Work in progress. 8070 [41] G. Camarillo, G. Eriksson, J. Holler, and H. Schulzrinne, 8071 "Grouping of media lines in the session description protocol (SDP)," 8072 RFC 3388, Internet Engineering Task Force, Dec. 2002. 8074 [42] "Requirements for Internet hosts - application and support," RFC 8075 1123, Internet Engineering Task Force, Oct. 1989. 8077 [43] R. Braden, "T/TCP -- TCP extensions for transactions functional 8078 specification," RFC 1644, Internet Engineering Task Force, July 1994. 8080 [44] W. R. Stevens, TCP/IP illustrated: the implementation, vol. 2. 8081 Reading, Massachusetts: Addison-Wesley, 1994. 8083 IPR Notice 8085 The IETF takes no position regarding the validity or scope of any 8086 Intellectual Property Rights or other rights that might be claimed to 8087 pertain to the implementation or use of the technology described in 8088 this document or the extent to which any license under such rights 8089 might or might not be available; nor does it represent that it has 8090 made any independent effort to identify any such rights. Information 8091 on the procedures with respect to rights in RFC documents can be 8092 found in BCP 78 and BCP 79. 8094 Copies of IPR disclosures made to the IETF Secretariat and any 8095 assurances of licenses to be made available, or the result of an 8096 attempt made to obtain a general license or permission for the use of 8097 such proprietary rights by implementers or users of this 8098 specification can be obtained from the IETF on-line IPR repository at 8099 http://www.ietf.org/ipr. 8101 The IETF invites any interested party to bring to its attention any 8102 copyrights, patents or patent applications, or other proprietary 8103 rights that may cover technology that may be required to implement 8104 this standard. Please address the information to the IETF at ietf- 8105 ipr@ietf.org. 8107 Full Copyright Statement 8109 Copyright (C) The Internet Society (2005). This document is subject 8110 to the rights, licenses and restrictions contained in BCP 78, and 8111 except as set forth therein, the authors retain all their rights. 8113 This document and the information contained herein are provided on an 8114 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 8115 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 8116 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 8117 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 8118 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 8119 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.