idnits 2.17.1 draft-ietf-mmusic-rfc2326bis-22.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. -- The draft header indicates that this document obsoletes RFC2326, but the abstract doesn't seem to directly say this. It does mention RFC2326 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 9563 has weird spacing: '...trolled by Re...' == 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. -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 13, 2009) is 5393 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. 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: 'H10' is mentioned on line 4014, but not defined == Missing Reference: 'H15' is mentioned on line 8483, but not defined == Missing Reference: 'CSeq' is mentioned on line 11858, but not defined == Missing Reference: 'Timestamp' is mentioned on line 11860, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. '3gpp-26234' -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS-pub-180-2' ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 2617 (Obsoleted by RFC 7235, RFC 7615, RFC 7616, RFC 7617) ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3851 (Obsoleted by RFC 5751) ** Obsolete normative reference: RFC 4395 (Obsoleted by RFC 7595) ** Obsolete normative reference: RFC 4566 (Obsoleted by RFC 8866) ** Obsolete normative reference: RFC 4646 (Obsoleted by RFC 5646) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) == Outdated reference: A later version (-22) exists of draft-ietf-mmusic-rtsp-nat-08 -- Obsolete informational reference (is this intentional?): RFC 822 (Obsoleted by RFC 2822) -- Obsolete informational reference (is this intentional?): RFC 1305 (Obsoleted by RFC 5905) -- Obsolete informational reference (is this intentional?): RFC 1644 (Obsoleted by RFC 6247) -- Obsolete informational reference (is this intentional?): RFC 2068 (Obsoleted by RFC 2616) -- Obsolete informational reference (is this intentional?): RFC 2326 (Obsoleted by RFC 7826) -- Obsolete informational reference (is this intentional?): RFC 3388 (Obsoleted by RFC 5888) Summary: 11 errors (**), 0 flaws (~~), 10 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MMUSIC Working Group H. Schulzrinne 3 Internet-Draft Columbia University 4 Obsoletes: RFC 2326 A. Rao 5 (if approved) Cisco 6 Intended status: Standards Track R. Lanphier 7 Expires: January 14, 2010 8 M. Westerlund 9 Ericsson AB 10 M. Stiemerling (Ed.) 11 NEC 12 July 13, 2009 14 Real Time Streaming Protocol 2.0 (RTSP) 15 draft-ietf-mmusic-rfc2326bis-22 17 Status of this Memo 19 This Internet-Draft is submitted to IETF in full conformance with the 20 provisions of BCP 78 and BCP 79. This document may contain material 21 from IETF Documents or IETF Contributions published or made publicly 22 available before November 10, 2008. The person(s) controlling the 23 copyright in some of this material may not have granted the IETF 24 Trust the right to allow modifications of such material outside the 25 IETF Standards Process. Without obtaining an adequate license from 26 the person(s) controlling the copyright in such materials, this 27 document may not be modified outside the IETF Standards Process, and 28 derivative works of it may not be created outside the IETF Standards 29 Process, except to format it for publication as an RFC or to 30 translate it into languages other than English. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF), its areas, and its working groups. Note that 34 other groups may also distribute working documents as Internet- 35 Drafts. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 The list of current Internet-Drafts can be accessed at 43 http://www.ietf.org/ietf/1id-abstracts.txt. 45 The list of Internet-Draft Shadow Directories can be accessed at 46 http://www.ietf.org/shadow.html. 48 This Internet-Draft will expire on January 14, 2010. 50 Copyright Notice 52 Copyright (c) 2009 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents in effect on the date of 57 publication of this document (http://trustee.ietf.org/license-info). 58 Please review these documents carefully, as they describe your rights 59 and restrictions with respect to this document. 61 Abstract 63 This memorandum defines RTSP version 2.0 which obsoletes RTSP version 64 1.0 which is defined in RFC 2326. 66 The Real Time Streaming Protocol, or RTSP, is an application-level 67 protocol for setup and control of the delivery of data with real-time 68 properties. RTSP provides an extensible framework to enable 69 controlled, on-demand delivery of real-time data, such as audio and 70 video. Sources of data can include both live data feeds and stored 71 clips. This protocol is intended to control multiple data delivery 72 sessions, provide a means for choosing delivery channels such as UDP, 73 multicast UDP and TCP, and provide a means for choosing delivery 74 mechanisms based upon RTP (RFC 3550). 76 Table of Contents 78 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 11 79 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 12 80 2.1. Content Description . . . . . . . . . . . . . . . . . . 12 81 2.2. Session Establishment . . . . . . . . . . . . . . . . . 13 82 2.3. Media Delivery Control . . . . . . . . . . . . . . . . . 14 83 2.4. Session Parameter Manipulations . . . . . . . . . . . . 16 84 2.5. Media Delivery . . . . . . . . . . . . . . . . . . . . . 16 85 2.5.1. Media Delivery Manipulations . . . . . . . . . . . . 17 86 2.6. Session Maintenance and Termination . . . . . . . . . . 19 87 2.7. Extending RTSP . . . . . . . . . . . . . . . . . . . . . 20 88 3. Document Conventions . . . . . . . . . . . . . . . . . . . . 22 89 3.1. Notational Conventions . . . . . . . . . . . . . . . . . 22 90 3.2. Terminology . . . . . . . . . . . . . . . . . . . . . . 22 91 4. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 26 92 4.1. RTSP Version . . . . . . . . . . . . . . . . . . . . . . 26 93 4.2. RTSP IRI and URI . . . . . . . . . . . . . . . . . . . . 26 94 4.3. Session Identifiers . . . . . . . . . . . . . . . . . . 28 95 4.4. SMPTE Relative Timestamps . . . . . . . . . . . . . . . 28 96 4.5. Normal Play Time . . . . . . . . . . . . . . . . . . . . 29 97 4.6. Absolute Time . . . . . . . . . . . . . . . . . . . . . 30 98 4.7. Feature-Tags . . . . . . . . . . . . . . . . . . . . . . 30 99 4.8. Message Body Tags . . . . . . . . . . . . . . . . . . . 30 100 4.9. Media Properties . . . . . . . . . . . . . . . . . . . . 31 101 4.9.1. Random Access and Seeking . . . . . . . . . . . . . 32 102 4.9.2. Retention . . . . . . . . . . . . . . . . . . . . . 32 103 4.9.3. Content Modifications . . . . . . . . . . . . . . . 32 104 4.9.4. Supported Scale Factors . . . . . . . . . . . . . . 33 105 4.9.5. Mapping to the Attributes . . . . . . . . . . . . . 33 106 5. RTSP Message . . . . . . . . . . . . . . . . . . . . . . . . 34 107 5.1. Message Types . . . . . . . . . . . . . . . . . . . . . 34 108 5.2. Message Headers . . . . . . . . . . . . . . . . . . . . 35 109 5.3. Message Body . . . . . . . . . . . . . . . . . . . . . . 35 110 5.4. Message Length . . . . . . . . . . . . . . . . . . . . . 36 111 6. General Header Fields . . . . . . . . . . . . . . . . . . . . 37 112 7. Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 113 7.1. Request Line . . . . . . . . . . . . . . . . . . . . . . 38 114 7.2. Request Header Fields . . . . . . . . . . . . . . . . . 40 115 8. Response . . . . . . . . . . . . . . . . . . . . . . . . . . 42 116 8.1. Status-Line . . . . . . . . . . . . . . . . . . . . . . 42 117 8.1.1. Status Code and Reason Phrase . . . . . . . . . . . 42 118 8.2. Response Headers . . . . . . . . . . . . . . . . . . . . 45 119 9. Message Body . . . . . . . . . . . . . . . . . . . . . . . . 48 120 9.1. Message-Body Header Fields . . . . . . . . . . . . . . . 48 121 9.2. Message Body . . . . . . . . . . . . . . . . . . . . . . 49 122 10. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 50 123 10.1. Reliability and Acknowledgements . . . . . . . . . . . . 50 124 10.2. Using Connections . . . . . . . . . . . . . . . . . . . 51 125 10.3. Closing Connections . . . . . . . . . . . . . . . . . . 53 126 10.4. Timing Out Connections and RTSP Messages . . . . . . . . 54 127 10.5. Showing Liveness . . . . . . . . . . . . . . . . . . . . 54 128 10.6. Use of IPv6 . . . . . . . . . . . . . . . . . . . . . . 55 129 11. Capability Handling . . . . . . . . . . . . . . . . . . . . . 56 130 12. Pipelining Support . . . . . . . . . . . . . . . . . . . . . 58 131 13. Method Definitions . . . . . . . . . . . . . . . . . . . . . 59 132 13.1. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 60 133 13.2. DESCRIBE . . . . . . . . . . . . . . . . . . . . . . . . 61 134 13.3. SETUP . . . . . . . . . . . . . . . . . . . . . . . . . 63 135 13.3.1. Changing Transport Parameters . . . . . . . . . . . 66 136 13.4. PLAY . . . . . . . . . . . . . . . . . . . . . . . . . . 67 137 13.4.1. General Usage . . . . . . . . . . . . . . . . . . . 67 138 13.4.2. Aggregated Sessions . . . . . . . . . . . . . . . . 71 139 13.4.3. Updating current PLAY Requests . . . . . . . . . . . 72 140 13.4.4. Playing On-Demand Media . . . . . . . . . . . . . . 73 141 13.4.5. Playing Dynamic On-Demand Media . . . . . . . . . . 74 142 13.4.6. Playing Live Media . . . . . . . . . . . . . . . . . 74 143 13.4.7. Playing Live with Recording . . . . . . . . . . . . 75 144 13.4.8. Playing Live with Time-Shift . . . . . . . . . . . . 75 145 13.5. PLAY_NOTIFY . . . . . . . . . . . . . . . . . . . . . . 76 146 13.5.1. End-of-Stream . . . . . . . . . . . . . . . . . . . 77 147 13.5.2. Media-Properties-Update . . . . . . . . . . . . . . 78 148 13.5.3. Scale-Change . . . . . . . . . . . . . . . . . . . . 79 149 13.6. PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . 80 150 13.7. TEARDOWN . . . . . . . . . . . . . . . . . . . . . . . . 83 151 13.7.1. Client to Server . . . . . . . . . . . . . . . . . . 83 152 13.7.2. Server to Client . . . . . . . . . . . . . . . . . . 84 153 13.8. GET_PARAMETER . . . . . . . . . . . . . . . . . . . . . 85 154 13.9. SET_PARAMETER . . . . . . . . . . . . . . . . . . . . . 86 155 13.10. REDIRECT . . . . . . . . . . . . . . . . . . . . . . . . 88 157 14. Embedded (Interleaved) Binary Data . . . . . . . . . . . . . 91 158 15. Status Code Definitions . . . . . . . . . . . . . . . . . . . 93 159 15.1. Success 1xx . . . . . . . . . . . . . . . . . . . . . . 93 160 15.1.1. 100 Continue . . . . . . . . . . . . . . . . . . . . 93 161 15.2. Success 2xx . . . . . . . . . . . . . . . . . . . . . . 93 162 15.2.1. 200 OK . . . . . . . . . . . . . . . . . . . . . . . 93 163 15.3. Redirection 3xx . . . . . . . . . . . . . . . . . . . . 93 164 15.3.1. 301 Moved Permanently . . . . . . . . . . . . . . . 94 165 15.3.2. 302 Found . . . . . . . . . . . . . . . . . . . . . 94 166 15.3.3. 303 See Other . . . . . . . . . . . . . . . . . . . 94 167 15.3.4. 304 Not Modified . . . . . . . . . . . . . . . . . . 94 168 15.3.5. 305 Use Proxy . . . . . . . . . . . . . . . . . . . 95 169 15.4. Client Error 4xx . . . . . . . . . . . . . . . . . . . . 95 170 15.4.1. 400 Bad Request . . . . . . . . . . . . . . . . . . 95 171 15.4.2. 401 Unauthorized . . . . . . . . . . . . . . . . . . 95 172 15.4.3. 402 Payment Required . . . . . . . . . . . . . . . . 96 173 15.4.4. 403 Forbidden . . . . . . . . . . . . . . . . . . . 96 174 15.4.5. 404 Not Found . . . . . . . . . . . . . . . . . . . 96 175 15.4.6. 405 Method Not Allowed . . . . . . . . . . . . . . . 96 176 15.4.7. 406 Not Acceptable . . . . . . . . . . . . . . . . . 96 177 15.4.8. 407 Proxy Authentication Required . . . . . . . . . 97 178 15.4.9. 408 Request Timeout . . . . . . . . . . . . . . . . 97 179 15.4.10. 410 Gone . . . . . . . . . . . . . . . . . . . . . . 97 180 15.4.11. 411 Length Required . . . . . . . . . . . . . . . . 97 181 15.4.12. 412 Precondition Failed . . . . . . . . . . . . . . 98 182 15.4.13. 413 Request Message Body Too Large . . . . . . . . . 98 183 15.4.14. 414 Request-URI Too Long . . . . . . . . . . . . . . 98 184 15.4.15. 415 Unsupported Media Type . . . . . . . . . . . . . 98 185 15.4.16. 451 Parameter Not Understood . . . . . . . . . . . . 98 186 15.4.17. 452 reserved . . . . . . . . . . . . . . . . . . . . 98 187 15.4.18. 453 Not Enough Bandwidth . . . . . . . . . . . . . . 99 188 15.4.19. 454 Session Not Found . . . . . . . . . . . . . . . 99 189 15.4.20. 455 Method Not Valid in This State . . . . . . . . . 99 190 15.4.21. 456 Header Field Not Valid for Resource . . . . . . 99 191 15.4.22. 457 Invalid Range . . . . . . . . . . . . . . . . . 99 192 15.4.23. 458 Parameter Is Read-Only . . . . . . . . . . . . . 99 193 15.4.24. 459 Aggregate Operation Not Allowed . . . . . . . . 99 194 15.4.25. 460 Only Aggregate Operation Allowed . . . . . . . . 99 195 15.4.26. 461 Unsupported Transport . . . . . . . . . . . . . 100 196 15.4.27. 462 Destination Unreachable . . . . . . . . . . . . 100 197 15.4.28. 463 Destination Prohibited . . . . . . . . . . . . . 100 198 15.4.29. 464 Data Transport Not Ready Yet . . . . . . . . . . 100 199 15.4.30. 465 Notification Reason Unknown . . . . . . . . . . 100 200 15.4.31. 470 Connection Authorization Required . . . . . . . 100 201 15.4.32. 471 Connection Credentials not accepted . . . . . . 101 202 15.4.33. 472 Failure to establish secure connection . . . . . 101 203 15.5. Server Error 5xx . . . . . . . . . . . . . . . . . . . . 101 204 15.5.1. 500 Internal Server Error . . . . . . . . . . . . . 101 205 15.5.2. 501 Not Implemented . . . . . . . . . . . . . . . . 101 206 15.5.3. 502 Bad Gateway . . . . . . . . . . . . . . . . . . 101 207 15.5.4. 503 Service Unavailable . . . . . . . . . . . . . . 101 208 15.5.5. 504 Gateway Timeout . . . . . . . . . . . . . . . . 102 209 15.5.6. 505 RTSP Version Not Supported . . . . . . . . . . . 102 210 15.5.7. 551 Option not supported . . . . . . . . . . . . . . 102 211 16. Header Field Definitions . . . . . . . . . . . . . . . . . . 103 212 16.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . 112 213 16.2. Accept-Credentials . . . . . . . . . . . . . . . . . . . 113 214 16.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . 113 215 16.4. Accept-Language . . . . . . . . . . . . . . . . . . . . 114 216 16.5. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . 115 217 16.6. Allow . . . . . . . . . . . . . . . . . . . . . . . . . 116 218 16.7. Authorization . . . . . . . . . . . . . . . . . . . . . 116 219 16.8. Bandwidth . . . . . . . . . . . . . . . . . . . . . . . 117 220 16.9. Blocksize . . . . . . . . . . . . . . . . . . . . . . . 117 221 16.10. Cache-Control . . . . . . . . . . . . . . . . . . . . . 117 222 16.11. Connection . . . . . . . . . . . . . . . . . . . . . . . 120 223 16.12. Connection-Credentials . . . . . . . . . . . . . . . . . 120 224 16.13. Content-Base . . . . . . . . . . . . . . . . . . . . . . 121 225 16.14. Content-Encoding . . . . . . . . . . . . . . . . . . . . 121 226 16.15. Content-Language . . . . . . . . . . . . . . . . . . . . 122 227 16.16. Content-Length . . . . . . . . . . . . . . . . . . . . . 123 228 16.17. Content-Location . . . . . . . . . . . . . . . . . . . . 123 229 16.18. Content-Type . . . . . . . . . . . . . . . . . . . . . . 123 230 16.19. CSeq . . . . . . . . . . . . . . . . . . . . . . . . . . 124 231 16.20. Date . . . . . . . . . . . . . . . . . . . . . . . . . . 124 232 16.21. Expires . . . . . . . . . . . . . . . . . . . . . . . . 125 233 16.22. From . . . . . . . . . . . . . . . . . . . . . . . . . . 126 234 16.23. If-Match . . . . . . . . . . . . . . . . . . . . . . . . 126 235 16.24. If-Modified-Since . . . . . . . . . . . . . . . . . . . 127 236 16.25. If-None-Match . . . . . . . . . . . . . . . . . . . . . 127 237 16.26. Last-Modified . . . . . . . . . . . . . . . . . . . . . 128 238 16.27. Location . . . . . . . . . . . . . . . . . . . . . . . . 128 239 16.28. Media-Properties . . . . . . . . . . . . . . . . . . . . 129 240 16.29. Media-Range . . . . . . . . . . . . . . . . . . . . . . 131 241 16.30. MTag . . . . . . . . . . . . . . . . . . . . . . . . . . 131 242 16.31. Notify-Reason . . . . . . . . . . . . . . . . . . . . . 132 243 16.32. Pipelined-Requests . . . . . . . . . . . . . . . . . . . 132 244 16.33. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . 133 245 16.34. Proxy-Authorization . . . . . . . . . . . . . . . . . . 133 246 16.35. Proxy-Require . . . . . . . . . . . . . . . . . . . . . 134 247 16.36. Proxy-Supported . . . . . . . . . . . . . . . . . . . . 134 248 16.37. Public . . . . . . . . . . . . . . . . . . . . . . . . . 135 249 16.38. Range . . . . . . . . . . . . . . . . . . . . . . . . . 136 250 16.39. Referrer . . . . . . . . . . . . . . . . . . . . . . . . 137 251 16.40. Retry-After . . . . . . . . . . . . . . . . . . . . . . 138 252 16.41. Request-Status . . . . . . . . . . . . . . . . . . . . . 138 253 16.42. Require . . . . . . . . . . . . . . . . . . . . . . . . 138 254 16.43. RTP-Info . . . . . . . . . . . . . . . . . . . . . . . . 139 255 16.44. Scale . . . . . . . . . . . . . . . . . . . . . . . . . 142 256 16.45. Seek-Style . . . . . . . . . . . . . . . . . . . . . . . 143 257 16.46. Server . . . . . . . . . . . . . . . . . . . . . . . . . 144 258 16.47. Session . . . . . . . . . . . . . . . . . . . . . . . . 144 259 16.48. Speed . . . . . . . . . . . . . . . . . . . . . . . . . 145 260 16.49. Supported . . . . . . . . . . . . . . . . . . . . . . . 146 261 16.50. Terminate-Reason . . . . . . . . . . . . . . . . . . . . 147 262 16.51. Timestamp . . . . . . . . . . . . . . . . . . . . . . . 147 263 16.52. Transport . . . . . . . . . . . . . . . . . . . . . . . 147 264 16.53. Unsupported . . . . . . . . . . . . . . . . . . . . . . 154 265 16.54. User-Agent . . . . . . . . . . . . . . . . . . . . . . . 154 266 16.55. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . 155 267 16.56. Via . . . . . . . . . . . . . . . . . . . . . . . . . . 156 268 16.57. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 156 269 17. Proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 270 17.1. Proxies and Protocol Extensions . . . . . . . . . . . . 158 271 18. Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 272 18.1. Validation Model (HTTP) . . . . . . . . . . . . . . . . 161 273 18.1.1. Last-Modified Dates . . . . . . . . . . . . . . . . 162 274 18.1.2. Message Body Tag Cache Validators . . . . . . . . . 162 275 18.1.3. Weak and Strong Validators . . . . . . . . . . . . . 162 276 18.1.4. Rules for When to Use Entity Tags and 277 Last-Modified Dates . . . . . . . . . . . . . . . . 165 278 18.1.5. Non-validating Conditionals . . . . . . . . . . . . 166 279 18.2. Invalidation After Updates or Deletions (HTTP) . . . . . 166 280 19. Security Framework . . . . . . . . . . . . . . . . . . . . . 168 281 19.1. RTSP and HTTP Authentication . . . . . . . . . . . . . . 168 282 19.2. RTSP over TLS . . . . . . . . . . . . . . . . . . . . . 168 283 19.3. Security and Proxies . . . . . . . . . . . . . . . . . . 169 284 19.3.1. Accept-Credentials . . . . . . . . . . . . . . . . . 170 285 19.3.2. User approved TLS procedure . . . . . . . . . . . . 171 286 20. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 287 20.1. Base Syntax . . . . . . . . . . . . . . . . . . . . . . 173 288 20.2. RTSP Protocol Definition . . . . . . . . . . . . . . . . 175 289 20.2.1. Generic Protocol elements . . . . . . . . . . . . . 175 290 20.2.2. Message Syntax . . . . . . . . . . . . . . . . . . . 178 291 20.2.3. Header Syntax . . . . . . . . . . . . . . . . . . . 182 292 20.3. SDP extension Syntax . . . . . . . . . . . . . . . . . . 191 293 21. Security Considerations . . . . . . . . . . . . . . . . . . . 192 294 21.1. Remote denial of Service Attack . . . . . . . . . . . . 194 295 22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 196 296 22.1. Feature-tags . . . . . . . . . . . . . . . . . . . . . . 196 297 22.1.1. Description . . . . . . . . . . . . . . . . . . . . 196 298 22.1.2. Registering New Feature-tags with IANA . . . . . . . 197 299 22.1.3. Registered entries . . . . . . . . . . . . . . . . . 197 300 22.2. RTSP Methods . . . . . . . . . . . . . . . . . . . . . . 197 301 22.2.1. Description . . . . . . . . . . . . . . . . . . . . 197 302 22.2.2. Registering New Methods with IANA . . . . . . . . . 197 303 22.2.3. Registered Entries . . . . . . . . . . . . . . . . . 198 304 22.3. RTSP Status Codes . . . . . . . . . . . . . . . . . . . 198 305 22.3.1. Description . . . . . . . . . . . . . . . . . . . . 198 306 22.3.2. Registering New Status Codes with IANA . . . . . . . 198 307 22.3.3. Registered Entries . . . . . . . . . . . . . . . . . 198 308 22.4. RTSP Headers . . . . . . . . . . . . . . . . . . . . . . 198 309 22.4.1. Description . . . . . . . . . . . . . . . . . . . . 198 310 22.4.2. Registering New Headers with IANA . . . . . . . . . 199 311 22.4.3. Registered entries . . . . . . . . . . . . . . . . . 199 312 22.5. Accept-Credentials . . . . . . . . . . . . . . . . . . . 200 313 22.5.1. Accept-Credentials policies . . . . . . . . . . . . 200 314 22.5.2. Accept-Credentials hash algorithms . . . . . . . . . 200 315 22.6. Cache-Control Cache Directive Extensions . . . . . . . 201 316 22.7. Media Properties . . . . . . . . . . . . . . . . . . . . 202 317 22.7.1. Description . . . . . . . . . . . . . . . . . . . . 202 318 22.7.2. Registration Rules . . . . . . . . . . . . . . . . . 202 319 22.7.3. Registered Values . . . . . . . . . . . . . . . . . 202 320 22.8. Notify-Reason header . . . . . . . . . . . . . . . . . . 202 321 22.8.1. Description . . . . . . . . . . . . . . . . . . . . 202 322 22.8.2. Registration Rules . . . . . . . . . . . . . . . . . 203 323 22.8.3. Registered Values . . . . . . . . . . . . . . . . . 203 324 22.9. Range header formats . . . . . . . . . . . . . . . . . . 203 325 22.10. Terminate-Reason Header . . . . . . . . . . . . . . . . 204 326 22.10.1. Redirect Reasons . . . . . . . . . . . . . . . . . . 204 327 22.10.2. Terminate-Reason Header Parameters . . . . . . . . . 204 328 22.11. RTP-Info header parameters . . . . . . . . . . . . . . . 204 329 22.11.1. Description . . . . . . . . . . . . . . . . . . . . 204 330 22.11.2. Registration Rules . . . . . . . . . . . . . . . . . 204 331 22.11.3. Registered Values . . . . . . . . . . . . . . . . . 205 332 22.12. Seek-Style Policies . . . . . . . . . . . . . . . . . . 205 333 22.12.1. Description . . . . . . . . . . . . . . . . . . . . 205 334 22.12.2. Registration Rules . . . . . . . . . . . . . . . . . 205 335 22.12.3. Registered Values . . . . . . . . . . . . . . . . . 205 336 22.13. Transport Header Registries . . . . . . . . . . . . . . 206 337 22.13.1. Transport Protocol Specification . . . . . . . . . . 206 338 22.13.2. Transport modes . . . . . . . . . . . . . . . . . . 207 339 22.13.3. Transport Parameters . . . . . . . . . . . . . . . . 207 340 22.14. URI Schemes . . . . . . . . . . . . . . . . . . . . . . 208 341 22.14.1. The rtsp URI Scheme . . . . . . . . . . . . . . . . 208 342 22.14.2. The rtsps URI Scheme . . . . . . . . . . . . . . . . 209 343 22.14.3. The rtspu URI Scheme . . . . . . . . . . . . . . . . 210 344 22.15. SDP attributes . . . . . . . . . . . . . . . . . . . . . 211 345 22.16. Media Type Registration for text/parameters . . . . . . 211 346 23. References . . . . . . . . . . . . . . . . . . . . . . . . . 213 347 23.1. Normative References . . . . . . . . . . . . . . . . . . 213 348 23.2. Informative References . . . . . . . . . . . . . . . . . 215 350 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 217 351 A.1. Media on Demand (Unicast) . . . . . . . . . . . . . . . 217 352 A.2. Media on Demand using Pipelining . . . . . . . . . . . . 220 353 A.3. Media on Demand (Unicast) . . . . . . . . . . . . . . . 223 354 A.4. Single Stream Container Files . . . . . . . . . . . . . 227 355 A.5. Live Media Presentation Using Multicast . . . . . . . . 229 356 A.6. Capability Negotiation . . . . . . . . . . . . . . . . . 230 357 Appendix B. RTSP Protocol State Machine . . . . . . . . . . . . 232 358 B.1. States . . . . . . . . . . . . . . . . . . . . . . . . . 232 359 B.2. State variables . . . . . . . . . . . . . . . . . . . . 232 360 B.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . 232 361 B.4. State Tables . . . . . . . . . . . . . . . . . . . . . . 233 362 Appendix C. Media Transport Alternatives . . . . . . . . . . . . 238 363 C.1. RTP . . . . . . . . . . . . . . . . . . . . . . . . . . 238 364 C.1.1. AVP . . . . . . . . . . . . . . . . . . . . . . . . 238 365 C.1.2. AVP/UDP . . . . . . . . . . . . . . . . . . . . . . 238 366 C.1.3. AVPF/UDP . . . . . . . . . . . . . . . . . . . . . . 239 367 C.1.4. SAVP/UDP . . . . . . . . . . . . . . . . . . . . . . 240 368 C.1.5. SAVPF/UDP . . . . . . . . . . . . . . . . . . . . . 240 369 C.1.6. RTCP usage with RTSP . . . . . . . . . . . . . . . . 240 370 C.2. RTP over TCP . . . . . . . . . . . . . . . . . . . . . . 241 371 C.2.1. Interleaved RTP over TCP . . . . . . . . . . . . . . 242 372 C.2.2. RTP over independent TCP . . . . . . . . . . . . . . 242 373 C.3. Handling Media Clock Time Jumps in the RTP Media Layer . 246 374 C.4. Handling RTP Timestamps after PAUSE . . . . . . . . . . 250 375 C.5. RTSP / RTP Integration . . . . . . . . . . . . . . . . . 252 376 C.6. Scaling with RTP . . . . . . . . . . . . . . . . . . . . 252 377 C.7. Maintaining NPT synchronization with RTP timestamps . . 252 378 C.8. Continuous Audio . . . . . . . . . . . . . . . . . . . . 252 379 C.9. Multiple Sources in an RTP Session . . . . . . . . . . . 252 380 C.10. Usage of SSRCs and the RTCP BYE Message During an 381 RTSP Session . . . . . . . . . . . . . . . . . . . . . . 252 382 C.11. Future Additions . . . . . . . . . . . . . . . . . . . . 253 383 Appendix D. Use of SDP for RTSP Session Descriptions . . . . . . 254 384 D.1. Definitions . . . . . . . . . . . . . . . . . . . . . . 254 385 D.1.1. Control URI . . . . . . . . . . . . . . . . . . . . 254 386 D.1.2. Media Streams . . . . . . . . . . . . . . . . . . . 255 387 D.1.3. Payload Type(s) . . . . . . . . . . . . . . . . . . 256 388 D.1.4. Format-Specific Parameters . . . . . . . . . . . . . 256 389 D.1.5. Directionality of media stream . . . . . . . . . . . 256 390 D.1.6. Range of Presentation . . . . . . . . . . . . . . . 257 391 D.1.7. Time of Availability . . . . . . . . . . . . . . . . 258 392 D.1.8. Connection Information . . . . . . . . . . . . . . . 258 393 D.1.9. Message Body Tag . . . . . . . . . . . . . . . . . . 258 394 D.2. Aggregate Control Not Available . . . . . . . . . . . . 259 395 D.3. Aggregate Control Available . . . . . . . . . . . . . . 259 396 D.4. RTSP external SDP delivery . . . . . . . . . . . . . . . 260 397 Appendix E. RTSP Use Cases . . . . . . . . . . . . . . . . . . . 262 398 E.1. On-demand Playback of Stored Content . . . . . . . . . . 262 399 E.2. Unicast Distribution of Live Content . . . . . . . . . . 263 400 E.3. On-demand Playback using Multicast . . . . . . . . . . . 264 401 E.4. Inviting an RTSP server into a conference . . . . . . . 264 402 E.5. Live Content using Multicast . . . . . . . . . . . . . . 265 403 Appendix F. Text format for Parameters . . . . . . . . . . . . . 267 404 Appendix G. Requirements for Unreliable Transport of RTSP . . . 268 405 Appendix H. Backwards Compatibility Considerations . . . . . . . 270 406 H.1. Play Request in Play mode . . . . . . . . . . . . . . . 270 407 H.2. Using Persistent Connections . . . . . . . . . . . . . . 270 408 Appendix I. Open Issues . . . . . . . . . . . . . . . . . . . . 271 409 Appendix J. Changes . . . . . . . . . . . . . . . . . . . . . . 272 410 Appendix K. Acknowledgements . . . . . . . . . . . . . . . . . . 279 411 K.1. Contributors . . . . . . . . . . . . . . . . . . . . . . 279 412 Appendix L. RFC Editor Consideration . . . . . . . . . . . . . . 281 413 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 282 415 1. Introduction 417 This memo defines version 2.0 of the Real Time Streaming Protocol 418 (RTSP 2.0). RTSP 2.0 is an application-level protocol for setup and 419 control over the delivery of data with real-time properties, 420 typically streaming media. Streaming media is, for instance, video 421 on demand or audio live streaming. Put simply, RTSP acts as a 422 "network remote control" for multimedia servers, as you know it from 423 your TV set. 425 The protocol operates between RTSP 2.0 clients and servers, but also 426 supports the usage of proxies placed between clients and servers. 427 Clients can request information about streaming media from servers, 428 by asking for a description of the media or use media description 429 provided externally. Then the media delivery protocol is used to 430 establish the media streams described by the media description. 431 Clients can then request to play out the media, pause it, or stop it 432 completely, as known from a regular DVD player remote control. The 433 requested media can consist of multiple audio and video streams that 434 are delivered as a time-synchronized streams from servers to clients. 436 RTSP 2.0 is an replacement of RTSP 1.0 [RFC2326] that obsoletes that 437 specification. This protocol is based on RTSP 1.0 but not backwards 438 compatible other than in the basic version negotiation mechanism. 439 The changes are documented in Appendix J. There are many reasons why 440 RTSP 2.0 can't be backwards compatible with RTSP 1.0 but some of the 441 main ones are; that most header that needed to be extensible did not 442 define the allowed syntax preventing safe deployment of extensions; 443 the changed behavior of the PLAY method when received in playing 444 state; changed behavior of the extensibility model and its mechanism; 445 the change of syntax for some headers. The summary is that there are 446 so many small details that changing version become necessary to 447 enable clarification and consistent behavior. 449 This document is structured in the way that it begins with an 450 overview of the protocol operations and its functions in an informal 451 way. Then a set of definitions of used terms and document 452 conventions is introduced. Then comes the actual protocol 453 specification. In the appendix some functionality that isn't core 454 RTSP defined, but still important to enable some usage, like RTP and 455 SDP usage with RTSP. This is followed by a number of informational 456 parts discussing the changes, use cases, different considerations or 457 motivations. 459 2. Protocol Overview 461 This section provides a informative overview of the different 462 mechanisms in the RTSP 2.0 protocol, to give the reader a high level 463 understanding before getting into all the different details. In case 464 of conflict with this description and the later sections, the later 465 sections take precedence. For more information about considered use 466 cases for RTSP see Appendix E. 468 RTSP 2.0 is a bi-directional request and response protocol that first 469 establish a context including content resources (the media) and then 470 controls the delivery of these content resources from the server to 471 the client. RTSP has three fundamental parts of interest: Session 472 Establishment, Media Delivery Control, and an extensibility model 473 described below. The protocol is based on some assumptions on 474 existing functionality to provide a complete solution for client 475 controlled real-time media delivery. 477 RTSP uses text-based messages, requests and responses, that may 478 contain a binary message body. An RTSP request starts with a method 479 line that identifies the method, the protocol and version and the 480 resource to act on. Following the method line follows a number of 481 RTSP headers. This part is ended by two consecutive carriage return 482 line feed (CRLF) character pairs. The message body if present 483 follows the two CRLF and the bodies length are described by a message 484 header. RTSP responses are similar, but start with a response line 485 with protocol and version, followed by a status code and a reason 486 phrase. RTSP messages are sent over a reliable transport protocol 487 between the client and server. RTSP 2.0 requires clients and servers 488 to implement TCP, and TLS over TCP, as mandatory transports for RTSP 489 messages. 491 2.1. Content Description 493 RTSP exists to provide access to multi-media content, but tries to be 494 agnostic to the media type or the actual media delivery protocol that 495 is used. To enable a client to implement a complete system, an RTSP- 496 external mechanism for describing the content and the delivery 497 protocol(s) is used. RTSP assumes that this description is either 498 delivered completely out of bands or as a data object in the response 499 to a client's request using the DESCRIBE method (Section 13.2). 501 Parameters that commonly have to be included in the Content 502 Description are the following: 504 o Number of media streams 505 o The resource identifier for each media stream/resource that is to 506 be controlled by RTSP 508 o The protocol that each media stream is to be delivered over 510 o Transport protocol parameters that are not negotiated or varies 511 with each client 513 o Media encoding information enabling client to correctly decode it 514 upon reception 516 o An aggregate control resource identifier 518 RTSP uses its own URI schemes ("rtsp" and "rtsps") to reference media 519 resources and aggregates under common control. 521 This specification describes in Appendix D how one uses SDP [RFC4566] 522 for Content Description 524 2.2. Session Establishment 526 The RTSP client can request the establishment of an RTSP session 527 after having used the content description to determine which media 528 streams are available, and also which media delivery protocol is used 529 and their particular resource identifiers. The RTSP session is a 530 common context between the client and the server that consist of one 531 or more media resource that is to be under common media delivery 532 control. 534 The client creates an RTSP session by sending an request using the 535 SETUP method (Section 13.3) to the server. In the SETUP request the 536 client also includes all the transport parameter necessary to enable 537 the media delivery protocol to function in the "Transport" header 538 (Section 16.52). This includes parameters that are pre-established 539 by the content description but necessary for any middlebox to 540 correctly handle the media delivery protocols. The Transport header 541 in a request may contain multiple alternatives for media delivery in 542 a prioritized list, which the server can select from. These 543 alternatives are typically based on information in the content 544 description. 546 The server determines if the media resource is available upon 547 receiving a SETUP request and if any of the transport parameter 548 specifications are acceptable. If that is successful, an RTSP 549 session context is created and the relevant parameters and state is 550 stored. An identifier is created for the RTSP session and included 551 in the response in the Session header (Section 16.47). The SETUP 552 response includes a Transport header that specifies which of the 553 alternatives that have been selected and relevant parameters. 555 A SETUP request that references an existing RTSP session but 556 identifies a new media resource is a request to add that media 557 resource under common control with the already present media 558 resources in an aggregated session. A client can expect this to work 559 for all media resources under RTSP control within a multi-media 560 content. However, aggregating resources from different content are 561 likely to be refused by the server. The RTSP session as aggregate is 562 referenced by the aggregate control URI, even if the RTSP session 563 only contains a single media. 565 To avoid an extra round trip in the session establishment of 566 aggregated RTSP sessions, RTSP 2.0 supports pipelined requests, i.e., 567 the client can send multiple requests back to back without waiting 568 first for the completion of any of them. The client uses client 569 selected identifier in the Pipelined-Requests header to instruct the 570 server to bind multiple requests together as if they included the 571 session identifier. 573 The SETUP response also provides additional information about the 574 established sessions in a couple of different headers. The Media- 575 Properties header include a number of properties that apply for the 576 aggregate that is valuable when doing media delivery control and 577 configuring user interface. The Accept-Ranges header inform the 578 client about which range formats that the server supports with these 579 media resources. The Media-Range header inform the client about the 580 time range of the media currently available. 582 2.3. Media Delivery Control 584 After having established an RTSP session, the client can start 585 controlling the media delivery. The basic operations are Start by 586 using the PLAY method (Section 13.4) and Halt by using the PAUSE 587 method (Section 13.6). PLAY also allows for choosing the starting 588 media position from which the server should deliver the media. The 589 positioning is done using the Range header (Section 16.38) that 590 supports several different time formats: Normal Play Time 591 (Section 4.5), SMPTE Timestamps (Section 4.4) and absolute time 592 (Section 4.6). The Range header does further allow the client to 593 specify a position where delivery should end, thus allowing a 594 specific interval to be delivered. 596 The support for positioning/searching within a content depends on the 597 content's media properties. Content exists in a number of different 598 types, such as: on-demand, live, and live with simultaneous 599 recording. Even within these categories there are differences in how 600 the content is generated and distributed, which affect how it can be 601 accessed for playback. The properties applicable for the RTSP 602 session are provided by the server in the SETUP response using the 603 Media-Properties header (Section 16.28). These are expressed using 604 one or several independent attributes. A first attribute is Random 605 Access, which expresses if positioning can be done, and with what 606 granularity. Another aspect is whether the content will change 607 during the lifetime of the session. While on-demand content will 608 provided in its completeness from the beginning, a live stream being 609 recorded results in that the length of the accessible content grows 610 as the session goes on. There also exist content that is dynamically 611 built by another protocol than RTSP and thus also changes in steps 612 during the session, but maybe not continuously. Furthermore, when 613 content is recorded, there are cases where not the complete content 614 is maintained, but, for example, only the last hour. All these 615 properties result in the need for mechanisms that will be discussed 616 below. 618 When the client accesses on-demand content, that is possible to 619 perform random access in, the client can issue the PLAY request for 620 any point in the content between the start and the end. The server 621 will deliver media from the closest random access point prior to the 622 requested point and indicate that in its PLAY response. If the 623 client issues a pause the delivery will be halted and the point at 624 which the server stopped will be reported back in the response. The 625 client can later resume by a PLAY request without a range header. 626 When the server is about to completed the PLAY request by delivering 627 the end of the content or the requested range the server will send a 628 PLAY_NOTIFY request indicating this. 630 When playing live content with no extra functions, such as recording, 631 the client will receive the live media from the server after having 632 sent a PLAY request. Seeking in such content is not working as the 633 server does not store it, but only forwards it from the source of the 634 session. Thus delivery continues until the client sends a PAUSE 635 request, tears down the session, or the content ends. 637 For live sessions that are being recorded the client will need to 638 keep track of how the recording progresses. Upon session 639 establishment the client will learn the current duration of the 640 recording from the Media-Range header. As the recording is ongoing 641 the content grows in direct relation to the passed time. Therefore, 642 each server's response to a PLAY request will contain the current 643 Media-Range header. The server should also send regularly every 5 644 minutes the current media range in a PLAY_NOTIFY request. If the 645 live transmission ends, the server must send a PLAY_NOTIFY request 646 with the updated Media-Properties indicating that the content stopped 647 being a recorded live session and instead become a on-demand content. 648 The request also contains the final media range. While the live 649 delivery continues the client can request to play what is delivered 650 just now by using the NPT timescale symbol "now", or it can request a 651 specific point in the available content by an explicit range request 652 for that point. If the requested point is outside of the available 653 interval the server will adjust the position to the closest available 654 point, i.e., either at the beginning or the end. 656 A special case of recording is, where the recording is not retained 657 longer than a specific time period, thus as the live delivery 658 continues the client can access any media within a moving window that 659 covers for example "now" to "now" minus 1 hour. A client that pauses 660 on a specific point within the content may not be able to retrieve 661 the content anymore. If the client waits too long before resuming 662 the pause point, the content may no longer be available. In this 663 case the pause point will be adjusted to the end of the available 664 media. 666 2.4. Session Parameter Manipulations 668 A session may have additional state or functionality that effects how 669 the server or client treats the session, content, how it functions, 670 or feedback on how well the session works. Such extensions are not 671 defined in this specification, but may be done in various extensions. 672 RTSP has two methods for retrieving and setting parameter values on 673 either the client or the server: GET_PARAMETER (Section 13.8) and 674 SET_PARAMETER (Section 13.9). These methods carry the parameters in 675 a message body of the appropriate format. One can also headers to 676 query state with the GET_PARAMETER method. As an example, clients 677 needing to know the current Media-Range for a time-progressing 678 session can use the GET_PARAMETER method and include the media-range. 679 Furthermore, synchronization information can be requested by using a 680 combination of RTP-Info and Range. 682 RTSP 2.0 does not have a strong mechanism for providing negotiation 683 of which headers, or parameters and their formats, that can be used. 684 However, responses will indicate request headers or parameters that 685 are not supported. A priori determination of what features are 686 available needs to be done through out-of-band mechanisms, like the 687 session description, or through the usage of feature tags 688 (Section 4.7). 690 2.5. Media Delivery 692 The delivery of media to the RTSP client is done with a protocol 693 outside of RTSP and this protocol is determined during the session 694 establishment. This document specifies how media is delivered with 695 RTP over UDP, TCP or the RTSP control connection. Additional 696 protocols may be specified in the future based on demand. 698 The usage of RTP as media delivery protocol requires some additional 699 information to function well. The PLAY responses contains 700 synchronization information to enable reliable and timely deliver of 701 how a client should synchronize different sources in the different 702 RTP sessions. It also provides a mapping between RTP timestamps and 703 the content time scale. When the server want to notify the client 704 about the completion of the media delivery, it sends a PLAY_NOTIFY 705 request to the client. The PLAY_NOTIFY request includes information 706 about the stream end, including the last RTP sequence number for each 707 stream, thus enabling the client to empty the buffer smoothly. 709 2.5.1. Media Delivery Manipulations 711 The basic playback functionality of RTSP is to request content for a 712 particular range to be delivered to the client in a pace that enables 713 playback as intended by the creator. However, RTSP can also 714 manipulate how this delivery is done to the client in two ways. 716 Scale: The ratio of media content time delivered per unit playback 717 time. 719 Speed: The ratio of playback time delivered per unit of wallclock 720 time. 722 Both affect the media delivery per time unit. However, they 723 manipulate two independent time scales and the effects are possible 724 to combine. 726 Scale is used for fast forward or slow motion control as it changes 727 the amount of content timescale that should be played back per time 728 unit. Scale > 1.0, means fast forward, e.g. Scale=2.0 results in 729 that 2 seconds of content is played back every second of playback. 730 Scale = 1.0 is the default value that is used if no Scale is 731 specified, i.e. playback at the contents original rate. Scale values 732 between 0 and 1.0 is providing for slow motion. Scale can be 733 negative to allow for reverse playback in either regular pace (Scale 734 = -1.0) or fast backwards (Scale < -1.0) or slow motion backwards 735 (-1.0 < Scale < 0). Scale = 0 is equal to pause and is not allowed. 737 In most cases the realization of scale means server side manipulation 738 of the media to ensure that the client can actually play it back. 739 These media manipulation and when they are needed are highly media 740 type dependent. Lets exemplify with two common media types audio and 741 video. 743 It is very difficult to modify the playback rate of audio. A maximum 744 of 10-30% is possible by changing the pitch-rate of speech. Music 745 goes out of tune if one tries to manipulate the playback rate by 746 resampling it. This is a well known problem and audio is commonly 747 muted or played back in short segments with skips to keep up with the 748 current playback point. 750 For video is possible to manipulate the frame rate, although the 751 rendering capabilities are often limited to certain frame rates. 752 Also the allowed bit-rates in decoding, the structured used in the 753 encoding and its dependency between frames and other capabilities of 754 the rendering device limits the possible manipulations. Therefore 755 basic fast forward capabilities often is implemented by selecting 756 certain sub-sets of frames. 758 Due to the media restrictions, the possible scale values are commonly 759 restricted to a limited set of possible scale ratios. To enable the 760 clients to select from the possible scale values, RTSP can signal the 761 supported Scale ratios for the content. To support aggregated or 762 dynamic content, where this may change during the ongoing session and 763 dependent on the location within the content, a mechanism for 764 updating the media properties and the current used scale factor 765 exist. 767 Speed affects how much of the playback timeline that is delivered in 768 a given wallclock period. The default is Speed = 1 which is to 769 deliver at the same rate the media is consumed. Speed > 1 means that 770 the receiver will get content faster than it regularly would consume 771 it. Speed < 1 means that delivery is slower than the regular media 772 rate. Speed values of 0 or lower has no meaning and are not allowed. 773 This mechanism enables two general functionalities. Client side 774 scale operations, i.e. the client receives all the frames and makes 775 the adjustment to the playback locally. The second usage is to 776 control delivery for buffering of media. By specifying a speed over 777 1.0 the client can build up the amount of playback time it has 778 present in its buffers to a level that is sufficient for its needs. 780 A naive implementation of Speed would only affect the transmission 781 schedule of the media and has a clear impact on the needed bandwidth. 782 This would result in the data rate being proportional to the speed 783 factor. Speed = 1.5, i.e. 50% faster than normal delivery, will then 784 result in a 50% increase in the data transport rate. If that can be 785 supported or not depends solely on the underlying network path. 786 Scale may also have some impact on the required bandwidth due to the 787 manipulation of the content in the new playback schedule. An example 788 is fast forward where only the independently decodable intra frames 789 are included in the media stream. This usage of solely intra frames 790 increase the data rate significantly compared to a normal sequence 791 with the same number of frames where most frames are encoded using 792 prediction. 794 This potential increase of the data rate needs to be handled by the 795 media sender. The client has requested that the media is delivered 796 in a specific way, which should be honored. However, the media 797 sender can not ignore if the network path between the sender and the 798 receiver can't handle the resulting media stream. In that case the 799 media stream needs to be adapted to fit the available resources of 800 the path. This can result in that media quality has be reduced due 801 to the delivery modifications that the client has requested. 803 The need for bitrate adaptation becomes especially problematic in 804 connection to Speed. If the goal is to fill up the buffer, the 805 client may not want to do that at the cost of reduced quality. If 806 you like to do local playout changes then you may actually require 807 that the requested speed is honored. To resolve this issue, the 808 usage of speed specifies a range so that both usages can be 809 supported. The server is requested to use the highest possible speed 810 value within the range which is compatible with the available 811 bandwidth. As long as the server can maintain a speed value within 812 the range it shall not change the media quality, but instead modify 813 the speed value in response to available bandwidth. However, if this 814 is not possible, the server should instead modify the media quality 815 to respect the lowest speed value and the available bandwidth. 817 This functionality enables the local scaling implementation to use a 818 tight range, or even a range where the lower bound equals the upper 819 bound, to identify that it requires the server to deliver the 820 requested amount of media time per delivery time independent of how 821 much it needs to adapt the media quality to fit within the available 822 path bandwidth. For buffer fill up, it is suitable to use a range 823 with a reasonable span and with a lower bound at the nominal media 824 rate 1.0, such as 1.0 - 2.5. If the client wants to reduce the 825 buffer, it can specify an upper bound that is below 1.0 to force the 826 server to deliver slower than the nominal media rate. 828 2.6. Session Maintenance and Termination 830 The session context that has been established is kept alive by having 831 the client show liveness. This is done in two main ways: 833 o Media transport protocol keep-alive. RTCP is possible to use when 834 using RTP. 836 o Any RTSP request referencing the session context. 838 Section 10.5 discusses the methods for showing liveness in more 839 depth. If the client fails to show liveness for more than the 840 established session timeout value (normally 60 seconds), the server 841 may terminate the context. Other values may be selected by the 842 server through the inclusion of the timeout parameter in the session 843 header. 845 The session context is normally terminated by the client by sending a 846 TEARDOWN request to the server referencing the aggregated control 847 URI. An individual media resource can be removed from a session 848 context by a TEARDOWN request referencing that particular media 849 resource. If all media resources are removed from a session context, 850 the session context is terminated. 852 A client may keep the session alive indefinitely if allowed by the 853 server, however it is recommend to release the session context when 854 an extended period of time without media delivery activity has 855 passed. It can re-establish the session context if required later. 856 One issue is that what is an extended period of time is dependent on 857 the server and its usage. It is recommended that the client 858 terminates the session before 10*times the session timeout value has 859 passed. A server may terminate the session after one session timeout 860 period without any client activity beyond keep-alive. When a server 861 terminates the session context, it does that by sending a TEARDOWN 862 request indicating the reason. 864 A server can also request that the client tear down the session and 865 re-establish it at an alternative server, as may be needed for 866 maintenance. This is done by using the REDIRECT method. The 867 Terminate-Reason header is used to indicate when and why. The 868 Location header indicates where it should connect if there is an 869 alternative server available. When the deadline expires, the server 870 simply stops providing the service. To achieve a clean closure, the 871 client needs to initiate session termination prior to the deadline. 872 In case the server has no other server to redirect to, and likes to 873 close the session for maintenance, it shall use the TEARDOWN method 874 with a Terminate-Reason header. 876 2.7. Extending RTSP 878 RTSP is quite a versatile protocol which supports extensions in many 879 different directions. Even this core specification contains several 880 blocks of functionality that are optional to implement. The use case 881 and need for the protocol deployment is what should determine what is 882 implemented. Allowing for extensions makes it possible for RTSP to 883 reach out to additional use cases. However, extensions will affect 884 the interoperability of the protocol and therefore it is important 885 that it can be done in a structured way. 887 The client can learn the servers capability through the usage of the 888 OPTIONS method (Section 13.1) and the Supported header 889 (Section 16.49). It can also try and possibly fail by using new 890 methods or require that particular features are supported using the 891 Require or Proxy-Require header. 893 The RTSP protocol in itself can be extended in three ways, listed 894 here in order of the magnitude of changes supported: 896 o Existing methods can be extended with new parameters, for example, 897 headers, as long as these parameters can be safely ignored by the 898 recipient. If the client needs negative acknowledgement when a 899 method extension is not supported, a tag corresponding to the 900 extension may be added in the field of the Require or Proxy- 901 Require headers (see Section 16.35). 903 o New methods can be added. If the recipient of the message does 904 not understand the request, it must respond with error code 501 905 (Not Implemented) so that the sender can avoid using this method 906 again. A client may also use the OPTIONS method to inquire about 907 methods supported by the server. The server must list the methods 908 it supports using the Public response header. 910 o A new version of the protocol can be defined, allowing almost all 911 aspects (except the position of the protocol version number) to 912 change. A new version of the protocol must be registered through 913 an IETF standard track document. 915 The basic capability discovery mechanism can be used to both discover 916 support for a certain feature and to ensure that a feature is 917 available when performing a request. For a detailed explanation of 918 this see Section 11. 920 New media delivery protocols may be added and negotiated at session 921 establishment, in addition to extension to the core protocol. 922 Certain types of protocol manipulations can be done through parameter 923 formats using SET_PARAMETER and GET_PARAMETER. 925 3. Document Conventions 927 3.1. Notational Conventions 929 Since a few of the definitions are identical to HTTP/1.1, this 930 specification only points to the section where they are defined 931 rather than copying it. For brevity, [HX.Y] is to be taken to refer 932 to Section X.Y of the current HTTP/1.1 specification ([RFC2616]). 934 All the mechanisms specified in this document are described in both 935 prose and the Augmented Backus-Naur form (ABNF) described in detail 936 in [RFC5234]. 938 Indented and smaller-type paragraphs are used to provide informative 939 background and motivation. This is intended to give readers who were 940 not involved with the formulation of the specification an 941 understanding of why things are the way they are in RTSP. 943 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 944 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 945 document are to be interpreted as described in [RFC2119]. 947 The word, "unspecified" is used to indicate functionality or features 948 that are not defined in this specification. Such functionality 949 cannot be used in a standardized manner without further definition in 950 an extension specification to RTSP. 952 3.2. Terminology 954 Aggregate control: The concept of controlling multiple streams using 955 a single timeline, generally maintained by the server. A client, 956 for example, uses aggregate control when it issues a single play 957 or pause message to simultaneously control both the audio and 958 video in a movie. A session which is under aggregate control is 959 referred to as an aggregated session. 961 Aggregate control URI: The URI used in an RTSP request to refer to 962 and control an aggregated session. It normally, but not always, 963 corresponds to the presentation URI specified in the session 964 description. See Section 13.3 for more information. 966 Client: The client requests media service from the media server. 968 Connection: A transport layer virtual circuit established between 969 two programs for the purpose of communication. 971 Container file: A file which may contain multiple media streams 972 which often constitutes a presentation when played together. The 973 concept of a container file is not embedded in the protocol. 974 However, RTSP servers may offer aggregate control on the media 975 streams within these files. 977 Continuous media: Data where there is a timing relationship between 978 source and sink; that is, the sink needs to reproduce the timing 979 relationship that existed at the source. The most common examples 980 of continuous media are audio and motion video. Continuous media 981 can be real-time (interactive or conversational), where there is a 982 "tight" timing relationship between source and sink, or streaming 983 where the relationship is less strict. 985 Feature-tag: A tag representing a certain set of functionality, i.e. 986 a feature. 988 IRI: Internationalized Resource Identifier, is the same as an URI, 989 with the exception that it allows characters from the whole 990 Universal Character Set (Unicode/ISO 10646), rather than the US- 991 ASCII only. See [RFC3987] for more information. 993 Live: Normally used to describe a presentation or session with media 994 coming from an ongoing event. This generally results in the 995 session having an unbound or only loosely defined duration, and 996 sometimes no seek operations are possible. 998 Media initialization: Datatype/codec specific initialization. This 999 includes such things as clock rates, color tables, etc. Any 1000 transport-independent information which is required by a client 1001 for playback of a media stream occurs in the media initialization 1002 phase of stream setup. 1004 Media parameter: Parameter specific to a media type that may be 1005 changed before or during stream delivery. 1007 Media server: The server providing media delivery services for one 1008 or more media streams. Different media streams within a 1009 presentation may originate from different media servers. A media 1010 server may reside on the same host or on a different host from 1011 which the presentation is invoked. 1013 (Media) stream: A single media instance, e.g., an audio stream or a 1014 video stream as well as a single whiteboard or shared application 1015 group. When using RTP, a stream consists of all RTP and RTCP 1016 packets created by a source within an RTP session. 1018 Message: The basic unit of RTSP communication, consisting of a 1019 structured sequence of octets matching the syntax defined in 1020 Section 20 and transmitted over a connection or a connectionless 1021 transport. A message is either a Request or a Response. 1023 Message Body: The information transferred as the payload of a 1024 message (Request and response). A message body consists of meta- 1025 information in the form of message-header and content in the form 1026 of an message-body, as described in Section 9. 1028 Non-Aggregated Control: Control of a single media stream. 1030 Presentation: A set of one or more streams presented to the client 1031 as a complete media feed and described by a presentation 1032 description as defined below. Presentations with more than one 1033 media stream are often handled in RTSP under aggregate control. 1035 Presentation description: A presentation description contains 1036 information about one or more media streams within a presentation, 1037 such as the set of encodings, network addresses and information 1038 about the content. Other IETF protocols such as SDP ([RFC4566]) 1039 use the term "session" for a presentation. The presentation 1040 description may take several different formats, including but not 1041 limited to the session description protocol format, SDP. 1043 Response: An RTSP response to a Request. One type of RTSP message. 1044 If an HTTP response is meant, it is indicated explicitly. 1046 Request: An RTSP request. One type of RTSP message. If an HTTP 1047 request is meant, it is indicated explicitly. 1049 Request-URI: The URI used in a request to indicate the resource on 1050 which the request is to be performed. 1052 RTSP agent: Refers to either an RTSP client, an RTSP server, or an 1053 RTSP proxy. In this specification, there are many capabilities 1054 that are common to these three entities such as the capability to 1055 send requests or receive responses. This term will be used when 1056 describing functionality that is applicable to all three of these 1057 entities. 1059 RTSP session: A stateful abstraction upon which the main control 1060 methods of RTSP operate. An RTSP session is a server entity; it 1061 is created, maintained and destroyed by the server. It is 1062 established by an RTSP server upon the completion of a successful 1063 SETUP request (when a 200 OK response is sent) and is labelled 1064 with a session identifier at that time. The session exists until 1065 timed out by the server or explicitly removed by a TEARDOWN 1066 request. An RTSP session is a stateful entity; an RTSP server 1067 maintains an explicit session state machine (see Appendix A) where 1068 most state transitions are triggered by client requests. The 1069 existence of a session implies the existence of state about the 1070 session's media streams and their respective transport mechanisms. 1071 A given session can have one or more media streams associated with 1072 it. An RTSP server uses the session to aggregate control over 1073 multiple media streams. 1075 Transport initialization: The negotiation of transport information 1076 (e.g., port numbers, transport protocols) between the client and 1077 the server. 1079 URI: Universal Resource Identifier, see [RFC3986]. The URIs used in 1080 RTSP are generally URLs as they give a location for the resource. 1081 As URLs are a subset of URIs, they will be referred to as URIs to 1082 cover also the cases when an RTSP URI would not be an URL. 1084 URL: Universal Resource Locator, is an URI which identifies the 1085 resource through its primary access mechanism, rather than 1086 identifying the resource by name or by some other attribute(s) of 1087 that resource. 1089 4. Protocol Parameters 1091 4.1. RTSP Version 1093 This specification defines version 2.0 of RTSP. 1095 RTSP uses a "." numbering scheme to indicate versions 1096 of the protocol. The protocol versioning policy is intended to allow 1097 the sender to indicate the format of a message and its capacity for 1098 understanding further RTSP communication, rather than the features 1099 obtained via that communication. No change is made to the version 1100 number for the addition of message components which do not affect 1101 communication behavior or which only add to extensible field values. 1103 The number is incremented when the changes made to the 1104 protocol add features which do not change the general message parsing 1105 algorithm, but which may add to the message semantics and imply 1106 additional capabilities of the sender. The number is 1107 incremented when the format of a message within the protocol is 1108 changed. The version of an RTSP message is indicated by an RTSP- 1109 Version field in the first line of the message. Note that the major 1110 and minor numbers MUST be treated as separate integers and that each 1111 MAY be incremented higher than a single digit. Thus, RTSP/2.4 is a 1112 lower version than RTSP/2.13, which in turn is lower than RTSP/12.3. 1113 Leading zeros MUST be ignored by recipients and MUST NOT be sent. 1115 4.2. RTSP IRI and URI 1117 RTSP 2.0 defines and registers three URI schemes "rtsp", "rtsps" and 1118 "rtspu". The usage of the last, "rtspu", is unspecified in RTSP 2.0, 1119 and is defined here to register and reserve the URI scheme that is 1120 defined in RTSP 1.0. The "rtspu" scheme indicates undefined 1121 transport of the RTSP messages over unreliable transport (UDP). The 1122 syntax of "rtsp" and "rtsps" URIs has been changed from RTSP 1.0. 1124 This specification also defines the format of the RTSP IRI [RFC3987] 1125 that can be used as RTSP resource identifiers and locators, in web 1126 pages, user interfaces, on paper, etc. However, the RTSP request 1127 message format only allows usage of the absolute URI format. The 1128 RTSP IRI format MUST use the rules and transformation for IRIs 1129 defined in [RFC3987]. This way RTSP 2.0 URIs for request can be 1130 produced from an RTSP IRI. 1132 The RTSP IRI and URI are both syntax restricted compared to the 1133 generic syntax defined in [RFC3986] and RFC [RFC3987]: 1135 o An absolute URI requires the authority part; i.e., a host identity 1136 must be provided. 1138 o Parameters in the path element are prefixed with the reserved 1139 separator ";". 1141 The RTSP URI and IRI is case sensitive, with the exception of those 1142 parts that [RFC3986] and [RFC3987] defines as case-insensitive; for 1143 example, the scheme and host part. 1145 The fragment identifier is used as defined in sections 3.5 and 4.3 of 1146 [RFC3986], i.e. the fragment is to be stripped from the IRI by the 1147 requester and not included in the request URI. The user agent needs 1148 to interpret the value of the fragment based on the media type the 1149 request relates to; i.e., the media type indicated in Content-Type 1150 header in the response to DESCRIBE. 1152 The syntax of any URI query string is unspecified and responder 1153 (usually the server) specific. The query is, from the requester's 1154 perspective, an opaque string and needs to be handled as such. 1155 Please note that relative URI with queries are difficult to handle 1156 due to the RFC 3986 relative URI handling rules. Any change of the 1157 path element using a relative URI results in the stripping of the 1158 query. Which means the relative part needs to contain the query. 1160 The URI scheme "rtsp" requires that commands are issued via a 1161 reliable protocol (within the Internet, TCP), while the scheme 1162 "rtsps" identifies a reliable transport using secure transport (TLS 1163 [RFC5246], see (Section 19). 1165 For the scheme "rtsp", if no port number is provided in the authority 1166 part of the URI port number 554 MUST be used. For the scheme 1167 "rtsps", the TCP port 322 is registered and MUST be assumed. 1169 A presentation or a stream is identified by a textual media 1170 identifier, using the character set and escape conventions of URIs 1171 [RFC3986]. URIs may refer to a stream or an aggregate of streams; 1172 i.e., a presentation. Accordingly, requests described in 1173 (Section 13) can apply to either the whole presentation or an 1174 individual stream within the presentation. Note that some request 1175 methods can only be applied to streams, not presentations, and vice 1176 versa. 1178 For example, the RTSP URI: 1180 rtsp://media.example.com:554/twister/audiotrack 1182 may identify the audio stream within the presentation "twister", 1183 which can be controlled via RTSP requests issued over a TCP 1184 connection to port 554 of host media.example.com. 1186 Also, the RTSP URI: 1188 rtsp://media.example.com:554/twister 1190 identifies the presentation "twister", which may be composed of audio 1191 and video streams, but could also be something else like a random 1192 media redirector. 1194 This does not imply a standard way to reference streams in URIs. 1195 The presentation description defines the hierarchical 1196 relationships in the presentation and the URIs for the individual 1197 streams. A presentation description may name a stream "a.mov" and 1198 the whole presentation "b.mov". 1200 The path components of the RTSP URI are opaque to the client and do 1201 not imply any particular file system structure for the server. 1203 This decoupling also allows presentation descriptions to be used 1204 with non-RTSP media control protocols simply by replacing the 1205 scheme in the URI. 1207 4.3. Session Identifiers 1209 Session identifiers are strings of length 8-128 characters. A 1210 session identifier MUST be chosen cryptographically random (see 1211 [RFC4086]) . It is RECOMMENDED that it contains 128 bits of entropy, 1212 i.e. approximately 22 characters from a high quality generator. (see 1213 Section 21.) However, note that the session identifier does not 1214 provide any security against session hijacking unless it is kept 1215 confidential between client, server and trusted proxies. 1217 4.4. SMPTE Relative Timestamps 1219 A SMPTE relative timestamp expresses time relative to the start of 1220 the clip. Relative timestamps are expressed as SMPTE time codes for 1221 frame-level access accuracy. The time code has the format 1223 hours:minutes:seconds:frames.subframes, 1225 with the origin at the start of the clip. The default SMPTE format 1226 is "SMPTE 30 drop" format, with frame rate is 29.97 frames per 1227 second. Other SMPTE codes MAY be supported (such as "SMPTE 25") 1228 through the use of alternative use of "smpte-type". For SMPTE 30, 1229 the "frames" field in the time value can assume the values 0 through 1230 29. The difference between 30 and 29.97 frames per second is handled 1231 by dropping the first two frame indices (values 00 and 01) of every 1232 minute, except every tenth minute. If the frame and the subframe 1233 values are zero, they may be omitted. Subframes are measured in one- 1234 hundredth of a frame. 1236 Examples: 1238 smpte=10:12:33:20- 1239 smpte=10:07:33- 1240 smpte=10:07:00-10:07:33:05.01 1241 smpte-25=10:07:00-10:07:33:05.01 1243 4.5. Normal Play Time 1245 Normal play time (NPT) indicates the stream absolute position 1246 relative to the beginning of the presentation, not to be confused 1247 with the Network Time Protocol (NTP) [RFC1305]. The timestamp 1248 consists of two parts: the mandatory first part may be expressed in 1249 either seconds or hours, minutes, and seconds. The optional second 1250 part consists of a decimal point and decimal figures and indicates 1251 fractions of a second. 1253 The beginning of a presentation corresponds to 0.0 seconds. Negative 1254 values are not defined. 1256 The special constant "now" is defined as the current instant of a 1257 live event. It MAY only be used for live events, and MUST NOT be 1258 used for on-demand (i.e., non-live) content. 1260 NPT is defined as in DSM-CC [ISO.13818-6.1995]: "Intuitively, NPT is 1261 the clock the viewer associates with a program. It is often 1262 digitally displayed on a VCR. NPT advances normally when in normal 1263 play mode (scale = 1), advances at a faster rate when in fast scan 1264 forward (high positive scale ratio), decrements when in scan reverse 1265 (negative scale ratio) and is fixed in pause mode. NPT is 1266 (logically) equivalent to SMPTE time codes." 1268 Examples: 1270 npt=123.45-125 1271 npt=12:05:35.3- 1272 npt=now- 1274 The syntax conforms to ISO 8601 [ISO.8601.2000]. The npt-sec 1275 notation is optimized for automatic generation, the npt-hhmmss 1276 notation for consumption by human readers. The "now" constant 1277 allows clients to request to receive the live feed rather than the 1278 stored or time-delayed version. This is needed since neither 1279 absolute time nor zero time are appropriate for this case. 1281 4.6. Absolute Time 1283 Absolute time is expressed as ISO 8601 [ISO.8601.2000] timestamps, 1284 using UTC (GMT). Fractions of a second may be indicated. 1286 Example for November 8, 1996 at 14h37 and 20 and a quarter seconds 1287 UTC: 1289 19961108T143720.25Z 1291 4.7. Feature-Tags 1293 Feature-tags are unique identifiers used to designate features in 1294 RTSP. These tags are used in Require (Section 16.42), Proxy-Require 1295 (Section 16.35), Proxy-Supported (Section 16.36), and Unsupported 1296 (Section 16.53) header fields. 1298 A feature-tag definition MUST indicate which combination of clients, 1299 servers or proxies they applies to. 1301 The creator of a new RTSP feature-tag should either prefix the 1302 feature-tag with a reverse domain name (e.g., 1303 "com.example.mynewfeature" is an apt name for a feature whose 1304 inventor can be reached at "example.com"), or register the new 1305 feature-tag with the Internet Assigned Numbers Authority (IANA) (see 1306 IANA Section 22). 1308 The usage of feature-tags is further described in Section 11 that 1309 deals with capability handling. 1311 4.8. Message Body Tags 1313 Message body tags are opaque strings that are used to compare two 1314 message bodies from the same resource, for example in caches or to 1315 optimize setup after a redirect. Message body tags can be carried in 1316 the MTag header (see Section 16.30) or in SDP (see Appendix D.1.9). 1317 MTag is similar to ETag in HTTP/1.1. 1319 A message body tag MUST be unique across all versions of all message 1320 bodies associated with a particular resource. A given message body 1321 tag value MAY be used for message body obtained by requests on 1322 different URIs. The use of the same message body tag value in 1323 conjunction with message bodies obtained by requests on different 1324 URIs does not imply the equivalence of those message bodies 1326 Message body tags are used in RTSP to make some methods conditional. 1327 The methods are made conditional through the inclusion of headers, 1328 see Section 16.23 and Section 16.25. Note that RTSP message body 1329 tags apply to the complete presentation; i.e., both the session 1330 description and the individual media streams. Thus message body tags 1331 can be used to verify at setup time after a redirect that the same 1332 session description applies to the media at the new location using 1333 the If-Match header. 1335 4.9. Media Properties 1337 When an RTSP server handles media, it is important to consider the 1338 different properties a media instance for delivery and playback can 1339 have. This specification considers the below listed media properties 1340 in its protocol operations. They are derived from the differences 1341 between a number of supported usages. 1343 On-demand: Media that has a fixed (given) duration that doesn't 1344 change during the life time of the RTSP session and is known at 1345 the time of the creation of the session. It is expected that the 1346 content of the media will not change, even if the representation, 1347 i.e encoding, quality, etc, may change. Generally one can seek, 1348 i.e. request any range, within the media. 1350 Dynamic On-demand: This is a variation of the on-demand case where 1351 external methods are used to manipulate the actual content of the 1352 media setup for the RTSP session. The main example is a content 1353 defined by a playlist-specified. 1355 Live: Live media represents a progressing content stream (such as 1356 broadcast TV) where the duration may or may not be known. It is 1357 not seekable, only the content presently being delivered can be 1358 accessed. 1360 Live with Recording: A Live stream that is combined with a server 1361 side capability to store and retain the content of the live 1362 session for random access delivery within the part of the already 1363 recorded content. The actual behavior of the media stream is very 1364 much depending on the retention policy for the media stream. 1365 Either the server will be able to capture the complete media 1366 stream, or it will have a limitation in how much will be retained. 1367 The media range will dynamically change as the session progress. 1368 For servers with a limited amount of storage available for 1369 recording, there will typically be a sliding window that goes 1370 forwards while data is made available and content that is older 1371 than a limit will be discarded. 1373 To cover the above usages, the following media properties with 1374 appropriate values are specified: 1376 4.9.1. Random Access and Seeking 1378 Random Access is about the possibility to specify and get media 1379 delivered from any point inside the content, an operation called 1380 seeking. This possiblity is signalled using Seek-Style which can 1381 take the following different values: 1383 Random Access: The media are seekable to any out of a large number 1384 of points within the media. Due to media encoding limitations, a 1385 particular point may not be reachable, but seeking to a point 1386 close by is enabled. A floating point number of seconds may be 1387 provided to express the worst case distance between random access 1388 points. 1390 Return To Start: Seeking is only possible to beginning of the 1391 content. 1393 No seeking: Seeking is not possible at all. 1395 4.9.2. Retention 1397 Media may have different retention policy in place that affect the 1398 operation on the media. The following different media retention 1399 policies are envisioned and taken into consideration where 1400 applicable. 1402 Unlimited: The media will not be removed as long as the RTSP session 1403 is in existence. 1405 Time Limited: The media will at least not be removed before given 1406 wallclock time. After that time it may or may not be available 1407 any more. 1409 Duration limited: Each individual unit of the media will be retained 1410 for the specified duration. 1412 4.9.3. Content Modifications 1414 There is also the question of how the content may change during time 1415 for a give media resource: 1417 Immutable: The content of the media will not change, even if the 1418 representation, i.e encoding, quality, etc, may change. 1420 Dynamic: Between explicit updates the media content will not change, 1421 but the content may change due to external methods or triggers, 1422 such as playlists. 1424 Time Progressing: As times progress new content will become 1425 available. If the content also is retained it will become longer 1426 and longer as everything between the start point and the point in 1427 currently being made available can be accessed. 1429 4.9.4. Supported Scale Factors 1431 The content is often limiting the possible rates of scale that can be 1432 supported when delivering the media. To enable the client to know 1433 what values or ranges of scale operations that the whole content or 1434 the current position supports a media properties attribute for this 1435 is defined. It contains a list with the values and/or ranges that 1436 are supported. The attribute is named "Scales". It may be updated 1437 at any point in the content due to content consisting of spliced 1438 pieces or content being dynamically updated by out of bands 1439 mechanisms. 1441 4.9.5. Mapping to the Attributes 1443 This section exemplifies how one would map the above listed usages to 1444 the properties and their values. 1446 On-demand: Random Access: Random Access=5s, Content Modifications: 1447 Immutable, Retention: unlimited or time limited. 1449 Dynamic On-demand: Random Access: Random Access=3s, Content 1450 Modifications: Dynamic, Retention: unlimited or time limited. 1452 Live: Random Access: No seeking, Content Modifications: Time 1453 Progressing, Retention: Duration limited=0.0s 1455 Live with Recording: Random Access: Random Access=3s, Content 1456 Modifications: Time Progressing, Retention: Duration limited=2H 1458 5. RTSP Message 1460 RTSP is a text-based protocol and uses the ISO 10646 character set in 1461 UTF-8 encoding (RFC 3629 [RFC3629]). Lines MUST be terminated by 1462 CRLF. 1464 Text-based protocols make it easier to add optional parameters in 1465 a self-describing manner. Since the number of parameters and the 1466 frequency of commands is low, processing efficiency is not a 1467 concern. Text-based protocols, if done carefully, also allow easy 1468 implementation of research prototypes in scripting languages such 1469 as TCL, Visual Basic and Perl. 1471 The ISO 10646 character set avoids tricky character set switching, 1472 but is invisible to the application as long as US-ASCII is being 1473 used. This is also the encoding used for RTCP [RFC3550]. ISO 8859-1 1474 translates directly into Unicode with a high-order octet of zero. 1475 ISO 8859-1 characters with the most-significant bit set are 1476 represented as 1100001x 10xxxxxx. (See RFC 3629 [RFC3629]) 1478 Requests contain methods, the object the method is operating upon and 1479 parameters to further describe the method. Methods are idempotent 1480 unless otherwise noted. Methods are also designed to require little 1481 or no state maintenance at the media server. 1483 5.1. Message Types 1485 RTSP messages consist of requests from client to server, or server to 1486 client, and responses in the reverse direction. Request ( 1487 (Section 7) ) and Response (Section 8) messages uses a format based 1488 on the generic message format of RFC 0822 [RFC0822] for transferring 1489 bodies (the payload of the message). Both types of message consist 1490 of a start-line, zero or more header fields (also known as 1491 "headers"), an empty line (i.e., a line with nothing preceding the 1492 CRLF) indicating the end of the header, and possibly the data of the 1493 message-body. 1495 generic-message = start-line 1496 *(message-header CRLF) 1497 CRLF 1498 [ message-body-data ] 1499 start-line = Request-Line | Status-Line 1501 In the interest of robustness, servers SHOULD ignore any empty 1502 line(s) received where a Request-Line is expected. In other words, 1503 if the server is reading the protocol stream at the beginning of a 1504 message and receives a CRLF first, it should ignore the CRLF. 1506 5.2. Message Headers 1508 RTSP header fields (see Section 16) include general-header, request- 1509 header, response-header, and entity-header fields. 1511 The order in which header fields with differing field names are 1512 received is not significant. However, it is "good practice" to send 1513 general-header fields first, followed by request-header or response- 1514 header fields, and ending with the entity-header fields. 1516 Multiple message-header fields with the same field-name MAY be 1517 present in a message if and only if the entire field-value for that 1518 header field is defined as a comma-separated list [i.e., #(values)]. 1519 It MUST be possible to combine the multiple header fields into one 1520 "field-name: field-value" pair, without changing the semantics of the 1521 message, by appending each subsequent field-value to the first, each 1522 separated by a comma. The order in which header fields with the same 1523 field-name are received is therefore significant to the 1524 interpretation of the combined field value, and thus a proxy MUST NOT 1525 change the order of these field values when a message is forwarded. 1527 Unknown message headers MUST be ignored by a RTSP server or client. 1528 An RTSP Proxy MUST forward unknown message headers. Message headers 1529 defined outside of this specification that are required to be 1530 interpret by the RTSP agent will need to use feature tags 1531 (Section 4.7) and include it in the appropriate Require 1532 (Section 16.42) or Proxy-Require (Section 16.35) header. 1534 5.3. Message Body 1536 The message-body (if any) of an RTSP message is used to carry further 1537 information for a particular resource associated with the request or 1538 response. An example for a message body is the Session Description 1539 Protocol (SDP). 1541 The presence of a message-body in either a request or a response MUST 1542 be signaled by the inclusion of a Content-Length header (see 1543 Section 16.16). 1545 The presence of a message-body in a request is signaled by the 1546 inclusion of a Content-Length header field in the RTSP message. A 1547 message-body MUST NOT be included in a request or response if the 1548 specification of the particular method (see Method Definitions 1549 (Section 13)) does not allow sending a message body. A server SHOULD 1550 read and forward a message-body on any request; if the request method 1551 does not include defined semantics for a message body, then the 1552 message-body SHOULD be ignored when handling the request. 1554 5.4. Message Length 1556 When a message body is included with a message, the length of that 1557 body is determined by one of the following (in order of precedence): 1559 1. Any response message which MUST NOT include a message body (such 1560 as the 1xx, 204, and 304 responses) is always terminated by the 1561 first empty line after the header fields, regardless of the 1562 message-header fields present in the message. (Note: An empty 1563 line is a line with nothing preceding the CRLF.) 1565 2. If a Content-Length header(Section 16.16) is present, its value 1566 in bytes represents the length of the message-body. If this 1567 header field is not present, a value of zero is assumed. 1569 Unlike an HTTP message, an RTSP message MUST contain a Content-Length 1570 header whenever it contains a message body. Note that RTSP does not 1571 support the HTTP/1.1 "chunked" transfer coding (see [H3.6.1]). 1573 Given the moderate length of presentation descriptions returned, 1574 the server should always be able to determine its length, even if 1575 it is generated dynamically, making the chunked transfer encoding 1576 unnecessary. 1578 6. General Header Fields 1580 The general headers are listed in Table 1: 1582 +--------------------+--------------------+ 1583 | Header Name | Defined in Section | 1584 +--------------------+--------------------+ 1585 | Cache-Control | Section 16.10 | 1586 | | | 1587 | Connection | Section 16.11 | 1588 | | | 1589 | CSeq | Section 16.19 | 1590 | | | 1591 | Date | Section 16.20 | 1592 | | | 1593 | Media-Properties | Section 16.28 | 1594 | | | 1595 | Media-Range | Section 16.29 | 1596 | | | 1597 | Pipelined-Requests | Section 16.32 | 1598 | | | 1599 | Proxy-Supported | Section 16.36 | 1600 | | | 1601 | Seek-Style | Section 16.45 | 1602 | | | 1603 | Supported | Section 16.49 | 1604 | | | 1605 | Timestamp | Section 16.51 | 1606 | | | 1607 | Via | Section 16.56 | 1608 +--------------------+--------------------+ 1610 Table 1: The general headers used in RTSP 1612 7. Request 1614 A request message uses the format outlined below regardless of the 1615 direction of a request, client to server or server to client: 1617 o Request line, containing the method to be applied to the resource, 1618 the identifier of the resource, and the protocol version in use; 1620 o Zero or more Header lines, that can be of the following types: 1621 general (Section 6), request (Section 7.2), or message 1622 body(Section 9.1); 1624 o One empty line (CRLF) to indicate the end of the header section; 1626 o Optionally a message-body, consisting of one or more lines. The 1627 length of the message body in bytes is indicated by the Content- 1628 Length message header. 1630 7.1. Request Line 1632 The request line provides the key information about the request: what 1633 method, on what resources and using which RTSP version. The methods 1634 that are defined by this specification are listed in Table 2. 1636 +---------------+--------------------+ 1637 | Method | Defined in Section | 1638 +---------------+--------------------+ 1639 | DESCRIBE | Section 13.2 | 1640 | | | 1641 | GET_PARAMETER | Section 13.8 | 1642 | | | 1643 | OPTIONS | Section 13.1 | 1644 | | | 1645 | PAUSE | Section 13.6 | 1646 | | | 1647 | PLAY | Section 13.4 | 1648 | | | 1649 | PLAY_NOTIFY | Section 13.5 | 1650 | | | 1651 | REDIRECT | Section 13.10 | 1652 | | | 1653 | SETUP | Section 13.3 | 1654 | | | 1655 | SET_PARAMETER | Section 13.9 | 1656 | | | 1657 | TEARDOWN | Section 13.7 | 1658 +---------------+--------------------+ 1660 Table 2: The RTSP Methods 1662 The syntax of the RTSP request line is the following: 1664 CRLF 1666 Note: This syntax cannot be freely changed in future versions of 1667 RTSP. This line needs to remain parsable by older RTSP 1668 implementations since it indicates the RTSP version of the message. 1670 In contrast to HTTP/1.1 [RFC2616], RTSP requests identify the 1671 resource through an absolute RTSP URI (scheme, host, and port) (see 1672 Section 4.2) rather than just the absolute path. 1674 HTTP/1.1 requires servers to understand the absolute URI, but 1675 clients are supposed to use the Host request header. This is 1676 purely needed for backward-compatibility with HTTP/1.0 servers, a 1677 consideration that does not apply to RTSP. 1679 An asterisk "*" can be used instead of an absolute URI in the 1680 Request-URI part to indicate that the request does not apply to a 1681 particular resource, but to the server or proxy itself, and is only 1682 allowed when the request method does not necessarily apply to a 1683 resource. 1685 For example: 1687 OPTIONS * RTSP/2.0 1689 An OPTIONS in this form will determine the capabilities of the server 1690 or the proxy that first receives the request. If the capability of 1691 the specific server needs to be determined, without regard to the 1692 capability of an intervening proxy, the server should be addressed 1693 explicitly with an absolute URI that contains the server's address. 1695 For example: 1697 OPTIONS rtsp://example.com RTSP/2.0 1699 7.2. Request Header Fields 1701 The RTSP headers in Table 3 can be included in a request, as request 1702 headers, to modify the specifics of the request. Some of these 1703 headers may also be used in the response to a request, as response 1704 headers, to modify the specifics of a response (Section 8.2). 1706 +--------------------+--------------------+ 1707 | Header | Defined in Section | 1708 +--------------------+--------------------+ 1709 | Accept | Section 16.1 | 1710 | | | 1711 | Accept-Credentials | Section 16.2 | 1712 | | | 1713 | Accept-Encoding | Section 16.3 | 1714 | | | 1715 | Accept-Language | Section 16.4 | 1716 | | | 1717 | Authorization | Section 16.7 | 1718 | | | 1719 | Bandwidth | Section 16.8 | 1720 | | | 1721 | Blocksize | Section 16.9 | 1722 | | | 1723 | From | Section 16.22 | 1724 | | | 1725 | If-Match | Section 16.23 | 1726 | | | 1727 | If-Modified-Since | Section 16.24 | 1728 | | | 1729 | If-None-Match | Section 16.25 | 1730 | | | 1731 | Notify-Reason | Section 16.31 | 1732 | | | 1733 | Proxy-Require | Section 16.35 | 1734 | | | 1735 | Range | Section 16.38 | 1736 | | | 1737 | Terminate-Reason | Section 16.50 | 1738 | | | 1739 | Referrer | Section 16.39 | 1740 | | | 1741 | Request-Status | Section 16.41 | 1742 | | | 1743 | Require | Section 16.42 | 1744 | | | 1745 | Scale | Section 16.44 | 1746 | | | 1747 | Session | Section 16.47 | 1748 | | | 1749 | Speed | Section 16.48 | 1750 | | | 1751 | Supported | Section 16.49 | 1752 | | | 1753 | Transport | Section 16.52 | 1754 | | | 1755 | User-Agent | Section 16.54 | 1756 +--------------------+--------------------+ 1758 Table 3: The RTSP request headers 1760 Detailed headers definition are provided in Section 16. 1762 New request headers may be defined. If the receiver of the request 1763 is required to understand the request header, the request MUST 1764 include a corresponding feature tag in a Require or Proxy-Require 1765 header to ensure the processing of the header. 1767 8. Response 1769 After receiving and interpreting a request message, the recipient 1770 responds with an RTSP response message. Normally, there is only one, 1771 final, response. It is only for responses using the response code 1772 class 1xx, that it is allowed to send one or more 1xx response 1773 messages prior to the final response message. 1775 The valid response codes and the methods they can be used with are 1776 listed in Table 4. 1778 8.1. Status-Line 1780 The first line of a Response message is the Status-Line, consisting 1781 of the protocol version followed by a numeric status code and the 1782 textual phrase associated with the status code, with each element 1783 separated by SP characters. No CR or LF is allowed except in the 1784 final CRLF sequence. 1786 SP SP CRLF 1788 8.1.1. Status Code and Reason Phrase 1790 The Status-Code element is a 3-digit integer result code of the 1791 attempt to understand and satisfy the request. These codes are fully 1792 defined in Section 15. The Reason-Phrase is intended to give a short 1793 textual description of the Status-Code. The Status-Code is intended 1794 for use by automata and the Reason-Phrase is intended for the human 1795 user. The client is not required to examine or display the Reason- 1796 Phrase. 1798 The first digit of the Status-Code defines the class of response. 1799 The last two digits do not have any categorization role. There are 5 1800 values for the first digit: 1802 1xx: Informational - Request received, continuing process 1804 2xx: Success - The action was successfully received, understood, and 1805 accepted 1807 3rr: Redirection - Further action needs to be taken in order to 1808 complete the request 1810 4xx: Client Error - The request contains bad syntax or cannot be 1811 fulfilled 1813 5xx: Server Error - The server failed to fulfill an apparently valid 1814 request 1816 The individual values of the numeric status codes defined for 1817 RTSP/2.0, and an example set of corresponding Reason-Phrases, are 1818 presented in Table 4. The reason phrases listed here are only 1819 recommended; they may be replaced by local equivalents without 1820 affecting the protocol. Note that RTSP adopts most HTTP/1.1 1821 [RFC2616] status codes and adds RTSP-specific status codes starting 1822 at x50 to avoid conflicts with newly defined HTTP status codes. 1824 RTSP status codes are extensible. RTSP applications are not required 1825 to understand the meaning of all registered status codes, though such 1826 understanding is obviously desirable. However, applications MUST 1827 understand the class of any status code, as indicated by the first 1828 digit, and treat any unrecognized response as being equivalent to the 1829 x00 status code of that class, with the exception that an 1830 unrecognized response MUST NOT be cached. For example, if an 1831 unrecognized status code of 431 is received by the client, it can 1832 safely assume that there was something wrong with its request and 1833 treat the response as if it had received a 400 status code. In such 1834 cases, user agents SHOULD present to the user the message body 1835 returned with the response, since that message body is likely to 1836 include human-readable information which will explain the unusual 1837 status. 1839 +------+----------------------------------------+-----------------+ 1840 | Code | Reason | Method | 1841 +------+----------------------------------------+-----------------+ 1842 | 100 | Continue | all | 1843 | | | | 1844 | | | | 1845 | 200 | OK | all | 1846 | | | | 1847 | | | | 1848 | 301 | Moved Permanently | all | 1849 | | | | 1850 | 302 | Found | all | 1851 | | | | 1852 | 304 | Not Modified | all | 1853 | | | | 1854 | 305 | Use Proxy | all | 1855 | | | | 1856 | | | | 1857 | 400 | Bad Request | all | 1858 | | | | 1859 | 401 | Unauthorized | all | 1860 | | | | 1861 | 402 | Payment Required | all | 1862 | | | | 1863 | 403 | Forbidden | all | 1864 | | | | 1865 | 404 | Not Found | all | 1866 | | | | 1867 | 405 | Method Not Allowed | all | 1868 | | | | 1869 | 406 | Not Acceptable | all | 1870 | | | | 1871 | 407 | Proxy Authentication Required | all | 1872 | | | | 1873 | 408 | Request Timeout | all | 1874 | | | | 1875 | 410 | Gone | all | 1876 | | | | 1877 | 411 | Length Required | all | 1878 | | | | 1879 | 412 | Precondition Failed | DESCRIBE, SETUP | 1880 | | | | 1881 | 413 | Request Message Body Too Large | all | 1882 | | | | 1883 | 414 | Request-URI Too Long | all | 1884 | | | | 1885 | 415 | Unsupported Media Type | all | 1886 | | | | 1887 | 451 | Parameter Not Understood | SET_PARAMETER | 1888 | | | | 1889 | 452 | reserved | n/a | 1890 | | | | 1891 | 453 | Not Enough Bandwidth | SETUP | 1892 | | | | 1893 | 454 | Session Not Found | all | 1894 | | | | 1895 | 455 | Method Not Valid In This State | all | 1896 | | | | 1897 | 456 | Header Field Not Valid | all | 1898 | | | | 1899 | 457 | Invalid Range | PLAY, PAUSE | 1900 | | | | 1901 | 458 | Parameter Is Read-Only | SET_PARAMETER | 1902 | | | | 1903 | 459 | Aggregate Operation Not Allowed | all | 1904 | | | | 1905 | 460 | Only Aggregate Operation Allowed | all | 1906 | | | | 1907 | 461 | Unsupported Transport | all | 1908 | | | | 1909 | 462 | Destination Unreachable | all | 1910 | | | | 1911 | 463 | Destination Prohibited | SETUP | 1912 | | | | 1913 | 464 | Data Transport Not Ready Yet | PLAY | 1914 | | | | 1915 | 465 | Notification Reason Unknown | PLAY_NOTIFY | 1916 | | | | 1917 | 470 | Connection Authorization Required | all | 1918 | | | | 1919 | 471 | Connection Credentials not accepted | all | 1920 | | | | 1921 | 472 | Failure to establish secure connection | all | 1922 | | | | 1923 | | | | 1924 | 500 | Internal Server Error | all | 1925 | | | | 1926 | 501 | Not Implemented | all | 1927 | | | | 1928 | 502 | Bad Gateway | all | 1929 | | | | 1930 | 503 | Service Unavailable | all | 1931 | | | | 1932 | 504 | Gateway Timeout | all | 1933 | | | | 1934 | 505 | RTSP Version Not Supported | all | 1935 | | | | 1936 | 551 | Option not support | all | 1937 +------+----------------------------------------+-----------------+ 1939 Table 4: Status codes and their usage with RTSP methods 1941 8.2. Response Headers 1943 The response-header allow the request recipient to pass additional 1944 information about the response which cannot be placed in the Status- 1945 Line. This header give information about the server and about 1946 further access to the resource identified by the Request-URI. All 1947 headers currently classified as response headers are listed in 1948 Table 5. 1950 +------------------------+--------------------+ 1951 | Header | Defined in Section | 1952 +------------------------+--------------------+ 1953 | Accept-Credentials | Section 16.2 | 1954 | | | 1955 | Accept-Ranges | Section 16.5 | 1956 | | | 1957 | Connection-Credentials | Section 16.12 | 1958 | | | 1959 | MTag | Section 16.30 | 1960 | | | 1961 | Location | Section 16.27 | 1962 | | | 1963 | Proxy-Authenticate | Section 16.33 | 1964 | | | 1965 | Public | Section 16.37 | 1966 | | | 1967 | Range | Section 16.38 | 1968 | | | 1969 | Retry-After | Section 16.40 | 1970 | | | 1971 | RTP-Info | Section 16.43 | 1972 | | | 1973 | Scale | Section 16.44 | 1974 | | | 1975 | Session | Section 16.47 | 1976 | | | 1977 | Server | Section 16.46 | 1978 | | | 1979 | Speed | Section 16.48 | 1980 | | | 1981 | Transport | Section 16.52 | 1982 | | | 1983 | Unsupported | Section 16.53 | 1984 | | | 1985 | Vary | Section 16.55 | 1986 | | | 1987 | WWW-Authenticate | Section 16.57 | 1988 +------------------------+--------------------+ 1990 Table 5: The RTSP response headers 1992 Response-headers names can be extended reliably only in combination 1993 with a change in the protocol version. However, the usage of 1994 feature-tags in the request allows the responding party to learn the 1995 capability of the receiver of the response. New or experimental 1996 header MAY be given the semantics of response-header if all parties 1997 in the communication recognize them to be response-header. 1999 Unrecognized headers in responses are treated as message-headers. 2001 9. Message Body 2003 Request and Response messages MAY transfer a message body, if not 2004 otherwise restricted by the request method or response status code. 2005 The message body consists of message-body header fields and an the 2006 content data itself. 2008 The SET_PARAMETER and GET_PARAMETER request and response, and 2009 DESCRIBE response MAY have an message body. All 4xx and 5xx 2010 responses MAY also have an message body. 2012 In this section, both sender and recipient refer to either the client 2013 or the server, depending on who sends and who receives the message 2014 body. 2016 9.1. Message-Body Header Fields 2018 Message-body header fields define meta-information about the content 2019 data in the message body. The message-body header fields are listed 2020 in Table 6. 2022 +------------------+--------------------+ 2023 | Header | Defined in Section | 2024 +------------------+--------------------+ 2025 | Allow | Section 16.6 | 2026 | | | 2027 | Content-Base | Section 16.13 | 2028 | | | 2029 | Content-Encoding | Section 16.14 | 2030 | | | 2031 | Content-Language | Section 16.15 | 2032 | | | 2033 | Content-Length | Section 16.16 | 2034 | | | 2035 | Content-Location | Section 16.17 | 2036 | | | 2037 | Content-Type | Section 16.18 | 2038 | | | 2039 | Expires | Section 16.21 | 2040 | | | 2041 | Last-Modified | Section 16.26 | 2042 +------------------+--------------------+ 2044 Table 6: The RTSP message-body headers 2046 The extension-header mechanism allows additional message-header 2047 fields to be defined without changing the protocol, but these fields 2048 cannot be assumed to be recognizable by the recipient. Unrecognized 2049 header fields SHOULD be ignored by the recipient and forwarded by 2050 proxies. 2052 9.2. Message Body 2054 RTSP message with an message body MUST include the Content-Type and 2055 Content-Length headers. When a message body is included with a 2056 message, the data type of that content data is determined via the 2057 header fields Content-Type and Content-Encoding. 2059 Content-Type specifies the media type of the underlying data. 2060 Content-Encoding may be used to indicate any additional content 2061 codings applied to the data, usually for the purpose of data 2062 compression, that are a property of the requested resource. There is 2063 no default encoding. 2065 The Content-Length of a message is the length of the content, 2066 measured in bytes. 2068 10. Connections 2070 RTSP requests can be transmitted using the two different connection 2071 scenarios listed below: 2073 o persistent - a transport connection is used for several request/ 2074 response transactions; 2076 o transient - a transport connection is used for a single request/ 2077 response transaction. 2079 RFC 2326 attempted to specify an optional mechanism for transmitting 2080 RTSP messages in connectionless mode over a transport protocol such 2081 as UDP. However, it was not specified in sufficient detail to allow 2082 for interoperable implementations. In an attempt to reduce 2083 complexity and scope, and due to lack of interest, RTSP 2.0 does not 2084 attempt to define a mechanism for supporting RTSP over UDP or other 2085 connectionless transport protocols. A side-effect of this is that 2086 RTSP requests MUST NOT be sent to multicast groups since no 2087 connection can be established with a specific receiver in multicast 2088 environments. 2090 Certain RTSP headers, such as the CSeq header (Section 16.19), which 2091 may appear to be relevant only to connectionless transport scenarios 2092 are still retained and must be implemented according to the 2093 specification. In the case of CSeq, it is quite useful for matching 2094 responses to requests if the requests are pipelined (see Section 12). 2095 It is also useful in proxies for keeping track of the different 2096 requests when aggregating several client requests on a single TCP 2097 connection. 2099 10.1. Reliability and Acknowledgements 2101 When RTSP messages are transmitted using reliable transport 2102 protocols, they MUST NOT be retransmitted at the RTSP protocol level. 2103 Instead, the implementation must rely on the underlying transport to 2104 provide reliability. The RTSP implementation may use any indication 2105 of reception acknowledgement of the message from the underlying 2106 transport protocols to optimize the RTSP behavior. 2108 If both the underlying reliable transport such as TCP and the RTSP 2109 application retransmit requests, each packet loss or message loss 2110 may result in two retransmissions. The receiver typically cannot 2111 take advantage of the application-layer retransmission since the 2112 transport stack will not deliver the application-layer 2113 retransmission before the first attempt has reached the receiver. 2114 If the packet loss is caused by congestion, multiple 2115 retransmissions at different layers will exacerbate the 2116 congestion. 2118 Lack of acknowledgement of an RTSP request should be handled within 2119 the constraints of the connection timeout considerations described 2120 below (Section 10.4). 2122 10.2. Using Connections 2124 A TCP transport can be used for both persistent connections (for 2125 several message exchanges) and transient connections (for a single 2126 message exchange). Implementations of this specification MUST 2127 support RTSP over TCP. The scheme of the RTSP URI (Section 4.2) 2128 indicates the default port that the server will listen on. 2130 A server MUST handle both persistent and transient connections. 2132 Transient connections facilitate mechanisms for fault tolerance. 2133 They also allow for application layer mobility. A server and 2134 client pair that support transient connections can survive the 2135 loss of a TCP connection; e.g., due to a NAT timeout. When the 2136 client has discovered that the TCP connection has been lost, it 2137 can set up a new one when there is need to communicate again. 2139 A persistent connection is RECOMMENDED to be used for all 2140 transactions between the server and client, including messages for 2141 multiple RTSP sessions. However, a persistent connection MAY be 2142 closed after a few message exchanges. For example, a client may use 2143 a persistent connection for the initial SETUP and PLAY message 2144 exchanges in a session and then close the connection. Later, when 2145 the client wishes to send a new request, such as a PAUSE for the 2146 session, a new connection would be opened. This connection may 2147 either be transient or persistent. 2149 An RTSP agent SHOULD NOT have more than one connection to the server 2150 at any given point. If a client or proxy handles multiple RTSP 2151 sessions on the same server, it SHOULD use only one connection for 2152 managing those sessions. 2154 This saves connection resources on the server. It also reduces 2155 complexity by and enabling the server to maintain less state about 2156 its sessions and connections. 2158 RTSP allows a server to send requests to a client. However, this can 2159 be supported only if a client establishes a persistent connection 2160 with the server. In cases where a persistent connection does not 2161 exist between a server and its client, due to the lack of a 2162 signalling channel the server may be forced to silently discard RTSP 2163 messages, and may even drop an RTSP session without notifying the 2164 client. An example of such a case is when the server desires to send 2165 a REDIRECT request for an RTSP session to the client but is not able 2166 to do so because it cannot reach the client. A server that attempt 2167 to send a request to a client that has no connection currently to the 2168 server SHOULD discard the request directly, it MAY queue it for later 2169 delivery. However, if the server queue the request it should when 2170 adding additional requests to the queue ensure to remove older 2171 requests that are now redundant. 2173 Without a persistent connection between the client and the server, 2174 the media server has no reliable way of reaching the client. 2175 Because the likely failure of server to client established 2176 connections the server will not even attempt establishing any 2177 connection. 2179 The sending of client and server requests can be asynchronous events. 2180 To avoid deadlock situations both client and server MUST be able to 2181 send and receive requests simultaneously. As an RTSP response may be 2182 queued up for transmission, reception or processing behind the peer 2183 RTSP agent's own requests, all RTSP agents are required to have a 2184 certain capability of handling outstanding messages. The issue is 2185 that outstanding requests may timeout despite them being processed by 2186 the peer due to the response is caught in the queue behind a number 2187 of request that the RTSP agent is processing but that take some time 2188 to complete. To avoid this problem an RTSP agent is recommended to 2189 buffer incoming messages locally so that any response messages can be 2190 processed immediately upon reception. If responses are separated 2191 from requests and directly forwarded for processing can not only the 2192 result be used immediately, the state associated with that 2193 outstanding request can also be released. However, buffering a 2194 number of requests on the receiving RTSP agent consumes resources and 2195 enables a resource exhaustion attack on the agent. Therefore this 2196 buffer should be limited so that an unreasonable number of requests 2197 or total message size is not allowed to consume the receiving agents 2198 resources. In most APIs having the receiving agent stop reading from 2199 the TCP socket will result in TCP's window being clamped. Thus 2200 forcing the buffering on the sending agent when the load is larger 2201 than expected. However, as both RTSP message sizes and frequency may 2202 be changed in the future by protocol extension an agent should be 2203 careful against taking harsher measurements against a potential 2204 attack. When under attack an RTSP agent can close TCP connections 2205 and release state associated with that TCP connection. 2207 To provide some guidance on what is reasonable the following 2208 guidelines are given. An RTSP agent should not have more than 10 2209 outstanding requests per RTSP session. An RTSP agent should not have 2210 more than 10 outstanding requests that aren't related to an RTSP 2211 session or that are requesting to create an RTSP session. 2213 In light of the above, it is RECOMMENDED that clients use persistent 2214 connections whenever possible. A client that supports persistent 2215 connections MAY "pipeline" its requests (see Section 12). 2217 10.3. Closing Connections 2219 The client MAY close a connection at any point when no outstanding 2220 request/response transactions exist for any RTSP session being 2221 managed through the connection. The server, however, SHOULD NOT 2222 close a connection until all RTSP sessions being managed through the 2223 connection have been timed out (Section 16.47). A server SHOULD NOT 2224 close a connection immediately after responding to a session-level 2225 TEARDOWN request for the last RTSP session being controlled through 2226 the connection. Instead, it should wait for a reasonable amount of 2227 time for the client to receive the TEARDOWN response, take 2228 appropriate action, and initiate the connection closing. The server 2229 SHOULD wait at least 10 seconds after sending the TEARDOWN response 2230 before closing the connection. 2232 This is to ensure that the client has time to issue a SETUP for a 2233 new session on the existing connection after having torn the last 2234 one down. 10 seconds should give the client ample opportunity to 2235 get its message to the server. 2237 A server SHOULD NOT close the connection directly as a result of 2238 responding to a request with an error code. 2240 Certain error responses such as "460 Only Aggregate Operation 2241 Allowed" (Section 15.4.25) are used for negotiating capabilities 2242 of a server with respect to content or other factors. In such 2243 cases, it is inefficient for the server to close a connection on 2244 an error response. Also, such behavior would prevent 2245 implementation of advanced/special types of requests or result in 2246 extra overhead for the client when testing for new features. On 2247 the flip side, keeping connections open after sending an error 2248 response poses a Denial of Service security risk (Section 21). 2250 If a server closes a connection while the client is attempting to 2251 send a new request, the client will have to close its current 2252 connection, establish a new connection and send its request over the 2253 new connection. 2255 An RTSP message should not be terminated by closing the connection. 2256 Such a message MAY be considered to be incomplete by the receiver and 2257 discarded. An RTSP message is properly terminated as defined in 2258 Section 5. 2260 10.4. Timing Out Connections and RTSP Messages 2262 Receivers of a request (responder) SHOULD respond to requests in a 2263 timely manner even when a reliable transport such as TCP is used. 2264 Similarly, the sender of a request (requester) SHOULD wait for a 2265 sufficient time for a response before concluding that the responder 2266 will not be acting upon its request. 2268 A responder SHOULD respond to all requests within 5 seconds. If the 2269 responder recognizes that processing of a request will take longer 2270 than 5 seconds, it SHOULD send a 100 (Continue) response as soon as 2271 possible. It SHOULD continue sending a 100 response every 5 seconds 2272 thereafter until it is ready to send the final response to the 2273 requester. After sending a 100 response, the receiver MUST send a 2274 final response indicating the success or failure of the request. 2276 A requester SHOULD wait at least 10 seconds for a response before 2277 concluding that the responder will not be responding to its request. 2278 After receiving a 100 response, the requester SHOULD continue waiting 2279 for further responses. If more than 10 seconds elapses without 2280 receiving any response, the requester MAY assume that the responder 2281 is unresponsive and abort the connection. 2283 A requester SHOULD wait longer than 10 seconds for a response if it 2284 is experiencing significant transport delays on its connection to the 2285 responder. The requester is capable of determining the RTT of the 2286 request/response cycle using the Timestamp header (Section 16.51) in 2287 any RTSP request. 2289 10 seconds was chosen for the following reasons. It gives TCP 2290 time to perform a couple of retransmissions, even if operating on 2291 default values. It is short enough that users may not abandon the 2292 process themselves. However, it should be noted that 10 seconds 2293 can be aggressive on certain type of networks. The 5 seconds 2294 value for 1xx messages is half the timeout giving a reasonable 2295 change of successful delivery before timeout happens on the 2296 requestor side. 2298 10.5. Showing Liveness 2300 The mechanisms for showing liveness of the client is, any RTSP 2301 request with a Session header, if RTP & RTCP is used an RTCP message, 2302 or through any other used media protocol capable of indicating 2303 liveness of the RTSP client. It is RECOMMENDED that a client does 2304 not wait to the last second of the timeout before trying to send a 2305 liveness message. The RTSP message may be lost or when using 2306 reliable protocols, such as TCP, the message may take some time to 2307 arrive safely at the receiver. To show liveness between RTSP request 2308 issued to accomplish other things, the following mechanisms can be 2309 used, in descending order of preference: 2311 RTCP: If RTP is used for media transport RTCP SHOULD be used. If 2312 RTCP is used to report transport statistics, it MUST also work 2313 as keep alive. The server can determine the client by used 2314 network address and port together with the fact that the client 2315 is reporting on the servers SSRC(s). A downside of using RTCP 2316 is that it only gives statistical guarantees to reach the 2317 server. However, that probability is so low that it can be 2318 ignored in most cases. For example, a session with 60 seconds 2319 timeout and enough bitrate assigned to RTCP messages to send a 2320 message from client to server on average every 5 seconds. That 2321 client have for a network with 5 % packet loss, the probability 2322 to fail showing liveness sign in that session within the 2323 timeout interval of 2.4*E-16. In sessions with shorter timeout 2324 times, or much higher packet loss, or small RTCP bandwidths 2325 SHOULD also use any of the mechanisms below. 2327 SET_PARAMETER: When using SET_PARAMETER for keep alive, no body 2328 SHOULD be included. This method is the RECOMMENDED RTSP method 2329 to use in request only intended to perform keep-alive. 2331 OPTIONS: This method is also usable, but it causes the server to 2332 perform more unnecessary processing and result in bigger 2333 responses than necessary for the task. The reason is that the 2334 server needs to determine the capabilities associated with the 2335 media resource to correctly populate the Public and Allow 2336 headers. 2338 The timeout parameter MAY be included in a SETUP response, and MUST 2339 NOT be included in requests. The server uses it to indicate to the 2340 client how long the server is prepared to wait between RTSP commands 2341 or other signs of life before closing the session due to lack of 2342 activity (see below and Appendix B). The timeout is measured in 2343 seconds, with a default of 60 seconds. The length of the session 2344 timeout MUST NOT be changed in an established session. 2346 10.6. Use of IPv6 2348 Explicit IPv6 support was not present in RTSP 1.0 (RFC 2326). RTSP 2349 2.0 has been updated for explicit IPv6 support. Implementations of 2350 RTSP 2.0 MUST understand literal IPv6 addresses in URIs and headers. 2352 11. Capability Handling 2354 This section describes the available capability handling mechanism 2355 which allows RTSP to be extended. Extensions to this version of the 2356 protocol are basically done in two ways. First, new headers can be 2357 added. Secondly, new methods can be added. The capability handling 2358 mechanism is designed to handle both cases. 2360 When a method is added, the involved parties can use the OPTIONS 2361 method to discover whether it is supported. This is done by issuing 2362 a OPTIONS request to the other party. Depending on the URI it will 2363 either apply in regards to a certain media resource, the whole server 2364 in general, or simply the next hop. The OPTIONS response MUST 2365 contain a Public header which declares all methods supported for the 2366 indicated resource. 2368 It is not necessary to use OPTIONS to discover support of a method, 2369 the client could simply try the method. If the receiver of the 2370 request does not support the method it will respond with an error 2371 code indicating the method is either not implemented (501) or does 2372 not apply for the resource (405). The choice between the two 2373 discovery methods depends on the requirements of the service. 2375 Feature-Tags are defined to handle functionality additions that are 2376 not new methods. Each feature-tag represents a certain block of 2377 functionality. The amount of functionality that a feature-tag 2378 represents can vary significantly. A feature-tag can for example 2379 represent the functionality a single RTSP header provides. Another 2380 feature-tag can represent much more functionality, such as the 2381 "play.basic" feature-tag which represents the minimal media delivery 2382 for playback implementation. 2384 Feature-tags are used to determine whether the client, server or 2385 proxy supports the functionality that is necessary to achieve the 2386 desired service. To determine support of a feature-tag, several 2387 different headers can be used, each explained below: 2389 Supported: This header is used to determine the complete set of 2390 functionality that both client and server have. The intended 2391 usage is to determine before one needs to use a functionality 2392 that it is supported. It can be used in any method, however, 2393 OPTIONS is the most suitable one as it at the same time 2394 determines all methods that are implemented. When sending a 2395 request the requester declares all its capabilities by 2396 including all supported feature-tags. This results in that the 2397 receiver learns the requesters feature support. The receiver 2398 then includes its set of features in the response. 2400 Proxy-Supported: This header is used similar to the Supported 2401 header, but instead of giving the supported functionality of 2402 the client or server it provides both the requester and the 2403 responder a view of what functionality the proxy chain between 2404 the two supports. Proxies are required to add this header 2405 whenever the Supported header is present, but proxies may 2406 independently of the requester add it. 2408 Require: The header can be included in any request where the end- 2409 point, i.e. the client or server, is required to understand the 2410 feature to correctly perform the request. This can, for 2411 example, be a SETUP request where the server is required to 2412 understand a certain parameter to be able to set up the media 2413 delivery correctly. Ignoring this parameter would not have the 2414 desired effect and is not acceptable. Therefore the end-point 2415 receiving a request containing a Require MUST negatively 2416 acknowledge any feature that it does not understand and not 2417 perform the request. The response in cases where features are 2418 not supported are 551 (Option Not Supported). Also the 2419 features that are not supported are given in the Unsupported 2420 header in the response. 2422 Proxy-Require: This header has the same purpose and workings as 2423 Require except that it only applies to proxies and not the end- 2424 point. Features that needs to be supported by both proxies and 2425 end-point needs to be included in both the Require and Proxy- 2426 Require header. 2428 Unsupported: This header is used in a 551 error response, to 2429 indicate which features were not supported. Such a response is 2430 only the result of the usage of the Require and/or Proxy- 2431 Require header where one or more feature where not supported. 2432 This information allows the requester to make the best of 2433 situations as it knows which features are not supported. 2435 12. Pipelining Support 2437 Pipelining is a general method to improve performance of request 2438 response protocols by allowing the requesting entity to have more 2439 than one request outstanding and send them over the same persistent 2440 connection. For RTSP, where the relative order of requests will 2441 matter, it is important to maintain the order of the requests. 2442 Because of this, the responding entity MUST process the incoming 2443 requests in their sending order. The sending order can be determined 2444 by the CSeq header and its sequence number. For TCP the delivery 2445 order will be the same as the sending order. The processing of the 2446 request MUST also have been finished before processing the next 2447 request from the same entity. The responses MUST be sent in the 2448 order the requests was processed. 2450 RTSP 2.0 has extended support for pipelining compared to RTSP 1.0. 2451 The major improvement is to allow all requests to setup and initiate 2452 media delivery to be pipelined after each other. This is 2453 accomplished by the utilization of the Pipelined-Requests header (see 2454 Section 16.32). This header allows a client to request that two or 2455 more requests are processed in the same RTSP session context which 2456 the first request creates. In other words, a client can request that 2457 two or more media streams are set-up and then played without needing 2458 to wait for a single response. This speeds up the initial startup 2459 time for an RTSP session with at least one RTT. 2461 If a pipelined request builds on the successful completion of one or 2462 more prior requests the requester must verify that all requests were 2463 executed as expected. A common example will be two SETUP requests 2464 and a PLAY request. In case one of the SETUP fails unexpectedly, the 2465 PLAY request can still be successfully executed. However, not as 2466 expected by the requesting client as only a single media instead of 2467 two will be played. In this case the client can send a PAUSE 2468 request, correct the failing SETUP request and then request it to be 2469 played. 2471 13. Method Definitions 2473 The method indicates what is to be performed on the resource 2474 identified by the Request-URI. The method name is case-sensitive. 2475 New methods may be defined in the future. Method names MUST NOT 2476 start with a $ character (decimal 24) and MUST be a token as defined 2477 by the ABNF [RFC5234] in the syntax chapter Section 20. The methods 2478 are summarized in Table 7. 2480 +---------------+-----------+--------+--------------+---------------+ 2481 | method | direction | object | Server req. | Client req. | 2482 +---------------+-----------+--------+--------------+---------------+ 2483 | DESCRIBE | C -> S | P,S | recommended | recommended | 2484 | | | | | | 2485 | GET_PARAMETER | C -> S | P,S | optional | optional | 2486 | | | | | | 2487 | | S -> C | | | | 2488 | | | | | | 2489 | OPTIONS | C -> S | P,S | R=Req, | Sd=Req, R=Opt | 2490 | | | | Sd=Opt | | 2491 | | | | | | 2492 | | S -> C | | | | 2493 | | | | | | 2494 | PAUSE | C -> S | P,S | required | required | 2495 | | | | | | 2496 | PLAY | C -> S | P,S | required | required | 2497 | | | | | | 2498 | PLAY_NOTIFY | S -> C | P,S | required | required | 2499 | | | | | | 2500 | REDIRECT | S -> C | P,S | optional | required | 2501 | | | | | | 2502 | SETUP | C -> S | S | required | required | 2503 | | | | | | 2504 | SET_PARAMETER | C -> S | P,S | required | optional | 2505 | | | | | | 2506 | | S -> C | | | | 2507 | | | | | | 2508 | TEARDOWN | C -> S | P,S | required | required | 2509 | | | | | | 2510 | | S -> C | | required | required | 2511 +---------------+-----------+--------+--------------+---------------+ 2513 Table 7: Overview of RTSP methods, their direction, and what objects 2514 (P: presentation, S: stream) they operate on. Legend: R=Respond, 2515 Sd=Send, Opt: Optional, Req: Required 2517 Note on Table 7: GET_PARAMETER is recommended, but not required. 2518 For example, a fully functional server can be built to deliver 2519 media without any parameters. SET_PARAMETER is required, however, 2520 due to its usage for keep-alive. PAUSE is now required due to 2521 that it is the only way of getting out of the state machines play 2522 state without terminating the whole session. 2524 If an RTSP agent does not support a particular method, it MUST return 2525 501 (Not Implemented) and the requesting RTSP agent, in turn, SHOULD 2526 NOT try this method again for the given agent / resource combination. 2527 An RTSP proxy who's main function is to log or audit and not modify 2528 transport or media handling in any way MAY forward RTSP messages with 2529 unknown methods. Note, the proxy still needs to perform the minimal 2530 required processing, like adding the Via header. 2532 13.1. OPTIONS 2534 The semantics of the RTSP OPTIONS method is similar to that of the 2535 HTTP OPTIONS method described in [H9.2]. In RTSP however, OPTIONS is 2536 bi-directional, in that a client can request it to a server and vice 2537 versa. A client MUST implement the capability to send an OPTIONS 2538 request and a server or a proxy MUST implement the capability to 2539 respond to an OPTIONS request. The client, server or proxy MAY also 2540 implement the converse of their required capability. 2542 An OPTIONS request may be issued at any time. Such a request does 2543 not modify the session state. However, it may prolong the session 2544 lifespan (see below). The URI in an OPTIONS request determines the 2545 scope of the request and the corresponding response. If the Request- 2546 URI refers to a specific media resource on a given host, the scope is 2547 limited to the set of methods supported for that media resource by 2548 the indicated RTSP agent. A Request-URI with only the host address 2549 limits the scope to the specified RTSP agent's general capabilities 2550 without regard to any specific media. If the Request-URI is an 2551 asterisk ("*"), the scope is limited to the general capabilities of 2552 the next hop (i.e. the RTSP agent in direct communication with the 2553 request sender). 2555 Regardless of scope of the request, the Public header MUST always be 2556 included in the OPTIONS response listing the methods that are 2557 supported by the responding RTSP agent. In addition, if the scope of 2558 the request is limited to a media resource, the Allow header MUST be 2559 included in the response to enumerate the set of methods that are 2560 allowed for that resource unless the set of methods completely 2561 matches the set in the Public header. If the given resource is not 2562 available, the RTSP agent SHOULD return an appropriate response code 2563 such as 3rr or 4xx. The Supported header MAY be included in the 2564 request to query the set of features that are supported by the 2565 responding RTSP agent. 2567 The OPTIONS method can be used to keep an RTSP session alive. 2568 However, it is not the preferred means of session keep-alive 2569 signalling, see Section 16.47. An OPTIONS request intended for 2570 keeping alive an RTSP session MUST include the Session header with 2571 the associated session ID. Such a request SHOULD also use the media 2572 or the aggregated control URI as the Request-URI. 2574 Example: 2576 C->S: OPTIONS * RTSP/2.0 2577 CSeq: 1 2578 User-Agent: PhonyClient/1.2 2579 Require: 2580 Proxy-Require: gzipped-messages 2581 Supported: play.basic 2583 S->C: RTSP/2.0 200 OK 2584 CSeq: 1 2585 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE 2586 Supported: play.basic, implicit-play, gzipped-messages 2587 Server: PhonyServer/1.1 2589 Note that some of the feature-tags in Require and Proxy-Require are 2590 fictional features. 2592 13.2. DESCRIBE 2594 The DESCRIBE method is used to retrieve the description of a 2595 presentation or media object from a server. The Request-URI of the 2596 DESCRIBE request identifies the media resource of interest. The 2597 client MAY include the Accept header in the request to list the 2598 description formats that it understands. The server MUST respond 2599 with a description of the requested resource and return the 2600 description in the message body of the response. The DESCRIBE reply- 2601 response pair constitutes the media initialization phase of RTSP. 2603 Example: 2605 C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/2.0 2606 CSeq: 312 2607 User-Agent: PhonyClient 1.2 2608 Accept: application/sdp, application/example 2610 S->C: RTSP/2.0 200 OK 2611 CSeq: 312 2612 Date: Thu, 23 Jan 1997 15:35:06 GMT 2613 Server: PhonyServer 1.1 2614 Content-Base: rtsp://server.example.com/fizzle/foo/ 2615 Content-Type: application/sdp 2616 Content-Length: 358 2618 v=0 2619 o=mhandley 2890844526 2890842807 IN IP4 192.0.2.46 2620 s=SDP Seminar 2621 i=A Seminar on the session description protocol 2622 u=http://www.example.com/lectures/sdp.ps 2623 e=seminar@example.com (Seminar Management) 2624 c=IN IP4 0.0.0.0 2625 a=control:* 2626 t=2873397496 2873404696 2627 m=audio 3456 RTP/AVP 0 2628 a=control:audio 2629 m=video 2232 RTP/AVP 31 2630 a=control:video 2632 The DESCRIBE response SHOULD contain all media initialization 2633 information for the resource(s) that it describes. Servers SHOULD 2634 NOT use the DESCRIBE response as a means of media indirection by 2635 having the description point at another server, instead usage of 3rr 2636 responses are recommended. 2638 By forcing a DESCRIBE response to contain all media initialization 2639 for the set of streams that it describes, and discouraging the use 2640 of DESCRIBE for media indirection, any looping problems can be 2641 avoided that might have resulted from other approaches. 2643 Media initialization is a requirement for any RTSP-based system, but 2644 the RTSP specification does not dictate that this is required to be 2645 done via the DESCRIBE method. There are three ways that an RTSP 2646 client may receive initialization information: 2648 o via an RTSP DESCRIBE request 2650 o via some other protocol (HTTP, email attachment, etc.) 2651 o via some form of user interface 2653 If a client obtains a valid description from an alternate source, the 2654 client MAY use this description for initialization purposes without 2655 issuing a DESCRIBE request for the same media. 2657 It is RECOMMENDED that minimal servers support the DESCRIBE method, 2658 and highly recommended that minimal clients support the ability to 2659 act as "helper applications" that accept a media initialization file 2660 from a user interface, and/or other means that are appropriate to the 2661 operating environment of the clients. 2663 13.3. SETUP 2665 The SETUP request for an URI specifies the transport mechanism to be 2666 used for the streamed media. The SETUP method may be used in two 2667 different cases; Create an RTSP session and change the transport 2668 parameters of already set up media stream. SETUP can be used in all 2669 three states; INIT, and READY, for both purposes and in PLAY to 2670 change the transport parameters. There is also a third possible 2671 usage for the SETUP method which is not specified in this memo: 2672 adding a media to a session. Using SETUP to add media to an existing 2673 session, when the session is in PLAY state, is unspecified. 2675 The Transport header, see Section 16.52, specifies the media 2676 transport parameters acceptable to the client for data transmission; 2677 the response will contain the transport parameters selected by the 2678 server. This allows the client to enumerate in descending order of 2679 preference the transport mechanisms and parameters acceptable to it, 2680 while the server can select the most appropriate. It is expected 2681 that the session description format used will enable the client to 2682 select a limited number possible configurations that are offered to 2683 the server to choose from. All transport related parameters shall be 2684 included in the Transport header, the use of other headers for this 2685 purpose is discouraged due to middleboxes, such as firewalls or NATs. 2687 For the benefit of any intervening firewalls, a client MUST indicate 2688 the known transport parameters, even if it has no influence over 2689 these parameters, for example, where the server advertises a fixed 2690 multicast address as destination. 2692 Since SETUP includes all transport initialization information, 2693 firewalls and other intermediate network devices (which need this 2694 information) are spared the more arduous task of parsing the 2695 DESCRIBE response, which has been reserved for media 2696 initialization. 2698 The client MUST include the Accept-Ranges header in the request 2699 indicating all supported unit formats in the Range header. This 2700 allows the server to know which format it may use in future session 2701 related responses, such as PLAY response without any range in the 2702 request. If the client does not support a time format necessary for 2703 the presentation the server MUST respond using 456 (Header Field Not 2704 Valid for Resource) and include the Accept-Ranges header with the 2705 range unit formats supported for the resource. 2707 In a SETUP response the server MUST include the Accept-Ranges header 2708 (see Section 16.5) to indicate which time formats that are acceptable 2709 to use for this media resource. 2711 The SETUP response 200 OK MUST include the Media-Properties header 2712 (see Section 16.28 ). The combination of the parameters of the 2713 Media-Properties header indicate the nature of the content present in 2714 the session (see also Section 4.9). For example, a live stream with 2715 time shifting is indicated by 2717 o Random Access set to Random-Access, 2719 o Content Modifications set to Time Progressing, 2721 o Retention set to Time-Duration (with specific recording window 2722 time value). 2724 The SETUP response 200 OK MUST include the Media-Range header (see 2725 Section 16.29) if the media is Time-Progressing. 2727 A basic example for SETUP: 2729 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/2.0 2730 CSeq: 302 2731 Transport: RTP/AVP;unicast;dest_addr=":4588"/":4589", 2732 RTP/AVP/TCP;unicast;interleaved=0-1 2733 Accept-Ranges: NPT, UTC 2734 User-Agent: PhonyClient/1.2 2736 S->C: RTSP/2.0 200 OK 2737 CSeq: 302 2738 Date: Thu, 23 Jan 1997 15:35:06 GMT 2739 Server: PhonyServer 1.1 2740 Session: 47112344;timeout=60 2741 Transport: RTP/AVP;unicast;dest_addr="192.0.2.53:4588"/ 2742 "192.0.2.53:4589"; src_addr="192.0.2.241:6256"/ 2743 "192.0.2.241:6257"; ssrc=2A3F93ED 2744 Accept-Ranges: NPT 2745 Media-Properties: Random-Access=3.2, Time-Progressing, 2746 Time-Duration=3600.0 2748 Media-Range: npt=0-2893.23 2750 In the above example the client wants to create an RTSP session 2751 containing the media resource "rtsp://example.com/foo/bar/baz.rm". 2752 The transport parameters acceptable to the client is either RTP/AVP/ 2753 UDP (UDP per default) to be received on client port 4588 and 4589 or 2754 RTP/AVP interleaved on the RTSP control channel. The server selects 2755 the RTP/AVP/UDP transport and adds the ports it will send and 2756 received RTP and RTCP from, and the RTP SSRC that will be used by the 2757 server. 2759 The server MUST generate a session identifier in response to a 2760 successful SETUP request, unless a SETUP request to a server includes 2761 a session identifier, in which case the server MUST bundle this setup 2762 request into the existing session (aggregated session) or return 2763 error 459 (Aggregate Operation Not Allowed) (see Section 15.4.24). 2764 An Aggregate control URI MUST be used to control an aggregated 2765 session. This URI MUST be different from the stream control URIs of 2766 the individual media streams included in the aggregate. The 2767 Aggregate control URI is to be specified by the session description 2768 if the server supports aggregated control and aggregated control is 2769 desired for the session. However, even if aggregated control is 2770 offered the client MAY chose to not set up the session in aggregated 2771 control. If an Aggregate control URI is not specified in the session 2772 description, it is normally an indication that non-aggregated control 2773 should be used. The SETUP of media streams in an aggregate which has 2774 not been given an aggregated control URI is unspecified. 2776 While the session ID sometimes carries enough information for 2777 aggregate control of a session, the Aggregate control URI is still 2778 important for some methods such as SET_PARAMETER where the control 2779 URI enables the resource in question to be easily identified. The 2780 Aggregate control URI is also useful for proxies, enabling them to 2781 route the request to the appropriate server, and for logging, 2782 where it is useful to note the actual resource that a request was 2783 operating on. 2785 A session will exist until it is either removed by a TEARDOWN request 2786 or is timed-out by the server. The server MAY remove a session that 2787 has not demonstrated liveness signs from the client(s) within a 2788 certain timeout period. The default timeout value is 60 seconds; the 2789 server MAY set this to a different value and indicate so in the 2790 timeout field of the Session header in the SETUP response. For 2791 further discussion see Section 16.47. Signs of liveness for an RTSP 2792 session are: 2794 o Any RTSP request from a client(s) which includes a Session header 2795 with that session's ID. 2797 o If RTP is used as a transport for the underlying media streams, an 2798 RTCP sender or receiver report from the client(s) for any of the 2799 media streams in that RTSP session. RTCP Sender Reports may for 2800 example be received in sessions where the server is invited into a 2801 conference session and is as valid for keep-alive. 2803 If a SETUP request on a session fails for any reason, the session 2804 state, as well as transport and other parameters for associated 2805 streams MUST remain unchanged from their values as if the SETUP 2806 request had never been received by the server. 2808 13.3.1. Changing Transport Parameters 2810 A client MAY issue a SETUP request for a stream that is already set 2811 up or playing in the session to change transport parameters, which a 2812 server MAY allow. If it does not allow changing of parameters, it 2813 MUST respond with error 455 (Method Not Valid In This State). 2814 Reasons to support changing transport parameters, is to allow for 2815 application layer mobility and flexibility to utilize the best 2816 available transport as it becomes available. If a client receives a 2817 455 when trying to change transport parameters while the server is in 2818 play state, it MAY try to put the server in ready state using PAUSE, 2819 before issuing the SETUP request again. If also that fails the 2820 changing of transport parameters will require that the client 2821 performs a TEARDOWN of the affected media and then setting it up 2822 again. In aggregated session avoiding tearing down all the media at 2823 the same time will avoid the creation of a new session. 2825 All transport parameters MAY be changed. However, the primary usage 2826 expected is to either change transport protocol completely, like 2827 switching from Interleaved TCP mode to UDP or vice versa or change 2828 delivery address. 2830 In a SETUP response for a request to change the transport parameters 2831 while in Play state, the server MUST include the Range to indicate 2832 from what point the new transport parameters are used. Further, if 2833 RTP is used for delivery, the server MUST also include the RTP-Info 2834 header to indicate from what timestamp and RTP sequence number the 2835 change has taken place. If both RTP-Info and Range is included in 2836 the response the "rtp_time" parameter and start point in the Range 2837 header MUST be for the corresponding time, i.e. be used in the same 2838 way as for PLAY to ensure the correct synchronization information is 2839 available. 2841 If the transport parameters change while in PLAY state results in a 2842 change of synchronization related information, for example changing 2843 RTP SSRC, the server MUST provide in the SETUP response the necessary 2844 synchronization information. However, the server is RECOMMENDED to 2845 avoid changing the synchronization information if possible. 2847 13.4. PLAY 2849 This section describes the usage of the PLAY method in general, for 2850 aggregated sessions, and in different usage scenarios. 2852 13.4.1. General Usage 2854 The PLAY method tells the server to start sending data via the 2855 mechanism specified in SETUP and which part of the media should be 2856 played out. PLAY requests are valid when the session is in READY or 2857 PLAY states. A PLAY request MUST include a Session header to 2858 indicate which session the request applies to. 2860 Upon receipt of the PLAY request, the server MUST position the normal 2861 play time to the beginning of the range specified in the received 2862 Range header and deliver stream data until the end of the range if 2863 given, or until a new PLAY request is received, else to the end of 2864 the media is reached. If no Range header is present in the PLAY 2865 request the server shall play from current pause point until the end 2866 of media. The pause point defaults at session start to the beginning 2867 of the media. For media that is time-progressing and has no 2868 retention, the pause point will always be set equal to NPT "now", 2869 i.e. current delivery point. The pause point may also be set to a 2870 particular point in the media by the PAUSE method, see Section 13.6. 2871 The pause point for media that is currently playing is equal to the 2872 current media position. For time-progressing media with time-limited 2873 retention, if the pause point represents a position that is older 2874 than what is retained by the server, the pause point will be moved to 2875 the oldest retained. 2877 What range values are valid depends on the type of content. For 2878 content that isn't time progressing the range value is valid if the 2879 given range is part of any media within the aggregate. In other 2880 words the valid media range for the aggregate is the union of all of 2881 the media components in the aggregate. If a given range value points 2882 outside of the media, the response MUST be the 457 (Invalid Range) 2883 error code and include the Media-Range header (Section 16.29) with 2884 the valid range for the media. Except for time progressing content 2885 where the client request a start point prior to what is retained, the 2886 start point is adjusted to the oldest retained content. For a start 2887 point that is beyond the media front edge, i.e. beyond the current 2888 value for "now", the server shall adjust the start value to the 2889 current front edge. The Range headers end point value may point 2890 beyond the current media edge. In that case, the server shall 2891 deliver media from the requested (and possibly adjusted) start point 2892 until the provided end-point, or the end of the media is reached 2893 prior to the specified stop point. Please note that if one simply 2894 want to play from a particular start point until the end of media 2895 using an Range header with an implicit stop point is recommended. 2897 If a client request starting playing media at the end-point either 2898 explicitly with a Range header or implicit by having a pause point 2899 that is at the end of the media, a 457 (Invalid Range) error MUST be 2900 sent and include the Media-Range header (Section 16.29). Below is 2901 specified that the Range header also must be included, and will in 2902 the case of Ready-State carry the pause point. Note that this also 2903 applies if the pause point or requested start point is at the 2904 begining of the media and a Scale header (Section 16.44) is included 2905 with a negative value (playing backwards). 2907 For media with random access properties a client may express its 2908 preference on which policy for start point selection the server shall 2909 use. This is done by including the Seek-Style header (Section 16.45) 2910 in the PLAY request. 2912 A client desiring to play the media from the beginning MUST send a 2913 PLAY request with a Range header pointing at the beginning, e.g. 2914 npt=0-. If a PLAY request is received without a Range header and 2915 media delivery has stopped at the end, the server SHOULD respond with 2916 a 457 "Invalid Range" error response. In that response, the current 2917 pause point MUST be included in a Range header. 2919 All range specifiers in this specification allow for ranges with 2920 implicit start point (e.g. "npt=-30"). When used in a PLAY request, 2921 the server treats this as a request to start/resume delivery from the 2922 current pause point, ending at the end time specified in the Range 2923 header. If the pause point is located later than the given end 2924 value, a 457 (Invalid Range) response MUST be given. 2926 The example below will play seconds 10 through 25. It also request 2927 the server to deliver media from the first Random Access Point prior 2928 to the indicated start point. 2930 C->S: PLAY rtsp://audio.example.com/audio RTSP/2.0 2931 CSeq: 835 2932 Session: 12345678 2933 Range: npt=10-25 2934 Seek-Style: RAP 2935 User-Agent: PhonyClient/1.2 2937 Servers MUST include a "Range" header in any PLAY response, even if 2938 no Range header was present in the request. The response MUST use 2939 the same format as the request's range header contained. If no Range 2940 header was in the request, the format used in any previous PLAY 2941 request within the session SHOULD be used. If no format has been 2942 indicated in a previous request the server MAY use any time format 2943 supported by the media and indicated in the Accept-Ranges header in 2944 the SETUP response. It is RECOMMENDED that NPT is used if supported 2945 by the media. 2947 For any error response to a PLAY request, the server's response 2948 depends on the current session state. If the session is in ready 2949 state, the current pause-point is returned using Range header with 2950 the pause point as the explicit start-point and an implicit end- 2951 point. For time-progressing content where the pause-point moves with 2952 real-time due to limited retention, the current pause point is 2953 returned. For sessions in playing state, the current playout point 2954 and the remaining parts of the range request is returned. For any 2955 media with retention longer than 0 seconds the currently valid Media- 2956 Range header shall also be included in the response. 2958 A PLAY response MAY include a header(s) carrying synchronization 2959 information. As the information necessary is dependent on the media 2960 transport format, further rules specifying the header and its usage 2961 is needed. For RTP the RTP-Info header is specified, see 2962 Section 16.43, and used in the following example. 2964 Here is a simple example for a single audio stream where the client 2965 requests the media starting from 3.52 seconds and to the end. The 2966 server sends a 200 OK response with the actual play time which is 10 2967 ms prior (3.51) and the RTP-Info header that contains the necessary 2968 parameters for the RTP stack. 2969 C->S: PLAY rtsp://example.com/audio RTSP/2.0 2970 CSeq: 836 2971 Session: 12345678 2972 Range: npt=3.52- 2973 User-Agent: PhonyClient/1.2 2975 S->C: RTSP/2.0 200 OK 2976 CSeq: 836 2977 Date: Thu, 23 Jan 1997 15:35:06 GMT 2978 Server: PhonyServer 1.0 2979 Range: npt=3.51-324.39 2980 Seek-Style: First-Prior 2981 RTP-Info:url="rtsp://example.com/audio" 2982 ssrc=0D12F123:seq=14783;rtptime=2345962545 2984 S->C: RTP Packet TS=2345962545 => NPT=3.51 2985 Media duration=0.16 seconds 2987 The server reply with the actual start point that will be delivered. 2988 This may differ from the requested range if alignment of the 2989 requested range to valid frame boundaries is required for the media 2990 source. Note that some media streams in an aggregate may need to be 2991 delivered from even earlier points. Also, some media format have a 2992 very long duration per individual data unit, therefore it might be 2993 necessary for the client to parse the data unit, and select where to 2994 start. The server shall also indicate which policy it uses for 2995 selecting the actual start point by including a Seek-Style header. 2997 In the following example the client receives the first media packet 2998 that stretches all the way up and past the requested playtime. Thus, 2999 it is the client's decision if to render to the user the time between 3000 3.52 and 7.05, or to skip it. In most cases it is probably most 3001 suitable not to render that time period. 3002 C->S: PLAY rtsp://example.com/audio RTSP/2.0 3003 CSeq: 836 3004 Session: 12345678 3005 Range: npt=7.05- User-Agent: PhonyClient/1.2 3007 S->C: RTSP/2.0 200 OK 3008 CSeq: 836 3009 Date: Thu, 23 Jan 1997 15:35:06 GMT 3010 Server: PhonyServer 1.0 3011 Range: npt=3.52- 3012 Seek-Style: First-Prior 3013 RTP-Info:url="rtsp://example.com/audio" 3014 ssrc=0D12F123:seq=14783;rtptime=2345962545 3016 S->C: RTP Packet TS=2345962545 => NPT=3.52 3017 Duration=4.15 seconds 3019 After playing the desired range, the presentation does NOT transition 3020 to the READY state, media delivery simply stops. A PAUSE request 3021 MUST be issued before the stream enters the READY state. A PLAY 3022 request while the stream is still in the PLAYING state is legal, and 3023 can be issued without an intervening PAUSE request. Such a request 3024 MUST replace the current PLAY action with the new one requested, i.e. 3025 being handle the same as the request was received in ready state. In 3026 the case the range in Range header has a implicit start time 3027 (-endtime), the server MUST continue to play from where it currently 3028 was until the specified end point. This is useful to change end at 3029 another point than in the previous request. 3031 The following example plays the whole presentation starting at SMPTE 3032 time code 0:10:20 until the end of the clip. Note: The RTP-Info 3033 headers has been broken into several lines, where following lines 3034 start with whitespace as allowed by the syntax. 3036 C->S: PLAY rtsp://audio.example.com/twister.en RTSP/2.0 3037 CSeq: 833 3038 Session: 12345678 3039 Range: smpte=0:10:20- 3040 User-Agent: PhonyClient/1.2 3042 S->C: RTSP/2.0 200 OK 3043 CSeq: 833 3044 Date: Thu, 23 Jan 1997 15:35:06 GMT 3045 Server: PhonyServer 1.0 3046 Range: smpte=0:10:22-0:15:45 3047 Seek-Style: Next 3048 RTP-Info:url="rtsp://example.com/twister.en" 3049 ssrc=0D12F123:seq=14783;rtptime=2345962545 3051 For playing back a recording of a live presentation, it may be 3052 desirable to use clock units: 3053 C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/2.0 3054 CSeq: 835 3055 Session: 12345678 3056 Range: clock=19961108T142300Z-19961108T143520Z 3057 User-Agent: PhonyClient/1.2 3059 S->C: RTSP/2.0 200 OK 3060 CSeq: 835 3061 Date: Thu, 23 Jan 1997 15:35:06 GMT 3062 Server: PhonyServer 1.0 3063 Range: clock=19961108T142300Z-19961108T143520Z 3064 Seek-Style: Next 3065 RTP-Info:url="rtsp://example.com/meeting.en" 3066 ssrc=0D12F123:seq=53745;rtptime=484589019 3068 13.4.2. Aggregated Sessions 3070 PLAY requests can operate on sessions controlling a single media and 3071 on aggregated sessions controlling multiple media. 3073 In an aggregated session the PLAY request MUST contain an aggregated 3074 control URI. A server MUST response with error 460 (Only Aggregate 3075 Operation Allowed) if the client PLAY Request-URI is for one of the 3076 media. The media in an aggregate MUST be played in sync. If a 3077 client wants individual control of the media, it needs to use 3078 separate RTSP sessions for each media. 3080 For aggregated sessions where the initial SETUP request (creating a 3081 session) is followed by one or more additional SETUP request, a PLAY 3082 request MAY be pipelined after those additional SETUP requests 3083 without awaiting their responses. This procedure can reduce the 3084 delay from start of session establishment until media play-out has 3085 started with one round trip time. However, a client needs to be 3086 aware that using this procedure will result in the playout of the 3087 server state established at the time of processing the PLAY, i.e., 3088 after the processing of all the requests prior to the PLAY request in 3089 the pipeline. This may not be the intended one due to failure of any 3090 of the prior requests. However, a client can easily determine this 3091 based on the responses from those requests. In case of failure, the 3092 client can halt the media playout using PAUSE and try to establish 3093 the intended state again before issuing another PLAY request. 3095 13.4.3. Updating current PLAY Requests 3097 Clients can issue PLAY requests while the stream is in PLAYING state 3098 and thus updating their request. 3100 The important difference compared to a PLAY request in ready state is 3101 the handling of the current play point and how the range header in 3102 request is constructed. The session is actively playing media and 3103 the play point will be moving making the exact time a request will 3104 take action is hard to predict. Depending on how the PLAY header 3105 appears two different cases exist: total replacement or continuation. 3106 A total replacement is signalled by having the first range 3107 specification have an explicit start value, e.g. npt=45- or 3108 npt=45-60, in which case the server stops playout at the current 3109 playout point and then starts delivering media according to the Range 3110 header. This is equivalent to having the client first send a PAUSE 3111 and then a new play request that isn't based on the pause point. In 3112 the case of continuation the first range specifier has an implicit 3113 start point and a explicit stop value (Z), e.g. npt=-60, which 3114 indicate that it MUST convert the range specifier being played prior 3115 to this PLAY request (X to Y) into (X to Z) and continue as this was 3116 the request originally played. If the stop point is beyond the 3117 current delivery point, the server SHALL immediatly pause delivery. 3118 As the request has been completed succesfully it shall be responded 3119 with 200 ok. A PLAY-Notify with end-of-stream is also sent to 3120 indicate the actual stop point. The pause point is set to requested 3121 stop point. 3123 An example of this behavior. The server has received requests to 3124 play ranges 10 to 15. If the new PLAY request arrives at the server 3125 4 seconds after the previous one, it will take effect while the 3126 server still plays the first range (10-15). Thus changing the 3127 behavior of this range to continue to play to 25 seconds, i.e. the 3128 equivalent single request would be PLAY with range: npt=10-25. 3130 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3131 CSeq: 834 3132 Session: 12345678 3133 Range: npt=10-15 3134 User-Agent: PhonyClient/1.2 3136 S->C: RTSP/2.0 200 OK 3137 CSeq: 834 3138 Date: Thu, 23 Jan 1997 15:35:06 GMT 3139 Server: PhonyServer 1.0 3140 Range: npt=10-15 3141 Seek-Style: Next 3142 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3143 ssrc=0D12F123:seq=5712;rtptime=934207921, 3144 url="rtsp://example.com/fizzle/videotrack" 3145 ssrc=789DAF12:seq=57654;rtptime=2792482193 3146 Session: 12345678 3148 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3149 CSeq: 835 3150 Session: 12345678 3151 Range: npt=-25 3152 User-Agent: PhonyClient/1.2 3154 S->C: RTSP/2.0 200 OK 3155 CSeq: 835 3156 Date: Thu, 23 Jan 1997 15:35:09 GMT 3157 Server: PhonyServer 1.0 3158 Range: npt=14-25 3159 Seek-Style: Next 3160 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3161 ssrc=0D12F123:seq=5712;rtptime=934239921, 3162 url="rtsp://example.com/fizzle/videotrack" 3163 ssrc=789DAF12:seq=57654;rtptime=2792842193 3164 Session: 12345678 3166 13.4.4. Playing On-Demand Media 3168 On-demand media is indicated by the content of the Media-Properties 3169 header in the SETUP response by (see also Section 16.28): 3171 o Random-Access property is set to Random Access; 3173 o Content Modifications set to Immutable; 3175 o Retention set Unlimited or Time-Limited. 3177 Playing on-demand media follows the general usage as described in 3178 Section 13.4.1. 3180 13.4.5. Playing Dynamic On-Demand Media 3182 Dynamic on-demand media is indicated by the content of the Media- 3183 Properties header in the SETUP response by (see also Section 16.28): 3185 o Random-Access set to Random Access; 3187 o Content Modifications set to dynamic; 3189 o Retention set Unlimited or Time-Limited. 3191 Playing on-demand media follows the general usage as described in 3192 Section 13.4.1 as long as the media has not been changed. 3194 There are ways for the client to get informed about changes of media 3195 resources in play state. The client will receive a PLAY_NOTIFY 3196 request with Notify-Reason header set to media-properties-update (see 3197 Section 13.5.2. The client can use the value of the Media-Range to 3198 decide further actions, if the Media-Range header is present in the 3199 PLAY_NOTIFY request. The second way is that the client issues a 3200 GET_PARAMETER request without a body but including a Media-Range 3201 header. The 200 OK response MUST include the current Media-Range 3202 header (see Section 16.29). 3204 13.4.6. Playing Live Media 3206 Live media is indicated by the content of the Media-Properties header 3207 in the SETUP response by (see also Section 16.28): 3209 o Random-Access set to no-seeking; 3211 o Content Modifications set to Time-Progressing; 3213 o Retention with Time-Duration set to 0.0. 3215 For live media, the SETUP response 200 OK MUST include the Media- 3216 Range header (see Section 16.29). 3218 A client MAY send PLAY requests without the Range header, if the 3219 request include the Range header it MUST use a symbolic value 3220 representing "now". For NPT that range specification is "npt=now-". 3221 The server MUST include the Range header in the response and it MUST 3222 indicate an explicit time value and not a symbolic value. In other 3223 words npt=now- is not a valid to use in the response. Instead the 3224 time since session start is recommended expressed as an open 3225 interval, e.g. "npt=96.23-". An absolute time value (clock) for the 3226 corresponding time MAY be given, i.e. "clock=20030213T143205Z-". The 3227 UTC clock format can only be used if client has shown support for it 3228 using the Accept-Ranges header. 3230 13.4.7. Playing Live with Recording 3232 Certain media server may offer recording services of live sessions to 3233 their clients. This recording would normally be from the beginning 3234 of the media session. Clients can randomly access the media between 3235 now and the beginning of the media session. This live media with 3236 recording is indicated by the content of the Media-Properties header 3237 in the SETUP response by (see also Section 16.28): 3239 o Random-Access set to random-access; 3241 o Content Modifications set to Time-Progressing; 3243 o Retention set to Time-limited or Unlimited 3245 The SETUP response 200 OK MUST include the Media-Range header (see 3246 Section 16.29) for this type of media. For live media with 3247 recording, the Range header indicates the current delivery point in 3248 the media and the Media-Range header indicates the currently 3249 available media window around the current time. This window can 3250 cover recorded content in the past (seen from current time in the 3251 media) or recorded content in the future (seen from current time in 3252 the media). The server adjusts the delivery point to the requested 3253 border of the window, if the client requests a delivery point that is 3254 located outside the recording windows, e.g., if requested to far in 3255 the past, the server selects the oldest range in the recording. The 3256 considerations in Section 13.5.3 apply, if a client requests delivery 3257 with Scale (Section 16.44) values other than 1.0 (Normal playback 3258 rate) while deliverying live media with recording. 3260 13.4.8. Playing Live with Time-Shift 3262 Certain media server may offer time-shift services to their clients. 3263 This time shift records a fixed interval in the past, i.e., a sliding 3264 window recording mechanism, but not past this interval. Clients can 3265 randomly access the media between now and the interval. This live 3266 media with recording is indicated by the content of the Media- 3267 Properties header in the SETUP response by (see also Section 16.28): 3269 o Random-Access set to random-access; 3271 o Content Modifications set to Time-Progressing; 3272 o Retention set to Time-Duration and a value indicating the 3273 recording interval (>0). 3275 The SETUP response 200 OK MUST include the Media-Range header (see 3276 Section 16.29) for this type of media. For live media with recording 3277 the Range header indicates the current time in the media and the 3278 Media Range indicates a window around the current time. This window 3279 can cover recorded content in the past (seen from current time in the 3280 media) or recorded content in the future (seen from current time in 3281 the media). The server adjusts the play point to the requested 3282 border of the window, if the client requests a play point that is 3283 located outside the recording windows, e.g., if requested too far in 3284 the past, the server selects the oldest range in the recording. The 3285 considerations in Section 13.5.3 apply, if a client requests delivery 3286 using a Scale (Section 16.44) value other than 1.0 (Normal playback 3287 rate) while delivering live media with time-shift. 3289 13.5. PLAY_NOTIFY 3291 The PLAY_NOTIFY method is issued by a server to inform a client about 3292 an asynchronously event for a session in play state. The Session 3293 header MUST be presented in a PLAY_NOTIFY request and indicates the 3294 scope of the request. Sending of PLAY_NOTIFY requests requires a 3295 persistent connection between server and client, otherwise there is 3296 no way for the server to send this request method to the client. 3298 PLAY_NOTIFY requests have an end-to-end (i.e. server to client) 3299 scope, as they carry the Session header, and apply only to the given 3300 session. The client SHOULD immediately return a response to the 3301 server. 3303 PLAY_NOTIFY requests MAY be used with a message body, depending on 3304 the value of the Notify-Reason header. It is described in the 3305 particular section for each Notify-Reason if a message body is used. 3306 However, currently there is no Notify-Reason that allows using a 3307 message body. There is in this case a need to obey some limitations 3308 when adding new Notify-Reasons that intend to use a message body: The 3309 server can send any type of message body, but it is not ensured that 3310 the client can understand the received message body. This is related 3311 to DESCRIBE (see Section 13.2 ), but in this particular case the 3312 client can state its acceptable message bodies by using the Accept 3313 header. In the case of PLAY_NOTIFY, the server does not know which 3314 message bodies are understood by the client. 3316 The Notify-Reason header (see Section 16.31) specifies the reason why 3317 the server sends the PLAY_NOTIFY request. This is extensible and new 3318 reasons MAY be added in the future. In case the client does not 3319 understand the reason for the notification it MUST respond with an 3320 465 (Notification Reason Unknown) (Section 15.4.30) error code. 3321 Servers can send PLAY_NOTIFY with these types: 3323 o end-of-stream (see Section 13.5.1); 3325 o media-properties-update (see Section 13.5.2); 3327 o scale-change (see Section 13.5.3). 3329 13.5.1. End-of-Stream 3331 A PLAY_NOTIFY request with Notify-Reason header set to end-of-stream 3332 indicates the completion or near completion of the PLAY request and 3333 the ending delivery of the media stream(s). The request MUST NOT be 3334 issued unless the server is in the playing state. The end of the 3335 media stream delivery notification may be used to indicate either a 3336 successful completion of the PLAY request currently being served, or 3337 to indicate some error resulting in failure to complete the request. 3338 The Request-Status header (Section 16.41) MUST be included to 3339 indicate which request the notification is for and its completion 3340 status. The message response status codes (Section 8.1.1) are used 3341 to indicate how the PLAY request concluded. The sender of a 3342 PALY_NOTIFY can issue an updated PALY_NOTIFY, in the case of a 3343 PLAY_NOTIFY sent with wrong information. For instance, a PLAY_NOTIFY 3344 was issued before reaching the end-of-stream, but some error occurred 3345 resulting in that the previously sent PLAY_NOTIFY contained a wrong 3346 time when the stream will end. In this case a new PLAY_NOTIFY MUST 3347 be sent including the correct status for the completion and all 3348 additional information. 3350 PLAY_NOTIFY requests with Notify-Reason header set to end-of-stream 3351 MUST include a Range header and the Scale header if the scale value 3352 is not 1. The Range header indicates the point in the stream or 3353 streams where delivery is ending with the timescale that was used by 3354 the server in the PLAY response for the request being fulfilled. The 3355 server MUST NOT use the "now" constant in the Range header; it MUST 3356 use the actual numeric end position in the proper timescale. When 3357 end-of-stream notifications are issued prior to having sent the last 3358 media packets, this is evident as the end time in the Range header is 3359 beyond the current time in the media being received by the client, 3360 e.g., npt=-15, if npt is currently at 14.2 seconds. The Scale header 3361 is to be included so that it is evident if the media time scale is 3362 moving backwards and/or have a non-default pace. 3364 If RTP is used as media transport, a RTP-Info header MUST be 3365 included, and the RTP-Info header MUST indicate the last sequence 3366 number in the seq parameter. 3368 A PLAY_NOTIFY request with Notify-Reason header set to end-of-stream 3369 MUST NOT carry a message body. 3371 This example request notifies the client about a future end-of-stream 3372 event: 3374 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3375 CSeq: 854 3376 Notify-Reason: end-of-stream 3377 Request-Status: cseq=853 status=200 reason="OK" 3378 Range: npt=-145 3379 RTP-Info:url="rtsp://example.com/audio" 3380 ssrc=0D12F123:seq=14783;rtptime=2345962545 3381 Session: uZ3ci0K+Ld-M 3383 C->S: RTSP/2.0 200 OK 3384 CSeq: 854 3385 User-Agent: PhonyClient/1.2 3387 13.5.2. Media-Properties-Update 3389 A PLAY_NOTIFY request with Notify-Reason header set to media- 3390 properties-update indicates an update of the media properties for the 3391 given session (see Section 16.28) and/or the available media range 3392 that can be played as indicated by Media-Range (Section 16.29). 3393 PLAY_NOTIFY requests with Notify-Reason header set to media- 3394 properties-update MUST include a Media-Properties and Date header and 3395 SHOULD include a Media-Range header. 3397 This notification MUST be sent for media that are time-progressing 3398 every time an event happens that changes the basis for making 3399 estimations on how the media range progress. In addition it is 3400 RECOMMENDED that the server sends these notifications every 5 minutes 3401 for time-progressing content to ensure the long term stability of the 3402 client estimation and allowing for clock skew detection by the 3403 client. Requests for the just mentioned reasons MUST include Media- 3404 Range header to provide current Media duration and the Range header 3405 to indicate the current playing point and any remaining parts of the 3406 requested range. 3408 The recommendation for sending updates every 5 minutes is due to 3409 any clock skew issues. In 5 minutes the clock skew should not 3410 become too significant as this is not used for media playback and 3411 synchronization, only for determining which content is available 3412 to the user. 3414 A PLAY_NOTIFY request with Notify-Reason header set to media- 3415 properties-update MUST NOT carry a message body. 3417 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3418 Date: Tue, 14 Apr 2008 15:48:06 GMT 3419 CSeq: 854 3420 Notify-Reason: media-properties-update 3421 Session: uZ3ci0K+Ld-M 3422 Media-Properties: Time-Progressing, 3423 Time-Limited=20080415T153919.36Z, Random-Access=5.0 3424 Media-Range: npt=0-1:37:21.394 3425 Range: npt=1:15:49.873- 3427 C->S: RTSP/2.0 200 OK 3428 CSeq: 854 3429 User-Agent: PhonyClient/1.2 3431 13.5.3. Scale-Change 3433 The server may be forced to change the rate, when a client request 3434 delivery using a Scale (Section 16.44) value other than 1.0 (normal 3435 playback rate). For time progressing media with some retention, i.e. 3436 the server stores already sent content, a client requesting to play 3437 with Scale values larger than 1 may catch up with the front end of 3438 the media. The server will then be unable to continue to provide 3439 with content at Scale larger than 1 as content is only made available 3440 by the server at Scale=1. Another case is when Scale < 1 and the 3441 media retention is time-duration limited. In this case the delivery 3442 point can reach the oldest media unit available, and further playback 3443 at this scale becomes impossible as there will be no media available. 3444 To avoid having the client loose any media, the scale will need to be 3445 adjusted to the same rate which the media is removed from the storage 3446 buffer, commonly scale = 1.0. 3448 Another case is when the content itself consist of spliced pieces or 3449 is dynamically updated. In these cases the server may be required to 3450 change from one supported scale value (different than Scale=1.0) to 3451 another. In this case the server will pick the closest value and 3452 inform the client of what it has picked. In these case the media 3453 properties will also be sent updating the supported Scale values. 3454 This enables a client to adjust the used Scale value. 3456 To minimize impact on playback in any of the above cases the server 3457 MUST modify the playback properties and set Scale to a supportable 3458 value and continue delivery the media. When doing this modification 3459 it MUST send a PLAY_NOTIFY message with the Notify-Reason header set 3460 to "scale-change". The request MUST contain a Range header with the 3461 media time where the change took effect, a Scale header with the new 3462 value in use, Session header with the ID for the session it applies 3463 to and a Date header with the server wallclock time of the change. 3464 For time progressing content also the Media-Range and the Media- 3465 Properties at this point in time MUST be included. The Media- 3466 Properties header MUST be included if the scale change was due to the 3467 content changing what scale values that is supported. 3469 For media streams being delivered using RTP also a RTP-Info header 3470 MUST be included. It MUST contain the rtptime parameter with a value 3471 corresponding to the point of change in that media and optionally 3472 also the sequence number. 3474 A PLAY_NOTIFY request with Notify-Reason header set to "Scale-Change" 3475 MUST NOT carry a message body. 3477 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3478 Date: Tue, 14 Apr 2008 15:48:06 GMT 3479 CSeq: 854 3480 Notify-Reason: scale-change 3481 Session: uZ3ci0K+Ld-M 3482 Media-Properties: Time-Progressing, 3483 Time-Limited=20080415T153919.36Z, Random-Access=5.0 3484 Media-Range: npt=0-1:37:21.394 3485 Range: npt=1:37:21.394- 3486 Scale: 1 3487 RTP-Info: url="rtsp://example.com/fizzle/foo/audio" 3488 ssrc=0D12F123:rtptime=2345962545 3490 C->S: RTSP/2.0 200 OK 3491 CSeq: 854 3492 User-Agent: PhonyClient/1.2 3494 13.6. PAUSE 3496 The PAUSE request causes the stream delivery to immediately be 3497 interrupted (halted). A PAUSE request MUST be done either with the 3498 aggregated control URI for aggregated sessions, resulting in all 3499 media being halted, or the media URI for non-aggregated sessions. 3500 Any attempt to do muting of a single media with an PAUSE request in 3501 an aggregated session MUST be responded with error 460 (Only 3502 Aggregate Operation Allowed). After resuming playback, 3503 synchronization of the tracks MUST be maintained. Any server 3504 resources are kept, though servers MAY close the session and free 3505 resources after being paused for the duration specified with the 3506 timeout parameter of the Session header in the SETUP message. 3508 Example: 3510 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3511 CSeq: 834 3512 Session: 12345678 3513 User-Agent: PhonyClient/1.2 3515 S->C: RTSP/2.0 200 OK 3516 CSeq: 834 3517 Date: Thu, 23 Jan 1997 15:35:06 GMT 3518 Range: npt=45.76- 3520 The PAUSE request causes stream delivery to be interrupted 3521 immediately on receipt of the message and the pause point is set to 3522 the current point in the presentation. That pause point in the media 3523 stream needs to be maintained. A subsequent PLAY request without 3524 Range header resume from the pause point and play until media end. 3526 The pause point after any PAUSE request MUST be returned to the 3527 client by adding a Range header with what remains unplayed of the 3528 PLAY request's range. For media with random access properties, if 3529 one desires to resume playing a ranged request, one simply includes 3530 the Range header from the PAUSE response and include the Seek-Style 3531 header with the Next policy in the PLAY request. For media that is 3532 time-progressing and has retention duration=0 the follow-up PLAY 3533 request to start media delivery again, will need to use "npt=now-" 3534 and not the answer given in the response to PAUSE. 3536 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3537 CSeq: 834 3538 Session: 12345678 3539 Range: npt=10-30 3540 User-Agent: PhonyClient/1.2 3542 S->C: RTSP/2.0 200 OK 3543 CSeq: 834 3544 Date: Thu, 23 Jan 1997 15:35:06 GMT 3545 Server: PhonyServer 1.0 3546 Range: npt=10-30 3547 Seek-Style: First-Prior 3548 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3549 ssrc=0D12F123:seq=5712;rtptime=934207921, 3550 url="rtsp://example.com/fizzle/videotrack" 3551 ssrc=4FAD8726:seq=57654;rtptime=2792482193 3552 Session: 12345678 3554 After 11 seconds, i.e. at 21 seconds into the presentation: 3555 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3556 CSeq: 835 3557 Session: 12345678 3558 User-Agent: PhonyClient/1.2 3560 S->C: RTSP/2.0 200 OK 3561 CSeq: 835 3562 Date: 23 Jan 1997 15:35:09 GMT 3563 Server: PhonyServer 1.0 3564 Range: npt=21-30 3565 Session: 12345678 3567 If a client issues a PAUSE request and the server acknowledges and 3568 enters the READY state, the proper server response, if the player 3569 issues another PAUSE, is still 200 OK. The 200 OK response MUST 3570 include the Range header with the current pause point. See examples 3571 below: 3573 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3574 CSeq: 834 3575 Session: 12345678 3576 User-Agent: PhonyClient/1.2 3578 S->C: RTSP/2.0 200 OK 3579 CSeq: 834 3580 Session: 12345678 3581 Date: Thu, 23 Jan 1997 15:35:06 GMT 3582 Range: npt=45.76-98.36 3584 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3585 CSeq: 835 3586 Session: 12345678 3587 User-Agent: PhonyClient/1.2 3589 S->C: RTSP/2.0 200 OK 3590 CSeq: 835 3591 Session: 12345678 3592 Date: 23 Jan 1997 15:35:07 GMT 3593 Range: npt=45.76-98.36 3595 13.7. TEARDOWN 3597 13.7.1. Client to Server 3599 The TEARDOWN client to server request stops the stream delivery for 3600 the given URI, freeing the resources associated with it. A TEARDOWN 3601 request MAY be performed on either an aggregated or a media control 3602 URI. However, some restrictions apply depending on the current 3603 state. The TEARDOWN request MUST contain a Session header indicating 3604 what session the request applies to. 3606 A TEARDOWN using the aggregated control URI or the media URI in a 3607 session under non-aggregated control (single media session) MAY be 3608 done in any state (Ready, and Play). A successful request MUST 3609 result in that media delivery is immediately halted and the session 3610 state is destroyed. This MUST be indicated through the lack of a 3611 Session header in the response. 3613 A TEARDOWN using a media URI in an aggregated session MAY only be 3614 done in Ready state. Such a request only removes the indicated media 3615 stream and associated resources from the session. This may result in 3616 that a session returns to non-aggregated control, due to that it only 3617 contains a single media after the requests completion. A session 3618 that will exist after the processing of the TEARDOWN request MUST in 3619 the response to that TEARDOWN request contain a Session header. Thus 3620 the presence of the Session header indicates to the receiver of the 3621 response if the session is still existing or has been removed. 3623 Example: 3625 C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/2.0 3626 CSeq: 892 3627 Session: 12345678 3628 User-Agent: PhonyClient/1.2 3630 S->C: RTSP/2.0 200 OK 3631 CSeq: 892 3632 Server: PhonyServer 1.0 3634 13.7.2. Server to Client 3636 The server can send TEARDOWN requests in the server to client 3637 direction to indicate that the server has been forced to terminate 3638 the ongoing session. This may happen for several reasons, such as 3639 server maintenance without available backup, or that the session has 3640 been inactive for extended periods of time. The reason is provided 3641 in the Terminate-Reason header (Section 16.50). 3643 When a RTSP client has maintained a RTSP session that otherwise is 3644 inactive for an extended period of time the server may reclaim the 3645 resources. That is done by issuing a REDIRECT request with the 3646 Terminate-Reason set to "Session-Timeout". This MAY be done when the 3647 client has been inactive in the RTSP session for more than one 3648 Session Timeout period (Section 16.47). However, the server is 3649 RECOMMENDED to not perform this operation until an extended period of 3650 inactivity has passed. The time period is considered extended when 3651 it is 10 times the Session Timeout period. Consideration of the 3652 application of the server and its content should be performed when 3653 configuring what is considered as extended periods of time. 3655 In case the server needs to stop providing service to the established 3656 sessions and their is no server to point at in a REDIRECT request 3657 TEARDOWN shall be used to terminate the session. This method can 3658 also be used when non-recoverable internal errors have happened and 3659 the server has no other option then to terminate the sessions. 3661 The TEARDOWN request is normally done on the session aggregate 3662 control URI and MUST include the following headers; Session and 3663 Terminate-Reason headers. The request only applies to the session 3664 identified in the Session header. The server may include a message 3665 to the client's user with the "user-msg" parameter. 3667 The TEARDOWN request may alternatively be done on the wild card URI * 3668 and without any session header. The scope of such a request is 3669 limited to the next-hop (i.e. the RTSP agent in direct communication 3670 with the server) and applies, as well, to the control connection 3671 between the next-hop RTSP agent and the server. This request 3672 indicates that all sessions and pending requests being managed via 3673 the control connection are terminated. Any intervening proxies 3674 SHOULD do all of the following in the order listed: 3676 1. respond to the TEARDOWN request 3678 2. disconnect the control channel from the requesting server 3680 3. pass the TEARDOWN request to each applicable client (typically 3681 those clients with an active session or an unanswered request) 3683 Note: The proxy is responsible for accepting TEARDOWN responses 3684 from its clients; these responses MUST NOT be passed on to either 3685 the original server or the redirected server. 3687 13.8. GET_PARAMETER 3689 The GET_PARAMETER request retrieves the value of any specified 3690 parameter or parameters for a presentation or stream specified in the 3691 URI. If the Session header is present in a request, the value of a 3692 parameter MUST be retrieved in the specified session context. There 3693 are two ways of specifying the parameters to be retrieved. The first 3694 is by including headers which have been defined such that you can use 3695 them for this purpose. Headers for this purpose should allow empty, 3696 or stripped value parts to avoid having to specify bogus data when 3697 indicating the desire to retrieve a value. The successful completion 3698 of the request should also be evident from any filled out values in 3699 the response. The Media-Range header (Section 16.29) is one such 3700 header. The other way is to specify a message body that lists the 3701 parameter(s) that are desired to be retrieved. The Content-Type 3702 header (Section 16.18) is used to specify which format the message 3703 body has. 3705 The headers that MAY be used for retrieving their current value using 3706 GET_PARAMETER are: 3708 o Accept-Ranges 3710 o Media-Range 3712 o Media-Properties 3714 o Range 3715 o RTP-Info 3717 The method MAY also be used without a message body or any header that 3718 request parameters for keep-alive purpose. Any request that is 3719 successful, i.e., a 200 OK response is received, then the keep-alive 3720 timer has been updated. Any non-required header present in such a 3721 request may or may not been processed. Normally the presence of 3722 filled out values in the header will be indication that the header 3723 has been processed. However, for cases when this is difficult to 3724 determine, it is recommended to use a feature-tag and the Require 3725 header. Due to this reason it is usually easier if any parameters to 3726 be retrieved are sent in the body, rather than using any header. 3728 Parameters specified within the body of the message must all be 3729 understood by the request receiving agent. If one or more parameters 3730 are not understood a 451 (Parameter Not Understood) MUST be sent 3731 including a body listing these parameters that wasn't understood. If 3732 all parameters are understood their value is filled in and returned 3733 in the response message body. 3735 Example: 3737 S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/2.0 3738 CSeq: 431 3739 Content-Type: text/parameters 3740 Session: 12345678 3741 Content-Length: 26 3742 User-Agent: PhonyClient/1.2 3744 packets_received 3745 jitter 3747 C->S: RTSP/2.0 200 OK 3748 CSeq: 431 3749 Session: 12345678 3750 Content-Length: 38 3751 Content-Type: text/parameters 3753 packets_received: 10 3754 jitter: 0.3838 3756 13.9. SET_PARAMETER 3758 This method requests to set the value of a parameter or a set of 3759 parameters for a presentation or stream specified by the URI. The 3760 method MAY also be used without a message body. It is the 3761 RECOMMENDED method to use in request sent for the sole purpose of 3762 updating the keep-alive timer. If this request is successful, i.e. a 3763 200 OK response is received, then the keep-alive timer has been 3764 updated. Any non-required header present in such a request may or 3765 may not been processed. To allow a client to determine if any such 3766 header has been processed, it is necessary to use a feature tag and 3767 the Require header. Due to this reason it is RECOMMENDED that any 3768 parameters are sent in the body, rather than using any header. 3770 A request is RECOMMENDED to only contain a single parameter to allow 3771 the client to determine why a particular request failed. If the 3772 request contains several parameters, the server MUST only act on the 3773 request if all of the parameters can be set successfully. A server 3774 MUST allow a parameter to be set repeatedly to the same value, but it 3775 MAY disallow changing parameter values. If the receiver of the 3776 request does not understand or cannot locate a parameter, error 451 3777 (Parameter Not Understood) MUST be used. In the case a parameter is 3778 not allowed to change, the error code is 458 (Parameter Is Read- 3779 Only). The response body MUST contain only the parameters that have 3780 errors. Otherwise no body MUST be returned. 3782 Note: transport parameters for the media stream MUST only be set with 3783 the SETUP command. 3785 Restricting setting transport parameters to SETUP is for the 3786 benefit of firewalls. 3788 The parameters are split in a fine-grained fashion so that there 3789 can be more meaningful error indications. However, it may make 3790 sense to allow the setting of several parameters if an atomic 3791 setting is desirable. Imagine device control where the client 3792 does not want the camera to pan unless it can also tilt to the 3793 right angle at the same time. 3795 Example: 3797 C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/2.0 3798 CSeq: 421 3799 User-Agent: PhonyClient/1.2 3800 Content-length: 20 3801 Content-type: text/parameters 3803 barparam: barstuff 3805 S->C: RTSP/2.0 451 Parameter Not Understood 3806 CSeq: 421 3807 Content-length: 10 3808 Content-type: text/parameters 3810 barparam: barstuff 3812 13.10. REDIRECT 3814 The REDIRECT method is issued by a server to inform a client that the 3815 service provided will be terminated and where a corresponding service 3816 can be provided instead. This happens for different reasons. One is 3817 that the server is being administrated such that it must stop 3818 providing service. Thus the client is required to connect to another 3819 server location to access the resource indicated by the Request-URI. 3821 The REDIRECT request SHALL contain a Terminate-Reason header 3822 (Section 16.50) to inform the client of the reason for the request. 3823 Additional parameters related to the reason may also be included. 3824 The intention here is to allow a server administrator to do a 3825 controlled shutdown of the RTSP server. That requires sufficient 3826 time to inform all entities having associated state with the server 3827 and for them to perform a controlled migration from this server to a 3828 fall back server. 3830 A REDIRECT request with a Session header has end-to-end (i.e. server 3831 to client) scope and applies only to the given session. Any 3832 intervening proxies SHOULD NOT disconnect the control channel while 3833 there are other remaining end-to-end sessions. The REQUIRED Location 3834 header MUST contain a complete absolute URI pointing to the resource 3835 to which the client SHOULD reconnect. Specifically, the Location 3836 MUST NOT contain just the host and port. A client may receive a 3837 REDIRECT request with a Session header, if and only if, an end-to-end 3838 session has been established. 3840 A client may receive a REDIRECT request without a Session header at 3841 any time when it has communication or a connection established with a 3842 server. The scope of such a request is limited to the next-hop (i.e. 3843 the RTSP agent in direct communication with the server) and applies 3844 to all sessions controlled, as well as the control connection between 3845 the next-hop RTSP agent and the server. A REDIRECT request without a 3846 Session header indicates that all sessions and pending requests being 3847 managed via the control connection MUST be redirected. The REQUIRED 3848 Location header, if included in such a request, SHOULD contain an 3849 absolute URI with only the host address and the OPTIONAL port number 3850 of the server to which the RTSP agent SHOULD reconnect. Any 3851 intervening proxies SHOULD do all of the following in the order 3852 listed: 3854 1. respond to the REDIRECT request 3856 2. disconnect the control channel from the requesting server 3858 3. connect to the server at the given host address 3859 4. pass the REDIRECT request to each applicable client (typically 3860 those clients with an active session or an unanswered request) 3862 Note: The proxy is responsible for accepting REDIRECT responses 3863 from its clients; these responses MUST NOT be passed on to either 3864 the original server or the redirected server. 3866 When the server lacks any alternative server and needs to terminate a 3867 session or all sessions the TEARDOWN request SHALL be used instead. 3869 When no Terminate-Reason "time" parameter are included in a REDIRECT 3870 request, the client SHALL perform the redirection immediately and 3871 return a response to the server. The server shall consider the 3872 session as terminated and can free any associated state after it 3873 receives the successful (2xx) response. The server MAY close the 3874 signalling connection upon receiving the response and the client 3875 SHOULD close the signalling connection after sending the 2xx 3876 response. The exception to this is when the client has several 3877 sessions on the server being managed by the given signalling 3878 connection. In this case, the client SHOULD close the connection 3879 when it has received and responded to REDIRECT requests for all the 3880 sessions managed by the signalling connection. 3882 The Terminate-Reason header "time" parameter MAY be used to indicate 3883 the wallclock time by when the redirection MUST have take place. To 3884 allow a client to determine that redirect time without being time 3885 synchronized with the server, the server MUST include a Date header 3886 in the request. The client should have before the redirection time- 3887 line terminated the session and close the control connection. The 3888 server MAY simple cease to provide service when the deadline time has 3889 been reached, or it may issue TEARDOWN requests to the remaining 3890 sessions. 3892 The differentiation of REDIRECT requests with and without range 3893 header is to allow for clear and explicit state handling. As the 3894 state in the server needs to be kept until the point of 3895 redirection, the handling becomes more clear if the client is 3896 required to TEARDOWN the session at the redirect point. 3898 If the REDIRECT request times out following the rules in Section 10.4 3899 the server MAY terminate the session or transport connection that 3900 would be redirected by the request. This is a safeguard against 3901 misbehaving clients that refuses to respond to a REDIRECT request. 3902 That should not provide any benefit. 3904 After a REDIRECT request has been processed, a client that wants to 3905 continue to send or receive media for the resource identified by the 3906 Request-URI will have to establish a new session with the designated 3907 host. If the URI given in the Location header is a valid resource 3908 URI, a client SHOULD issue a DESCRIBE request for the URI. 3910 Note: The media resource indicated by the Location header can be 3911 identical, slightly different or totally different. This is the 3912 reason why a new DESCRIBE request SHOULD be issued. 3914 If the Location header contains only a host address, the client MAY 3915 assume that the media on the new server is identical to the media on 3916 the old server, i.e. all media configuration information from the old 3917 session is still valid except for the host address. However, the 3918 usage of conditional SETUP using MTag identifiers are RECOMMENDED to 3919 verify the assumption. 3921 This example request redirects traffic for this session to the new 3922 server at the given absolute time: 3924 S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/2.0 3925 CSeq: 732 3926 Location: rtsp://s2.example.com:8001 3927 Terminate-Reason: Server-Admin ;time=19960213T143205Z 3928 Session: uZ3ci0K+Ld-M 3929 Date: Thu, 13 Feb 1996 14:30:43 GMT 3931 C->S: RTSP/2.0 200 OK 3932 CSeq: 732 3933 User-Agent: PhonyClient/1.2 3935 14. Embedded (Interleaved) Binary Data 3937 In order to fulfill certain requirements on the network side, e.g. in 3938 conjunction with network address translators that block RTP traffic 3939 over UDP, it may be necessary to interleave RTSP messages and media 3940 stream data. This interleaving should generally be avoided unless 3941 necessary since it complicates client and server operation and 3942 imposes additional overhead. Also, head of line blocking may cause 3943 problems. Interleaved binary data SHOULD only be used if RTSP is 3944 carried over TCP. Interleaved data is not allowed inside RTSP 3945 messages. 3947 Stream data such as RTP packets is encapsulated by an ASCII dollar 3948 sign (24 decimal), followed by a one-byte channel identifier, 3949 followed by the length of the encapsulated binary data as a binary, 3950 two-byte integer in network byte order. The stream data follows 3951 immediately afterwards, without a CRLF, but including the upper-layer 3952 protocol headers. Each $ block MUST contain exactly one upper-layer 3953 protocol data unit, e.g., one RTP packet. 3954 0 1 2 3 3955 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 3956 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3957 | "$" = 24 | Channel ID | Length in bytes | 3958 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3959 : Length number of bytes of binary data : 3960 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3962 The channel identifier is defined in the Transport header with the 3963 interleaved parameter (Section 16.52). 3965 When the transport choice is RTP, RTCP messages are also interleaved 3966 by the server over the TCP connection. The usage of RTCP messages is 3967 indicated by including a interval containing a second channel in the 3968 interleaved parameter of the Transport header, see Section 16.52. If 3969 RTCP is used, packets MUST be sent on the first available channel 3970 higher than the RTP channel. The channels are bi-directional, using 3971 the same ChannelD in both directions, and therefore RTCP traffic are 3972 sent on the second channel in both directions. 3974 RTCP is sometime needed for synchronization when two or more 3975 streams are interleaved in such a fashion. Also, this provides a 3976 convenient way to tunnel RTP/RTCP packets through the TCP control 3977 connection when required by the network configuration and transfer 3978 them onto UDP when possible. 3980 C->S: SETUP rtsp://example.com/bar.file RTSP/2.0 3981 CSeq: 2 3982 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 3983 Accept-Ranges: NPT, SMPTE, UTC 3984 User-Agent: PhonyClient/1.2 3986 S->C: RTSP/2.0 200 OK 3987 CSeq: 2 3988 Date: Thu, 05 Jun 1997 18:57:18 GMT 3989 Transport: RTP/AVP/TCP;unicast;interleaved=5-6 3990 Session: 12345678 3991 Accept-Ranges: NPT 3992 Media-Properties: Random-Access=0.2, Unmutable, Unlimited 3994 C->S: PLAY rtsp://example.com/bar.file RTSP/2.0 3995 CSeq: 3 3996 Session: 12345678 3997 User-Agent: PhonyClient/1.2 3999 S->C: RTSP/2.0 200 OK 4000 CSeq: 3 4001 Session: 12345678 4002 Date: Thu, 05 Jun 1997 18:59:15 GMT 4003 RTP-Info: url="rtsp://example.com/bar.file" 4004 ssrc=0D12F123:seq=232433;rtptime=972948234 4005 Range: npt=0-56.8 4006 Seek-Style: RAP 4008 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 4009 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 4010 S->C: $006{2 byte length}{"length" bytes RTCP packet} 4012 15. Status Code Definitions 4014 Where applicable, HTTP status [H10] codes are reused. Status codes 4015 that have the same meaning are not repeated here. See Table 4 for a 4016 listing of which status codes may be returned by which requests. All 4017 error messages, 4xx and 5xx MAY return a body containing further 4018 information about the error. 4020 15.1. Success 1xx 4022 15.1.1. 100 Continue 4024 The client SHOULD continue with its request. This interim response 4025 is used to inform the client that the initial part of the request has 4026 been received and has not yet been rejected by the server. The 4027 client SHOULD continue by sending the remainder of the request or, if 4028 the request has already been completed, ignore this response. The 4029 server MUST send a final response after the request has been 4030 completed. 4032 15.2. Success 2xx 4034 This class of status code indicates that the client's request was 4035 successfully received, understood, and accepted. 4037 15.2.1. 200 OK 4039 The request has succeeded. The information returned with the 4040 response is dependent on the method used in the request. 4042 15.3. Redirection 3xx 4044 The notation "3rr" indicates response codes from 300 to 399 inclusive 4045 which are meant for redirection. The response code 304 is excluded 4046 from this set, as it is not used for redirection. 4048 Within RTSP, redirection may be used for load balancing or 4049 redirecting stream requests to a server topologically closer to the 4050 client. Mechanisms to determine topological proximity are beyond the 4051 scope of this specification. 4053 A 3rr code MAY be used to respond to any request. It is RECOMMENDED 4054 that they are used if necessary before a session is established, 4055 i.e., in response to DESCRIBE or SETUP. However, in cases where a 4056 server is not able to send a REDIRECT request to the client, the 4057 server MAY need to resort to using 3rr responses to inform a client 4058 with an established session about the need for redirecting the 4059 session. If a 3rr response is received for a request in relation to 4060 an established session, the client SHOULD send a TEARDOWN request for 4061 the session, and MAY reestablish the session using the resource 4062 indicated by the Location. 4064 If the Location header is used in a response it MUST contain an 4065 absolute URI pointing out the media resource the client is redirected 4066 to, the URI MUST NOT only contain the host name. 4068 15.3.1. 301 Moved Permanently 4070 The request resource are moved permanently and resides now at the URI 4071 given by the location header. The user client SHOULD redirect 4072 automatically to the given URI. This response MUST NOT contain a 4073 message-body. The Location header MUST be included in the response. 4075 15.3.2. 302 Found 4077 The requested resource resides temporarily at the URI given by the 4078 Location header. The Location header MUST be included in the 4079 response. This response is intended to be used for many types of 4080 temporary redirects; e.g., load balancing. It is RECOMMENDED that 4081 the server set the reason phrase to something more meaningful than 4082 "Found" in these cases. The user client SHOULD redirect 4083 automatically to the given URI. This response MUST NOT contain a 4084 message-body. 4086 This example shows a client being redirected to a different server: 4088 C->S: SETUP rtsp://example.com/fizzle/foo RTSP/2.0 4089 CSeq: 2 4090 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 4091 Accept-Ranges: NPT, SMPTE, UTC 4092 User-Agent: PhonyClient/1.2 4094 S->C: RTSP/2.0 302 Try Other Server 4095 CSeq: 2 4096 Location: rtsp://s2.example.com:8001/fizzle/foo 4098 15.3.3. 303 See Other 4100 This status code MUST NOT be used in RTSP. However, it was allowed 4101 to use in RTSP 1.0 (RFC 2326). 4103 15.3.4. 304 Not Modified 4105 If the client has performed a conditional DESCRIBE or SETUP (see 4106 Section 16.24) and the requested resource has not been modified, the 4107 server SHOULD send a 304 response. This response MUST NOT contain a 4108 message-body. 4110 The response MUST include the following header fields: 4112 o Date 4114 o MTag and/or Content-Location, if the header(s) would have been 4115 sent in a 200 response to the same request. 4117 o Expires, Cache-Control, and/or Vary, if the field-value might 4118 differ from that sent in any previous response for the same 4119 variant. 4121 This response is independent for the DESCRIBE and SETUP requests. 4122 That is, a 304 response to DESCRIBE does NOT imply that the resource 4123 content is unchanged (only the session description) and a 304 4124 response to SETUP does NOT imply that the resource description is 4125 unchanged. The MTag and If-Match headers may be used to link the 4126 DESCRIBE and SETUP in this manner. 4128 15.3.5. 305 Use Proxy 4130 The requested resource MUST be accessed through the proxy given by 4131 the Location field. The Location field gives the URI of the proxy. 4132 The recipient is expected to repeat this single request via the 4133 proxy. 305 responses MUST only be generated by origin servers. 4135 15.4. Client Error 4xx 4137 15.4.1. 400 Bad Request 4139 The request could not be understood by the server due to malformed 4140 syntax. The client SHOULD NOT repeat the request without 4141 modifications. If the request does not have a CSeq header, the 4142 server MUST NOT include a CSeq in the response. 4144 15.4.2. 401 Unauthorized 4146 The request requires user authentication. The response MUST include 4147 a WWW-Authenticate header (Section 16.57) field containing a 4148 challenge applicable to the requested resource. The client MAY 4149 repeat the request with a suitable Authorization header field. If 4150 the request already included Authorization credentials, then the 401 4151 response indicates that authorization has been refused for those 4152 credentials. If the 401 response contains the same challenge as the 4153 prior response, and the user agent has already attempted 4154 authentication at least once, then the user SHOULD be presented the 4155 entity that was given in the response, since that entity might 4156 include relevant diagnostic information. HTTP access authentication 4157 is explained in [RFC2617]. 4159 15.4.3. 402 Payment Required 4161 This code is reserved for future use. 4163 15.4.4. 403 Forbidden 4165 The server understood the request, but is refusing to fulfill it. 4166 Authorization will not help and the request SHOULD NOT be repeated. 4167 If the server wishes to make public why the request has not been 4168 fulfilled, it SHOULD describe the reason for the refusal in the 4169 entity. If the server does not wish to make this information 4170 available to the client, the status code 404 (Not Found) can be used 4171 instead. 4173 15.4.5. 404 Not Found 4175 The server has not found anything matching the Request-URI. No 4176 indication is given of whether the condition is temporary or 4177 permanent. The 410 (Gone) status code SHOULD be used if the server 4178 knows, through some internally configurable mechanism, that an old 4179 resource is permanently unavailable and has no forwarding address. 4180 This status code is commonly used when the server does not wish to 4181 reveal exactly why the request has been refused, or when no other 4182 response is applicable. 4184 15.4.6. 405 Method Not Allowed 4186 The method specified in the request is not allowed for the resource 4187 identified by the Request-URI. The response MUST include an Allow 4188 header containing a list of valid methods for the requested resource. 4189 This status code is also to be used if a request attempts to use a 4190 method not indicated during SETUP. 4192 15.4.7. 406 Not Acceptable 4194 The resource identified by the request is only capable of generating 4195 response entities which have content characteristics not acceptable 4196 according to the accept headers sent in the request. 4198 The response SHOULD include an message body containing a list of 4199 available entity characteristics and location(s) from which the user 4200 or user agent can choose the one most appropriate. The entity format 4201 is specified by the media type given in the Content-Type header 4202 field. Depending upon the format and the capabilities of the user 4203 agent, selection of the most appropriate choice MAY be performed 4204 automatically. However, this specification does not define any 4205 standard for such automatic selection. 4207 If the response could be unacceptable, a user agent SHOULD 4208 temporarily stop receipt of more data and query the user for a 4209 decision on further actions. 4211 15.4.8. 407 Proxy Authentication Required 4213 This code is similar to 401 (Unauthorized) (Section 15.4.2), but 4214 indicates that the client must first authenticate itself with the 4215 proxy. The proxy MUST return a Proxy-Authenticate header field 4216 (Section 16.33) containing a challenge applicable to the proxy for 4217 the requested resource. 4219 15.4.9. 408 Request Timeout 4221 The client did not produce a request within the time that the server 4222 was prepared to wait. The client MAY repeat the request without 4223 modifications at any later time. 4225 15.4.10. 410 Gone 4227 The requested resource is no longer available at the server and the 4228 forwarding address is not known. This condition is expected to be 4229 considered permanent. If the server does not know, or has no 4230 facility to determine, whether or not the condition is permanent, the 4231 status code 404 (Not Found) SHOULD be used instead. This response is 4232 cacheable unless indicated otherwise. 4234 The 410 response is primarily intended to assist the task of 4235 repository maintenance by notifying the recipient that the resource 4236 is intentionally unavailable and that the server owners desire that 4237 remote links to that resource be removed. Such an event is common 4238 for limited-time, promotional services and for resources belonging to 4239 individuals no longer working at the server's site. It is not 4240 necessary to mark all permanently unavailable resources as "gone" or 4241 to keep the mark for any length of time -- that is left to the 4242 discretion of the owner of the server. 4244 15.4.11. 411 Length Required 4246 The server refuses to accept the request without a defined Content- 4247 Length. The client MAY repeat the request if it adds a valid 4248 Content-Length header field containing the length of the message-body 4249 in the request message. 4251 15.4.12. 412 Precondition Failed 4253 The precondition given in one or more of the request-header fields 4254 evaluated to false when it was tested on the server. This response 4255 code allows the client to place preconditions on the current resource 4256 meta information (header field data) and thus prevent the requested 4257 method from being applied to a resource other than the one intended. 4259 15.4.13. 413 Request Message Body Too Large 4261 The server is refusing to process a request because the request 4262 message body is larger than the server is willing or able to process. 4263 The server MAY close the connection to prevent the client from 4264 continuing the request. 4266 If the condition is temporary, the server SHOULD include a Retry- 4267 After header field to indicate that it is temporary and after what 4268 time the client MAY try again. 4270 15.4.14. 414 Request-URI Too Long 4272 The server is refusing to service the request because the Request-URI 4273 is longer than the server is willing to interpret. This rare 4274 condition is only likely to occur when a client has used a request 4275 with long query information, when the client has descended into a URI 4276 "black hole" of redirection (e.g., a redirected URI prefix that 4277 points to a suffix of itself), or when the server is under attack by 4278 a client attempting to exploit security holes present in some servers 4279 using fixed-length buffers for reading or manipulating the Request- 4280 URI. 4282 15.4.15. 415 Unsupported Media Type 4284 The server is refusing to service the request because the entity of 4285 the request is in a format not supported by the requested resource 4286 for the requested method. 4288 15.4.16. 451 Parameter Not Understood 4290 The recipient of the request does not support one or more parameters 4291 contained in the request. When returning this error message the 4292 sender SHOULD return a message body containing the offending 4293 parameter(s). 4295 15.4.17. 452 reserved 4297 This error code was removed from RFC 2326 [RFC2326] as it is 4298 obsolete. This error code MUST NOT be used anymore. 4300 15.4.18. 453 Not Enough Bandwidth 4302 The request was refused because there was insufficient bandwidth. 4303 This may, for example, be the result of a resource reservation 4304 failure. 4306 15.4.19. 454 Session Not Found 4308 The RTSP session identifier in the Session header is missing, 4309 invalid, or has timed out. 4311 15.4.20. 455 Method Not Valid in This State 4313 The client or server cannot process this request in its current 4314 state. The response MUST contain an Allow header to make error 4315 recovery possible. 4317 15.4.21. 456 Header Field Not Valid for Resource 4319 The server could not act on a required request header. For example, 4320 if PLAY contains the Range header field but the stream does not allow 4321 seeking. This error message may also be used for specifying when the 4322 time format in Range is impossible for the resource. In that case 4323 the Accept-Ranges header MUST be returned to inform the client of 4324 which format(s) that are allowed. 4326 15.4.22. 457 Invalid Range 4328 The Range value given is out of bounds, e.g., beyond the end of the 4329 presentation. 4331 15.4.23. 458 Parameter Is Read-Only 4333 The parameter to be set by SET_PARAMETER can be read but not 4334 modified. When returning this error message the sender SHOULD return 4335 a message body containing the offending parameter(s). 4337 15.4.24. 459 Aggregate Operation Not Allowed 4339 The requested method may not be applied on the URI in question since 4340 it is an aggregate (presentation) URI. The method may be applied on 4341 a media URI. 4343 15.4.25. 460 Only Aggregate Operation Allowed 4345 The requested method may not be applied on the URI in question since 4346 it is not an aggregate control (presentation) URI. The method may be 4347 applied on the aggregate control URI. 4349 15.4.26. 461 Unsupported Transport 4351 The Transport field did not contain a supported transport 4352 specification. 4354 15.4.27. 462 Destination Unreachable 4356 The data transmission channel could not be established because the 4357 client address could not be reached. This error will most likely be 4358 the result of a client attempt to place an invalid dest_addr 4359 parameter in the Transport field. 4361 15.4.28. 463 Destination Prohibited 4363 The data transmission channel was not established because the server 4364 prohibited access to the client address. This error is most likely 4365 the result of a client attempt to redirect media traffic to another 4366 destination with a dest_addr parameter in the Transport header. 4368 15.4.29. 464 Data Transport Not Ready Yet 4370 The data transmission channel to the media destination is not yet 4371 ready for carrying data. However, the responding entity still 4372 expects that the data transmission channel will be established at 4373 this point in time. Note, however, that this may result in a 4374 permanent failure like 462 "Destination Unreachable". 4376 An example when this error may occur is in the case a client sends a 4377 PLAY request to a server prior to ensuring that the TCP connections 4378 negotiated for carrying media data was successful established (In 4379 violation of this specification). The server would use this error 4380 code to indicate that the requested action could not be performed due 4381 to the failure of completing the connection establishment. 4383 15.4.30. 465 Notification Reason Unknown 4385 This indicates that the client has received a PLAY_NOTIFY 4386 (Section 13.5) with a Notify-Reason header (Section 16.31) unknown to 4387 the client. 4389 15.4.31. 470 Connection Authorization Required 4391 The secured connection attempt needs user or client authorization 4392 before proceeding. The next hops certificate is included in this 4393 response in the Accept-Credentials header. 4395 15.4.32. 471 Connection Credentials not accepted 4397 When performing a secure connection over multiple connections, a 4398 intermediary has refused to connect to the next hop and carry out the 4399 request due to unacceptable credentials for the used policy. 4401 15.4.33. 472 Failure to establish secure connection 4403 A proxy fails to establish a secure connection to the next hop RTSP 4404 agent. This is primarily caused by a fatal failure at the TLS 4405 handshake, for example due to server not accepting any cipher suits. 4407 15.5. Server Error 5xx 4409 Response status codes beginning with the digit "5" indicate cases in 4410 which the server is aware that it has erred or is incapable of 4411 performing the request The server SHOULD include an entity containing 4412 an explanation of the error situation, and whether it is a temporary 4413 or permanent condition. User agents SHOULD display any included 4414 entity to the user. These response codes are applicable to any 4415 request method. 4417 15.5.1. 500 Internal Server Error 4419 The server encountered an unexpected condition which prevented it 4420 from fulfilling the request. 4422 15.5.2. 501 Not Implemented 4424 The server does not support the functionality required to fulfill the 4425 request. This is the appropriate response when the server does not 4426 recognize the request method and is not capable of supporting it for 4427 any resource. 4429 15.5.3. 502 Bad Gateway 4431 The server, while acting as a gateway or proxy, received an invalid 4432 response from the upstream server it accessed in attempting to 4433 fulfill the request. 4435 15.5.4. 503 Service Unavailable 4437 The server is currently unable to handle the request due to a 4438 temporary overloading or maintenance of the server. The implication 4439 is that this is a temporary condition which will be alleviated after 4440 some delay. If known, the length of the delay MAY be indicated in a 4441 Retry-After header. If no Retry-After is given, the client SHOULD 4442 handle the response as it would for a 500 response. 4444 Note: The existence of the 503 status code does not imply that 4445 a server must use it when becoming overloaded. Some servers 4446 may wish to simply refuse the connection. 4448 15.5.5. 504 Gateway Timeout 4450 The server, while acting as a proxy, did not receive a timely 4451 response from the upstream server specified by the URI or some other 4452 auxiliary server (e.g. DNS) it needed to access in attempting to 4453 complete the request. 4455 15.5.6. 505 RTSP Version Not Supported 4457 The server does not support, or refuses to support, the RTSP protocol 4458 version that was used in the request message. The server is 4459 indicating that it is unable or unwilling to complete the request 4460 using the same major version as the client other than with this error 4461 message. The response SHOULD contain an message body describing why 4462 that version is not supported and what other protocols are supported 4463 by that server. 4465 15.5.7. 551 Option not supported 4467 A feature-tag given in the Require or the Proxy-Require fields was 4468 not supported. The Unsupported header MUST be returned stating the 4469 feature for which there is no support. 4471 16. Header Field Definitions 4473 +---------------+----------------+--------+---------+------+ 4474 | method | direction | object | acronym | Body | 4475 +---------------+----------------+--------+---------+------+ 4476 | DESCRIBE | C -> S | P,S | DES | r | 4477 | | | | | | 4478 | GET_PARAMETER | C -> S, S -> C | P,S | GPR | R,r | 4479 | | | | | | 4480 | OPTIONS | C -> S, S -> C | P,S | OPT | | 4481 | | | | | | 4482 | | S -> C | | | | 4483 | | | | | | 4484 | PAUSE | C -> S | P,S | PSE | | 4485 | | | | | | 4486 | PLAY | C -> S | P,S | PLY | | 4487 | | | | | | 4488 | PLAY_NOTIFY | S -> C | P,S | PNY | R | 4489 | | | | | | 4490 | REDIRECT | S -> C | P,S | RDR | | 4491 | | | | | | 4492 | SETUP | C -> S | S | STP | | 4493 | | | | | | 4494 | SET_PARAMETER | C -> S, S -> C | P,S | SPR | R,r | 4495 | | | | | | 4496 | TEARDOWN | C -> S | P,S | TRD | | 4497 +---------------+----------------+--------+---------+------+ 4499 Table 8: Overview of RTSP methods, their direction, and what objects 4500 (P: presentation, S: stream) they operate on. Body notes if a method 4501 is allowed to carry body and in which direction, R = Request, 4502 r=response. Note: It is allowed for all error messages 4xx and 5xx to 4503 have a body 4505 The general syntax for header fields is covered in Section 5.2. This 4506 section lists the full set of header fields along with notes on 4507 meaning, and usage. The syntax definition for header fields are 4508 present in Section 20.2.3. Throughout this section, we use [HX.Y] to 4509 informational refer to Section X.Y of the current HTTP/1.1 4510 specification RFC 2616 [RFC2616]. Examples of each header field are 4511 given. 4513 Information about header fields in relation to methods and proxy 4514 processing is summarized in Table 9, Table 10, Table 11, and 4515 Table 12. 4517 The "where" column describes the request and response types in which 4518 the header field can be used. Values in this column are: 4520 R: header field may only appear in requests; 4522 r: header field may only appear in responses; 4524 2xx, 4xx, etc.: A numerical value or range indicates response codes 4525 with which the header field can be used; 4527 c: header field is copied from the request to the response. 4529 An empty entry in the "where" column indicates that the header field 4530 may be present in both requests and responses. 4532 The "proxy" column describes the operations a proxy may perform on a 4533 header field. An empty proxy column indicates that the proxy MUST 4534 NOT do any changes to that header, all allowed operations are 4535 explicitly stated: 4537 a: A proxy can add or concatenate the header field if not present. 4539 m: A proxy can modify an existing header field value. 4541 d: A proxy can delete a header field value. 4543 r: A proxy needs to be able to read the header field, and thus 4544 this header field cannot be encrypted. 4546 The rest of the columns relate to the presence of a header field in a 4547 method. The method names when abbreviated, are according to Table 8: 4549 c: Conditional; requirements on the header field depend on the 4550 context of the message. 4552 m: The header field is mandatory. 4554 m*: The header field SHOULD be sent, but clients/servers need to be 4555 prepared to receive messages without that header field. 4557 o: The header field is optional. 4559 *: The header field MUST be present if the message body is not 4560 empty. See Section 16.16, Section 16.18 and Section 5.3 for 4561 details. 4563 -: The header field is not applicable. 4565 "Optional" means that a Client/Server MAY include the header field in 4566 a request or response. The Client/Server behavior when receiving 4567 such headers varies, for some it may ignore the header field, in 4568 other case it is request to process the header. This is regulated by 4569 the method and header descriptions. Example of headers that require 4570 processing are the Require and Proxy-Require header fields discussed 4571 in Section 16.42 and Section 16.35. A "mandatory" header field MUST 4572 be present in a request, and MUST be understood by the Client/Server 4573 receiving the request. A mandatory response header field MUST be 4574 present in the response, and the header field MUST be understood by 4575 the Client/Server processing the response. "Not applicable" means 4576 that the header field MUST NOT be present in a request. If one is 4577 placed in a request by mistake, it MUST be ignored by the Client/ 4578 Server receiving the request. Similarly, a header field labeled "not 4579 applicable" for a response means that the Client/Server MUST NOT 4580 place the header field in the response, and the Client/Server MUST 4581 ignore the header field in the response. 4583 An RTSP agent MUST ignore extension headers that are not understood. 4585 The From and Location header fields contain an URI. If the URI 4586 contains a comma, or semicolon, the URI MUST be enclosed in double 4587 quotes ("). Any URI parameters are contained within these quotes. 4588 If the URI is not enclosed in double quotas, any semicolon- delimited 4589 parameters are header-parameters, not URI parameters. 4591 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4592 | Header | Wher | Pro | DES | OPT | SETU | PLA | PAUS | TRD | 4593 | | e | xy | | | P | Y | E | | 4594 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4595 | Accept | R | | o | - | - | - | - | - | 4596 | | | | | | | | | | 4597 | Accept-Credent | R | r | o | o | o | o | o | o | 4598 | ials | | | | | | | | | 4599 | | | | | | | | | | 4600 | Accept-Encodin | R | r | o | - | - | - | - | - | 4601 | g | | | | | | | | | 4602 | | | | | | | | | | 4603 | Accept-Languag | R | r | o | - | - | - | - | - | 4604 | e | | | | | | | | | 4605 | | | | | | | | | | 4606 | Accept-Ranges | R | r | - | - | m | - | - | - | 4607 | | | | | | | | | | 4608 | Accept-Ranges | r | r | - | - | o | - | - | - | 4609 | | | | | | | | | | 4610 | Accept-Ranges | 456 | r | - | - | - | o | - | - | 4611 | | | | | | | | | | 4612 | Allow | r | am | c | c | c | - | - | - | 4613 | | | | | | | | | | 4614 | Allow | 405 | am | m | m | m | m | m | m | 4615 | | | | | | | | | | 4616 | Authorization | R | | o | o | o | o | o | o | 4617 | | | | | | | | | | 4618 | Bandwidth | R | | o | o | o | o | - | - | 4619 | | | | | | | | | | 4620 | Blocksize | R | | o | - | o | o | - | - | 4621 | | | | | | | | | | 4622 | Cache-Control | | r | o | - | o | - | - | - | 4623 | | | | | | | | | | 4624 | Connection | | | o | o | o | o | o | o | 4625 | | | | | | | | | | 4626 | Connection-Cre | 470, | ar | o | o | o | o | o | o | 4627 | dentials | 407 | | | | | | | | 4628 | | | | | | | | | | 4629 | Content-Base | r | | o | - | - | - | - | - | 4630 | | | | | | | | | | 4631 | Content-Base | 4xx, | | o | o | o | o | o | o | 4632 | | 5xx | | | | | | | | 4633 | | | | | | | | | | 4634 | Content-Encodi | R | r | - | - | - | - | - | - | 4635 | ng | | | | | | | | | 4636 | | | | | | | | | | 4637 | Content-Encodi | r | r | o | - | - | - | - | - | 4638 | ng | | | | | | | | | 4639 | | | | | | | | | | 4640 | Content-Encodi | 4xx, | r | o | o | o | o | o | o | 4641 | ng | 5xx | | | | | | | | 4642 | | | | | | | | | | 4643 | Content-Langua | R | r | - | - | - | - | - | - | 4644 | ge | | | | | | | | | 4645 | | | | | | | | | | 4646 | Content-Langua | r | r | o | - | - | - | - | - | 4647 | ge | | | | | | | | | 4648 | | | | | | | | | | 4649 | Content-Langua | 4xx, | r | o | o | o | o | o | o | 4650 | ge | 5xx | | | | | | | | 4651 | | | | | | | | | | 4652 | Content-Length | r | r | * | - | - | - | - | - | 4653 | | | | | | | | | | 4654 | Content-Length | 4xx, | r | * | * | * | * | * | * | 4655 | | 5xx | | | | | | | | 4656 | | | | | | | | | | 4657 | Content-Locati | r | | o | - | - | - | - | - | 4658 | on | | | | | | | | | 4659 | | | | | | | | | | 4660 | Content-Locati | 4xx, | | o | o | o | o | o | o | 4661 | on | 5xx | | | | | | | | 4662 | | | | | | | | | | 4663 | Content-Type | r | | * | - | - | - | - | - | 4664 | Content-Type | 4xx, | | * | * | * | * | * | * | 4665 | | 5xx | | | | | | | | 4666 | | | | | | | | | | 4667 | CSeq | Rc | rm | m | m | m | m | m | m | 4668 | | | | | | | | | | 4669 | Date | | am | o | o | o | o | o | o | 4670 | | | | | | | | | | 4671 | MTag | r | r | o | - | o | - | - | - | 4672 | | | | | | | | | | 4673 | Expires | r | r | o | - | - | - | - | - | 4674 | | | | | | | | | | 4675 | From | R | r | o | o | o | o | o | o | 4676 | | | | | | | | | | 4677 | If-Match | R | r | - | - | o | - | - | - | 4678 | | | | | | | | | | 4679 | If-Modified-Si | R | r | o | - | o | - | - | - | 4680 | nce | | | | | | | | | 4681 | | | | | | | | | | 4682 | If-None-Match | R | r | o | - | - | - | - | - | 4683 | | | | | | | | | | 4684 | Last-Modified | r | r | o | - | - | - | - | - | 4685 | | | | | | | | | | 4686 | Location | 3rr | | o | o | o | o | o | o | 4687 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4689 Table 9: Overview of RTSP header fields (A-L) related to methods 4690 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 4692 +--------------+-------+------+----+----+------+------+-------+-----+ 4693 | Header | Where | Prox | DE | OP | SETU | PLAY | PAUSE | TRD | 4694 | | | y | S | T | P | | | | 4695 +--------------+-------+------+----+----+------+------+-------+-----+ 4696 | Media- | | | - | - | r | r | r | - | 4697 | Properties | | | | | | | | | 4698 | | | | | | | | | | 4699 | Media-Range | | | - | - | r | r | r | - | 4700 | | | | | | | | | | 4701 | Pipelined- | | amdr | - | o | o | o | o | o | 4702 | Requests | | | | | | | | | 4703 | | | | | | | | | | 4704 | Proxy- | 407 | amr | m | m | m | m | m | m | 4705 | Authenticate | | | | | | | | | 4706 | | | | | | | | | | 4707 | Proxy- | R | rd | o | o | o | o | o | o | 4708 | Authorizatio | | | | | | | | | 4709 | n | | | | | | | | | 4710 | | | | | | | | | | 4711 | Proxy- | R | ar | o | o | o | o | o | o | 4712 | Require | | | | | | | | | 4713 | | | | | | | | | | 4714 | Proxy- | r | r | c | c | c | c | c | c | 4715 | Require | | | | | | | | | 4716 | | | | | | | | | | 4717 | Proxy- | R | amr | c | c | c | c | c | c | 4718 | Supported | | | | | | | | | 4719 | | | | | | | | | | 4720 | Proxy- | r | | c | c | c | c | c | c | 4721 | Supported | | | | | | | | | 4722 | | | | | | | | | | 4723 | Public | r | admr | - | m | - | - | - | - | 4724 | | | | | | | | | | 4725 | Public | 501 | admr | m | m | m | m | m | m | 4726 | | | | | | | | | | 4727 | Range | R | | - | - | - | o | - | - | 4728 | | | | | | | | | | 4729 | Range | r | | - | - | c | m | m | - | 4730 | | | | | | | | | | 4731 | Terminate-Re | R | r | - | - | - | - | - | - | 4732 | ason | | | | | | | | | 4733 | | | | | | | | | | 4734 | Referrer | R | | o | o | o | o | o | o | 4735 | | | | | | | | | | 4736 | Request- | R | | - | - | - | - | - | - | 4737 | Status | | | | | | | | | 4738 | | | | | | | | | | 4739 | Require | R | | o | o | o | o | o | o | 4740 | | | | | | | | | | 4741 | Retry-After | 3rr,5 | | o | o | o | - | - | - | 4742 | | 03 | | | | | | | | 4743 | | | | | | | | | | 4744 | Retry-After | 413 | | o | o | o | o | o | o | 4745 | | | | | | | | | | 4746 | RTP-Info | r | | - | - | c | c | - | - | 4747 | | | | | | | | | | 4748 | Scale | | | - | - | - | o | - | - | 4749 | | | | | | | | | | 4750 | Seek-Style | R | | - | - | - | o | - | - | 4751 | | | | | | | | | | 4752 | Seek-Style | r | | - | - | - | m | - | - | 4753 | | | | | | | | | | 4754 | Session | R | r | - | o | o | m | m | m | 4755 | | | | | | | | | | 4756 | Session | r | r | - | c | m | m | m | o | 4757 | | | | | | | | | | 4758 | Server | R | r | - | o | - | - | - | - | 4759 | Server | r | r | o | o | o | o | o | o | 4760 | | | | | | | | | | 4761 | Speed | | | - | - | - | o | - | - | 4762 | | | | | | | | | | 4763 | Supported | R | amr | o | o | o | o | o | o | 4764 | | | | | | | | | | 4765 | Supported | r | amr | c | c | c | c | c | c | 4766 | | | | | | | | | | 4767 | Timestamp | R | admr | o | o | o | o | o | o | 4768 | | | | | | | | | | 4769 | Timestamp | c | admr | m | m | m | m | m | m | 4770 | | | | | | | | | | 4771 | Transport | | amr | - | - | m | - | - | - | 4772 | | | | | | | | | | 4773 | Unsupported | r | | c | c | c | c | c | c | 4774 | | | | | | | | | | 4775 | User-Agent | R | | m* | m* | m* | m* | m* | m* | 4776 | | | | | | | | | | 4777 | Vary | r | | c | c | c | c | c | c | 4778 | | | | | | | | | | 4779 | Via | R | amr | o | o | o | o | o | o | 4780 | | | | | | | | | | 4781 | Via | c | dr | m | m | m | m | m | m | 4782 | | | | | | | | | | 4783 | WWW- | 401 | | m | m | m | m | m | m | 4784 | Authenticate | | | | | | | | | 4785 +--------------+-------+------+----+----+------+------+-------+-----+ 4787 Table 10: Overview of RTSP header fields (P-W) related to methods 4788 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 4790 +------------------------+---------+-------+-----+-----+-----+-----+ 4791 | Header | Where | Proxy | GPR | SPR | RDR | PNY | 4792 +------------------------+---------+-------+-----+-----+-----+-----+ 4793 | Accept-Credentials | R | r | o | o | o | - | 4794 | | | | | | | | 4795 | Allow | 405 | amr | m | m | m | - | 4796 | | | | | | | | 4797 | Authorization | R | | o | o | o | - | 4798 | | | | | | | | 4799 | Bandwidth | R | | - | o | - | - | 4800 | | | | | | | | 4801 | Blocksize | R | | - | o | - | - | 4802 | | | | | | | | 4803 | Connection | | | o | o | o | - | 4804 | | | | | | | | 4805 | Connection-Credentials | 470,407 | ar | o | o | o | - | 4806 | | | | | | | | 4807 | Content-Base | R | | o | o | - | - | 4808 | | | | | | | | 4809 | Content-Base | r | | o | o | - | - | 4810 | | | | | | | | 4811 | Content-Base | 4xx,5xx | | o | o | o | - | 4812 | | | | | | | | 4813 | Content-Encoding | R | r | o | o | - | - | 4814 | | | | | | | | 4815 | Content-Encoding | r | r | o | o | - | - | 4816 | | | | | | | | 4817 | Content-Encoding | 4xx,5xx | r | o | o | o | - | 4818 | | | | | | | | 4819 | Content-Language | R | r | o | o | - | - | 4820 | | | | | | | | 4821 | Content-Language | r | r | o | o | - | - | 4822 | | | | | | | | 4823 | Content-Language | 4xx,5xx | r | o | o | o | - | 4824 | | | | | | | | 4825 | Content-Length | R | r | * | * | - | - | 4826 | | | | | | | | 4827 | Content-Length | r | r | * | * | - | - | 4828 | | | | | | | | 4829 | Content-Length | 4xx,5xx | r | * | * | * | - | 4830 | | | | | | | | 4831 | Content-Location | R | | o | o | - | - | 4832 | | | | | | | | 4833 | Content-Location | r | | o | o | - | - | 4834 | | | | | | | | 4835 | Content-Location | 4xx,5xx | | o | o | o | - | 4836 | | | | | | | | 4837 | Content-Type | R | | * | * | - | - | 4838 | | | | | | | | 4839 | Content-Type | r | | * | * | - | - | 4840 | | | | | | | | 4841 | Content-Type | 4xx | | * | * | * | - | 4842 | | | | | | | | 4843 | CSeq | R,c | mr | m | m | m | m | 4844 | | | | | | | | 4845 | Date | R | a | o | o | m | - | 4846 | | | | | | | | 4847 | Date | r | am | o | o | o | - | 4848 | | | | | | | | 4849 | From | R | r | o | o | o | - | 4850 | | | | | | | | 4851 | Last-Modified | R | r | - | - | - | - | 4852 | | | | | | | | 4853 | Last-Modified | r | r | o | - | - | - | 4854 | | | | | | | | 4855 | Location | 3rr | | o | o | o | - | 4856 | | | | | | | | 4857 | Location | R | | - | - | m | - | 4858 | | | | | | | | 4859 | Media-Properties | | | - | - | - | | 4860 | | | | | | | | 4861 | Media-Range | R | | o | - | - | c | 4862 | | | | | | | | 4863 | Media-Range | r | | c | - | - | - | 4864 | | | | | | | | 4865 | Notify-Reason | R | | - | - | - | m | 4866 | | | | | | | | 4867 | Pipelined-Requests | | amdr | o | o | o | - | 4868 | | | | | | | | 4869 | Proxy-Authenticate | 407 | amr | m | m | m | - | 4870 | | | | | | | | 4871 | Proxy-Authorization | R | rd | o | o | o | - | 4872 | | | | | | | | 4873 | Proxy-Require | R | ar | o | o | o | - | 4874 | | | | | | | | 4875 | Proxy-Require | r | r | c | c | c | - | 4876 | | | | | | | | 4877 | Proxy-Supported | R | amr | c | c | c | - | 4878 | | | | | | | | 4879 | Proxy-Supported | r | | c | c | c | - | 4880 | | | | | | | | 4881 | Public | 501 | admr | m | m | m | - | 4882 +------------------------+---------+-------+-----+-----+-----+-----+ 4884 Table 11: Overview of RTSP header fields (A-P) related to methods 4885 GET_PARAMETER, SET_PARAMETER, PLAY_NOTIFY, and REDIRECT. 4887 +------------------+-------------+-------+-----+-----+-----+-----+ 4888 | Header | Where | Proxy | GPR | SPR | RDR | PNY | 4889 +------------------+-------------+-------+-----+-----+-----+-----+ 4890 | Range | R | | o | - | o | m | 4891 | | | | | | | | 4892 | Terminate-Reason | R | r | - | - | m | - | 4893 | | | | | | | | 4894 | Referrer | R | | o | o | o | - | 4895 | | | | | | | | 4896 | Request-Status | R | | - | - | - | m | 4897 | | | | | | | | 4898 | Require | R | r | o | o | o | - | 4899 | | | | | | | | 4900 | Retry-After | 3rr,413,503 | | o | o | - | - | 4901 | | | | | | | | 4902 | Retry-After | 413 | | o | o | o | o | 4903 | Scale | | | - | - | - | c | 4904 | | | | | | | | 4905 | Seek-Style | | | - | - | - | - | 4906 | | | | | | | | 4907 | Session | R | r | o | o | o | m | 4908 | | | | | | | | 4909 | Session | r | r | c | c | o | m | 4910 | | | | | | | | 4911 | Server | R | r | o | o | o | - | 4912 | | | | | | | | 4913 | Server | r | r | o | o | - | - | 4914 | | | | | | | | 4915 | Speed | | | - | - | - | - | 4916 | | | | | | | | 4917 | Supported | R | adrm | o | o | o | - | 4918 | | | | | | | | 4919 | Supported | r | adrm | c | c | c | - | 4920 | | | | | | | | 4921 | Timestamp | R | adrm | o | o | o | - | 4922 | | | | | | | | 4923 | Timestamp | c | adrm | m | m | m | - | 4924 | | | | | | | | 4925 | Unsupported | r | arm | c | c | c | - | 4926 | | | | | | | | 4927 | User-Agent | R | r | m* | m* | - | - | 4928 | | | | | | | | 4929 | User-Agent | r | r | - | - | m* | - | 4930 | | | | | | | | 4931 | Vary | r | | c | c | - | - | 4932 | | | | | | | | 4933 | Via | R | amr | o | o | o | - | 4934 | | | | | | | | 4935 | Via | c | dr | m | m | m | - | 4936 | | | | | | | | 4937 | WWW-Authenticate | 401 | | m | m | m | - | 4938 +------------------+-------------+-------+-----+-----+-----+-----+ 4940 Table 12: Overview of RTSP header fields (R-W) related to methods 4941 GET_PARAMETER, SET_PARAMETER, PLAY_NOTIFY, and REDIRECT. 4943 16.1. Accept 4945 The Accept request-header field can be used to specify certain 4946 presentation description content types which are acceptable for the 4947 response. 4949 See Section 20.2.3 for the syntax. 4951 Example of use: 4952 Accept: application/example ;q=1.0, application/sdp 4954 16.2. Accept-Credentials 4956 The Accept-Credentials header is a request header used to indicate to 4957 any trusted intermediary how to handle further secured connections to 4958 proxies or servers. See Section 19 for the usage of this header. It 4959 MUST NOT be included in server to client requests. 4961 In a request the header MUST contain the method (User, Proxy, or Any) 4962 for approving credentials selected by the requester. The method MUST 4963 NOT be changed by any proxy, unless it is "proxy" when a proxy MAY 4964 change it to "user" to take the role of user approving each further 4965 hop. If the method is "User" the header contains zero or more of 4966 credentials that the client accepts. The header may contain zero 4967 credentials in the first RTSP request to a RTSP server when using the 4968 "User" method. This as the client has not yet received any 4969 credentials to accept. Each credential MUST consist of one URI 4970 identifying the proxy or server, the hash algorithm identifier, and 4971 the hash over that entity's DER encoded certificate [RFC5280] in 4972 Base64 [RFC4648]. All RTSP clients and proxies MUST implement the 4973 SHA-256[FIPS-pub-180-2] algorithm for computation of the hash of the 4974 DER encoded certificate. The SHA-256 algorithm is identified by the 4975 token "sha-256". 4977 The intention with allowing for other hash algorithms is to enable 4978 the future retirement of algorithms that are not implemented 4979 somewhere else than here. Thus the definition of future algorithms 4980 for this purpose is intended to be extremely limited. A feature tag 4981 can be used to ensure that support for the replacement algorithm 4982 exist. 4984 Example: 4985 Accept-Credentials:User 4986 "rtsps://proxy2.example.com/";sha-256;exaIl9VMbQMOFGClx5rXnPJKVNI=, 4987 "rtsps://server.example.com/";sha-256;lurbjj5khhB0NhIuOXtt4bBRH1M= 4989 16.3. Accept-Encoding 4991 The Accept-Encoding request-header field is similar to Accept, but 4992 restricts the content-codings that are acceptable in the response. 4994 A server tests whether a content-coding is acceptable, according to 4995 an Accept-Encoding field, using these rules: 4997 1. If the content-coding is one of the content-codings listed in the 4998 Accept-Encoding field, then it is acceptable, unless it is 4999 accompanied by a qvalue of 0. (As defined in section 3.9, a 5000 qvalue of 0 means "not acceptable.") 5002 2. The special "*" symbol in an Accept-Encoding field matches any 5003 available content-coding not explicitly listed in the header 5004 field. 5006 3. If multiple content-codings are acceptable, then the acceptable 5007 content-coding with the highest non-zero qvalue is preferred. 5009 4. The "identity" content-coding is always acceptable, unless 5010 specifically refused because the Accept-Encoding field includes 5011 "identity;q=0", or because the field includes "*;q=0" and does 5012 not explicitly include the "identity" content-coding. If the 5013 Accept-Encoding field-value is empty, then only the "identity" 5014 encoding is acceptable. 5016 If an Accept-Encoding field is present in a request, and if the 5017 server cannot send a response which is acceptable according to the 5018 Accept-Encoding header, then the server SHOULD send an error response 5019 with the 406 (Not Acceptable) status code. 5021 If no Accept-Encoding field is present in a request, the server MAY 5022 assume that the client will accept any content coding. In this case, 5023 if "identity" is one of the available content-codings, then the 5024 server SHOULD use the "identity" content-coding, unless it has 5025 additional information that a different content-coding is meaningful 5026 to the client. 5028 16.4. Accept-Language 5030 The Accept-Language request-header field is similar to Accept, but 5031 restricts the set of natural languages that are preferred as a 5032 response to the request. Note that the language specified applies to 5033 the presentation description and any reason phrases, but not the 5034 media content. 5036 A language tag identifies a natural language spoken, written, or 5037 otherwise conveyed by human beings for communication of information 5038 to other human beings. Computer languages are explicitly excluded. 5039 The syntax and registry of RTSP 2.0 language tags is the same as that 5040 defined by [RFC4646]. 5042 Each language-range MAY be given an associated quality value which 5043 represents an estimate of the user's preference for the languages 5044 specified by that range. The quality value defaults to "q=1". For 5045 example: 5047 Accept-Language: da, en-gb;q=0.8, en;q=0.7 5049 would mean: "I prefer Danish, but will accept British English and 5050 other types of English." A language-range matches a language-tag if 5051 it exactly equals the tag, or if it exactly equals a prefix of the 5052 tag such that the first tag character following the prefix is "-". 5053 The special range "*", if present in the Accept-Language field, 5054 matches every tag not matched by any other range present in the 5055 Accept-Language field. 5057 Note: This use of a prefix matching rule does not imply that 5058 language tags are assigned to languages in such a way that it is 5059 always true that if a user understands a language with a certain 5060 tag, then this user will also understand all languages with tags 5061 for which this tag is a prefix. The prefix rule simply allows the 5062 use of prefix tags if this is the case. 5064 The language quality factor assigned to a language-tag by the Accept- 5065 Language field is the quality value of the longest language-range in 5066 the field that matches the language-tag. If no language-range in the 5067 field matches the tag, the language quality factor assigned is 0. If 5068 no Accept-Language header is present in the request, the server 5069 SHOULD assume that all languages are equally acceptable. If an 5070 Accept-Language header is present, then all languages which are 5071 assigned a quality factor greater than 0 are acceptable. 5073 16.5. Accept-Ranges 5075 The Accept-Ranges request and response-header field allows indication 5076 of the format supported in the Range header. The client MUST include 5077 the header in SETUP requests to indicate which formats it support to 5078 receive in PLAY and PAUSE responses, and REDIRECT requests. The 5079 server MUST include the header in SETUP and 456 error responses to 5080 indicate the formats supported for the resource indicated by the 5081 request URI. The header MAY be included in GET_PARAMETER request and 5082 response pairs. The GET_PARAMETER request MUST contain a Session 5083 header to identify the session context the request are related to. 5084 The requester and responder will indicate their capabilities 5085 regarding Range formats respectively. 5086 Accept-Ranges: NPT, SMPTE 5088 The syntax is defined in Section 20.2.3. 5090 16.6. Allow 5092 The Allow message-header field lists the methods supported by the 5093 resource identified by the Request-URI. The purpose of this field is 5094 to strictly inform the recipient of valid methods associated with the 5095 resource. An Allow header field MUST be present in a 405 (Method Not 5096 Allowed) response. The Allow header MUST also be present in all 5097 OPTIONS responses where the content of the header will not include 5098 exactly the same methods as listed in the Public header. 5100 The Allow MUST also be included in SETUP and DESCRIBE responses, if 5101 the methods allowed for the resource is different than the minimal 5102 implementation set. 5104 Example of use: 5105 Allow: SETUP, PLAY, SET_PARAMETER, DESCRIBE 5107 16.7. Authorization 5109 An RTSP client that wishes to authenticate itself with a server, 5110 usually, but not necessarily, after receiving a 401 response, does so 5111 by including an Authorization request-header field with the request. 5112 The Authorization field value consists of credentials containing the 5113 authentication information of the user agent for the realm of the 5114 resource being requested. 5116 If a request is authenticated and a realm specified, the same 5117 credentials SHOULD be valid for all other requests within this realm 5118 (assuming that the authentication scheme itself does not require 5119 otherwise, such as credentials that vary according to a challenge 5120 value or using synchronized clocks). 5122 When a shared cache (see Section 18) receives a request containing an 5123 Authorization field, it MUST NOT return the corresponding response as 5124 a reply to any other request, unless one of the following specific 5125 exceptions holds: 5127 1. If the response includes the "maxage" cache-control directive, 5128 the cache MAY use that response in replying to a subsequent 5129 request. But (if the specified maximum age has passed) a proxy 5130 cache MUST first revalidate it with the origin server, using the 5131 request-headers from the new request to allow the origin server 5132 to authenticate the new request. (This is the defined behavior 5133 for maxage.) If the response includes "maxage=0", the proxy MUST 5134 always revalidate it before re-using it. 5136 2. If the response includes the "must-revalidate" cache-control 5137 directive, the cache MAY use that response in replying to a 5138 subsequent request. But if the response is stale, all caches 5139 MUST first revalidate it with the origin server, using the 5140 request-headers from the new request to allow the origin server 5141 to authenticate the new request. 5143 3. If the response includes the "public" cache-control directive, it 5144 MAY be returned in reply to any subsequent request. 5146 16.8. Bandwidth 5148 The Bandwidth request-header field describes the estimated bandwidth 5149 available to the client, expressed as a positive integer and measured 5150 in bits per second. The bandwidth available to the client may change 5151 during an RTSP session, e.g., due to mobility, congestion, etc. 5153 Example: 5154 Bandwidth: 62360 5156 16.9. Blocksize 5158 The Blocksize request-header field is sent from the client to the 5159 media server asking the server for a particular media packet size. 5160 This packet size does not include lower-layer headers such as IP, 5161 UDP, or RTP. The server is free to use a blocksize which is lower 5162 than the one requested. The server MAY truncate this packet size to 5163 the closest multiple of the minimum, media-specific block size, or 5164 override it with the media-specific size if necessary. The block 5165 size MUST be a positive decimal number, measured in octets. The 5166 server only returns an error (4xx) if the value is syntactically 5167 invalid. 5169 16.10. Cache-Control 5171 The Cache-Control general-header field is used to specify directives 5172 that MUST be obeyed by all caching mechanisms along the request/ 5173 response chain. 5175 Cache directives MUST be passed through by a proxy or gateway 5176 application, regardless of their significance to that application, 5177 since the directives may be applicable to all recipients along the 5178 request/response chain. It is not possible to specify a cache- 5179 directive for a specific cache. 5181 Cache-Control should only be specified in a SETUP request and its 5182 response. Note: Cache-Control does not govern the caching of 5183 responses as for HTTP, instead it applies to the media stream 5184 identified by the SETUP request. The RTSP requests are generally not 5185 cacheable, for further information see Section 18. Below is the 5186 description of the cache directives that can be included in the 5187 Cache-Control header. 5189 no-cache: Indicates that the media stream MUST NOT be cached 5190 anywhere. This allows an origin server to prevent caching even 5191 by caches that have been configured to return stale responses 5192 to client requests. Note, there is no security function 5193 enforcing that the content can't be cached. 5195 public: Indicates that the media stream is cacheable by any cache. 5197 private: Indicates that the media stream is intended for a single 5198 user and MUST NOT be cached by a shared cache. A private (non- 5199 shared) cache may cache the media streams. 5201 no-transform: An intermediate cache (proxy) may find it useful to 5202 convert the media type of a certain stream. A proxy might, for 5203 example, convert between video formats to save cache space or 5204 to reduce the amount of traffic on a slow link. Serious 5205 operational problems may occur, however, when these 5206 transformations have been applied to streams intended for 5207 certain kinds of applications. For example, applications for 5208 medical imaging, scientific data analysis and those using end- 5209 to-end authentication all depend on receiving a stream that is 5210 bit-for-bit identical to the original media stream. Therefore, 5211 if a response includes the no-transform directive, an 5212 intermediate cache or proxy MUST NOT change the encoding of the 5213 stream. Unlike HTTP, RTSP does not provide for partial 5214 transformation at this point, e.g., allowing translation into a 5215 different language. 5217 only-if-cached: In some cases, such as times of extremely poor 5218 network connectivity, a client may want a cache to return only 5219 those media streams that it currently has stored, and not to 5220 receive these from the origin server. To do this, the client 5221 may include the only-if-cached directive in a request. If it 5222 receives this directive, a cache SHOULD either respond using a 5223 cached media stream that is consistent with the other 5224 constraints of the request, or respond with a 504 (Gateway 5225 Timeout) status. However, if a group of caches is being 5226 operated as a unified system with good internal connectivity, 5227 such a request MAY be forwarded within that group of caches. 5229 max-stale: Indicates that the client is willing to accept a media 5230 stream that has exceeded its expiration time. If max-stale is 5231 assigned a value, then the client is willing to accept a 5232 response that has exceeded its expiration time by no more than 5233 the specified number of seconds. If no value is assigned to 5234 max-stale, then the client is willing to accept a stale 5235 response of any age. 5237 min-fresh: Indicates that the client is willing to accept a media 5238 stream whose freshness lifetime is no less than its current age 5239 plus the specified time in seconds. That is, the client wants 5240 a response that will still be fresh for at least the specified 5241 number of seconds. 5243 must-revalidate: When the must-revalidate directive is present in a 5244 SETUP response received by a cache, that cache MUST NOT use the 5245 entry after it becomes stale to respond to a subsequent request 5246 without first revalidating it with the origin server. That is, 5247 the cache is required to do an end-to-end revalidation every 5248 time, if, based solely on the origin server's Expires, the 5249 cached response is stale.) 5251 proxy-revalidate: The proxy-revalidate directive has the same 5252 meaning as the must-revalidate directive, except that it does 5253 not apply to non-shared user agent caches. It can be used on a 5254 response to an authenticated request to permit the user's cache 5255 to store and later return the response without needing to 5256 revalidate it (since it has already been authenticated once by 5257 that user), while still requiring proxies that service many 5258 users to revalidate each time (in order to make sure that each 5259 user has been authenticated). Note that such authenticated 5260 responses also need the public cache control directive in order 5261 to allow them to be cached at all. 5263 max-age: When an intermediate cache is forced, by means of a max- 5264 age=0 directive, to revalidate its own cache entry, and the 5265 client has supplied its own validator in the request, the 5266 supplied validator might differ from the validator currently 5267 stored with the cache entry. In this case, the cache MAY use 5268 either validator in making its own request without affecting 5269 semantic transparency. 5271 However, the choice of validator might affect performance. The best 5272 approach is for the intermediate cache to use its own validator when 5273 making its request. If the server replies with 304 (Not Modified), 5274 then the cache can return its now validated copy to the client with a 5275 200 (OK) response. If the server replies with a new entity and cache 5276 validator, however, the intermediate cache can compare the returned 5277 validator with the one provided in the client's request, using the 5278 strong comparison function. If the client's validator is equal to 5279 the origin server's, then the intermediate cache simply returns 304 5280 (Not Modified). Otherwise, it returns the new entity with a 200 (OK) 5281 response. 5283 16.11. Connection 5285 The Connection general-header field allows the sender to specify 5286 options that are desired for that particular connection and MUST NOT 5287 be communicated by proxies over further connections. 5289 RTSP 2.0 proxies MUST parse the Connection header field before a 5290 message is forwarded and, for each connection-token in this field, 5291 remove any header field(s) from the message with the same name as the 5292 connection-token. Connection options are signaled by the presence of 5293 a connection-token in the Connection header field, not by any 5294 corresponding additional header field(s), since the additional header 5295 field may not be sent if there are no parameters associated with that 5296 connection option. 5298 Message headers listed in the Connection header MUST NOT include end- 5299 to-end headers, such as Cache-Control. 5301 The use of the connection option "close" in RTSP messages SHOULD be 5302 limited to error messages when the server is unable to recover and 5303 therefore see it necessary to close the connection. The reason is 5304 that the client has the choice of continuing using a connection 5305 indefinitely, as long as it sends valid messages. 5307 16.12. Connection-Credentials 5309 The Connection-Credentials response header is used to carry the chain 5310 of credentials of any next hop that need to be approved by the 5311 requester. It MUST only be used in server to client responses. 5313 The Connection-Credentials header in an RTSP response MUST, if 5314 included, contain the credential information (in form of a list of 5315 certificates providing the chain of certification) of the next hop 5316 that an intermediary needs to securely connect to. The header MUST 5317 include the URI of the next hop (proxy or server) and a base64 5318 [RFC4648] encoded binary structure containing a sequence of DER 5319 encoded X.509v3 certificates[RFC5280] . 5321 The binary structure starts with the number of certificates 5322 (NR_CERTS) included as a 16 bit unsigned integer. This is followed 5323 by NR_CERTS number of 16 bit unsigned integers providing the size in 5324 octets of each DER encoded certificate. This is followed by NR_CERTS 5325 number of DER encoded X.509v3 certificates in a sequence (chain). 5326 The proxy or server's certificate must come first in the structure. 5327 Each following certificate must directly certify the one preceding 5328 it. Because certificate validation requires that root keys be 5329 distributed independently, the self-signed certificate which 5330 specifies the root certificate authority may optionally be omitted 5331 from the chain, under the assumption that the remote end must already 5332 possess it in order to validate it in any case. 5334 Example: 5336 Connection-Credentials:"rtsps://proxy2.example.com/";MIIDNTCC... 5338 Where MIIDNTCC... is a BASE64 encoding of the following structure: 5340 0 1 2 3 5341 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 5342 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5343 | Number of certificates | Size of certificate #1 | 5344 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5345 | Size of certificate #2 | Size of certificate #3 | 5346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5347 : DER Encoding of Certificate #1 : 5348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5349 : DER Encoding of Certificate #2 : 5350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5351 : DER Encoding of Certificate #3 : 5352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5354 16.13. Content-Base 5356 The Content-Base message-header field may be used to specify the base 5357 URI for resolving relative URIs within the message body. 5358 Content-Base: rtsp://media.example.com/movie/twister/ 5359 If no Content-Base field is present, the base URI of an message body 5360 is defined either by its Content-Location (if that Content-Location 5361 URI is an absolute URI) or the URI used to initiate the request, in 5362 that order of precedence. Note, however, that the base URI of the 5363 contents within the message-body may be redefined within that 5364 message-body. 5366 16.14. Content-Encoding 5368 The Content-Encoding header field is used as a modifier to the media- 5369 type. When present, its value indicates what additional content 5370 codings have been applied to the message body, and thus what decoding 5371 mechanisms must be applied in order to obtain the media-type 5372 referenced by the Content-Type header field. Content-Encoding is 5373 primarily used to allow a document to be compressed without losing 5374 the identity of its underlying media type. 5376 The content-coding is a characteristic of the entity identified by 5377 the Request-URI. Typically, the message body is stored with this 5378 encoding and is only decoded before rendering or analogous usage. 5380 However, a non-transparent proxy MAY modify the content-coding if the 5381 new coding is known to be acceptable to the recipient, unless the 5382 "no-transform" cache-control directive is present in the message. 5384 If the content-coding of an message body is not "identity", then the 5385 response MUST include a Content-Encoding entity-header that lists the 5386 non-identity content-coding(s) used. 5388 If the content-coding of an message body in a request message is not 5389 acceptable to the origin server, the server SHOULD respond with a 5390 status code of 415 (Unsupported Media Type). 5392 If multiple encodings have been applied to a message body, the 5393 content codings MUST be listed in the order in which they were 5394 applied. Additional information about the encoding parameters MAY be 5395 provided by other header fields not defined by this specification. 5397 16.15. Content-Language 5399 The Content-Language header field describes the natural language(s) 5400 of the intended audience for the enclosed message body. Note that 5401 this might not be equivalent to all the languages used within the 5402 message body. 5404 Language tags are mentioned in Section 16.4. The primary purpose of 5405 Content-Language is to allow a user to identify and differentiate 5406 entities according to the user's own preferred language. Thus, if 5407 the body content is intended only for a Danish-literate audience, the 5408 appropriate field is 5410 Content-Language: da 5412 If no Content-Language is specified, the default is that the content 5413 is intended for all language audiences. This might mean that the 5414 sender does not consider it to be specific to any natural language, 5415 or that the sender does not know for which language it is intended. 5417 Multiple languages MAY be listed for content that is intended for 5418 multiple audiences. For example, a rendition of the "Treaty of 5419 Waitangi," presented simultaneously in the original Maori and English 5420 versions, would call for 5422 Content-Language: mi, en 5424 However, just because multiple languages are present within an entity 5425 does not mean that it is intended for multiple linguistic audiences. 5426 An example would be a beginner's language primer, such as "A First 5427 Lesson in Latin," which is clearly intended to be used by an English- 5428 literate audience. In this case, the Content-Language would properly 5429 only include "en". 5431 Content-Language MAY be applied to any media type -- it is not 5432 limited to textual documents. 5434 16.16. Content-Length 5436 The Content-Length general-header field contains the length of the 5437 message body of the RTSP message (i.e. after the double CRLF 5438 following the last header). Unlike HTTP, it MUST be included in all 5439 messages that carry a message body beyond the header portion of the 5440 RTSP message. If it is missing, a default value of zero is assumed. 5441 Any Content-Length greater than or equal to zero is a valid value. 5443 16.17. Content-Location 5445 The Content-Location header field MAY be used to supply the resource 5446 location for the entity enclosed in the message when that entity is 5447 accessible from a location separate from the requested resource's 5448 URI. A server SHOULD provide a Content-Location for the variant 5449 corresponding to the response entity; especially in the case where a 5450 resource has multiple entities associated with it, and those entities 5451 actually have separate locations by which they might be individually 5452 accessed, the server SHOULD provide a Content-Location for the 5453 particular variant which is returned. 5455 The Content-Location value is not a replacement for the original 5456 requested URI; it is only a statement of the location of the resource 5457 corresponding to this particular entity at the time of the request. 5458 Future requests MAY specify the Content-Location URI as the request- 5459 URI if the desire is to identify the source of that particular 5460 entity. 5462 A cache cannot assume that an entity with a Content-Location 5463 different from the URI used to retrieve it can be used to respond to 5464 later requests on that Content-Location URI. However, the Content- 5465 Location can be used to differentiate between multiple entities 5466 retrieved from a single requested resource. 5468 If the Content-Location is a relative URI, the relative URI is 5469 interpreted relative to the Request-URI. 5471 16.18. Content-Type 5473 The Content-Type header indicates the media type of the message body 5474 sent to the recipient. Note that the content types suitable for RTSP 5475 are likely to be restricted in practice to presentation descriptions 5476 and parameter-value types. 5478 16.19. CSeq 5480 The CSeq general-header field specifies the sequence number for an 5481 RTSP request-response pair. This field MUST be present in all 5482 requests and responses. For every RTSP request containing the given 5483 sequence number, the corresponding response will have the same 5484 number. Any retransmitted request MUST contain the same sequence 5485 number as the original (i.e. the sequence number is not incremented 5486 for retransmissions of the same request). For each new RTSP request 5487 the CSeq value MUST be incremented by one. The initial sequence 5488 number MAY be any number, however, it is RECOMMENDED to start at 0. 5489 Each sequence number series is unique between each requester and 5490 responder, i.e. the client has one series for its request to a server 5491 and the server has another when sending request to the client. Each 5492 requester and responder is identified with its network address. 5494 Proxies that aggregate several sessions on the same transport will 5495 regularly need to renumber the CSeq header field in requests and 5496 responses to fulfill the rules for the header. 5498 Example: 5499 CSeq: 239 5501 16.20. Date 5503 The Date header field represents the date and time at which the 5504 message was originated. The inclusion of the Date header in RTSP 5505 message follows these rules: 5507 o An RTSP message, sent either by the client or the server, 5508 containing a body MUST include a Date header, if the sending host 5509 has a clock; 5511 o Clients and servers are RECOMMENDED to include a Date header in 5512 all other RTSP messages, if the sending host has a clock; 5514 o If the server does not have a clock that can provide a reasonable 5515 approximation of the current time, its responses MUST NOT include 5516 a Date header field. In this case, this rule MUST be followed: 5517 Some origin server implementations might not have a clock 5518 available. An origin server without a clock MUST NOT assign 5519 Expires or Last- Modified values to a response, unless these 5520 values were associated with the resource by a system or user with 5521 a reliable clock. It MAY assign an Expires value that is known, 5522 at or before server configuration time, to be in the past (this 5523 allows "pre-expiration" of responses without storing separate 5524 Expires values for each resource). 5526 A received message that does not have a Date header field MUST be 5527 assigned one by the recipient if the message will be cached by that 5528 recipient . An RTSP implementation without a clock MUST NOT cache 5529 responses without revalidating them on every use. An RTSP cache, 5530 especially a shared cache, SHOULD use a mechanism, such as NTP, to 5531 synchronize its clock with a reliable external standard. 5533 The RTSP-date sent in a Date header SHOULD NOT represent a date and 5534 time subsequent to the generation of the message. It SHOULD 5535 represent the best available approximation of the date and time of 5536 message generation, unless the implementation has no means of 5537 generating a reasonably accurate date and time. In theory, the date 5538 ought to represent the moment just before the entity is generated. 5539 In practice, the date can be generated at any time during the message 5540 origination without affecting its semantic value. 5542 16.21. Expires 5544 The Expires message-header field gives a date and time after which 5545 the description or media-stream should be considered stale. The 5546 interpretation depends on the method: 5548 DESCRIBE response: The Expires header indicates a date and time 5549 after which the presentation description (body) SHOULD be 5550 considered stale. 5552 SETUP response: The Expires header indicate a date and time after 5553 which the media stream SHOULD be considered stale. 5555 A stale cache entry may not normally be returned by a cache (either a 5556 proxy cache or an user agent cache) unless it is first validated with 5557 the origin server (or with an intermediate cache that has a fresh 5558 copy of the message body). See Section 18 for further discussion of 5559 the expiration model. 5561 The presence of an Expires field does not imply that the original 5562 resource will change or cease to exist at, before, or after that 5563 time. 5565 The format is an absolute date and time as defined by RTSP-date: 5567 An example of its use is 5568 Expires: Thu, 01 Dec 1994 16:00:00 GMT 5570 RTSP/2.0 clients and caches MUST treat other invalid date formats, 5571 especially including the value "0", as having occurred in the past 5572 (i.e., already expired). 5574 To mark a response as "already expired," an origin server should use 5575 an Expires date that is equal to the Date header value. To mark a 5576 response as "never expires," an origin server SHOULD use an Expires 5577 date approximately one year from the time the response is sent. 5578 RTSP/2.0 servers SHOULD NOT send Expires dates more than one year in 5579 the future. 5581 16.22. From 5583 The From request-header field, if given, SHOULD contain an Internet 5584 e-mail address for the human user who controls the requesting user 5585 agent. The address SHOULD be machine-usable, as defined by "mailbox" 5586 in [RFC1123]. 5588 This header field MAY be used for logging purposes and as a means for 5589 identifying the source of invalid or unwanted requests. It SHOULD 5590 NOT be used as an insecure form of access protection. The 5591 interpretation of this field is that the request is being performed 5592 on behalf of the person given, who accepts responsibility for the 5593 method performed. In particular, robot agents SHOULD include this 5594 header so that the person responsible for running the robot can be 5595 contacted if problems occur on the receiving end. 5597 The Internet e-mail address in this field MAY be separate from the 5598 Internet host which issued the request. For example, when a request 5599 is passed through a proxy the original issuer's address SHOULD be 5600 used. 5602 The client SHOULD NOT send the From header field without the user's 5603 approval, as it might conflict with the user's privacy interests or 5604 their site's security policy. It is strongly recommended that the 5605 user be able to disable, enable, and modify the value of this field 5606 at any time prior to a request. 5608 16.23. If-Match 5610 See [H14.24]. 5612 The If-Match request-header field is especially useful for ensuring 5613 the integrity of the presentation description, in both the case where 5614 it is fetched via means external to RTSP (such as HTTP), or in the 5615 case where the server implementation is guaranteeing the integrity of 5616 the description between the time of the DESCRIBE message and the 5617 SETUP message. By including the MTag given in or with the session 5618 description in a SETUP request, the client ensures that resources set 5619 up are matching the description. A SETUP request for which the MTag 5620 validation check fails, MUST response using 412 (Precondition 5621 Failed). 5623 This validation check is also very useful if a session has been 5624 redirected from one server to another. 5626 16.24. If-Modified-Since 5628 The If-Modified-Since request-header field is used with the DESCRIBE 5629 and SETUP methods to make them conditional. If the requested variant 5630 has not been modified since the time specified in this field, a 5631 description will not be returned from the server (DESCRIBE) or a 5632 stream will not be set up (SETUP). Instead, a 304 (Not Modified) 5633 response MUST be returned without any message-body. 5635 An example of the field is: 5636 If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT 5638 16.25. If-None-Match 5640 This request header can be used with one or several message body tags 5641 to make DESCRIBE requests conditional. A client that has one or more 5642 message bodies previously obtained from the resource, can verify that 5643 none of those entities is current by including a list of their 5644 associated message body tags in the If-None-Match header field. The 5645 purpose of this feature is to allow efficient updates of cached 5646 information with a minimum amount of transaction overhead. As a 5647 special case, the value "*" matches any current entity of the 5648 resource. 5650 If any of the message body tags match the message body tag of the 5651 message body that would have been returned in the response to a 5652 similar DESCRIBE request (without the If-None-Match header) on that 5653 resource, or if "*" is given and any current entity exists for that 5654 resource, then the server MUST NOT perform the requested method, 5655 unless required to do so because the resource's modification date 5656 fails to match that supplied in an If-Modified-Since header field in 5657 the request. Instead, if the request method was DESCRIBE, the server 5658 SHOULD respond with a 304 (Not Modified) response, including the 5659 cache-related header fields (particularly MTag) of one of the message 5660 bodies that matched. For all other request methods, the server MUST 5661 respond with a status of 412 (Precondition Failed). 5663 See Section 18.1.3 for rules on how to determine if two message body 5664 tags match. 5666 If none of the message body tags match, then the server MAY perform 5667 the requested method as if the If-None-Match header field did not 5668 exist, but MUST also ignore any If-Modified-Since header field(s) in 5669 the request. That is, if no message body tags match, then the server 5670 MUST NOT return a 304 (Not Modified) response. 5672 If the request would, without the If-None-Match header field, result 5673 in anything other than a 2xx or 304 status, then the If-None-Match 5674 header MUST be ignored. (See Section 18.1.4 for a discussion of 5675 server behavior when both If-Modified-Since and If-None-Match appear 5676 in the same request.) 5678 The meaning of "If-None-Match: *" is that the method MUST NOT be 5679 performed if the representation selected by the origin server (or by 5680 a cache, possibly using the Vary mechanism, see Section 16.55) 5681 exists, and SHOULD be performed if the representation does not exist. 5682 This feature is intended to be useful in preventing races between PUT 5683 operations. 5685 The result of a request having both an If-None-Match header field and 5686 either an If-Match or an If-Unmodified-Since header fields is 5687 undefined by this specification. 5689 16.26. Last-Modified 5691 The Last-Modified message-header field indicates the date and time at 5692 which the origin server believes the presentation description or 5693 media stream was last modified. For the method DESCRIBE, the header 5694 field indicates the last modification date and time of the 5695 description, for SETUP that of the media stream. 5697 An origin server MUST NOT send a Last-Modified date which is later 5698 than the server's time of message origination. In such cases, where 5699 the resource's last modification would indicate some time in the 5700 future, the server MUST replace that date with the message 5701 origination date. 5703 An origin server SHOULD obtain the Last-Modified value of the entity 5704 as close as possible to the time that it generates the Date value of 5705 its response. This allows a recipient to make an accurate assessment 5706 of the entity's modification time, especially if the entity changes 5707 near the time that the response is generated. 5709 RTSP servers SHOULD send Last-Modified whenever feasible. 5711 16.27. Location 5713 The Location response-header field is used to redirect the recipient 5714 to a location other than the Request-URI for completion of the 5715 request or identification of a new resource. For 3xx responses, the 5716 location SHOULD indicate the server's preferred URI for automatic 5717 redirection to the resource. The field value consists of a single 5718 absolute URI. 5720 Note: The Content-Location header field (Section 16.17) differs from 5721 Location in that the Content-Location identifies the original 5722 location of the entity enclosed in the request. It is therefore 5723 possible for a response to contain header fields for both Location 5724 and Content-Location. Also, see Section 18.2 for cache requirements 5725 of some methods. 5727 16.28. Media-Properties 5729 This general header is used in SETUP response or PLAY_NOTIFY requests 5730 to indicate the media's properties that currently are applicable to 5731 the RTSP session. PLAY_NOTIFY MAY be used to modify these properties 5732 at any point. However, the client SHOULD have received the update 5733 prior to that any action related to the new media properties take 5734 affect. For aggregated sessions, the Media-Properties header will be 5735 returned in each SETUP response. The header received in the latest 5736 response is the one that applies on the whole session from this point 5737 until any future update. The header MAY be included without value in 5738 GET_PARAMETER requests to the server with a Session header included 5739 to query the current Media-Properties for the session. The responder 5740 MUST include the current session's media properties. 5742 The media properties expressed by this header is the one applicable 5743 to all media in the RTSP session. For aggregated sessions, the 5744 header expressed the combined media-properties. As a result 5745 aggregation of media MAY result in a change of the media properties, 5746 and thus the content of the Media-Properties header contained in 5747 subsequent SETUP responses. 5749 The header contains a list of property values that are applicable to 5750 the currently setup media or aggregate of media as indicated by the 5751 RTSP URI in the request. No ordering are enforced within the header. 5752 Property values should be grouped into a single group that handles a 5753 particular orthogonal property. Values or groups that express 5754 multiple properties SHOULD NOT be used. The list of properties that 5755 can be expressed MAY be extended at any time. Unknown property 5756 values MUST be ignored. 5758 This specification defines the following 4 groups and their property 5759 values: 5761 Random Access: 5763 Random-Access: Indicates that random access is possible. May 5764 optionally include a floating point value in seconds indicating 5765 the longest duration between any two random access points in 5766 the media. 5768 Begining-Only: Seeking is limited to the beginning only. 5770 No-Seeking: No seeking is possible. 5772 Content Modifications 5774 Immutable: The content will not be changed during the life-time 5775 of the RTSP session. 5777 Dynamic: The content may be changed based on external methods or 5778 triggers 5780 Time-Progressing The media accessible progress as wallclock time 5781 progresses. 5783 Retention 5785 Unlimited: Content will be retained for the duration of the life- 5786 time of the RTSP session. 5788 Time-Limited: Content will be retained at least until the 5789 specified wallclock time. The time must be provided in the 5790 absolute time format specified in Section Section 4.6. 5792 Time-Duration Each individual media unit is retained for at least 5793 the specified time duration. This definition allows for 5794 retaining data with a time based sliding window. The time 5795 duration is expressed as floating point number in seconds. 0.0 5796 is a valid value as this indicates that no data is retained in 5797 a time-progressing session. 5799 Supported Scale: 5801 Scales: A quoted comma separated list of one or more decimal 5802 values or ranges of scale values supported by the content in 5803 arbitary order. A range has a start and stop value separated 5804 by a colon. A range indicates that the content supports fine 5805 grained selection of scale values. Fine grained allows for 5806 steps at least as small as one tenth of a scale value. 5807 Negative values are supported. The value 0 have no meaning and 5808 must not be used. 5810 Examples of this header for on-demand content and a live stream 5811 without recording are: 5813 On-demand: 5814 Media-Properties: Random-Access=2.5s, Unlimited, Immutable, 5815 Scales="-20, -10, -4, 0.5:1.5, 4, 8, 10, 15, 20" 5817 Live stream without recording/timeshifting: 5818 Media-Properties: No-Seeking, Time-Progressing, Time-Duration=0.0 5820 16.29. Media-Range 5822 The Media-Range general header is used to give the range of the media 5823 at the time of sending the RTSP message. This header MUST be 5824 included in SETUP response, and PLAY and PAUSE response for media 5825 that are Time-Progressing, and PLAY and PAUSE response after any 5826 change for media that are Dynamic, and in PLAY_NOTIFY request that 5827 are sent due to Media-Property-Update. Media-Range header without 5828 any range specifications MAY be included in GET_PARAMETER requests to 5829 the server to request the current range. The server MUST in this 5830 case include the current range at the time of sending the response. 5832 The header MUST include range specifications for all time formats 5833 supported for the media, as indicated in Accept-Ranges header 5834 (Section 16.5) when setting up the media. The server MAY include 5835 more than one range specification of any given time format to 5836 indicate media that has non-continuous range. 5838 For media that has the Time-Progressing property, the Media-Range 5839 values will only be valid for the particular point in time when it 5840 was issued. As wallclock progresses so will also the media range. 5841 However, it shall be assumed that media time progress in direct 5842 relationship to wallclock time (with the exception of clock skew) so 5843 that a reasonably accurate estimation of the media range can be 5844 calculated. 5846 16.30. MTag 5848 The MTag response header MAY be included in DESCRIBE or SETUP 5849 responses. The message body tags (Section 4.8) returned in a 5850 DESCRIBE response, and the one in SETUP refers to the presentation, 5851 i.e. both the returned session description and the media stream. 5852 This allows for verification that one has the right session 5853 description to a media resource at the time of the SETUP request. 5854 However, it has the disadvantage that a change in any of the parts 5855 results in invalidation of all the parts. 5857 If the MTag is provided both inside the message body, e.g. within the 5858 "a=mtag" attribute in SDP, and in the response message, then both 5859 tags MUST be identical. It is RECOMMENDED that the MTag is primarily 5860 given in the RTSP response message, to ensure that caches can use the 5861 MTag without requiring content inspection. However, for session 5862 descriptions that are distributed outside of RTSP, for example using 5863 HTTP, etc. it will be necessary to include the message body tag in 5864 the session description as specified in Appendix D.1.9. 5866 SETUP and DESCRIBE requests can be made conditional upon the MTag 5867 using the headers If-Match (Section 16.23) and If-None-Match ( 5868 Section 16.25). 5870 16.31. Notify-Reason 5872 The Notify Reason header is solely used in the PLAY_NOTIFY method. 5873 It indicates the reason why the server has sent the asynchronous 5874 PLAY_NOTIFY request (see Section 13.5). 5876 16.32. Pipelined-Requests 5878 The Pipelined-Requests general header is used to indicate that a 5879 request is to be executed in the context created by a previous 5880 request(s). The primary usage of this header is to allow pipelining 5881 of SETUP requests so that any additional SETUP request after the 5882 first one does not need to wait for the session ID to be sent back to 5883 the requesting entity. The header contains a unique identifier that 5884 is scoped by the persistent connection used to send the requests. 5886 Upon receiving a request with the Pipelined-Requests the responding 5887 entity MUST look up if there exist a binding between this Pipelined- 5888 Requests identifier for the current persistent connection and an RTSP 5889 session ID. If that exists then the received request is processed 5890 the same way as if it did contain the Session header with the looked 5891 up session ID. If there doesn't exist a mapping and no Session 5892 header is included in the request, the responding entity MUST create 5893 a binding upon the successful completion of a session creating 5894 request, i.e. SETUP. If the request failed to create an RTSP 5895 session no binding MUST be created. In case the request contains 5896 both a Session header and the Pipelined-Requests header the 5897 Pipelined-Requests MUST be ignored. 5899 Note: Based on the above definition at least the first request 5900 containing a new unique Pipelined-Requests will be required to be a 5901 SETUP request (unless the protocol is extended with new methods of 5902 creating a session). After that first one, additional SETUP requests 5903 or request of any type using the RTSP session context may include the 5904 Pipelined-Requests header. 5906 When responding to any request that contained the Pipelined-Requests 5907 header the server MUST include also the Session header when a binding 5908 to a session context exist. A RTSP agent that knows the session ID 5909 SHOULD NOT use the Pipelined-Requests header in any request and only 5910 use the Session header. This as the Session identifier is persistent 5911 across transport contexts, like TCP connections, which the Pipelined- 5912 Requests identifier is not. 5914 It is the RTSP agent sending the request with a Pipelined-Requests 5915 header that has the responsibility for using a unique and previously 5916 unused identifier within the the transport context. Currently only 5917 TCP connection is defined as such transport context. A server MUST 5918 delete the Pipelined-Requests identifier and its binding to a session 5919 upon the termination of that session. RTSP agents are RECOMMENDED to 5920 despite the previous mandate to no reuse identifiers to allow for 5921 better error handling and logging. 5923 RTSP Proxies may need to translate Pipelined-Requests identifier 5924 values from incoming request to outgoing to allow for aggregation of 5925 requests onto a persistent connection. 5927 16.33. Proxy-Authenticate 5929 The Proxy-Authenticate response-header field MUST be included as part 5930 of a 407 (Proxy Authentication Required) response. The field value 5931 consists of a challenge that indicates the authentication scheme and 5932 parameters applicable to the proxy for this Request-URI. 5934 The HTTP access authentication process is described in [RFC2617]. 5935 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies 5936 only to the current connection and SHOULD NOT be passed on to 5937 downstream clients. However, an intermediate proxy might need to 5938 obtain its own credentials by requesting them from the downstream 5939 client, which in some circumstances will appear as if the proxy is 5940 forwarding the Proxy-Authenticate header field. 5942 16.34. Proxy-Authorization 5944 The Proxy-Authorization request-header field allows the client to 5945 identify itself (or its user) to a proxy which requires 5946 authentication. The Proxy-Authorization field value consists of 5947 credentials containing the authentication information of the user 5948 agent for the proxy and/or realm of the resource being requested. 5950 The HTTP access authentication process is described in [RFC2617]. 5951 Unlike Authorization, the Proxy-Authorization header field applies 5952 only to the next outbound proxy that demanded authentication using 5953 the Proxy- Authenticate field. When multiple proxies are used in a 5954 chain, the Proxy-Authorization header field is consumed by the first 5955 outbound proxy that was expecting to receive credentials. A proxy 5956 MAY relay the credentials from the client request to the next proxy 5957 if that is the mechanism by which the proxies cooperatively 5958 authenticate a given request. 5960 16.35. Proxy-Require 5962 The Proxy-Require request-header field is used to indicate proxy- 5963 sensitive features that MUST be supported by the proxy. Any Proxy- 5964 Require header features that are not supported by the proxy MUST be 5965 negatively acknowledged by the proxy to the client using the 5966 Unsupported header. The proxy MUST use the 551 (Option Not 5967 Supported) status code in the response. Any feature-tag included in 5968 the Proxy-Require does not apply to the end-point (server or client). 5969 To ensure that a feature is supported by both proxies and servers the 5970 tag needs to be included in also a Require header. 5972 See Section 16.42 for more details on the mechanics of this message 5973 and a usage example. See discussion in the proxies section 5974 (Section 17.1) about when to consider that a feature requires proxy 5975 support. 5977 Example of use: 5978 Proxy-Require: play.basic 5980 16.36. Proxy-Supported 5982 The Proxy-Supported header field enumerates all the extensions 5983 supported by the proxy using feature-tags. The header carries the 5984 intersection of extensions supported by the forwarding proxies. The 5985 Proxy-Supported header MAY be included in any request by a proxy. It 5986 MUST be added by any proxy if the Supported header is present in a 5987 request. When present in a request, the receiver MUST in the 5988 response copy the received Proxy-Supported header. 5990 The Proxy-Supported header field contains a list of feature-tags 5991 applicable to proxies, as described in Section 4.7. The list are the 5992 intersection of all feature-tags understood by the proxies. To 5993 achieve an intersection, the proxy adding the Proxy-Supported header 5994 includes all proxy feature-tags it understands. Any proxy receiving 5995 a request with the header, checks the list and removes any feature- 5996 tag it do not support. A Proxy-Supported header present in the 5997 response MUST NOT be touched by the proxies. 5999 Example: 6001 C->P1: OPTIONS rtsp://example.com/ RTSP/2.0 6002 Supported: foo, bar, blech 6003 User-Agent: PhonyClient/1.2 6005 P1->P2: OPTIONS rtsp://example.com/ RTSP/2.0 6006 Supported: foo, bar, blech 6007 Proxy-Supported: proxy-foo, proxy-bar, proxy-blech 6008 Via: 2.0 pro.example.com 6010 P2->S: OPTIONS rtsp://example.com/ RTSP/2.0 6011 Supported: foo, bar, blech 6012 Proxy-Supported: proxy-foo, proxy-blech 6013 Via: 2.0 pro.example.com, 2.0 prox2.example.com 6015 S->C: RTSP/2.0 200 OK 6016 Supported: foo, bar, baz 6017 Proxy-Supported: proxy-foo, proxy-blech 6018 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 6019 Via: 2.0 pro.example.com, 2.0 prox2.example.com 6021 16.37. Public 6023 The Public response header field lists the set of methods supported 6024 by the response sender. This header applies to the general 6025 capabilities of the sender and its only purpose is to indicate the 6026 sender's capabilities to the recipient. The methods listed may or 6027 may not be applicable to the Request-URI; the Allow header field 6028 (Section 16.6) MAY be used to indicate methods allowed for a 6029 particular URI. 6031 Example of use: 6032 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 6034 In the event that there are proxies between the sender and the 6035 recipient of a response, each intervening proxy MUST modify the 6036 Public header field to remove any methods that are not supported via 6037 that proxy. The resulting Public header field will contain an 6038 intersection of the sender's methods and the methods allowed through 6039 by the intervening proxies. 6041 In general, proxies should allow all methods to transparently pass 6042 through from the sending RTSP agent to the receiving RTSP agent, 6043 but there may be cases where this is not desirable for a given 6044 proxy. Modification of the Public response header field by the 6045 intervening proxies ensures that the request sender gets an 6046 accurate response indicating the methods that can be used on the 6047 target agent via the proxy chain. 6049 16.38. Range 6051 The Range header specifies a time range in PLAY (Section 13.4), PAUSE 6052 (Section 13.6), SETUP (Section 13.3), REDIRECT (Section 13.10), and 6053 PLAY_NOTIFY (Section 13.5) requests and responses. It MAY be 6054 included in GET_PARAMETER requests from the client to the server with 6055 only a Range format and no value to request the current media 6056 position, whether the session is in playing or ready state in the 6057 included format. The server SHALL, if supporting the range format, 6058 respond with the current playing point or pause point as the start of 6059 the range. If an explicit stop point was used in the previous PLAY 6060 request, then that value shall be included as stop point. Note that 6061 if the server is currently under any type of media playback 6062 manipulation affecting the interpretation of Range, like Scale, that 6063 is also required to be included in any GET_PARAMETER response to 6064 provide complete information. 6066 The range can be specified in a number of units. This specification 6067 defines smpte (Section 4.4), npt (Section 4.5), and clock 6068 (Section 4.6) range units. While byte ranges [H14.35.1] and other 6069 extended units MAY be used, their behavior is unspecified since they 6070 are not normally meaningful in RTSP. Servers supporting the Range 6071 header MUST understand the NPT range format and SHOULD understand the 6072 SMPTE range format. If the Range header is sent in a time format 6073 that is not understood, the recipient SHOULD return 456 (Header Field 6074 Not Valid for Resource) and include an Accept-Ranges header 6075 indicating the supported time formats for the given resource. 6077 Example: 6078 Range: clock=19960213T143205Z- 6080 The Range header contains a range of one single range format. A 6081 range is a half-open interval with a start and an end point, 6082 including the start point, but excluding the end point. A range may 6083 either be fully specified with explicit values for start point and 6084 end point, or have either start or end point be implicit. An 6085 implicit start point indicates the session's pause point, and if no 6086 pause point is set the start of the content. An implicit end point 6087 indicates the end of the content. The usage of both implicit start 6088 and end point is not allowed in the same range header, however, the 6089 exclusion of the range header has that meaning, i.e. from pause point 6090 (or start) until end of content. 6092 Regarding the half-open intervals; a range of A-B starts exactly 6093 at time A, but ends just before B. Only the start time of a media 6094 unit such as a video or audio frame is relevant. For example, 6095 assume that video frames are generated every 40 ms. A range of 6096 10.0-10.1 would include a video frame starting at 10.0 or later 6097 time and would include a video frame starting at 10.08, even 6098 though it lasted beyond the interval. A range of 10.0-10.08, on 6099 the other hand, would exclude the frame at 10.08. 6101 Please note the difference between NPT time scales' "now" and an 6102 implicit start value. Implicit value reference the current pause- 6103 point. While "now" is the currently ongoing time. In a time- 6104 progressing session with recording (retention for some or full 6105 time) the pause point may be 2 min into the session while now 6106 could be 1 hour into the session. 6108 By default, range intervals increase, where the second point is 6109 larger than the first point. 6111 Example: 6112 Range: npt=10-15 6114 However, range intervals can also decrease if the Scale header (see 6115 Section 16.44) indicates a negative scale value. For example, this 6116 would be the case when a playback in reverse is desired. 6118 Example: 6119 Scale: -1 6120 Range: npt=15-10 6122 Decreasing ranges are still half open intervals as described above. 6123 Thus, for range A-B, A is closed and B is open. In the above 6124 example, 15 is closed and 10 is open. An exception to this rule is 6125 the case when B=0 in a decreasing range. In this case, the range is 6126 closed on both ends, as otherwise there would be no way to reach 0 on 6127 a reverse playback for formats that have such a notion, like NPT and 6128 SMPTE. 6130 Example: 6131 Scale: -1 6132 Range: npt=15-0 6134 In this range both 15 and 0 are closed. 6136 A decreasing range interval without a corresponding negative Scale 6137 header is not valid. 6139 16.39. Referrer 6141 The Referrer request-header field allows the client to specify, for 6142 the server's benefit, the address (URI) of the resource from which 6143 the Request-URI was obtained. The URI refers to that of the 6144 presentation description, typically retrieved via HTTP. The Referrer 6145 request-header allows a server to generate lists of back-links to 6146 resources for interest, logging, optimized caching, etc. It also 6147 allows obsolete or mistyped links to be traced for maintenance. The 6148 Referrer field MUST NOT be sent if the Request-URI was obtained from 6149 a source that does not have its own URI, such as input from the user 6150 keyboard. 6152 If the field value is a relative URI, it SHOULD be interpreted 6153 relative to the Request-URI. The URI MUST NOT include a fragment. 6155 See [H15.1.3] for security considerations on Referrer. 6157 16.40. Retry-After 6159 The Retry-After response-header field can be used with a 503 (Service 6160 Unavailable) response to indicate how long the service is expected to 6161 be unavailable to the requesting client. This field MAY also be used 6162 with any 3xx (Redirection) response to indicate the minimum time the 6163 user-agent is asked wait before issuing the redirected request. The 6164 value of this field can be either an RTSP-date or an integer number 6165 of seconds (in decimal) after the time of the response. 6167 Example: 6168 Retry-After: Fri, 31 Dec 1999 23:59:59 GMT 6169 Retry-After: 120 6171 In the latter example, the delay is 2 minutes. 6173 16.41. Request-Status 6175 This request header is used to indicate the end result for requests 6176 that takes time to complete, such a PLAY (Section 13.4). It is sent 6177 in PLAY_NOTIFY (Section 13.5) with the end-of-stream reason to report 6178 how the PLAY request concluded, either in success or in failure. The 6179 header carries a reference to the request it reports on using the 6180 CSeq number for the session indicated by the Session header in the 6181 request. It provides both a numerical status code (according to 6182 Section 8.1.1) and a human readable reason phrase. 6184 Example: 6185 Request-Status: cseq=63 status=500 reason="Media data unavailable" 6187 16.42. Require 6189 The Require request-header field is used by clients or servers to 6190 ensure that the other end-point supports features that are required 6191 in respect to this request. It can also be used to query if the 6192 other end-point supports certain features, however, the use of the 6193 Supported (Section 16.49) is much more effective in this purpose. 6194 The server MUST respond to this header by using the Unsupported 6195 header to negatively acknowledge those feature-tags which are NOT 6196 supported. The response MUST use the error code 551 (Option Not 6197 Supported). This header does not apply to proxies, for the same 6198 functionality in respect to proxies see Proxy-Require header 6199 (Section 16.35) with the exception of media modifying proxies. Media 6200 modifying proxies due to their nature of handling media in a way that 6201 is very similar to what a server, do need to understand also the 6202 server features to correctly serve the client. 6204 This is to make sure that the client-server interaction will 6205 proceed without delay when all features are understood by both 6206 sides, and only slow down if features are not understood (as in 6207 the example below). For a well-matched client-server pair, the 6208 interaction proceeds quickly, saving a round-trip often required 6209 by negotiation mechanisms. In addition, it also removes state 6210 ambiguity when the client requires features that the server does 6211 not understand. 6213 Example (Not complete): 6214 C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/2.0 6215 CSeq: 302 6216 Require: funky-feature 6217 Funky-Parameter: funkystuff 6219 S->C: RTSP/2.0 551 Option not supported 6220 CSeq: 302 6221 Unsupported: funky-feature 6223 In this example, "funky-feature" is the feature-tag which indicates 6224 to the client that the fictional Funky-Parameter field is required. 6225 The relationship between "funky-feature" and Funky-Parameter is not 6226 communicated via the RTSP exchange, since that relationship is an 6227 immutable property of "funky-feature" and thus should not be 6228 transmitted with every exchange. 6230 Proxies and other intermediary devices MUST ignore this header. If a 6231 particular extension requires that intermediate devices support it, 6232 the extension should be tagged in the Proxy-Require field instead 6233 (see Section 16.35). See discussion in the proxies section 6234 (Section 17.1) about when to consider that a feature requires proxy 6235 support. 6237 16.43. RTP-Info 6239 The RTP-Info response-header field is used to set RTP-specific 6240 parameters in the PLAY response. For streams using RTP as transport 6241 protocol the RTP-Info header SHOULD be part of a 200 response to 6242 PLAY. 6244 The exclusion of the RTP-Info in a PLAY response for RTP 6245 transported media will result in that a client needs to 6246 synchronize the media streams using RTCP. This may have negative 6247 impact as the RTCP can be lost, and does not need to be 6248 particularly timely in their arrival. Also functionality as 6249 informing the client from which packet a seek has occurred is 6250 affected. 6252 The RTP-Info MAY be included in SETUP responses to provide 6253 synchronization information when changing transport parameters, see 6254 Section 13.3. The RTP-Info header and the Range header MAY be 6255 included in a GET_PARAMETER request from client to server without any 6256 values to request the current playback point and corresponding.RTP 6257 synchronization information. When the RTP-Info header is included in 6258 a Request also the Range header MUST be included (Note, Range header 6259 only MAY be used). The server respons SHALL include both the Range 6260 header and the RTP-Info header. If the session is in playing state, 6261 then the value of the Range header SHALL be filled in with the 6262 current playback point and with the corresponding RTP-Info values. 6263 If the server is another state, no values are included in the RTP- 6264 Info header. 6266 The header can carry the following parameters: 6268 url: Indicates the stream URI which for which the following RTP 6269 parameters correspond, this URI MUST be the same used in the 6270 SETUP request for this media stream. Any relative URI MUST use 6271 the Request-URI as base URI. This parameter MUST be present. 6273 ssrc: The Synchronization source (SSRC) that the RTP timestamp and 6274 sequence number provide applies to. This parameter MUST be 6275 present. 6277 seq: Indicates the sequence number of the first packet of the stream 6278 that is direct result of the request. This allows clients to 6279 gracefully deal with packets when seeking. The client uses 6280 this value to differentiate packets that originated before the 6281 seek from packets that originated after the seek. Note that a 6282 client may not receive the packet with the expressed sequence 6283 number, and instead packets with a higher sequence number, due 6284 to packet loss or reordering. This parameter is RECOMMENDED to 6285 be present. 6287 rtptime: MUST indicate the RTP timestamp value corresponding to the 6288 start time value in the Range response header, or if not 6289 explicitly given the implied start point. The client uses this 6290 value to calculate the mapping of RTP time to NPT or other 6291 media timescale. This parameter SHOULD be present to ensure 6292 inter-media synchronization is achieved. There exist no 6293 requirement that any received RTP packet will have the same RTP 6294 timestamp value as the one in the parameter used to establish 6295 synchronization. 6297 A mapping from RTP timestamps to NTP timestamps (wallclock) is 6298 available via RTCP. However, this information is not sufficient 6299 to generate a mapping from RTP timestamps to media clock time 6300 (NPT, etc.). Furthermore, in order to ensure that this 6301 information is available at the necessary time (immediately at 6302 startup or after a seek), and that it is delivered reliably, this 6303 mapping is placed in the RTSP control channel. 6305 In order to compensate for drift for long, uninterrupted 6306 presentations, RTSP clients should additionally map NPT to NTP, 6307 using initial RTCP sender reports to do the mapping, and later 6308 reports to check drift against the mapping. 6310 Example: 6311 Range:npt=3.25-15 6312 RTP-Info:url="rtsp://example.com/foo/audio" ssrc=0A13C760:seq=45102; 6313 rtptime=12345678,url="rtsp://example.com/foo/video" 6314 ssrc=9A9DE123:seq=30211;rtptime=29567112 6316 Lets assume that Audio uses a 16kHz RTP timestamp clock and Video 6317 a 90kHz RTP timestamp clock. Then the media synchronization is 6318 depicted in the following way. 6320 NPT 3.0---3.1---3.2-X-3.3---3.4---3.5---3.6 6321 Audio PA A 6322 Video V PV 6324 X: NPT time value = 3.25, from Range header. 6325 A: RTP timestamp value for Audio from RTP-Info header (12345678). 6326 V: RTP timestamp value for Video from RTP-Info header (29567112). 6327 PA: RTP audio packet carrying an RTP timestamp of 12344878. Which 6328 corresponds to NPT = (12344878 - A) / 16000 + 3.25 = 3.2 6329 PV: RTP video packet carrying an RTP timestamp of 29573412. Which 6330 corresponds to NPT = (29573412 - V) / 90000 + 3.25 = 3.32 6332 16.44. Scale 6334 A scale value of 1 indicates normal play at the normal forward 6335 viewing rate. If not 1, the value corresponds to the rate with 6336 respect to normal viewing rate. For example, a ratio of 2 indicates 6337 twice the normal viewing rate ("fast forward") and a ratio of 0.5 6338 indicates half the normal viewing rate. In other words, a ratio of 2 6339 has content time increase at twice the playback time. For every 6340 second of elapsed (wallclock) time, 2 seconds of content time will be 6341 delivered. A negative value indicates reverse direction. For 6342 certain media transports this may require certain considerations to 6343 work consistent, see Appendix C.1 for description on how RTP handles 6344 this. 6346 The transmitted data rate SHOULD NOT be changed by selection of a 6347 different scale value. The resulting bit-rate should be reasonably 6348 close to the nominal bit-rate of the content for Scale = 1. The 6349 server has to actively manipulate the data when needed to meet the 6350 bitrate constraints. Implementation of scale changes depends on the 6351 server and media type. For video, a server may, for example, deliver 6352 only key frames or selected key frames. For audio, it may time-scale 6353 the audio while preserving pitch or, less desirably, deliver 6354 fragments of audio, or completely mute the audio. 6356 The server and content may restrict the range of scale values that it 6357 supports. The supported values are indicated by the Media-Properties 6358 header (Section 16.28). The client SHOULD only indicate values 6359 indicated to be supported. However, as the values may change as the 6360 content progresses a requested value may no longer be valid when the 6361 request arrives. Thus, a non-supported value in a request does not 6362 generate an error, only forces the server to choose the closest 6363 value. The response MUST always contain the actual scale value 6364 chosen by the server. 6366 If the server does not implement the possibility to scale, it will 6367 not return a Scale header. A server supporting Scale operations for 6368 PLAY MUST indicate this with the use of the "play.scale" feature-tag. 6370 When indicating a negative scale for a reverse playback, the Range 6371 header MUST indicate a decreasing range as described in 6372 Section 16.38. 6374 Example of playing in reverse at 3.5 times normal rate: 6375 Scale: -3.5 6376 Range: npt=15-10 6378 16.45. Seek-Style 6380 When a client sends a PLAY request with a Range header to perform a 6381 random access to the media, the client does not know if the server 6382 will pick the first media samples or the first random access point 6383 prior to the request range. Depending on use case, the client may 6384 have a strong preference. To express this preference and provide the 6385 client with information on how the server actually acted on that 6386 preference the Seek-Style header is defined. 6388 Seek-Style is a general header that MAY be included in any PLAY 6389 request to indicate the client's preference for any media stream that 6390 has random access properties. The server MUST always include the 6391 header in any PLAY response for media with random access properties 6392 to indicate what policy was applied. A Server that receives a 6393 unknown Seek-Style policy MUST ignore it and select the server 6394 default policy. 6396 This specification defines the following seek policies that may be 6397 requested: 6399 RAP: Random Access Point (RAP) is the behavior of requesting the 6400 server to locate the closest previous random access point that 6401 exist in the media aggregate and deliver from that. By requesting 6402 a RAP media quality will be the best possible as all media will be 6403 delivered from a point where full media state can be established 6404 in the media decoder. 6406 First-Prior: The first-prior policy will start delivery with the 6407 media unit that has a playout time first prior to the requested 6408 time. For discrete media that would only include media units that 6409 would still be rendered at the request time. For continuous media 6410 that is media that will be render during the requested start time 6411 of the range. 6413 Next: The next media units after the provided start time of the 6414 range. For continuous framed media that would mean the first next 6415 frame after the provided time. For discrete media the first unit 6416 that is to be rendered after the provided time. The main usage is 6417 for this case is when the client knows it has all media up to a 6418 certain point and would like to continue delivery so that a 6419 complete non-interrupted media playback can be achieved. Example 6420 of such scenarios include switching from a broadcast/multicast 6421 delivery to a unicast based delivery. This policy MUST only be 6422 used on the client's explicit request. 6424 Please note that these expressed preferences exist for optimizing the 6425 startup time or the media quality. The "Next" policy breaks the 6426 normal definition of the Range header to enable a client to request 6427 media with minimal overlap, although some may still occur for 6428 aggregated sessions. RAP and First-Prior both fulfill the 6429 requirement of providing media from the requested range and forward. 6430 However, unless RAP is used, the media quality for many media codecs 6431 using predictive methods can be severely degraded unless additional 6432 data is available as, for example, already buffered, or through other 6433 side channels. 6435 16.46. Server 6437 The Server response-header field contains information about the 6438 software used by the origin server to handle the request. The field 6439 can contain multiple product tokens and comments identifying the 6440 server and any significant subproducts. The product tokens are 6441 listed in order of their significance for identifying the 6442 application. 6444 Example: 6445 Server: PhonyServer/1.0 6447 If the response is being forwarded through a proxy, the proxy 6448 application MUST NOT modify the Server response-header. Instead, it 6449 SHOULD include a Via field (Section 16.56). 6451 16.47. Session 6453 The Session request-header and response-header field identifies an 6454 RTSP session. An RTSP session is created by the server as a result 6455 of a successful SETUP request and in the response the session 6456 identifier is given to the client. The RTSP session exist until 6457 destroyed by a TEARDOWN, REDIRECT or timed out by the server. 6459 The session identifier is chosen by the server (see Section 4.3) and 6460 MUST be returned in the SETUP response. Once a client receives a 6461 session identifier, it MUST be included in any request related to 6462 that session. This means that the Session header MUST be included in 6463 a request using the following methods: PLAY, PAUSE, and TEARDOWN, and 6464 MAY be included in SETUP, OPTIONS, SET_PARAMETER, GET_PARAMETER, and 6465 REDIRECT, and MUST NOT be included in DESCRIBE. In an RTSP response 6466 the session header MUST be included in methods, SETUP, PLAY, and 6467 PAUSE, and MAY be included in methods, TEARDOWN, and REDIRECT, and if 6468 included in the request of the following methods it MUST also be 6469 included in the response, OPTIONS, GET_PARAMETER, and SET_PARAMETER, 6470 and MUST NOT be included in DESCRIBE. 6472 Note that a session identifier identifies an RTSP session across 6473 transport sessions or connections. RTSP requests for a given session 6474 can use different URIs (Presentation and media URIs). Note, that 6475 there are restrictions depending on the session which URIs that are 6476 acceptable for a given method. However, multiple "user" sessions for 6477 the same URI from the same client will require use of different 6478 session identifiers. 6480 The session identifier is needed to distinguish several delivery 6481 requests for the same URI coming from the same client. 6483 The response 454 (Session Not Found) MUST be returned if the session 6484 identifier is invalid. 6486 The header MAY include the session timeout period. If not explicitly 6487 provided this value is set to 60 seconds. As this affects how often 6488 session keep-alives are needed values smaller than 30 seconds are not 6489 recommended. However, larger than default values can be useful in 6490 applications of RTSP that have inactive but established sessions for 6491 longer time periods. 6493 60 seconds was chosen as session timeout value due to: Resulting 6494 in not to frequent keep-alive messages and having low sensitivity 6495 to variations in request response timing. If one reduces the 6496 timeout value to below 30 seconds the corresponding request 6497 response timeout becomes a significant part of the session 6498 timeout. 60 seconds also allows for reasonably rapid recovery of 6499 committed server resources in case of client failure. 6501 16.48. Speed 6503 The Speed request-header field requests the server to deliver 6504 specific amounts of nominal media time per unit of delivery time, 6505 contingent on the server's ability and desire to serve the media 6506 stream at the given speed. The client requests the delivery speed to 6507 be within a given range with an upper and lower bound. The server 6508 SHALL deliver at the highest possible speed within the range, but not 6509 faster than the upper-bound, for which the underlying network path 6510 can support the resulting transport data rates. As long as any speed 6511 value within the given range can be provided the server SHALL NOT 6512 modify the media quality. Only if the server is unable to delivery 6513 media at the speed value provided by the lower bound shall it reduce 6514 the media quality. 6516 Implementation of the Speed functionality by the server is OPTIONAL. 6517 The server can indicate its support through a feature-tag, 6518 play.speed. The lack of a Speed header in the response is an 6519 indication of lack of support of this functionality. 6521 The speed parameter values are expressed as a positive decimal value, 6522 e.g., a value of 2.0 indicates that data is to be delivered twice as 6523 fast as normal. A speed value of zero is invalid. The range is 6524 specified in the form "lower bound - upper bound". The lower bound 6525 value may be smaller or equal to the upper bound. All speeds may not 6526 be possible to support. Therefore the server MAY modify the 6527 requested values to the closest supported. The actual supported 6528 speed MUST be included in the response. Note, however, that the use 6529 cases may vary and that Speed value ranges such as 0.7 - 0.8, 6530 0.3-2.0, 1.0-2.5, 2.5-2.5 all have their usage. 6532 Example: 6533 Speed: 1.0 - 2.5 6534 Use of this header changes the bandwidth used for data delivery. It 6535 is meant for use in specific circumstances where delivery of the 6536 presentation at a higher or lower rate is desired. The main use 6537 cases are buffer operations or local scale operations. Implementors 6538 should keep in mind that bandwidth for the session may be negotiated 6539 beforehand (by means other than RTSP), and therefore re-negotiation 6540 may be necessary. To perform Speed operations the server needs to 6541 ensure that the network path can support the resulting bit-rate. 6542 Thus the media transport needs to support feedback so that the server 6543 can react and adapt to the available bitrate. 6545 16.49. Supported 6547 The Supported header enumerates all the extensions supported by the 6548 client or server using feature tags. The header carries the 6549 extensions supported by the message sending entity. The Supported 6550 header MAY be included in any request. When present in a request, 6551 the receiver MUST respond with its corresponding Supported header. 6552 Note that the supported headers is also included in 4xx and 5xx 6553 responses. 6555 The Supported header contains a list of feature-tags, described in 6556 Section 4.7, that are understood by the client or server. 6558 Example: 6560 C->S: OPTIONS rtsp://example.com/ RTSP/2.0 6561 Supported: foo, bar, blech 6562 User-Agent: PhonyClient/1.2 6564 S->C: RTSP/2.0 200 OK 6565 Supported: bar, blech, baz 6567 16.50. Terminate-Reason 6569 The Terminate-Reason request header allows the server when sending a 6570 REDIRECT or TERMINATE request to provide a reason for the session 6571 termination and any additional information. This specification 6572 identifies three reasons for Redirections and may be extended in the 6573 future: 6575 Server-Admin: The server needs to be shutdown for some 6576 administrative reason. 6578 Session-Timeout: A client's session is kept alive for extended 6579 periods of time and the server has determined that it needs to 6580 reclaim the resources associated with this session. 6582 Internal-Error An internal error that is impossible to recover from 6583 has occurred forcing the server to terminate the session. 6585 The Server may provide additional parameters containing information 6586 around the redirect. This specification defines the following ones. 6588 time: Provides a wallclock time when the server will stop provide 6589 any service. 6591 user-msg: An UTF-8 text string with a message from the server to the 6592 user. This message SHOULD be displayed to the user. 6594 16.51. Timestamp 6596 The Timestamp general-header describes when the agent sent the 6597 request. The value of the timestamp is of significance only to the 6598 agent and may use any timescale. The responding agent MUST echo the 6599 exact same value and MAY, if it has accurate information about this, 6600 add a floating point number indicating the number of seconds that has 6601 elapsed since it has received the request. The timestamp is used by 6602 the agent to compute the round-trip time to the responding agent so 6603 that it can adjust the timeout value for retransmissions. It also 6604 resolves retransmission ambiguities for unreliable transport of RTSP. 6606 16.52. Transport 6608 The Transport request and response header indicates which transport 6609 protocol is to be used and configures its parameters such as 6610 destination address, compression, multicast time-to-live and 6611 destination port for a single stream. It sets those values not 6612 already determined by a presentation description. 6614 A Transport request header MAY contain a list of transport options 6615 acceptable to the client, in the form of multiple transport 6616 specification entries. Transport specifications are comma separated, 6617 listed in decreasing order of preference. Parameters may be added to 6618 each transport specification, separated by a semicolon. The server 6619 MUST return a Transport response-header in the response to indicate 6620 the values actually chosen if any. If the transport specification is 6621 not supported, no transport header is returned and the request MUST 6622 be responded using the status code 461 (Unsupported Transport) 6623 (Section 15.4.26). In case more than one transport specification was 6624 present in the request, the server MUST return the single (transport- 6625 spec) which was actually chosen, if any. The number of transport- 6626 spec entries is expected to be limited as the client will get 6627 guidance on what configurations that are possible from the 6628 presentation description. 6630 The Transport header MAY also be used in subsequent SETUP requests to 6631 change transport parameters. A server MAY refuse to change 6632 parameters of an existing stream. 6634 A transport specification may only contain one of any given parameter 6635 within it. Parameters MAY be given in any order. Additionally, it 6636 may only contain either of the unicast or the multicast transport 6637 type parameter. All parameters need to be understood in a transport 6638 specification, if not, the transport specification MUST be ignored. 6639 RTSP proxies of any type that uses or modifies the transport 6640 specification, e.g. access proxy or security proxy, MUST remove 6641 specifications with unknown parameters before forwarding the RTSP 6642 message. If that result in no remaining transport specification the 6643 proxy shall send a 461 (Unsupported Transport) (Section 15.4.26) 6644 response without any Transport header. 6646 The Transport header is restricted to describing a single media 6647 stream. (RTSP can also control multiple streams as a single 6648 entity.) Making it part of RTSP rather than relying on a 6649 multitude of session description formats greatly simplifies 6650 designs of firewalls. 6652 The general syntax for the transport specifier is a list of slash 6653 separated tokens: 6654 Value1/Value2/Value3... 6655 Which for RTP transports take the form: 6656 RTP/profile/lower-transport. 6658 The default value for the "lower-transport" parameters is specific to 6659 the profile. For RTP/AVP, the default is UDP. 6661 There are two different methods for how to specify where the media 6662 should be delivered for unicast transport: 6664 dest_addr: The presence of this parameter and its values indicates 6665 the destination address or addresses (host address and port 6666 pairs for IP flows) necessary for the media transport. 6668 No dest_addr: The lack of the dest_addr parameter indicates that the 6669 server MUST send media to same address for which the RTSP 6670 messages originates. Does not work for transports requiring 6671 explicitly given destination ports. 6673 The choice of method for indicating where the media is to be 6674 delivered depends on the use case. In some case the only allowed 6675 method will be to use no explicit address indication and have the 6676 server deliver media to the source of the RTSP messages. 6678 For Multicast there is several methods for specifying addresses but 6679 they are different in how they work compared with unicast: 6681 dest_addr with client picked address: The address and relevant 6682 parameters like TTL (scope) for the actual multicast group to 6683 deliver the media to. There are security implications 6684 (Section 21) with this method that needs to be addressed if 6685 using this method because a RTSP server can be used as a DoS 6686 attacker on a existing multicast group. 6688 dest_addr using Session Description Information: The information 6689 included in the transport header can all be coming from the 6690 session description, e.g. the SDP c= and m= line. This 6691 mitigates some of the security issues of the previous methods 6692 as it is the session provider that picks the multicast group 6693 and scope. The client MUST include the information if it is 6694 available in the session description. 6696 No dest_addr: The behavior when no explicit multicast group is 6697 present in a request is not defined. 6699 An RTSP proxy will need to take care. If the media is not desired to 6700 be routed through the proxy, the proxy will need to introduce the 6701 destination indication. 6703 Below are the configuration parameters associated with transport: 6705 General parameters: 6707 unicast / multicast: This parameter is a mutually exclusive 6708 indication of whether unicast or multicast delivery will be 6709 attempted. One of the two values MUST be specified. Clients 6710 that are capable of handling both unicast and multicast 6711 transmission needs to indicate such capability by including two 6712 full transport-specs with separate parameters for each. 6714 layers: The number of multicast layers to be used for this media 6715 stream. The layers are sent to consecutive addresses starting 6716 at the dest_addr address. If the parameter is not included, it 6717 defaults to a single layer. 6719 dest_addr: A general destination address parameter that can contain 6720 one or more address specifications. Each combination of 6721 Protocol/Profile/Lower Transport needs to have the format and 6722 interpretation of its address specification defined. For RTP/ 6723 AVP/UDP and RTP/AVP/TCP, the address specification is a tuple 6724 containing a host address and port. Note, only a single 6725 destination entity per transport spec is intended. The usage 6726 of multiple destination to distribute a single media to 6727 multiple entities is unspecified. 6729 The client originating the RTSP request MAY specify the 6730 destination address of the stream recipient with the host 6731 address part of the tuple. When the destination address is 6732 specified, the recipient may be a different party than the 6733 originator of the request. To avoid becoming the unwitting 6734 perpetrator of a remote-controlled denial-of-service attack, a 6735 server MUST perform security checks (see Section 21.1) and 6736 SHOULD log such attempts before allowing the client to direct a 6737 media stream to a recipient address not chosen by the server. 6738 Implementations cannot rely on TCP as reliable means of client 6739 identification. If the server does not allow the host address 6740 part of the tuple to be set, it MUST return 463 (Destination 6741 Prohibited). 6743 The host address part of the tuple MAY be empty, for example 6744 ":58044", in cases when only destination port is desired to be 6745 specified. Responses to request including the Transport header 6746 with a dest_addr parameter SHOULD include the full destination 6747 address that is actually used by the server. The server MUST 6748 NOT remove address information present already in the request 6749 when responding unless the protocol requires it. 6751 src_addr: A general source address parameter that can contain one or 6752 more address specifications. Each combination of Protocol/ 6753 Profile/Lower Transport needs to have the format and 6754 interpretation of its address specification defined. For RTP/ 6755 AVP/UDP and RTP/AVP/TCP, the address specification is a tuple 6756 containing a host address and port. 6758 This parameter MUST be specified by the server if it transmits 6759 media packets from another address than the one RTSP messages 6760 are sent to. This will allow the client to verify source 6761 address and give it a destination address for its RTCP feedback 6762 packets if RTP is used. The address or addresses indicated in 6763 the src_addr parameter SHOULD be used both for sending and 6764 receiving of the media streams data packets. The main reasons 6765 are threefold: First, indicating the port and source address(s) 6766 lets the receiver know where from the packets is expected to 6767 originate. Secondly, traversal of NATs are greatly simplified 6768 when traffic is flowing symmetrically over a NAT binding. 6769 Thirdly, certain NAT traversal mechanisms, needs to know to 6770 which address and port to send so called "binding packets" from 6771 the receiver to the sender, thus creating a address binding in 6772 the NAT that the sender to receiver packet flow can use. 6774 This information may also be available through SDP. 6775 However, since this is more a feature of transport than 6776 media initialization, the authoritative source for this 6777 information should be in the SETUP response. 6779 mode: The mode parameter indicates the methods to be supported for 6780 this session. Valid values are "PLAY" and "RECORD". If not 6781 provided, the default is "PLAY". The "RECORD" value was 6782 defined in RFC 2326 and is in this specification unspecified 6783 but reserved. 6785 interleaved: The interleaved parameter implies mixing the media 6786 stream with the control stream in whatever protocol is being 6787 used by the control stream, using the mechanism defined in 6788 Section 14. The argument provides the channel number to be 6789 used in the $ statement and MUST be present. This parameter 6790 MAY be specified as a interval, e.g., interleaved=4-5 in cases 6791 where the transport choice for the media stream requires it, 6792 e.g. for RTP with RTCP. The channel number given in the 6793 request are only a guidance from the client to the server on 6794 what channel number(s) to use. The server MAY set any valid 6795 channel number in the response. The declared channel(s) are 6796 bi-directional, so both end-parties MAY send data on the given 6797 channel. One example of such usage is the second channel used 6798 for RTCP, where both server and client sends RTCP packets on 6799 the same channel. 6801 This allows RTP/RTCP to be handled similarly to the way 6802 that it is done with UDP, i.e., one channel for RTP and 6803 the other for RTCP. 6805 Multicast-specific: 6807 ttl: multicast time-to-live for IPv4. When included in requests the 6808 value indicate the TTL value that the client request the server 6809 to use. In a response, the value actually being used by the 6810 server is returned. A server will need to consider what values 6811 that are reasonable and also the authority of the user to set 6812 this value. Corresponding functions are not needed for IPv6 as 6813 the scoping is part of the address. 6815 RTP-specific: 6817 These parameters are MAY only be used if the media transport protocol 6818 is RTP. 6820 ssrc: The ssrc parameter, if included in a SETUP response, indicates 6821 the RTP SSRC [RFC3550] value(s) that will be used by the media 6822 server for RTP packets within the stream. It is expressed as 6823 an eight digit hexadecimal value. 6825 The ssrc parameter MUST NOT be specified in requests. The 6826 functionality of specifying the ssrc parameter in a SETUP 6827 request is deprecated as it is incompatible with the 6828 specification of RTP in RFC 3550[RFC3550]. If the parameter is 6829 included in the Transport header of a SETUP request, the server 6830 MAY ignore it, and choose appropriate SSRCs for the stream. 6831 The server MAY set the ssrc parameter in the Transport header 6832 of the response. 6834 The parameters setup and connection defined below MAY only be used if 6835 the media transport protocol of the lower-level transport is 6836 connection-oriented (such as TCP). However, these parameters MUST 6837 NOT be used when interleaving data over the RTSP control connection. 6838 The third parameter, RTCP-mux, can be used also in the interleaved 6839 mode. 6841 setup: Clients use the setup parameter on the Transport line in a 6842 SETUP request, to indicate the roles it wishes to play in a TCP 6843 connection. This parameter is adapted from [RFC4145]. We 6844 discuss the use of this parameter in RTP/AVP/TCP non- 6845 interleaved transport in Appendix C.2.2; the discussion below 6846 is limited to syntactic issues. Clients may specify the 6847 following values for the setup parameter: ["active":] The 6848 client will initiate an outgoing connection. ["passive":] The 6849 client will accept an incoming connection. ["actpass":] The 6850 client is willing to accept an incoming connection or to 6851 initiate an outgoing connection. 6853 If a client does not specify a setup value, the "active" value 6854 is assumed. 6856 In response to a client SETUP request where the setup parameter 6857 is set to "active", a server's 2xx reply MUST assign the setup 6858 parameter to "passive" on the Transport header line. 6860 In response to a client SETUP request where the setup parameter 6861 is set to "passive", a server's 2xx reply MUST assign the setup 6862 parameter to "active" on the Transport header line. 6864 In response to a client SETUP request where the setup parameter 6865 is set to "actpass", a server's 2xx reply MUST assign the setup 6866 parameter to "active" or "passive" on the Transport header 6867 line. 6869 Note that the "holdconn" value for setup is not defined for 6870 RTSP use, and MUST NOT appear on a Transport line. 6872 connection: Clients use the setup parameter on the Transport line in 6873 a SETUP request, to indicate the SETUP request prefers the 6874 reuse of an existing connection between client and server (in 6875 which case the client sets the "connection" parameter to 6876 "existing"), or that the client requires the creation of a new 6877 connection between client and server (in which cast the client 6878 sets the "connection" parameter to "new"). Typically, clients 6879 use the "new" value for the first SETUP request for a URL, and 6880 "existing" for subsequent SETUP requests for a URL. 6882 If a client SETUP request assigns the "new" value to 6883 "connection", the server response MUST also assign the "new" 6884 value to "connection" on the Transport line. 6886 If a client SETUP request assigns the "existing" value to 6887 "connection", the server response MUST assign a value of 6888 "existing" or "new" to "connection" on the Transport line, at 6889 its discretion. 6891 The default value of "connection" is "existing", for all SETUP 6892 requests (initial and subsequent). 6894 RTCP-mux: Use to negotiate the usage of RTP and RTCP multiplexing 6895 [I-D.ietf-avt-rtp-and-rtcp-mux] on a single underlying 6896 transport stream. The presence of this parameter in a SETUP 6897 request indicates the clients support and desire to use RTP and 6898 RTCP multiplexing. The client MAY still include two transport 6899 streams in the Transport header specification to handle cases 6900 if RTP and RTCP multiplexing is not supported by the server. 6901 If the server supports the usage of RTP and RTCP multiplexing 6902 it SHALL include this parameter in the response and strip down 6903 the transport address negotiation to a single src_addr and 6904 dest_addr. If the server does not support RTP and RTCP 6905 multiplexing is removes this parameter from the transport 6906 specification in response and treat the specification as if the 6907 parameter was not included. 6909 The combination of transport protocol, profile and lower transport 6910 needs to be defined. A number of combinations are defined in the 6911 Appendix C. 6913 Below is a usage example, showing a client advertising the capability 6914 to handle multicast or unicast, preferring multicast. Since this is 6915 a unicast-only stream, the server responds with the proper transport 6916 parameters for unicast. 6918 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/2.0 6919 CSeq: 302 6920 Transport: RTP/AVP;multicast;mode="PLAY", 6921 RTP/AVP;unicast;dest_addr="192.0.2.5:3456"/ 6922 "192.0.2.5:3457";mode="PLAY" 6923 Accept-Ranges: NPT, SMPTE, UTC 6924 User-Agent: PhonyClient/1.2 6926 S->C: RTSP/2.0 200 OK 6927 CSeq: 302 6928 Date: Thu, 23 Jan 1997 15:35:06 GMT 6929 Session: 47112344 6930 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:3456"/ 6931 "192.0.2.5:3457";src_addr="192.0.2.224:6256"/ 6932 "192.0.2.224:6257";mode="PLAY" 6933 Accept-Ranges: NPT 6934 Media-Properties: Random-Access=0.6, Dynamic, 6935 Time-Limited=20081128T165900 6937 16.53. Unsupported 6939 The Unsupported response-header lists the features not supported by 6940 the server. In the case where the feature was specified via the 6941 Proxy-Require field (Section 16.35), if there is a proxy on the path 6942 between the client and the server, the proxy MUST send a response 6943 message with a status code of 551 (Option Not Supported). The 6944 request MUST NOT be forwarded. 6946 See Section 16.42 for a usage example. 6948 16.54. User-Agent 6950 The User-Agent request-header field contains information about the 6951 user agent originating the request. This is for statistical 6952 purposes, the tracing of protocol violations, and automated 6953 recognition of user agents for the sake of tailoring responses to 6954 avoid particular user agent limitations. User agents SHOULD include 6955 this field with requests. The field can contain multiple product 6956 tokens and comments identifying the agent and any subproducts which 6957 form a significant part of the user agent. By convention, the 6958 product tokens are listed in order of their significance for 6959 identifying the application. 6961 Example: 6962 User-Agent: PhonyClient/1.2 6964 16.55. Vary 6966 The Vary field value indicates the set of request-header fields that 6967 fully determines, while the response is fresh, whether a cache is 6968 permitted to use the response to reply to a subsequent request 6969 without revalidation. For uncacheable or stale responses, the Vary 6970 field value advises the user agent about the criteria that were used 6971 to select the representation. A Vary field value of "*" implies that 6972 a cache cannot determine from the request headers of a subsequent 6973 request whether this response is the appropriate representation. 6975 An RTSP server SHOULD include a Vary header field with any cacheable 6976 response that is subject to server-driven negotiation. Doing so 6977 allows a cache to properly interpret future requests on that resource 6978 and informs the user agent about the presence of negotiation on that 6979 resource. A server MAY include a Vary header field with a non- 6980 cacheable response that is subject to server-driven negotiation, 6981 since this might provide the user agent with useful information about 6982 the dimensions over which the response varies at the time of the 6983 response. 6985 A Vary field value consisting of a list of field-names signals that 6986 the representation selected for the response is based on a selection 6987 algorithm which considers ONLY the listed request-header field values 6988 in selecting the most appropriate representation. A cache MAY assume 6989 that the same selection will be made for future requests with the 6990 same values for the listed field names, for the duration of time for 6991 which the response is fresh. 6993 The field-names given are not limited to the set of standard request- 6994 header fields defined by this specification. Field names are case- 6995 insensitive. 6997 A Vary field value of "*" signals that unspecified parameters not 6998 limited to the request-headers (e.g., the network address of the 6999 client), play a role in the selection of the response representation. 7001 The "*" value MUST NOT be generated by a proxy server; it may only be 7002 generated by an origin server. 7004 16.56. Via 7006 The Via general-header field MUST be used by proxies to indicate the 7007 intermediate protocols and recipients between the user agent and the 7008 server on requests, and between the origin server and the client on 7009 responses. The field is intended to be used for tracking message 7010 forwards, avoiding request loops, and identifying the protocol 7011 capabilities of all senders along the request/response chain. 7013 Multiple Via field values represents each proxy that has forwarded 7014 the message. Each recipient MUST append its information such that 7015 the end result is ordered according to the sequence of forwarding 7016 applications. 7018 Proxies (e.g., Access Proxy or Translator Proxy) SHOULD NOT, by 7019 default, forward the names and ports of hosts within the private/ 7020 protected region. This information SHOULD only be propagated if 7021 explicitly enabled. If not enabled, the via-received of any host 7022 behind the firewall/NAT SHOULD be replaced by an appropriate 7023 pseudonym for that host. 7025 For organizations that have strong privacy requirements for hiding 7026 internal structures, a proxy MAY combine an ordered subsequence of 7027 Via header field entries with identical sent-protocol values into a 7028 single such entry. Applications MUST NOT combine entries which have 7029 different received-protocol values. 7031 16.57. WWW-Authenticate 7033 The WWW-Authenticate response-header field MUST be included in 401 7034 (Unauthorized) response messages. The field value consists of at 7035 least one challenge that indicates the authentication scheme(s) and 7036 parameters applicable to the Request-URI. 7038 The HTTP access authentication process is described in [RFC2617]. 7039 User agents are advised to take special care in parsing the WWW- 7040 Authenticate field value as it might contain more than one challenge, 7041 or if more than one WWW-Authenticate header field is provided, the 7042 contents of a challenge itself can contain a comma-separated list of 7043 authentication parameters. 7045 17. Proxies 7047 RTSP Proxies are RTSP agents that sit in between a client and a 7048 server. A proxy can take on both the role as a client and as server 7049 depending on what it tries to accomplish. Proxies are also 7050 introduced for several different reasons and the below are often 7051 combined. 7053 Caching Proxy: This type of proxy is used to reduce the workload on 7054 servers and connections. By caching the description and media 7055 streams, i.e., the presentation, the proxy can serve a client 7056 with content, but without requesting it from the server once it 7057 has been cached and has not become stale. See the caching 7058 Section 18. This type of proxy is also expected to understand 7059 RTSP end-point functionality, i.e., functionality identified in 7060 the Require header in addition to what Proxy-Require demands. 7062 Translator Proxy: This type of proxy is used to ensure that an RTSP 7063 client get access to servers and content on an external network 7064 or using content encodings not supported by the client. The 7065 proxy performs the necessary translation of addresses, 7066 protocols or encodings. This type of proxy is expected to also 7067 understand RTSP end-point functionality, i.e. functionality 7068 identified in the Require header in addition to what Proxy- 7069 Require demands. 7071 Access Proxy: This type of proxy is used to ensure that a RTSP 7072 client get access to servers on an external network. Thus this 7073 proxy is placed on the border between two domains, e.g. a 7074 private address space and the public Internet. The proxy 7075 performs the necessary translation, usually addresses. This 7076 type of proxies are required to redirect the media to 7077 themselves or a controlled gateway that perform the translation 7078 before the media can reach the client. 7080 Security Proxy: This type of proxy is used to help facilitate 7081 security functions around RTSP. For example when having a 7082 firewalled network, the security proxy request that the 7083 necessary pinholes in the firewall is opened when a client in 7084 the protected network want to access media streams on the 7085 external side. This proxy can also limit the clients access to 7086 certain type of content. This proxy can perform its function 7087 without redirecting the media between the server and client. 7088 However, in deployments with private address spaces this proxy 7089 is likely to be combined with the access proxy. Anyway, the 7090 functionality of this proxy is usually closely tied into 7091 understand all aspects of the media transport. 7093 Auditing Proxy: RTSP proxies can also provide network owners with a 7094 logging and audit point for RTSP sessions, e.g. for 7095 corporations that tracks their employees usage of the network. 7096 This type of proxy can perform its function without inserting 7097 itself or any other node in the media transport. This proxy 7098 type can also accept unknown methods as it doesn't interfere 7099 with the clients requests. 7101 All type of proxies can be used also when using secured communication 7102 with TLS as RTSP 2.0 allows the client to approve certificate chains 7103 used for connection establishment from a proxy, see Section 19.3.2. 7104 However, that trust model may not be suitable for all type of 7105 deployment, and instead secured sessions do by-pass of the proxies. 7107 Access proxies SHOULD NOT be used in equipment like NATs and 7108 firewalls that aren't expected to be regularly maintained, like home 7109 or small office equipment. In these cases it is better to use the 7110 NAT traversal procedures defined for RTSP 2.0 7111 [I-D.ietf-mmusic-rtsp-nat]. The reason for these recommendations is 7112 that any extensions of RTSP resulting in new media transport 7113 protocols or profiles, new parameters etc may fail in a proxy that 7114 isn't maintained. Thus resulting in blocking further development of 7115 RTSP and its usage. 7117 17.1. Proxies and Protocol Extensions 7119 The existence of proxies must always be considered when developing 7120 new RTSP extensions. Most type of proxies will need to implement any 7121 new method to operate correct in the presence of that extension. New 7122 headers will be possible to introduce without being blocked by 7123 proxies not yet updated. However, it is important to consider if 7124 this header and its function is required to be understood by the 7125 proxy or can be forwarded. If the header needs to be understood a 7126 feature-tag representing the functionality needs to be included in 7127 the Proxy-Require header. Below are guidelines for analysis if the 7128 header needs to be understood. The transport header and its 7129 parameters also shows that headers that are extensible and requires 7130 correct interpretation in the proxy also requires handling rules. 7132 When defining a new RTSP header it needs to be considered if RTSP 7133 proxies are required to understand them to achieve correct 7134 functionality. Determining this is not easy as the functionality for 7135 proxies are widely varied as can be understood from the above list of 7136 functionality. When evaluating this, one can divide the 7137 functionality into three main categories: 7139 Media modifying: The caching and translator proxies are modifying 7140 the actual media and therefore needs to understand also request 7141 directed to the server that affects how the media is rendered. 7142 Thus, this type of proxies needs to also understand the server 7143 side functionality. 7145 Transport modifying: The access and the security proxy both need to 7146 understand how the transport is performed, either for opening 7147 pinholes or to translate the outer headers, e.g. IP and UDP. 7149 Non-modifying: The audit proxy is special in that it do not modify 7150 the messages in other ways than to insert the Via header. That 7151 makes it possible for this type to forward RTSP message that 7152 contains different type of unknown methods, headers or header 7153 parameters. 7155 Based on the above classification, one should evaluate if the new 7156 functionality requires the Transport modifying type of proxies to 7157 understand it or not. 7159 18. Caching 7161 In HTTP, response-request pairs are cached. RTSP differs 7162 significantly in that respect. Responses are not cacheable, with the 7163 exception of the presentation description returned by DESCRIBE. 7164 (Since the responses for anything but DESCRIBE and GET_PARAMETER do 7165 not return any data, caching is not really an issue for these 7166 requests.) However, it is desirable for the continuous media data, 7167 typically delivered out-of-band with respect to RTSP, to be cached, 7168 as well as the session description. 7170 On receiving a SETUP or PLAY request, a proxy ascertains whether it 7171 has an up-to-date copy of the continuous media content and its 7172 description. It can determine whether the copy is up-to-date by 7173 issuing a SETUP or DESCRIBE request, respectively, and comparing the 7174 Last-Modified header with that of the cached copy. If the copy is 7175 not up-to-date, it modifies the SETUP transport parameters as 7176 appropriate and forwards the request to the origin server. 7177 Subsequent control commands such as PLAY or PAUSE then pass the proxy 7178 unmodified. The proxy delivers the continuous media data to the 7179 client, while possibly making a local copy for later reuse. The 7180 exact allowed behavior of the cache is given by the cache-response 7181 directives described in Section 16.10. A cache MUST answer any 7182 DESCRIBE requests if it is currently serving the stream to the 7183 requester, as it is possible that low-level details of the stream 7184 description may have changed on the origin-server. 7186 Note that an RTSP cache, unlike the HTTP cache, is of the "cut- 7187 through" variety. Rather than retrieving the whole resource from the 7188 origin server, the cache simply copies the streaming data as it 7189 passes by on its way to the client. Thus, it does not introduce 7190 additional latency. 7192 To the client, an RTSP proxy cache appears like a regular media 7193 server, to the media origin server like a client. Just as an HTTP 7194 cache has to store the content type, content language, and so on for 7195 the objects it caches, a media cache has to store the presentation 7196 description. Typically, a cache eliminates all transport-references 7197 (that is, e.g. multicast information) from the presentation 7198 description, since these are independent of the data delivery from 7199 the cache to the client. Information on the encodings remains the 7200 same. If the cache is able to translate the cached media data, it 7201 would create a new presentation description with all the encoding 7202 possibilities it can offer. 7204 18.1. Validation Model (HTTP) 7206 When a cache has a stale entry that it would like to use as a 7207 response to a client's request, it first has to check with the origin 7208 server (or possibly an intermediate cache with a fresh response) to 7209 see if its cached entry is still usable. We call this "validating" 7210 the cache entry. Since we do not want to have to pay the overhead of 7211 retransmitting the full response if the cached entry is good, and we 7212 do not want to pay the overhead of an extra round trip if the cached 7213 entry is invalid, the RTSP protocol supports the use of conditional 7214 methods. 7216 The key protocol features for supporting conditional methods are 7217 those concerned with "cache validators." When an origin server 7218 generates a full response, it attaches some sort of validator to it, 7219 which is kept with the cache entry. When a client (user agent or 7220 proxy cache) makes a conditional request for a resource for which it 7221 has a cache entry, it includes the associated validator in the 7222 request. 7224 The server then checks that validator against the current validator 7225 for the entity, and, if they match (see Section 18.1.3), it responds 7226 with a special status code (usually, 304 (Not Modified)) and no 7227 message body. Otherwise, it returns a full response (including 7228 message body). Thus, we avoid transmitting the full response if the 7229 validator matches, and we avoid an extra round trip if it does not 7230 match. 7232 In RTSP, a conditional request looks exactly the same as a normal 7233 request for the same resource, except that it carries a special 7234 header (which includes the validator) that implicitly turns the 7235 method (usually DESCRIBE) into a conditional. 7237 The protocol includes both positive and negative senses of cache- 7238 validating conditions. That is, it is possible to request either 7239 that a method be performed if and only if a validator matches or if 7240 and only if no validators match. 7242 Note: a response that lacks a validator may still be cached, and 7243 served from cache until it expires, unless this is explicitly 7244 prohibited by a cache-control directive (see Section 16.10). 7245 However, a cache cannot do a conditional retrieval if it does not 7246 have a validator for the entity, which means it will not be 7247 refreshable after it expires. 7249 18.1.1. Last-Modified Dates 7251 The Last-Modified header (Section 16.26) value is often used as a 7252 cache validator. In simple terms, a cache entry is considered to be 7253 valid if the entity has not been modified since the Last-Modified 7254 value. 7256 18.1.2. Message Body Tag Cache Validators 7258 The MTag response-header field value, an message body tag, provides 7259 for an "opaque" cache validator. This might allow more reliable 7260 validation in situations where it is inconvenient to store 7261 modification dates, where the one-second resolution of RTSP-date 7262 values is not sufficient, or where the origin server wishes to avoid 7263 certain paradoxes that might arise from the use of modification 7264 dates. 7266 Message body tags are described in Section 5.3 7268 18.1.3. Weak and Strong Validators 7270 Since both origin servers and caches will compare two validators to 7271 decide if they represent the same or different entities, one normally 7272 would expect that if the message body (i.e., the presentation 7273 description) or any associated message body headers changes in any 7274 way, then the associated validator would change as well. If this is 7275 true, then we call this validator a "strong validator." We call 7276 message body (i.e., the presentation description) or any associated 7277 message body headers an entity for a better understanding. 7279 However, there might be cases when a server prefers to change the 7280 validator only on semantically significant changes, and not when 7281 insignificant aspects of the entity change. A validator that does 7282 not always change when the resource changes is a "weak validator." 7284 Message body tags are normally "strong validators," but the protocol 7285 provides a mechanism to tag an message body tag as "weak." One can 7286 think of a strong validator as one that changes whenever the bits of 7287 an entity changes, while a weak value changes whenever the meaning of 7288 an entity changes. Alternatively, one can think of a strong 7289 validator as part of an identifier for a specific entity, while a 7290 weak validator is part of an identifier for a set of semantically 7291 equivalent entities. 7293 Note: One example of a strong validator is an integer that is 7294 incremented in stable storage every time an entity is changed. 7296 An entity's modification time, if represented with one-second 7297 resolution, could be a weak validator, since it is possible that 7298 the resource might be modified twice during a single second. 7300 Support for weak validators is optional. However, weak validators 7301 allow for more efficient caching of equivalent objects; for 7302 example, a hit counter on a site is probably good enough if it is 7303 updated every few days or weeks, and any value during that period 7304 is likely "good enough" to be equivalent. 7306 A "use" of a validator is either when a client generates a request 7307 and includes the validator in a validating header field, or when a 7308 server compares two validators. 7310 Strong validators are usable in any context. Weak validators are 7311 only usable in contexts that do not depend on exact equality of an 7312 entity. For example, either kind is usable for a conditional 7313 DESCRIBE of a full entity. However, only a strong validator is 7314 usable for a sub-range retrieval, since otherwise the client might 7315 end up with an internally inconsistent entity. 7317 Clients MAY issue DESCRIBE requests with either weak validators or 7318 strong validators. Clients MUST NOT use weak validators in other 7319 forms of request. 7321 The only function that the RTSP protocol defines on validators is 7322 comparison. There are two validator comparison functions, depending 7323 on whether the comparison context allows the use of weak validators 7324 or not: 7326 o The strong comparison function: in order to be considered equal, 7327 both validators MUST be identical in every way, and both MUST NOT 7328 be weak. 7330 o The weak comparison function: in order to be considered equal, 7331 both validators MUST be identical in every way, but either or both 7332 of them MAY be tagged as "weak" without affecting the result. 7334 An message body tag is strong unless it is explicitly tagged as weak. 7336 A Last-Modified time, when used as a validator in a request, is 7337 implicitly weak unless it is possible to deduce that it is strong, 7338 using the following rules: 7340 o The validator is being compared by an origin server to the actual 7341 current validator for the entity and, 7343 o That origin server reliably knows that the associated entity did 7344 not change twice during the second covered by the presented 7345 validator. 7347 OR 7349 o The validator is about to be used by a client in an If-Modified- 7350 Since, because the client has a cache entry for the associated 7351 entity, and 7353 o That cache entry includes a Date value, which gives the time when 7354 the origin server sent the original response, and 7356 o The presented Last-Modified time is at least 60 seconds before the 7357 Date value. 7359 OR 7361 o The validator is being compared by an intermediate cache to the 7362 validator stored in its cache entry for the entity, and 7364 o That cache entry includes a Date value, which gives the time when 7365 the origin server sent the original response, and 7367 o The presented Last-Modified time is at least 60 seconds before the 7368 Date value. 7370 This method relies on the fact that if two different responses were 7371 sent by the origin server during the same second, but both had the 7372 same Last-Modified time, then at least one of those responses would 7373 have a Date value equal to its Last-Modified time. The arbitrary 60- 7374 second limit guards against the possibility that the Date and Last- 7375 Modified values are generated from different clocks, or at somewhat 7376 different times during the preparation of the response. An 7377 implementation MAY use a value larger than 60 seconds, if it is 7378 believed that 60 seconds is too short. 7380 If a client wishes to perform a sub-range retrieval on a value for 7381 which it has only a Last-Modified time and no opaque validator, it 7382 MAY do this only if the Last-Modified time is strong in the sense 7383 described here. 7385 18.1.4. Rules for When to Use Entity Tags and Last-Modified Dates 7387 We adopt a set of rules and recommendations for origin servers, 7388 clients, and caches regarding when various validator types ought to 7389 be used, and for what purposes. 7391 RTSP origin servers: 7393 o SHOULD send an message body tag validator unless it is not 7394 feasible to generate one. 7396 o MAY send a weak message body tag instead of a strong message body 7397 tag, if performance considerations support the use of weak message 7398 body tags, or if it is unfeasible to send a strong message body 7399 tag. 7401 o SHOULD send a Last-Modified value if it is feasible to send one, 7402 unless the risk of a breakdown in semantic transparency that could 7403 result from using this date in an If-Modified-Since header would 7404 lead to serious problems. 7406 In other words, the preferred behavior for an RTSP origin server is 7407 to send both a strong message body tag and a Last-Modified value. 7409 In order to be legal, a strong message body tag MUST change whenever 7410 the associated entity value changes in any way. A weak message body 7411 tag SHOULD change whenever the associated entity changes in a 7412 semantically significant way. 7414 Note: in order to provide semantically transparent caching, an 7415 origin server must avoid reusing a specific strong message body 7416 tag value for two different entities, or reusing a specific weak 7417 message body tag value for two semantically different entities. 7418 Cache entries might persist for arbitrarily long periods, 7419 regardless of expiration times, so it might be inappropriate to 7420 expect that a cache will never again attempt to validate an entry 7421 using a validator that it obtained at some point in the past. 7423 RTSP clients: 7425 o If an message body tag has been provided by the origin server, 7426 MUST use that message body tag in any cache-conditional request 7427 (using If- Match or If-None-Match). 7429 o If only a Last-Modified value has been provided by the origin 7430 server, SHOULD use that value in non-subrange cache-conditional 7431 requests (using If-Modified-Since). 7433 o If both an message body tag and a Last-Modified value have been 7434 provided by the origin server, SHOULD use both validators in 7435 cache-conditional requests. 7437 An RTSP origin server, upon receiving a conditional request that 7438 includes both a Last-Modified date (e.g., in an If-Modified-Since 7439 header) and one or more message body tags (e.g., in an If-Match, If- 7440 None-Match, or If-Range header field) as cache validators, MUST NOT 7441 return a response status of 304 (Not Modified) unless doing so is 7442 consistent with all of the conditional header fields in the request. 7444 Note: The general principle behind these rules is that RTSP 7445 servers and clients should transmit as much non-redundant 7446 information as is available in their responses and requests. RTSP 7447 systems receiving this information will make the most conservative 7448 assumptions about the validators they receive. 7450 18.1.5. Non-validating Conditionals 7452 The principle behind message body tags is that only the service 7453 author knows the semantics of a resource well enough to select an 7454 appropriate cache validation mechanism, and the specification of any 7455 validator comparison function more complex than byte-equality would 7456 open up a can of worms. Thus, comparisons of any other headers are 7457 never used for purposes of validating a cache entry. 7459 18.2. Invalidation After Updates or Deletions (HTTP) 7461 The effect of certain methods performed on a resource at the origin 7462 server might cause one or more existing cache entries to become non- 7463 transparently invalid. That is, although they might continue to be 7464 "fresh," they do not accurately reflect what the origin server would 7465 return for a new request on that resource. 7467 There is no way for the RTSP protocol to guarantee that all such 7468 cache entries are marked invalid. For example, the request that 7469 caused the change at the origin server might not have gone through 7470 the proxy where a cache entry is stored. However, several rules help 7471 reduce the likelihood of erroneous behavior. 7473 In this section, the phrase "invalidate an entity" means that the 7474 cache will either remove all instances of that entity from its 7475 storage, or will mark these as "invalid" and in need of a mandatory 7476 revalidation before they can be returned in response to a subsequent 7477 request. 7479 Some HTTP methods MUST cause a cache to invalidate an entity. This 7480 is either the entity referred to by the Request-URI, or by the 7481 Location or Content-Location headers (if present). These methods 7482 are: 7484 o DESCRIBE 7486 o SETUP 7488 In order to prevent denial of service attacks, an invalidation based 7489 on the URI in a Location or Content-Location header MUST only be 7490 performed if the host part is the same as in the Request-URI. 7492 A cache that passes through requests for methods it does not 7493 understand SHOULD invalidate any entities referred to by the Request- 7494 URI. 7496 19. Security Framework 7498 The RTSP security framework consists of two high level components: 7499 the pure authentication mechanisms based on HTTP authentication, and 7500 the transport protection based on TLS, which is independent of RTSP. 7501 Because of the similarity in syntax and usage between RTSP servers 7502 and HTTP servers, the security for HTTP is re-used to a large extent. 7504 19.1. RTSP and HTTP Authentication 7506 RTSP and HTTP share common authentication schemes, and thus follow 7507 the same usage guidelines as specified in[RFC2617] and also in [H15]. 7508 Servers SHOULD implement both basic and digest [RFC2617] 7509 authentication. Client MUST implement both basic and digest 7510 authentication [RFC2617] so that Server who requires the client to 7511 authenticate can trust that the capability is present. 7513 It should be stressed that using the HTTP authentication alone does 7514 not provide full control message security. Therefore, in 7515 environments requiring tighter security for the control messages, TLS 7516 SHOULD be used, see Section 19.2. 7518 19.2. RTSP over TLS 7520 RTSP MUST follow the same guidelines with regards to TLS [RFC5246] 7521 usage as specified for HTTP, see [RFC2818]. RTSP over TLS is 7522 separated from unsecured RTSP both on URI level and port level. 7523 Instead of using the "rtsp" scheme identifier in the URI, the "rtsps" 7524 scheme identifier MUST be used to signal RTSP over TLS. If no port 7525 is given in a URI with the "rtsps" scheme, port 322 MUST be used for 7526 TLS over TCP/IP. 7528 When a client tries to setup an insecure channel to the server (using 7529 the "rtsp" URI), and the policy for the resource requires a secure 7530 channel, the server MUST redirect the client to the secure service by 7531 sending a 301 redirect response code together with the correct 7532 Location URI (using the "rtsps" scheme). A user or client MAY 7533 upgrade a non secured URI to a secured by changing the scheme from 7534 "rtsp" to "rtsps". A server implementing support for "rtsps" MUST 7535 allow this. 7537 It should be noted that TLS allows for mutual authentication (when 7538 using both server and client certificates). Still, one of the more 7539 common ways TLS is used is to only provide server side authentication 7540 (often to avoid client certificates). TLS is then used in addition 7541 to HTTP authentication, providing transport security and server 7542 authentication, while HTTP Authentication is used to authenticate the 7543 client. 7545 RTSP includes the possibility to keep a TCP session up between the 7546 client and server, throughout the RTSP session lifetime. It may be 7547 convenient to keep the TCP session, not only to save the extra setup 7548 time for TCP, but also the extra setup time for TLS (even if TLS uses 7549 the resume function, there will be almost two extra round trips). 7550 Still, when TLS is used, such behavior introduces extra active state 7551 in the server, not only for TCP and RTSP, but also for TLS. This may 7552 increase the vulnerability to DoS attacks. 7554 In addition to these recommendations, Section 19.3 gives further 7555 recommendations of TLS usage with proxies. 7557 19.3. Security and Proxies 7559 The nature of a proxy is often to act as a "man-in-the-middle", while 7560 security is often about preventing the existence of a "man-in-the- 7561 middle". This section provides clients with the possibility to use 7562 proxies even when applying secure transports (TLS) between the RTSP 7563 agents. The TLS proxy mechanism allows for server and proxy 7564 identification using certificates. However, the client can not be 7565 identified based on certificates. The client needs to select between 7566 using the procedure specified below or using a TLS connection 7567 directly (by-passing any proxies) to the server. The choice may be 7568 dependent on policies. 7570 There are basically two categories of proxies, the transparent 7571 proxies (of which the client is not aware) and the non-transparent 7572 proxies (of which the client is aware). An infrastructure based on 7573 proxies requires that the trust model is such that both client and 7574 servers can trust the proxies to handle the RTSP messages correctly. 7575 To be able to trust a proxy, the client and server also needs to be 7576 aware of the proxy. Hence, transparent proxies cannot generally be 7577 seen as trusted and will not work well with security (unless they 7578 work only at transport layer). In the rest of this section any 7579 reference to proxy will be to a non-transparent proxy, which inspects 7580 or manipulate the RTSP messages. 7582 HTTP Authentication is built on the assumption of proxies and can 7583 provide user-proxy authentication and proxy-proxy/server 7584 authentication in addition to the client-server authentication. 7586 When TLS is applied and a proxy is used, the client will connect to 7587 the proxy's address when connecting to any RTSP server. This implies 7588 that for TLS, the client will authenticate the proxy server and not 7589 the end server. Note that when the client checks the server 7590 certificate in TLS, it MUST check the proxy's identity (URI or 7591 possibly other known identity) against the proxy's identity as 7592 presented in the proxy's Certificate message. 7594 The problem is that for a proxy accepted by the client, the proxy 7595 needs to be provided information on which grounds it should accept 7596 the next-hop certificate. Both the proxy and the user may have rules 7597 for this, and the user have the possibility to select the desired 7598 behavior. To handle this case, the Accept-Credentials header (See 7599 Section 16.2) is used, where the client can force the proxy/proxies 7600 to relay back the chain of certificates used to authenticate any 7601 intermediate proxies as well as the server. Given the assumption 7602 that the proxies are viewed as trusted, it gives the user a 7603 possibility to enforce policies to each trusted proxy of whether it 7604 should accept the next entity in the chain. 7606 A proxy MUST use TLS for the next hop if the RTSP request includes a 7607 "rtsps" URI. TLS MAY be applied on intermediate links (e.g. between 7608 client and proxy, or between proxy and proxy), even if the resource 7609 and the end server are not require to use it. The proxy MUST, when 7610 initiating the next hop TLS connection, use the incoming TLS 7611 connections cipher suite list, only modified by removing any cipher 7612 suits that the proxy does not support. In case a proxy fails to 7613 establish a TLS connection due to cipher suite mismatch between proxy 7614 and next hop proxy or server, this is indicated using error code 472 7615 (Failure to establish secure connection). 7617 19.3.1. Accept-Credentials 7619 The Accept-Credentials header can be used by the client to distribute 7620 simple authorization policies to intermediate proxies. The client 7621 includes the Accept-Credentials header to dictate how the proxy 7622 treats the server/next proxy certificate. There are currently three 7623 methods defined: 7625 Any, which means that the proxy (or proxies) MUST accept whatever 7626 certificate presented. This is of course not a recommended 7627 option to use, but may be useful in certain circumstances (such 7628 as testing). 7630 Proxy, which means that the proxy (or proxies) MUST use its own 7631 policies to validate the certificate and decide whether to 7632 accept it or not. This is convenient in cases where the user 7633 has a strong trust relation with the proxy. Reason why a 7634 strong trust relation may exist are; personal/company proxy, 7635 proxy has a out-of-band policy configuration mechanism. 7637 User, which means that the proxy (or proxies) MUST send credential 7638 information about the next hop to the client for authorization. 7639 The client can then decide whether the proxy should accept the 7640 certificate or not. See Section 19.3.2 for further details. 7642 If the Accept-Credentials header is not included in the RTSP request 7643 from the client, then the "Proxy" method MUST be used as default. If 7644 another method than the "Proxy" is to be used, then the Accept- 7645 Credentials header MUST be included in all of the RTSP request from 7646 the client. This is because it cannot be assumed that the proxy 7647 always keeps the TLS state or the users previous preference between 7648 different RTSP messages (in particular if the time interval between 7649 the messages is long). 7651 With the "Any" and "Proxy" methods the proxy will apply the policy as 7652 defined for respectively method. If the policy does not accept the 7653 credentials of the next hop, the entity MUST respond with a message 7654 using status code 471 (Connection Credentials not accepted). 7656 An RTSP request in the direction server to client MUST NOT include 7657 the Accept-Credential header. As for the non-secured communication, 7658 the possibility for these requests depends on the presence of a 7659 client established connection. However, if the server to client 7660 request is in relation to a session established over a TLS secured 7661 channel, it MUST be sent in a TLS secured connection. That secured 7662 connection MUST also be the one used by the last client to server 7663 request. If no such transport connection exist at the time when the 7664 server desires to send the request, the server discard the message. 7666 Further policies MAY be defined and registered, but should be done so 7667 with caution. 7669 19.3.2. User approved TLS procedure 7671 For the "User" method, each proxy MUST perform the following 7672 procedure for each RTSP request: 7674 o Setup the TLS session to the next hop if not already present (i.e. 7675 run the TLS handshake, but do not send the RTSP request). 7677 o Extract the peer certificate chain for the TLS session. 7679 o Check if a matching identity and hash of the peer certificate is 7680 present in the Accept-Credentials header. If present, send the 7681 message to the next hop, and conclude these procedures. If not, 7682 go to the next step. 7684 o The proxy responds to the RTSP request with a 470 or 407 response 7685 code. The 407 response code MAY be used when the proxy requires 7686 both user and connection authorization from user or client. In 7687 this message the proxy MUST include a Connection-Credentials 7688 header, see Section 16.12 with the next hop's identity and 7689 certificate. 7691 The client MUST upon receiving a 470 or 407 response with Connection- 7692 Credentials header take the decision on whether to accept the 7693 certificate or not (if it cannot do so, the user SHOULD be 7694 consulted). If the certificate is accepted, the client has to again 7695 send the RTSP request. In that request the client has to include the 7696 Accept-Credentials header including the hash over the DER encoded 7697 certificate for all trusted proxies in the chain. 7699 Example: 7701 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7702 CSeq: 2 7703 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7704 "192.0.2.5:4589" 7705 Accept-Ranges: NPT, SMPTE, UTC 7706 Accept-Credentials: User 7707 P->C: RTSP/2.0 470 Connection Authorization Required 7708 CSeq: 2 7709 Connection-Credentials: "rtsps://test.example.org"; 7710 MIIDNTCCAp... 7712 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7713 CSeq: 2 7714 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7715 "192.0.2.5:4589" 7716 Accept-Credentials: User "rtsps://test.example.org";sha-256; 7717 dPYD7txpoGTbAqZZQJ+vaeOkyH4= 7718 Accept-Ranges: NPT, SMPTE, UTC 7719 P->S: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7720 CSeq: 2 7721 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7722 "192.0.2.5:4589" 7723 Via: RTSP/2.0 proxy.example.org 7724 Accept-Credentials: User "rtsps://test.example.org";sha-256; 7725 dPYD7txpoGTbAqZZQJ+vaeOkyH4= 7726 Accept-Ranges: NPT, SMPTE, UTC 7728 One implication of this process is that the connection for secured 7729 RTSP messages may take significantly more round-trip times for the 7730 first message. An complete extra message exchange between the proxy 7731 connecting to the next hop and the client results because of the 7732 process for approval for each hop. However, after the first message 7733 exchange the remaining message should not be delayed, if each message 7734 contains the chain of proxies that the requester accepts. The 7735 procedure of including the credentials in each request rather than 7736 building state in each proxy, avoids the need for revocation 7737 procedures. 7739 20. Syntax 7741 The RTSP syntax is described in an Augmented Backus-Naur Form (ABNF) 7742 as defined in RFC 5234 [RFC5234]. It uses the basic definitions 7743 present in RFC 5234. 7745 Please note that ABNF strings, e.g. "Accept", are case insensitive 7746 as specified in section 2.3 of RFC 5234. 7748 20.1. Base Syntax 7750 RTSP header values can be folded onto multiple lines if the 7751 continuation line begins with a space or horizontal tab. All linear 7752 white space, including folding, has the same semantics as SP. A 7753 recipient MAY replace any linear white space with a single SP before 7754 interpreting the field value or forwarding the message downstream. 7755 This is intended to behave exactly as HTTP/1.1 as described in RFC 7756 2616 [RFC2616]. The SWS construct is used when linear white space is 7757 optional, generally between tokens and separators. 7759 To separate the header name from the rest of value, a colon is used, 7760 which, by the above rule, allows whitespace before, but no line 7761 break, and whitespace after, including a line break. The HCOLON 7762 defines this construct. 7764 OCTET = %x00-FF ; any 8-bit sequence of data 7765 CHAR = %x01-7F ; any US-ASCII character (octets 1 - 127) 7766 UPALPHA = %x41-5A ; any US-ASCII uppercase letter "A".."Z" 7767 LOALPHA = %x61-7A ;any US-ASCII lowercase letter "a".."z" 7768 ALPHA = UPALPHA / LOALPHA 7769 DIGIT = %x30-39 ; any US-ASCII digit "0".."9" 7770 CTL = %x00-1F / %x7F ; any US-ASCII control character 7771 ; (octets 0 - 31) and DEL (127) 7772 CR = %x0D ; US-ASCII CR, carriage return (13 7773 LF = %x0A ; US-ASCII LF, linefeed (10) 7774 SP = %x20 ; US-ASCII SP, space (32) 7775 HT = %x09 ; US-ASCII HT, horizontal-tab (9) 7776 DQ = %x22 ; US-ASCII double-quote mark (34) 7777 BACKSLASH = %x5C ; US-ASCII backslash (92) 7778 CRLF = CR LF 7779 LWS = [CRLF] 1*( SP / HT ) ; Line-breaking White Space 7780 SWS = [LWS] ; Separating White Space 7781 HCOLON = *( SP / HT ) ":" SWS 7782 TEXT = %x20-7E / %x80-FF ; any OCTET except CTLs 7783 tspecials = "(" / ")" / "<" / ">" / "@" 7784 / "," / ";" / ":" / BACKSLASH / DQ 7785 / "/" / "[" / "]" / "?" / "=" 7786 / "{" / "}" / SP / HT 7787 token = 1*(%x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39 7788 / %x41-5A / %x5E-7A / %x7C / %x7E) 7789 ; 1* 7790 quoted-string = ( DQ *qdtext DQ ) 7791 qdtext = %x20-21 / %x23-7E / %x80-FF ; any TEXT except <"> 7792 quoted-pair = BACKSLASH CHAR 7793 ctext = %x20-27 / %x2A-7E 7794 / %x80-FF ; any OCTET except CTLs, "(" and ")" 7795 generic-param = token [ EQUAL gen-value ] 7796 gen-value = token / host / quoted-string 7798 safe = "$" / "-" / "_" / "." / "+" 7799 extra = "!" / "*" / "'" / "(" / ")" / "," 7800 rtsp-extra = "!" / "*" / "'" / "(" / ")" 7802 HEX = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" 7803 / "a" / "b" / "c" / "d" / "e" / "f" 7804 LHEX = DIGIT / "a" / "b" / "c" / "d" / "e" / "f" 7805 ; lowercase "a-f" Hex 7806 reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" 7808 unreserved = ALPHA / DIGIT / safe / extra 7809 rtsp-unreserved = ALPHA / DIGIT / safe / rtsp-extra 7811 base64 = *base64-unit [base64-pad] 7812 base64-unit = 4base64-char 7813 base64-pad = (2base64-char "==") / (3base64-char "=") 7814 base64-char = ALPHA / DIGIT / "+" / "/" 7815 SLASH = SWS "/" SWS ; slash 7816 EQUAL = SWS "=" SWS ; equal 7817 LPAREN = SWS "(" SWS ; left parenthesis 7818 RPAREN = SWS ")" SWS ; right parenthesis 7819 COMMA = SWS "," SWS ; comma 7820 SEMI = SWS ";" SWS ; semicolon 7821 COLON = SWS ":" SWS ; colon 7822 MINUS = SWS "-" SWS ; minus/dash 7823 LDQUOT = SWS DQ ; open double quotation mark 7824 RDQUOT = DQ SWS ; close double quotation mark 7825 RAQUOT = ">" SWS ; right angle quote 7826 LAQUOT = SWS "<" ; left angle quote 7828 TEXT-UTF8char = %x21-7E / UTF8-NONASCII 7829 UTF8-NONASCII = %xC0-DF 1UTF8-CONT 7830 / %xE0-EF 2UTF8-CONT 7831 / %xF0-F7 3UTF8-CONT 7832 / %xF8-FB 4UTF8-CONT 7833 / %xFC-FD 5UTF8-CONT 7834 UTF8-CONT = %x80-BF 7836 FLOAT = ["-"] 1*12DIGIT ["." 1*9DIGIT] 7837 POS-FLOAT = 1*12DIGIT ["." 1*9DIGIT] 7839 20.2. RTSP Protocol Definition 7841 20.2.1. Generic Protocol elements 7842 RTSP-IRI = schemes ":" IRI-rest 7843 IRI-rest = ihier-part [ "?" iquery ] [ "#" ifragment ] 7844 ihier-part = "//" iauthority ipath-abempty 7845 RTSP-IRI-ref = RTSP-IRI / irelative-ref 7846 irelative-ref = irelative-part [ "?" iquery ] [ "#" ifragment ] 7847 irelative-part = "//" iauthority ipath-abempty 7848 / ipath-absolute 7849 / ipath-noscheme 7850 / ipath-empty 7852 iauthority = < As defined in RFC 3987> 7853 ipath = ipath-abempty ; begins with "/" or is empty 7854 / ipath-absolute ; begins with "/" but not "//" 7855 / ipath-noscheme ; begins with a non-colon segment 7856 / ipath-rootless ; begins with a segment 7857 / ipath-empty ; zero characters 7859 ipath-abempty = *( "/" isegment ) 7860 ipath-absolute = "/" [ isegment-nz *( "/" isegment ) ] 7861 ipath-noscheme = isegment-nz-nc *( "/" isegment ) 7862 ipath-rootless = isegment-nz *( "/" isegment ) 7863 ipath-empty = 0 7865 isegment = *ipchar [";" *ipchar] 7866 isegment-nz = 1*ipchar [";" *ipchar] 7867 / ";" *ipchar 7868 isegment-nz-nc = (1*ipchar-nc [";" *ipchar-nc]) 7869 / ";" *ipchar-nc 7870 ; non-zero-length segment without any colon ":" 7872 ipchar = iunreserved / pct-encoded / sub-delims / ":" / "@" 7873 ipchar-nc = iunreserved / pct-encoded / sub-delims / "@" 7875 iquery = < As defined in RFC 3987> 7876 ifragment = < As defined in RFC 3987> 7877 iunreserved = < As defined in RFC 3987> 7878 pct-encoded = < As defined in RFC 3987> 7879 RTSP-URI = schemes ":" URI-rest 7880 RTSP-REQ-URI = schemes ":" URI-req-rest 7881 RTSP-URI-Ref = RTSP-URI / RTSP-Relative 7882 RTSP-REQ-Ref = RTSP-REQ-URI / RTSP-REQ-Rel 7883 schemes = "rtsp" / "rtsps" / scheme 7884 scheme = < As defined in RFC 3986> 7885 URI-rest = hier-part [ "?" query ] [ "#" fragment ] 7886 URI-req-rest = hier-part [ "?" query ] 7887 ; Note fragment part not allowed in requests 7888 hier-part = "//" authority path-abempty 7890 RTSP-Relative = relative-part [ "?" query ] [ "#" fragment ] 7891 RTSP-REQ-Rel = relative-part [ "?" query ] 7892 relative-part = "//" authority path-abempty 7893 / path-absolute 7894 / path-noscheme 7895 / path-empty 7897 authority = < As defined in RFC 3986> 7898 query = < As defined in RFC 3986> 7899 fragment = < As defined in RFC 3986> 7901 path = path-abempty ; begins with "/" or is empty 7902 / path-absolute ; begins with "/" but not "//" 7903 / path-noscheme ; begins with a non-colon segment 7904 / path-rootless ; begins with a segment 7905 / path-empty ; zero characters 7907 path-abempty = *( "/" segment ) 7908 path-absolute = "/" [ segment-nz *( "/" segment ) ] 7909 path-noscheme = segment-nz-nc *( "/" segment ) 7910 path-rootless = segment-nz *( "/" segment ) 7911 path-empty = 0 7913 segment = *pchar [";" *pchar] 7914 segment-nz = ( 1*pchar [";" *pchar]) / (";" *pchar) 7915 segment-nz-nc = ( 1*pchar-nc [";" *pchar-nc]) / (";" *pchar-nc) 7916 ; non-zero-length segment without any colon ":" 7918 pchar = unreserved / pct-encoded / sub-delims / ":" / "@" 7919 pchar-nc = unreserved / pct-encoded / sub-delims / "@" 7921 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" 7922 / "*" / "+" / "," / "=" 7924 smpte-range = smpte-type ["=" smpte-range-spec] 7925 ; See section 3.4 7926 smpte-range-spec = ( smpte-time "-" [ smpte-time ] ) 7927 / ( "-" smpte-time ) 7928 smpte-type = "smpte" / "smpte-30-drop" 7929 / "smpte-25" / smpte-type-extension 7930 ; other timecodes may be added 7931 smpte-type-extension = "smpte" token 7932 smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT 7933 [ ":" 1*2DIGIT [ "." 1*2DIGIT ] ] 7935 npt-range = "npt" ["=" npt-range-spec] 7936 npt-range-spec = ( npt-time "-" [ npt-time ] ) / ( "-" npt-time ) 7937 npt-time = "now" / npt-sec / npt-hhmmss 7938 npt-sec = 1*DIGIT [ "." *DIGIT ] 7939 npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ] 7940 npt-hh = 1*DIGIT ; any positive number 7941 npt-mm = 1*2DIGIT ; 0-59 7942 npt-ss = 1*2DIGIT ; 0-59 7944 utc-range = "clock" ["=" utc-range-spec] 7945 utc-range-spec = ( utc-time "-" [ utc-time ] ) / ( "-" utc-time ) 7946 utc-time = utc-date "T" utc-clock "Z" 7947 utc-date = 8DIGIT 7948 utc-clock = 6DIGIT [ "." fraction ] 7949 fraction = 1*DIGIT 7951 feature-tag = token 7953 session-id = 1*256( ALPHA / DIGIT / safe ) 7955 extension-header = header-name HCOLON header-value 7956 header-name = token 7957 header-value = *(TEXT-UTF8char / UTF8-CONT / LWS) 7959 20.2.2. Message Syntax 7960 RTSP-message = Request / Response ; RTSP/2.0 messages 7962 Request = Request-Line 7963 *((general-header 7964 / request-header 7965 / message-header) CRLF) 7966 CRLF 7967 [ message-body-data ] 7969 Response = Status-Line 7970 *((general-header 7971 / response-header 7972 / message-header) CRLF) 7973 CRLF 7974 [ message-body-data ] 7976 Request-Line = Method SP Request-URI SP RTSP-Version CRLF 7978 Status-Line = RTSP-Version SP Status-Code SP Reason-Phrase CRLF 7979 Method = "DESCRIBE" 7980 / "GET_PARAMETER" 7981 / "OPTIONS" 7982 / "PAUSE" 7983 / "PLAY" 7984 / "PLAY_NOTIFY" 7985 / "REDIRECT" 7986 / "SETUP" 7987 / "SET_PARAMETER" 7988 / "TEARDOWN" 7989 / extension-method 7991 extension-method = token 7993 Request-URI = "*" / RTSP-REQ-URI 7994 RTSP-Version = "RTSP/" 1*DIGIT "." 1*DIGIT 7996 message-body-data = 1*OCTET 7998 Status-Code = "100" ; Continue 7999 / "200" ; OK 8000 / "301" ; Moved Permanently 8001 / "302" ; Found 8002 / "303" ; See Other 8003 / "304" ; Not Modified 8004 / "305" ; Use Proxy 8005 / "400" ; Bad Request 8006 / "401" ; Unauthorized 8007 / "402" ; Payment Required 8008 / "403" ; Forbidden 8009 / "404" ; Not Found 8010 / "405" ; Method Not Allowed 8011 / "406" ; Not Acceptable 8012 / "407" ; Proxy Authentication Required 8013 / "408" ; Request Time-out 8014 / "410" ; Gone 8015 / "411" ; Length Required 8016 / "412" ; Precondition Failed 8017 / "413" ; Request Message Body Too Large 8018 / "414" ; Request-URI Too Large 8019 / "415" ; Unsupported Media Type 8020 / "451" ; Parameter Not Understood 8021 / "452" ; reserved 8022 / "453" ; Not Enough Bandwidth 8023 / "454" ; Session Not Found 8024 / "455" ; Method Not Valid in This State 8025 / "456" ; Header Field Not Valid for Resource 8026 / "457" ; Invalid Range 8027 / "458" ; Parameter Is Read-Only 8028 / "459" ; Aggregate operation not allowed 8029 / "460" ; Only aggregate operation allowed 8030 / "461" ; Unsupported Transport 8031 / "462" ; Destination Unreachable 8032 / "463" ; Destination Prohibited 8033 / "464" ; Data Transport Not Ready Yet 8034 / "470" ; Connection Authorization Required 8035 / "471" ; Connection Credentials not accepted 8036 / "472" ; Failure to establish secure connection 8037 / "500" ; Internal Server Error 8038 / "501" ; Not Implemented 8039 / "502" ; Bad Gateway 8040 / "503" ; Service Unavailable 8041 / "504" ; Gateway Time-out 8042 / "505" ; RTSP Version not supported 8043 / "551" ; Option not supported 8044 / extension-code 8046 extension-code = 3DIGIT 8048 Reason-Phrase = *TEXT 8049 general-header = Cache-Control 8050 / Connection 8051 / CSeq 8052 / Date 8053 / Media-Properties 8054 / Media-Range 8055 / Pipelined-Requests 8056 / Proxy-Supported 8057 / Seek-Style 8058 / Supported 8059 / Timestamp 8060 / Via 8061 / extension-header 8063 request-header = Accept 8064 / Accept-Credentials 8065 / Accept-Encoding 8066 / Accept-Language 8067 / Authorization 8068 / Bandwidth 8069 / Blocksize 8070 / From 8071 / If-Match 8072 / If-Modified-Since 8073 / If-None-Match 8074 / Notify-Reason 8075 / Proxy-Require 8076 / Range 8077 / Referrer 8078 / Request-Status 8079 / Require 8080 / Scale 8081 / Session 8082 / Speed 8083 / Supported 8084 / Terminate-Reason 8085 / Transport 8086 / User-Agent 8087 / extension-header 8089 response-header = Accept-Credentials 8090 / Accept-Ranges 8091 / Connection-Credentials 8092 / MTag 8093 / Location 8094 / Proxy-Authenticate 8095 / Public 8096 / Range 8097 / Retry-After 8098 / RTP-Info 8099 / Scale 8100 / Session 8101 / Server 8102 / Speed 8103 / Transport 8104 / Unsupported 8105 / Vary 8106 / WWW-Authenticate 8107 / extension-header 8109 message-header = Allow 8110 / Content-Base 8111 / Content-Encoding 8112 / Content-Language 8113 / Content-Length 8114 / Content-Location 8115 / Content-Type 8116 / Expires 8117 / Last-Modified 8118 / extension-header 8120 20.2.3. Header Syntax 8122 All header syntaxes not defined in this section are defined in 8123 section 14 of the HTTP 1.1 specification [RFC2616]. 8125 Accept = "Accept" HCOLON 8126 [ accept-range *(COMMA accept-range) ] 8127 accept-range = media-type-range *(SEMI accept-param) 8128 media-type-range = ( "*/*" 8129 / ( m-type SLASH "*" ) 8130 / ( m-type SLASH m-subtype ) 8131 ) *( SEMI m-parameter ) 8132 accept-param = ("q" EQUAL qvalue) / generic-param 8133 qvalue = ( "0" [ "." *3DIGIT ] ) 8134 / ( "1" [ "." *3("0") ] ) 8135 Accept-Credentials = "Accept-Credentials" HCOLON cred-decision 8136 cred-decision = ("User" [LWS cred-info]) 8137 / "Proxy" 8138 / "Any" 8139 / (token [LWS 1*TEXT]) ; For future extensions 8140 cred-info = cred-info-data *(COMMA cred-info-data) 8142 cred-info-data = DQ RTSP-REQ-URI DQ SEMI hash-alg SEMI base64 8143 hash-alg = "sha-256" / extension-alg 8144 extension-alg = token 8145 Accept-Encoding = "Accept-Encoding" HCOLON 8146 [ encoding *(COMMA encoding) ] 8147 encoding = codings *(SEMI accept-param) 8148 codings = content-coding / "*" 8149 content-coding = token 8150 Accept-Language = "Accept-Language" HCOLON 8151 [ language *(COMMA language) ] 8152 language = language-range *(SEMI accept-param) 8153 language-range = (1*8ALPHA *( "-" 1*8ALPHA)) / "*" 8154 Accept-Ranges = "Accept-Ranges" HCOLON acceptable-ranges 8155 acceptable-ranges = (range-unit *(COMMA range-unit)) 8156 / "none" 8157 range-unit = "NPT" / "SMPTE" / "UTC" / extension-format 8158 extension-format = token 8159 Allow = "Allow" HCOLON [Method *(COMMA Method)] 8160 Authorization = "Authorization" HCOLON credentials 8161 credentials = ("Digest" LWS digest-response) 8162 / other-response 8163 digest-response = dig-resp *(COMMA dig-resp) 8164 dig-resp = username / realm / nonce / digest-uri 8165 / dresponse / algorithm / cnonce 8166 / opaque / message-qop 8167 / nonce-count / auth-param 8168 username = "username" EQUAL username-value 8169 username-value = quoted-string 8170 digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT 8171 digest-uri-value = Request-URI 8172 ; by HTTP/1.1 8173 message-qop = "qop" EQUAL qop-value 8174 cnonce = "cnonce" EQUAL cnonce-value 8175 cnonce-value = nonce-value 8176 nonce-count = "nc" EQUAL nc-value 8177 nc-value = 8LHEX 8178 dresponse = "response" EQUAL request-digest 8179 request-digest = LDQUOT 32LHEX RDQUOT 8180 auth-param = auth-param-name EQUAL 8181 ( token / quoted-string ) 8182 auth-param-name = token 8183 other-response = auth-scheme LWS auth-param 8184 *(COMMA auth-param) 8186 auth-scheme = token 8188 Bandwidth = "Bandwidth" HCOLON 1*DIGIT 8190 Blocksize = "Blocksize" HCOLON 1*DIGIT 8192 Cache-Control = "Cache-Control" HCOLON cache-directive 8193 *(COMMA cache-directive) 8194 cache-directive = cache-rqst-directive 8195 / cache-rspns-directive 8197 cache-rqst-directive = "no-cache" 8198 / "max-stale" [EQUAL delta-seconds] 8199 / "min-fresh" EQUAL delta-seconds 8200 / "only-if-cached" 8201 / cache-extension 8203 cache-rspns-directive = "public" 8204 / "private" 8205 / "no-cache" 8206 / "no-transform" 8207 / "must-revalidate" 8208 / "proxy-revalidate" 8209 / "max-age" EQUAL delta-seconds 8210 / cache-extension 8212 cache-extension = token [EQUAL (token / quoted-string)] 8213 delta-seconds = 1*DIGIT 8215 Connection-Credentials = "Connection-Credentials" HCOLON cred-chain 8216 cred-chain = DQ RTSP-REQ-URI DQ SEMI base64 8218 Connection = "Connection" HCOLON connection-token 8219 *(COMMA connection-token) 8220 connection-token = token 8222 Content-Base = "Content-Base" HCOLON RTSP-URI-Ref 8223 Content-Encoding = "Content-Encoding" HCOLON 8224 content-coding *(COMMA content-coding) 8225 Content-Language = "Content-Language" HCOLON 8226 language-tag *(COMMA language-tag) 8227 language-tag = primary-tag *( "-" subtag ) 8228 primary-tag = 1*8ALPHA 8229 subtag = 1*8ALPHA 8230 Content-Length = "Content-Length" HCOLON 1*DIGIT 8231 Content-Location = "Content-Location" HCOLON RTSP-REQ-Ref 8232 Content-Type = ( "Content-Type" / "c" ) HCOLON media-type 8233 media-type = m-type SLASH m-subtype *(SEMI m-parameter) 8234 m-type = discrete-type / composite-type 8235 discrete-type = "text" / "image" / "audio" / "video" 8236 / "application" / extension-token 8237 composite-type = "message" / "multipart" / extension-token 8238 extension-token = ietf-token / x-token 8239 ietf-token = token 8240 x-token = "x-" token 8241 m-subtype = extension-token / iana-token 8242 iana-token = token 8243 m-parameter = m-attribute EQUAL m-value 8244 m-attribute = token 8245 m-value = token / quoted-string 8247 CSeq = "CSeq" HCOLON cseq-nr 8248 cseq-nr = 1*9DIGIT 8249 Date = "Date" HCOLON RTSP-date 8250 RTSP-date = rfc1123-date ; HTTP-date 8251 rfc1123-date = wkday "," SP date1 SP time SP "GMT" 8252 date1 = 2DIGIT SP month SP 4DIGIT 8253 ; day month year (e.g., 02 Jun 1982) 8254 time = 2DIGIT ":" 2DIGIT ":" 2DIGIT 8255 ; 00:00:00 - 23:59:59 8256 wkday = "Mon" / "Tue" / "Wed" 8257 / "Thu" / "Fri" / "Sat" / "Sun" 8258 month = "Jan" / "Feb" / "Mar" / "Apr" 8259 / "May" / "Jun" / "Jul" / "Aug" 8260 / "Sep" / "Oct" / "Nov" / "Dec" 8262 Expires = "Expires" HCOLON RTSP-date 8263 From = "From" HCOLON from-spec 8264 from-spec = ( name-addr / addr-spec ) *( SEMI from-param ) 8265 name-addr = [ display-name ] LAQUOT addr-spec RAQUOT 8266 addr-spec = RTSP-REQ-URI / absolute-URI 8267 absolute-URI = < As defined in RFC 3986> 8268 display-name = *(token LWS) / quoted-string 8269 from-param = tag-param / generic-param 8270 tag-param = "tag" EQUAL token 8271 If-Match = "If-Match" HCOLON ("*" / message-tag-list) 8272 message-tag-list = message-tag *(COMMA message-tag) 8273 message-tag = [ weak ] opaque-tag 8274 weak = "W/" 8275 opaque-tag = quoted-string 8276 If-Modified-Since = "If-Modified-Since" HCOLON RTSP-date 8277 If-None-Match = "If-None-Match" HCOLON ("*" / message-tag-list) 8278 Last-Modified = "Last-Modified" HCOLON RTSP-date 8279 Location = "Location" HCOLON RTSP-REQ-URI 8280 Media-Properties = "Media-Properties" HCOLON [media-prop-list] 8281 media-prop-list = media-prop-value *(COMMA media-prop-value) 8282 media-prop-value = ("Random-Access" [EQUAL POS-FLOAT]) 8283 / "Begining-Only" 8284 / "No-Seeking" 8285 / "Immutable" 8286 / "Dynamic" 8287 / "Time-Progressing" 8288 / "Unlimited" 8289 / ("Time-Limited" EQUAL utc-range-spec) 8290 / ("Time-Duration" EQUAL POS-FLOAT) 8291 / ("Scales" EQUAL scale-value-list) 8292 / media-prop-ext 8293 media-prop-ext = token [EQUAL (1*rtsp-unreserved / quoted-string)] 8294 scale-value-list = DQ scale-entry *(COMMA scale-entry) DQ 8295 scale-entry = scale-value / (scale-value COLON scale-value) 8296 scale-value = FLOAT 8297 Media-Range = "Media-Range" HCOLON [ranges-list] 8298 ranges-list = ranges-spec *(COMMA ranges-spec) 8299 MTag = "MTag" HCOLON message-tag 8300 Notify-Reason = "Notify-Reason" HCOLON Notify-Reas-val 8301 Notify-Reas-val = "end-of-stream" 8302 / "media-properties-update" 8303 / "scale-change" 8304 / Notify-Reason-extension 8305 Notify-Reason-extension = token 8306 Pipelined-Requests = "Pipelined-Requests" HCOLON startup-id 8307 startup-id = 1*8DIGIT 8309 Proxy-Authenticate = "Proxy-Authenticate" HCOLON challenge-list 8310 challenge-list = challenge *(COMMA challenge) 8311 challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) 8312 / other-challenge 8313 other-challenge = auth-scheme LWS auth-param 8314 *(COMMA auth-param) 8315 digest-cln = realm / domain / nonce 8316 / opaque / stale / algorithm 8317 / qop-options / auth-param 8318 realm = "realm" EQUAL realm-value 8319 realm-value = quoted-string 8320 domain = "domain" EQUAL LDQUOT RTSP-REQ-Ref 8321 *(1*SP RTSP-REQ-Ref ) RDQUOT 8322 nonce = "nonce" EQUAL nonce-value 8323 nonce-value = quoted-string 8324 opaque = "opaque" EQUAL quoted-string 8325 stale = "stale" EQUAL ( "true" / "false" ) 8326 algorithm = "algorithm" EQUAL ("MD5" / "MD5-sess" / token) 8327 qop-options = "qop" EQUAL LDQUOT qop-value 8328 *("," qop-value) RDQUOT 8329 qop-value = "auth" / "auth-int" / token 8330 Proxy-Require = "Proxy-Require" HCOLON feature-tag 8331 *(COMMA feature-tag) 8333 Proxy-Supported = "Proxy-Supported" HCOLON feature-tag 8334 *(COMMA feature-tag) 8336 Public = "Public" HCOLON Method *(COMMA Method) 8338 Range = "Range" HCOLON ranges-spec 8340 ranges-spec = npt-range / utc-range / smpte-range 8341 / range-ext 8342 range-ext = extension-format ["=" range-value] 8343 range-value = 1*(rtsp-unreserved / quoted-string / ":" ) 8345 Referrer = "Referrer" HCOLON RTSP-REQ-Ref 8346 Request-Status = "Request-Status" HCOLON req-status-info 8347 req-status-info = cseq-info LWS status-info LWS reason-info 8348 cseq-info = "cseq" EQUAL cseq-nr 8349 status-info = "status" EQUAL Status-Code 8350 reason-info = "reason" EQUAL DQ Reason-Phrase DQ 8351 Require = "Require" HCOLON feature-tag-list 8352 feature-tag-list = feature-tag *(COMMA feature-tag) 8353 RTP-Info = "RTP-Info" HCOLON [rtsp-info-spec 8354 *(COMMA rtsp-info-spec)] 8355 rtsp-info-spec = stream-url 1*ssrc-parameter 8356 stream-url = "url" EQUAL DQ RTSP-REQ-Ref DQ 8357 ssrc-parameter = LWS "ssrc" EQUAL ssrc HCOLON 8358 ri-parameter *(SEMI ri-parameter) 8359 ri-parameter = ("seq" EQUAL 1*DIGIT) 8360 / ("rtptime" EQUAL 1*DIGIT) 8361 / generic-param 8363 Retry-After = "Retry-After" HCOLON delta-seconds 8364 [ comment ] *( SEMI retry-param ) 8365 retry-param = ("duration" EQUAL delta-seconds) 8366 / generic-param 8368 Scale = "Scale" HCOLON scale-value 8369 Seek-Style = "Seek-Style" HCOLON Seek-S-values 8370 Seek-S-values = "RAP" 8371 / "First-Prior" 8372 / "Next" 8373 / Seek-S-value-ext 8374 Seek-S-value-ext = token 8375 Speed = "Speed" HCOLON POS-FLOAT MINUS POS-FLOAT 8376 Server = "Server" HCOLON ( product / comment ) 8377 *(LWS (product / comment)) 8378 product = token [SLASH product-version] 8379 product-version = token 8380 comment = LPAREN *( ctext / quoted-pair) RPAREN 8382 Session = "Session" HCOLON session-id 8383 [ SEMI "timeout" EQUAL delta-seconds ] 8385 Supported = "Supported" HCOLON [feature-tag-list] 8386 Terminate-Reason = "Terminate-Reason" HCOLON TR-Info 8387 TR-Info = TR-Reason *(SEMI TR-Parameter) 8388 TR-Reason = "Session-Timeout" 8389 / "Server-Admin" 8390 / "Internal-Error" 8391 / token 8392 TR-Parameter = TR-time / TR-user-msg / generic-param 8393 TR-time = "time" EQUAL utc-time 8394 TR-user-msg = "user-msg" EQUAL quoted-string 8396 Timestamp = "Timestamp" HCOLON timestamp-value LWS [delay] 8397 timestamp-value = *DIGIT [ "." *DIGIT ] 8398 delay = *DIGIT [ "." *DIGIT ] 8400 Transport = "Transport" HCOLON transport-spec 8401 *(COMMA transport-spec) 8402 transport-spec = transport-id *trns-parameter 8403 transport-id = trans-id-rtp / other-trans 8404 trans-id-rtp = "RTP/" profile ["/" lower-transport] 8405 ; no LWS is allowed inside transport-id 8406 other-trans = token *("/" token) 8408 profile = "AVP" / "SAVP" / "AVPF" / token 8409 lower-transport = "TCP" / "UDP" / token 8410 trns-parameter = (SEMI ( "unicast" / "multicast" )) 8411 / (SEMI "interleaved" EQUAL channel [ "-" channel ]) 8412 / (SEMI "ttl" EQUAL ttl) 8413 / (SEMI "layers" EQUAL 1*DIGIT) 8414 / (SEMI "ssrc" EQUAL ssrc *(SLASH ssrc)) 8415 / (SEMI "mode" EQUAL mode-spec) 8416 / (SEMI "dest_addr" EQUAL addr-list) 8417 / (SEMI "src_addr" EQUAL addr-list) 8418 / (SEMI trn-param-ext) 8419 / (SEMI "setup" EQUAL contrans-setup) 8420 / (SEMI "connection" EQUAL contrans-con) 8421 / (SEMI "RTCP-mux") 8422 contrans-setup = "active" / "passive" / "actpass" 8423 contrans-con = "new" / "existing" 8424 trn-param-ext = par-name [EQUAL trn-par-value] 8425 par-name = token 8426 trn-par-value = *(rtsp-unreserved / quoted-string) 8427 ttl = 1*3DIGIT ; 0 to 255 8428 ssrc = 8HEX 8429 channel = 1*3DIGIT 8430 mode-spec = ( DQ mode *(COMMA mode) DQ ) 8431 mode = "PLAY" / token 8432 addr-list = quoted-addr *(SLASH quoted-addr) 8433 quoted-addr = DQ (host-port / extension-addr) DQ 8434 host-port = host [":" port] 8435 / ":" port 8436 extension-addr = 1*qdtext 8437 host = < As defined in RFC 3986> 8438 port = < As defined in RFC 3986> 8439 Unsupported = "Unsupported" HCOLON feature-tag-list 8441 User-Agent = "User-Agent" HCOLON ( product / comment ) 8442 0*(LWS (product / comment)) 8444 Vary = "Vary" HCOLON ( "*" / field-name-list) 8445 field-name-list = field-name *(COMMA field-name) 8446 field-name = token 8447 Via = "Via" HCOLON via-parm *(COMMA via-parm) 8448 via-parm = sent-protocol LWS sent-by *( SEMI via-params ) 8449 via-params = via-ttl / via-maddr 8450 / via-received / via-branch 8451 / via-extension 8452 via-ttl = "ttl" EQUAL ttl 8453 via-maddr = "maddr" EQUAL host 8454 via-received = "received" EQUAL (IPv4address / IPv6address) 8455 IPv4address = < As defined in RFC 3986> 8456 IPv6address = < As defined in RFC 3986> 8457 via-branch = "branch" EQUAL token 8458 via-extension = generic-param 8459 sent-protocol = protocol-name SLASH protocol-version 8460 SLASH transport-prot 8461 protocol-name = "RTSP" / token 8462 protocol-version = token 8463 transport-prot = "UDP" / "TCP" / "TLS" / other-transport 8464 other-transport = token 8465 sent-by = host [ COLON port ] 8467 WWW-Authenticate = "WWW-Authenticate" HCOLON challenge-list 8469 20.3. SDP extension Syntax 8471 This section defines in ABNF the SDP extensions defined for RTSP. 8472 See Appendix D for the definition of the extensions in text. 8474 control-attribute = "a=control:" *SP RTSP-REQ-REF 8476 a-range-def = "a=range:" ranges-spec CRLF 8478 a-mtag-def = "a=mtag:" message-tag CRLF 8480 21. Security Considerations 8482 Because of the similarity in syntax and usage between RTSP servers 8483 and HTTP servers, the security considerations outlined in [H15] apply 8484 also. 8486 Specifically, please note the following: 8488 Abuse of Server Log Information: RTSP and HTTP servers will 8489 presumably have similar logging mechanisms, and thus should be 8490 equally guarded in protecting the contents of those logs, thus 8491 protecting the privacy of the users of the servers. See 8492 [H15.1.1] for HTTP server recommendations regarding server 8493 logs. 8495 Transfer of Sensitive Information: There is no reason to believe 8496 that information transferred or controlled via RTSP may be any 8497 less sensitive than that normally transmitted via HTTP. 8498 Therefore, all of the precautions regarding the protection of 8499 data privacy and user privacy apply to implementors of RTSP 8500 clients, servers, and proxies. See [H15.1.2] for further 8501 details. 8503 Attacks Based On File and Path Names: Though RTSP URIs are opaque 8504 handles that do not necessarily have file system semantics, it 8505 is anticipated that many implementations will translate 8506 portions of the Request-URIs directly to file system calls. In 8507 such cases, file systems SHOULD follow the precautions outlined 8508 in [H15.5], such as checking for ".." in path components. 8510 Personal Information: RTSP clients are often privy to the same 8511 information that HTTP clients are (user name, location, etc.) 8512 and thus should be equally sensitive. See [H15.1] for further 8513 recommendations. 8515 Privacy Issues Connected to Accept Headers: Since may of the same 8516 "Accept" headers exist in RTSP as in HTTP, the same caveats 8517 outlined in [H15.1.4] with regards to their use should be 8518 followed. 8520 DNS Spoofing: Presumably, given the longer connection times 8521 typically associated to RTSP sessions relative to HTTP 8522 sessions, RTSP client DNS optimizations should be less 8523 prevalent. Nonetheless, the recommendations provided in 8524 [H15.3] are still relevant to any implementation which attempts 8525 to rely on a DNS-to-IP mapping to hold beyond a single use of 8526 the mapping. 8528 Location Headers and Spoofing: If a single server supports multiple 8529 organizations that do not trust each another, then it needs to 8530 check the values of Location and Content-Location header fields 8531 in responses that are generated under control of said 8532 organizations to make sure that they do not attempt to 8533 invalidate resources over which they have no authority. 8534 ([H15.4]) 8536 In addition to the recommendations in the current HTTP specification 8537 (RFC 2616 [RFC2616], as of this writing) and also of the previous 8538 RFC2068 [RFC2068], future HTTP specifications may provide additional 8539 guidance on security issues. 8541 The following are added considerations for RTSP implementations. 8543 Concentrated denial-of-service attack: The protocol offers the 8544 opportunity for a remote-controlled denial-of-service attack. 8545 See Section 21.1. 8547 Session hijacking: Since there is no or little relation between a 8548 transport layer connection and an RTSP session, it is possible 8549 for a malicious client to issue requests with random session 8550 identifiers which would affect unsuspecting clients. The 8551 server SHOULD use a large, random and non-sequential session 8552 identifier to minimize the possibility of this kind of attack. 8553 However, unless the RTSP signalling always are confidentiality 8554 protected, e.g. using TLS, an on-path attacker will be able to 8555 hijack a session. For real session security, client 8556 authentication needs to be performed. 8558 Authentication: Servers SHOULD implement both basic and digest 8559 [RFC2617] authentication. In environments requiring tighter 8560 security for the control messages, the transport layer 8561 mechanism TLS [RFC5246] SHOULD be used. 8563 Stream issues: RTSP only provides for stream control. Stream 8564 delivery issues are not covered in this section, nor in the 8565 rest of this draft. RTSP implementations will most likely rely 8566 on other protocols such as RTP, IP multicast, RSVP and IGMP, 8567 and should address security considerations brought up in those 8568 and other applicable specifications. 8570 Persistently suspicious behavior: RTSP servers SHOULD return error 8571 code 403 (Forbidden) upon receiving a single instance of 8572 behavior which is deemed a security risk. RTSP servers SHOULD 8573 also be aware of attempts to probe the server for weaknesses 8574 and entry points and MAY arbitrarily disconnect and ignore 8575 further requests clients which are deemed to be in violation of 8576 local security policy. 8578 Scope of Multicast: If RTSP is used to control the transmission of 8579 media onto a multicast network it is need to consider the scope 8580 that delivery has. RTSP supports the TTL Transport header 8581 parameter to indicate this scope. However, such scope control 8582 is risk as it may be set to large and distribute media beyond 8583 the intended scope. 8585 TLS through proxies: If one uses the possibility to connect TLS in 8586 multiple legs (Section 19.3 one really needs to be aware of the 8587 trust model. That procedure requires full faith and trust in 8588 all proxies that one allows to connect through. They are man 8589 in the middle and has access to all that goes on over the TLS 8590 connection. Thus it is important to consider if that trust 8591 model is acceptable in the actual application. 8593 Resource Exhaustion As RTSP is a stateful protocol and establish 8594 resource usages on the server there is a clear possibility to 8595 attack the server by trying to overbook these resources to 8596 perform an denial of service attack. This attack can be both 8597 against ongoing sessions and to prevent others from 8598 establishing sessions. RTSP agents will need to have mechanism 8599 to prevent single peers from consuming extensive amounts of 8600 resources. 8602 21.1. Remote denial of Service Attack 8604 The attacker may initiate traffic flows to one or more IP addresses 8605 by specifying them as the destination in SETUP requests. While the 8606 attacker's IP address may be known in this case, this is not always 8607 useful in prevention of more attacks or ascertaining the attackers 8608 identity. Thus, an RTSP server MUST only allow client-specified 8609 destinations for RTSP-initiated traffic flows if the server has 8610 ensured that the specified destination address accepts receiving 8611 media through different security mechanisms. Security mechanisms 8612 that are acceptable in an increased generality are: 8614 o Verification of the client's identity, either against a database 8615 of known users using RTSP authentication mechanisms (preferably 8616 digest authentication or stronger) 8618 o A list of addresses that accept to be media destinations, 8619 especially considering user identity 8621 o Media path based verification 8623 The server SHOULD NOT allow the destination field to be set unless a 8624 mechanism exists in the system to authorize the request originator to 8625 direct streams to the recipient. It is preferred that this 8626 authorization be performed by the media recipient (destination) 8627 itself and the credentials passed along to the server. However, in 8628 certain cases, such as when recipient address is a multicast group, 8629 or when the recipient is unable to communicate with the server in an 8630 out-of-band manner, this may not be possible. In these cases the 8631 server may chose another method such as a server-resident 8632 authorization list to ensure that the request originator has the 8633 proper credentials to request stream delivery to the recipient. 8635 One solution that performs the necessary verification of acceptance 8636 of media suitable for unicast based delivery is the ICE based NAT 8637 traversal method described in [I-D.ietf-mmusic-rtsp-nat]. By using 8638 random passwords and username the probability of unintended 8639 indication as a valid media destination is very low. If the server 8640 include in its STUN requests a cookie (consisting of random material) 8641 that is the destination echo back the solution is also safe against 8642 having a off-path attacker being able to spoof the STUN checks. 8643 Leaving this solution vulnerable only to on-path attackers that can 8644 see the STUN requests go to the target of attack. 8646 For delivery to multicast addresses there is need for another 8647 solution which is not specified here. 8649 22. IANA Considerations 8651 This section sets up a number of registries for RTSP 2.0 that should 8652 be maintained by IANA. For each registry there is a description on 8653 what it is required to contain, what specification is needed when 8654 adding a entry with IANA, and finally the entries that this document 8655 needs to register. See also the Section 2.7 "Extending RTSP". There 8656 is also an IANA registration of two SDP attributes. 8658 The sections describing how to register an item uses some of the 8659 requirements level described in RFC 5226 [RFC5226], namely "First 8660 Come, First Served", "Expert Review, "Specification Required", and 8661 "Standards Action". 8663 A registration request to IANA MUST contain the following 8664 information: 8666 o A name of the item to register according to the rules specified by 8667 the intended registry. 8669 o Indication of who has change control over the feature (for 8670 example, IETF, ISO, ITU-T, other international standardization 8671 bodies, a consortium, a particular company or group of companies, 8672 or an individual); 8674 o A reference to a further description, if available, for example 8675 (in decreasing order of preference) an RFC, a published standard, 8676 a published paper, a patent filing, a technical report, documented 8677 source code or a computer manual; 8679 o For proprietary features, contact information (postal and email 8680 address); 8682 22.1. Feature-tags 8684 22.1.1. Description 8686 When a client and server try to determine what part and functionality 8687 of the RTSP specification and any future extensions that its counter 8688 part implements there is need for a namespace. This registry 8689 contains named entries representing certain functionality. 8691 The usage of feature-tags is explained in Section 11 and 8692 Section 13.1. 8694 22.1.2. Registering New Feature-tags with IANA 8696 The registering of feature-tags is done on a first come, first served 8697 basis. 8699 The name of the feature MUST follow these rules: The name may be of 8700 any length, but SHOULD be no more than twenty characters long. The 8701 name MUST NOT contain any spaces, or control characters. The 8702 registration MUST indicate if the feature-tag applies to clients, 8703 servers, or proxies only or any combinations of these. Any 8704 proprietary feature MUST have as the first part of the name a vendor 8705 tag, which identifies the organization. 8707 22.1.3. Registered entries 8709 The following feature-tags are in this specification defined and 8710 hereby registered. The change control belongs to the IETF. 8712 play.basic: The minimal implementation for delivery and playback 8713 operations according to this specification. Applies for both 8714 clients, servers and proxies. 8716 play.scale: Support of scale operations for media playback. Applies 8717 only for servers. 8719 play.speed: Support of the speed functionality for media delivery. 8720 Applies only for servers. 8722 setup.rtp.rtcp.mux Support of the RTP and RTCP multiplexing as 8723 discussed in Appendix C.1.6.4. 8725 22.2. RTSP Methods 8727 22.2.1. Description 8729 What a method is, is described in section Section 13. Extending the 8730 protocol with new methods allow for totally new functionality. 8732 22.2.2. Registering New Methods with IANA 8734 A new method MUST be registered through an IETF Standards Action. 8735 The reason is that new methods may radically change the protocols 8736 behavior and purpose. 8738 A specification for a new RTSP method MUST consist of the following 8739 items: 8741 o A method name which follows the ABNF rules for methods. 8743 o A clear specification on what action and response a request with 8744 the method will result in. Which directions the method is used, 8745 C->S or S->C or both. How the use of headers, if any, modifies 8746 the behavior and effect of the method. 8748 o A list or table specifying which of the registered headers that 8749 are allowed to use with the method in request or/and response. 8751 o Describe how the method relates to network proxies. 8753 22.2.3. Registered Entries 8755 This specification, RFCXXXX, registers 10 methods: DESCRIBE, 8756 GET_PARAMETER, OPTIONS, PAUSE, PLAY, PLAY_NOTIFY REDIRECT, SETUP, 8757 SET_PARAMETER, and TEARDOWN. 8759 22.3. RTSP Status Codes 8761 22.3.1. Description 8763 A status code is the three digit numbers used to convey information 8764 in RTSP response messages, seeSection 8. The number space is limited 8765 and care should be taken not to fill the space. 8767 22.3.2. Registering New Status Codes with IANA 8769 A new status code can only be registered by an IETF Standards Action. 8770 A specification for a new status code MUST specify the following: 8772 o The requested number. 8774 o A description what the status code means and the expected behavior 8775 of the sender and receiver of the code. 8777 22.3.3. Registered Entries 8779 RFCXXXX, registers the numbered status code defined in the ABNF entry 8780 "Status-Code" except "extension-code" in Section 20.2.2. 8782 22.4. RTSP Headers 8784 22.4.1. Description 8786 By specifying new headers a method(s) can be enhanced in many 8787 different ways. An unknown header will be ignored by the receiving 8788 entity. If the new header is vital for a certain functionality, a 8789 feature-tag for the functionality can be created and demanded to be 8790 used by the counter-part with the inclusion of a Require header 8791 carrying the feature-tag. 8793 22.4.2. Registering New Headers with IANA 8795 Registrations in the registry can be done following the Expert Review 8796 policy. A specification SHOULD be provided, preferable an IETF RFC 8797 or other Standards Developing Organization specification. The 8798 minimal information in a registration request is the header name and 8799 the contact information. 8801 The specification SHOULD contain the following information: 8803 o The name of the header. 8805 o An ABNF specification of the header syntax. 8807 o A list or table specifying when the header may be used, 8808 encompassing all methods, their request or response, the direction 8809 (C->S or S->C). 8811 o How the header is to be handled by proxies. 8813 o A description of the purpose of the header. 8815 22.4.3. Registered entries 8817 All headers specified in Section 16 in RFCXXXX are to be registered. 8819 Furthermore the following RTSP headers defined in other 8820 specifications are registered: 8822 o x-wap-profile defined in [3gpp-26234]. 8824 o x-wap-profile-diff defined in [3gpp-26234]. 8826 o x-wap-profile-warning defined in [3gpp-26234]. 8828 o x-predecbufsize defined in [3gpp-26234]. 8830 o x-initpredecbufperiod defined in [3gpp-26234]. 8832 o x-initpostdecbufperiod defined in [3gpp-26234]. 8834 o 3gpp-videopostdecbufsize defined in [3gpp-26234]. 8836 o 3GPP-Link-Char defined in [3gpp-26234]. 8838 o 3GPP-Adaptation defined in [3gpp-26234]. 8840 o 3GPP-QoE-Metrics defined in [3gpp-26234]. 8842 o 3GPP-QoE-Feedback defined in [3gpp-26234]. 8844 The use of "x-" is NOT RECOMMENDED but the above headers in the 8845 register list was defined prior to the clarification. 8847 22.5. Accept-Credentials 8849 The security framework's TLS connection mechanism has two registrable 8850 entities. 8852 22.5.1. Accept-Credentials policies 8854 In Section 19.3.1 three policies for how to handle certificates are 8855 specified. Further policies may be defined and MUST be registered 8856 with IANA using the following rules: 8858 o Registering requires an IETF Standards Action 8860 o A registration is required to name a contact person. 8862 o Name of the policy. 8864 o A describing text that explains how the policy works for handling 8865 the certificates. 8867 This specification registers the following values: 8869 Any 8871 Proxy 8873 User 8875 22.5.2. Accept-Credentials hash algorithms 8877 The Accept-Credentials header (See Section 16.2) allows for the usage 8878 of other algorithms for hashing the DER records of accepted entities. 8879 The registration of any future algorithm is expected to be extremely 8880 rare and could also cause interoperability problems. Therefore the 8881 bar for registering new algorithms is intentionally placed high. 8883 Any registration of a new hash algorithm MUST fulfill the following 8884 requirement: 8886 o Follow the IETF Standards Action policy. 8888 o A definition of the algorithm and its identifier meeting the 8889 "token" ABNF requirement. 8891 22.6. Cache-Control Cache Directive Extensions 8893 There exist a number of cache directives which can be sent in the 8894 Cache-Control header. A registry for these cache directives MUST be 8895 defined with the following rules: 8897 o Registering requires an IETF Standards Action. 8899 o A registration is required to contain a contact person. 8901 o Name of the directive and a definition of the value, if any. 8903 o Specification if it is an request or response directive. 8905 o A describing text that explains how the cache directive is used 8906 for RTSP controlled media streams. 8908 This specification registers the following values: 8910 no-cache: 8912 public: 8914 private: 8916 no-transform: 8918 only-if-cached: 8920 max-stale: 8922 min-fresh: 8924 must-revalidate: 8926 proxy-revalidate: 8928 max-age: 8930 22.7. Media Properties 8932 22.7.1. Description 8934 The media streams being controlled by RTSP can have many different 8935 properties. The media properties required to cover the use cases 8936 that was in mind when writing the specification are defined. 8937 However, it can be expected that further innovation will result in 8938 new use cases or media streams with properties not covered by the 8939 ones specified here. Thus new media properties can be specified. As 8940 new media properties may need a substantial amount of new definitions 8941 to correctly specify behavior for this property the bar is intended 8942 to be high. 8944 22.7.2. Registration Rules 8946 Registering new media property MUST fulfill the following 8947 requirements 8949 o Follow the Specification Required policy and get the approval of 8950 the designated Expert. 8952 o Have an ABNF definition of the media property value name that 8953 meets "media-prop-ext" definition 8955 o A Contact Person for the Registration 8957 o Description of all changes to the behavior of the RTSP protocol as 8958 result of these changes. 8960 22.7.3. Registered Values 8962 This specification registers the 9 values listed in Section 16.28. 8964 22.8. Notify-Reason header 8966 22.8.1. Description 8968 Notify-Reason values are used for indicating the reason the 8969 notification was sent. Each reason has its associated rules on what 8970 headers and information that may or must be included in the 8971 notification. New notification behaviors need to be specified to 8972 enable interoperable usage, thus a specification of each new value is 8973 required. 8975 22.8.2. Registration Rules 8977 Registrations for new Notify-Reason value MUST fulfill the following 8978 requirements 8980 o Follow the Specification Required policy and get the approval of 8981 the designated Expert. 8983 o Have a ABNF definition of the Notify reason value name that meets 8984 "Notify-Reason-extension" definition 8986 o A Contact Person for the Registration 8988 o Description of which headers shall be included in the request and 8989 response, when it should be sent, and any effect it has on the 8990 server client state. 8992 22.8.3. Registered Values 8994 This specification registers 3 values defined in the Notify-Reas-val 8995 ABNFSection 20.2.3: 8997 o end-of-stream 8999 o media-properties-update 9001 o scale-change 9003 22.9. Range header formats 9005 The Range header allows for different range formats. New ones may be 9006 registered, but moderation should be applied as it makes 9007 interoperability more difficult. A registration MUST fulfill the 9008 following requirements: 9010 o Follow the Specification Required policy. 9012 o An ABNF definition of the range format that fulfills the "range- 9013 ext" definition. 9015 o A Contact person for the registration. 9017 o Rules for how one handles the range when using a negative Scale. 9019 22.10. Terminate-Reason Header 9021 The Terminate-Reason header (Section 16.50) has two registries for 9022 extensions. 9024 22.10.1. Redirect Reasons 9026 Registrations are done under the policy of Expert Review. The 9027 registered value needs to follow syntax, i.e. be a token. The 9028 specification needs to provide definition of what the procedures that 9029 is to be followed when a client receives this redirect reason. This 9030 specification registers two values: 9032 o Session-Timeout 9034 o Server-Admin 9036 22.10.2. Terminate-Reason Header Parameters 9038 Registrations are done under the policy of Specification Required. 9039 The registrations must define a syntax for the parameter that also 9040 follows the allowed by the RTSP 2.0 specification. A contact person 9041 is also required. This specification registers: 9043 o time 9045 o user-msg 9047 22.11. RTP-Info header parameters 9049 22.11.1. Description 9051 The RTP-Info header (Section 16.43) carries one or more parameter 9052 value pairs with information about a particular point in the RTP 9053 stream. RTP extensions or new usages may need new types of 9054 information. As RTP information that could be needed is likely to be 9055 generic enough and to maximize the interoperability registration 9056 requires specification required. 9058 22.11.2. Registration Rules 9060 Registrations for new Notify-Reason value MUST fulfill the following 9061 requirements 9063 o Follow the Specification Required policy and get the approval of 9064 the designated Expert. 9066 o Have a ABNF definition that meets the "generic-param" definition 9068 o A Contact Person for the Registration 9070 22.11.3. Registered Values 9072 This specification registers 2 parameter value pairs: 9074 o seq 9076 o rtptime 9078 22.12. Seek-Style Policies 9080 22.12.1. Description 9082 New seek policies may be registered, however, a large number of these 9083 will complicate implementation substantially. The impact of unknown 9084 policies is that the server will not honor the unknown and use the 9085 server default policy instead. 9087 22.12.2. Registration Rules 9089 Registrations of new Seek-Style polices MUST fulfill the following 9090 requirements 9092 o Follow the Specification Required policy. 9094 o Have a ABNF definition of the Seek-Style policy name that meets 9095 "Seek-S-value-ext" definition 9097 o A Contact Person for the Registration 9099 o Description of which headers shall be included in the request and 9100 response, when it should be sent, and any affect it has on the 9101 server client state. 9103 22.12.3. Registered Values 9105 This specification registers 3 values: 9107 o RAP 9109 o First-Prior 9111 o Next 9113 22.13. Transport Header Registries 9115 The transport header contains a number of parameters which have 9116 possibilities for future extensions. Therefore registries for these 9117 needs to be defined. 9119 22.13.1. Transport Protocol Specification 9121 A registry for the parameter transport-protocol specification MUST be 9122 defined with the following rules: 9124 o Registering uses the policy of Specification Required. 9126 o A contact person or organization with address and email. 9128 o A value definition that are following the ABNF syntax definition. 9130 o A describing text that explains how the registered value are used 9131 in RTSP. 9133 This specification registers the following values: 9135 RTP/AVP: Use of the RTP[RFC3550] protocol for media transport in 9136 combination with the "RTP profile for audio and video 9137 conferences with minimal control"[RFC3551] over UDP. The usage 9138 is explained in RFC XXXX, appendix Appendix C.1. 9140 RTP/AVP/UDP: the same as RTP/AVP. 9142 RTP/AVPF: Use of the RTP[RFC3550] protocol for media transport in 9143 combination with the "Extended RTP Profile for RTCP-based 9144 Feedback (RTP/AVPF)" [RFC4585] over UDP. The usage is 9145 explained in RFC XXXX, appendix Appendix C.1. 9147 RTP/AVPF/UDP: the same as RTP/AVPF. 9149 RTP/SAVP: Use of the RTP[RFC3550] protocol for media transport in 9150 combination with the "The Secure Real-time Transport Protocol 9151 (SRTP)" [RFC3711] over UDP. The usage is explained in RFC 9152 XXXX, appendix Appendix C.1. 9154 RTP/SAVP/UDP: the same as RTP/SAVP. 9156 RTP/SAVPF: Use of the RTP[RFC3550] protocol for media transport in 9157 combination with the "[RFC5124] over UDP. The usage is 9158 explained in RFC XXXX, appendix Appendix C.1. 9160 RTP/SAVPF/UDP: the same as RTP/SAVPF. 9162 RTP/AVP/TCP: Use of the RTP[RFC3550] protocol for media transport in 9163 combination with the "RTP profile for audio and video 9164 conferences with minimal control"[RFC3551] over TCP. The usage 9165 is explained in RFC XXXX, appendix Appendix C.2.2. 9167 RTP/AVPF/TCP: Use of the RTP[RFC3550] protocol for media transport 9168 in combination with the "Extended RTP Profile for RTCP-based 9169 Feedback (RTP/AVPF)"[RFC4585] over TCP. The usage is explained 9170 in RFC XXXX, appendix Appendix C.2.2. 9172 RTP/SAVP/TCP: Use of the RTP[RFC3550] protocol for media transport 9173 in combination with the "The Secure Real-time Transport 9174 Protocol (SRTP)" [RFC3711] over TCP. The usage is explained in 9175 RFC XXXX, appendix Appendix C.2.2. 9177 RTP/SAVPF/TCP: Use of the RTP[RFC3550] protocol for media transport 9178 in combination with the "[RFC5124] over TCP. The usage is 9179 explained in RFC XXXX, appendix Appendix C.2.2. 9181 22.13.2. Transport modes 9183 A registry for the transport parameter mode MUST be defined with the 9184 following rules: 9186 o Registering requires an IETF Standards Action. 9188 o A contact person or organization with address and email. 9190 o A value definition that are following the ABNF token definition. 9192 o A describing text that explains how the registered value are used 9193 in RTSP. 9195 This specification registers 1 value: 9197 PLAY: See RFC XXXX. 9199 22.13.3. Transport Parameters 9201 A registry for parameters that may be included in the Transport 9202 header MUST be defined with the following rules: 9204 o Registering uses the Specification Required policy. 9206 o A value definition that are following the ABNF token definition. 9208 o A describing text that explains how the registered value are used 9209 in RTSP. 9211 This specification registers all the transport parameters defined in 9212 Section 16.52. 9214 22.14. URI Schemes 9216 This specification defines two URI schemes ("rtsp" and "rtsps") and 9217 reserves a third one ("rtspu"). Registrations are following RFC 9218 4395[RFC4395]. 9220 22.14.1. The rtsp URI Scheme 9222 URI scheme name: rtsp 9224 Status: Permanent 9226 URI scheme syntax: See Section 20.2.1 of RFC XXXX. 9228 URI scheme semantics: The rtsp scheme is used to indicate resources 9229 accessible through the usage of the Real-time Streaming 9230 Protocol (RTSP). RTSP allows different operations on the 9231 resource identified by the URI, but the primary purpose is the 9232 streaming delivery of the resource to a client. However, the 9233 operations that are currently defined are: Describing the 9234 resource for the purpose of configuring the receiving entity 9235 (DESCRIBE), configuring the delivery method and its addressing 9236 (SETUP), controlling the delivery (PLAY and PAUSE), reading or 9237 setting of resource related parameters (SET_PARAMETER and 9238 GET_PARAMETER, and termination of the session context created 9239 (TEARDOWN). 9241 Encoding considerations: IRIs in this scheme are defined and needs 9242 to be encoded as RTSP URIs when used within the RTSP protocol. 9243 That encoding is done according to RFC 3987. 9245 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9246 2326), RTSP 2.0 (RFC XXXX) 9248 Interoperability considerations: The change in URI syntax performed 9249 between RTSP 1.0 and 2.0 can create interoperability issues. 9251 Security considerations: All the security threats identified in 9252 Section 7 of RFC 3986 applies also to this scheme. They need 9253 to be reviewed and considered in any implementation utilizing 9254 this scheme. 9256 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9258 Author/Change controller: IETF 9260 References: RFC 2326, RFC 3986, RFC 3987, RFC XXXX 9262 22.14.2. The rtsps URI Scheme 9264 URI scheme name: rtsps 9266 Status: Permanent 9268 URI scheme syntax: See Section 20.2.1 of RFC XXXX. 9270 URI scheme semantics: The rtsps scheme is used to indicate resources 9271 accessible through the usage of the Real-time Streaming 9272 Protocol (RTSP) over TLS. RTSP allows different operations on 9273 the resource identified by the URI, but the primary purpose is 9274 the streaming delivery of the resource to a client. However, 9275 the operations that are currently defined are: Describing the 9276 resource for the purpose of configuring the receiving entity 9277 (DESCRIBE), configuring the delivery method and its addressing 9278 (SETUP), controlling the delivery (PLAY and PAUSE), reading or 9279 setting of resource related parameters (SET_PARAMETER and 9280 GET_PARAMETER, and termination of the session context created 9281 (TEARDOWN). 9283 Encoding considerations: IRIs in this scheme are defined and needs 9284 to be encoded as RTSP URIs when used within the RTSP protocol. 9285 That encoding is done according to RFC 3987. 9287 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9288 2326), RTSP 2.0 (RFC XXXX) 9290 Interoperability considerations: The change in URI syntax performed 9291 between RTSP 1.0 and 2.0 can create interoperability issues. 9293 Security considerations: All the security threats identified in 9294 Section 7 of RFC 3986 applies also to this scheme. They need 9295 to be reviewed and considered in any implementation utilizing 9296 this scheme. 9298 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9300 Author/Change controller: IETF 9301 References: RFC 2326, RFC 3986, RFC 3987, RFC XXXX 9303 22.14.3. The rtspu URI Scheme 9305 URI scheme name: rtspu 9307 Status: Permanent 9309 URI scheme syntax: See Section 3.2 of RFC 2326. 9311 URI scheme semantics: The rtspu scheme is used to indicate resources 9312 accessible through the usage of the Real-time Streaming 9313 Protocol (RTSP) over unreliable datagram transport. RTSP 9314 allows different operations on the resource identified by the 9315 URI, but the primary purpose is the streaming delivery of the 9316 resource to a client. However, the operations that are 9317 currently defined are: Describing the resource for the purpose 9318 of configuring the receiving entity (DESCRIBE), configuring the 9319 delivery method and its addressing (SETUP), controlling the 9320 delivery (PLAY and PAUSE), reading or setting of resource 9321 related parameters (SET_PARAMETER and GET_PARAMETER, and 9322 termination of the session context created (TEARDOWN). 9324 Encoding considerations: IRIs in this scheme are defined and needs 9325 to be encoded as RTSP URIs when used within the RTSP protocol. 9326 That encoding is done according to RFC 3987. 9328 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9329 2326) 9331 Interoperability considerations: The definition of the transport 9332 mechanism of RTSP over UDP has interoperability issues. That 9333 makes the usage of this scheme problematic. 9335 Security considerations: All the security threats identified in 9336 Section 7 of RFC 3986 applies also to this scheme. They needs 9337 to be reviewed and considered in any implementation utilizing 9338 this scheme. 9340 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9342 Author/Change controller: IETF 9344 References: RFC 2326, RFC 3986, RFC 3987 9346 22.15. SDP attributes 9348 This specification defines three SDP [RFC4566] attributes that it is 9349 requested that IANA register. 9351 SDP Attribute ("att-field"): 9353 Attribute name: range 9354 Long form: Media Range Attribute 9355 Type of name: att-field 9356 Type of attribute: Media and session level 9357 Subject to charset: No 9358 Purpose: RFC XXXX 9359 Reference: RFC XXXX 9360 Values: See ABNF definition. 9362 Attribute name: control 9363 Long form: RTSP control URI 9364 Type of name: att-field 9365 Type of attribute: Media and session level 9366 Subject to charset: No 9367 Purpose: RFC XXXX 9368 Reference: RFC XXXX 9369 Values: Absolute or Relative URIs. 9371 Attribute name: mtag 9372 Long form: Message Tag 9373 Type of name: att-field 9374 Type of attribute: Media and session level 9375 Subject to charset: No 9376 Purpose: RFC XXXX 9377 Reference: RFC XXXX 9378 Values: See ABNF definition 9380 22.16. Media Type Registration for text/parameters 9382 Type name: text 9384 Subtype name: parameters 9386 Required parameters: 9388 Optional parameters: 9390 Encoding considerations: 9392 Security considerations: This format may carry any type of 9393 parameters. Some can clear have security requirements, like 9394 privacy, confidentiality or integrity requirements. The format 9395 has no built in security protection. For the usage it was defined 9396 the transport can be protected between server and client using 9397 TLS. However, care must be take to consider if also the proxies 9398 are trusted with the parameters in case hop-by-hop security is 9399 used. If stored as file in file system the necessary precautions 9400 needs to be taken in relation to the parameters requirements 9401 including object security such as S/MIME [RFC3851]. 9403 Interoperability considerations: This media type was mentioned as a 9404 fictional example in RFC 2326 but was not formally specified. 9405 This have resulted in usage of this media type which may not match 9406 its formal definition. 9408 Published specification: RFC XXXX, Appendix F. 9410 Applications that use this media type: Applications that use RTSP 9411 and have additional parameters they like to read and set using the 9412 RTSP GET_PARAMETER and SET_PARAMETER methods. 9414 Additional information: 9416 Magic number(s): 9418 File extension(s): 9420 Macintosh file type code(s): 9422 Person & email address to contact for further information: Magnus 9423 Westerlund (magnus.westerlund@ericsson.com) 9425 Intended usage: Common 9427 Restrictions on usage: None 9429 Author: Magnus Westerlund (magnus.westerlund@ericsson.com) 9431 Change controller: IETF 9433 Addition Notes: 9435 23. References 9437 23.1. Normative References 9439 [3gpp-26234] 9440 Third Generation Partnership Project (3GPP), "Transparent 9441 end-to-end Packet-switched Streaming Service (PSS); 9442 Protocols and codecs; Technical Specification 26.234", 9443 December 2002. 9445 [FIPS-pub-180-2] 9446 National Institute of Standards and Technology (NIST), 9447 "Federal Information Processing Standards Publications 9448 (FIPS PUBS) 180-2: Secure Hash Standard", August 2002. 9450 [I-D.ietf-avt-rtp-and-rtcp-mux] 9451 Perkins, C. and M. Westerlund, "Multiplexing RTP Data and 9452 Control Packets on a Single Port", 9453 draft-ietf-avt-rtp-and-rtcp-mux-07 (work in progress), 9454 August 2007. 9456 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 9457 August 1980. 9459 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 9460 RFC 793, September 1981. 9462 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 9463 Requirement Levels", BCP 14, RFC 2119, March 1997. 9465 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 9466 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 9467 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 9469 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 9470 Leach, P., Luotonen, A., and L. Stewart, "HTTP 9471 Authentication: Basic and Digest Access Authentication", 9472 RFC 2617, June 1999. 9474 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 9476 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 9477 Jacobson, "RTP: A Transport Protocol for Real-Time 9478 Applications", STD 64, RFC 3550, July 2003. 9480 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 9481 Video Conferences with Minimal Control", STD 65, RFC 3551, 9482 July 2003. 9484 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 9485 10646", STD 63, RFC 3629, November 2003. 9487 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 9488 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 9489 RFC 3711, March 2004. 9491 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 9492 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 9493 August 2004. 9495 [RFC3851] Ramsdell, B., "Secure/Multipurpose Internet Mail 9496 Extensions (S/MIME) Version 3.1 Message Specification", 9497 RFC 3851, July 2004. 9499 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 9500 Resource Identifier (URI): Generic Syntax", STD 66, 9501 RFC 3986, January 2005. 9503 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 9504 Identifiers (IRIs)", RFC 3987, January 2005. 9506 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 9507 Requirements for Security", BCP 106, RFC 4086, June 2005. 9509 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 9510 Architecture", RFC 4291, February 2006. 9512 [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and 9513 Registration Procedures for New URI Schemes", BCP 35, 9514 RFC 4395, February 2006. 9516 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 9517 Description Protocol", RFC 4566, July 2006. 9519 [RFC4567] Arkko, J., Lindholm, F., Naslund, M., Norrman, K., and E. 9520 Carrara, "Key Management Extensions for Session 9521 Description Protocol (SDP) and Real Time Streaming 9522 Protocol (RTSP)", RFC 4567, July 2006. 9524 [RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP) 9525 and RTP Control Protocol (RTCP) Packets over Connection- 9526 Oriented Transport", RFC 4571, July 2006. 9528 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 9529 "Extended RTP Profile for Real-time Transport Control 9530 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, 9531 July 2006. 9533 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 9534 Languages", BCP 47, RFC 4646, September 2006. 9536 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 9537 Encodings", RFC 4648, October 2006. 9539 [RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for 9540 Real-time Transport Control Protocol (RTCP)-Based Feedback 9541 (RTP/SAVPF)", RFC 5124, February 2008. 9543 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 9544 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 9545 May 2008. 9547 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 9548 Specifications: ABNF", STD 68, RFC 5234, January 2008. 9550 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 9551 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 9553 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 9554 Housley, R., and W. Polk, "Internet X.509 Public Key 9555 Infrastructure Certificate and Certificate Revocation List 9556 (CRL) Profile", RFC 5280, May 2008. 9558 23.2. Informative References 9560 [I-D.ietf-mmusic-rtsp-nat] 9561 Goldberg, J., Westerlund, M., and T. Zeng, "A Network 9562 Address Translator (NAT) Traversal mechanism for media 9563 controlled by Real-Time Streaming Protocol (RTSP)", 9564 draft-ietf-mmusic-rtsp-nat-08 (work in progress), 9565 July 2009. 9567 [ISO.13818-6.1995] 9568 International Organization for Standardization, 9569 "Information technology - Generic coding of moving 9570 pictures and associated audio information - part 6: 9571 Extension for digital storage media and control", 9572 ISO Draft Standard 13818-6, November 1995. 9574 [ISO.8601.2000] 9575 International Organization for Standardization, "Data 9576 elements and interchange formats - Information interchange 9577 - Representation of dates and times", ISO/IEC Standard 9578 8601, December 2000. 9580 [RFC0822] Crocker, D., "Standard for the format of ARPA Internet 9581 text messages", STD 11, RFC 822, August 1982. 9583 [RFC1123] Braden, R., "Requirements for Internet Hosts - Application 9584 and Support", STD 3, RFC 1123, October 1989. 9586 [RFC1305] Mills, D., "Network Time Protocol (Version 3) 9587 Specification, Implementation", RFC 1305, March 1992. 9589 [RFC1644] Braden, B., "T/TCP -- TCP Extensions for Transactions 9590 Functional Specification", RFC 1644, July 1994. 9592 [RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. 9593 Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", 9594 RFC 2068, January 1997. 9596 [RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time 9597 Streaming Protocol (RTSP)", RFC 2326, April 1998. 9599 [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address 9600 Translator (NAT) Terminology and Considerations", 9601 RFC 2663, August 1999. 9603 [RFC2974] Handley, M., Perkins, C., and E. Whelan, "Session 9604 Announcement Protocol", RFC 2974, October 2000. 9606 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 9607 A., Peterson, J., Sparks, R., Handley, M., and E. 9608 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 9609 June 2002. 9611 [RFC3388] Camarillo, G., Eriksson, G., Holler, J., and H. 9612 Schulzrinne, "Grouping of Media Lines in the Session 9613 Description Protocol (SDP)", RFC 3388, December 2002. 9615 [RFC4145] Yon, D. and G. Camarillo, "TCP-Based Media Transport in 9616 the Session Description Protocol (SDP)", RFC 4145, 9617 September 2005. 9619 [Stevens98] 9620 Stevens, W., "Unix Networking Programming - Volume 1, 9621 second edition", 1998. 9623 Appendix A. Examples 9625 This section contains several different examples trying to illustrate 9626 possible ways of using RTSP. The examples can also help with the 9627 understanding of how functions of RTSP work. However, remember that 9628 these are examples and the normative and syntax description in the 9629 other sections takes precedence. Please also note that many of the 9630 example contain syntax illegal line breaks to accommodate the 9631 formatting restriction that the RFC series impose. 9633 A.1. Media on Demand (Unicast) 9635 This is an example of media on demand streaming of a media stored in 9636 a container file. For purposes of this example, a container file is 9637 a storage entity in which multiple continuous media types pertaining 9638 to the same end-user presentation are present. In effect, the 9639 container file represents an RTSP presentation, with each of its 9640 components being RTSP controlled media streams. Container files are 9641 a widely used means to store such presentations. While the 9642 components are transported as independent streams, it is desirable to 9643 maintain a common context for those streams at the server end. 9645 This enables the server to keep a single storage handle open 9646 easily. It also allows treating all the streams equally in case 9647 of any priorization of streams by the server. 9649 It is also possible that the presentation author may wish to prevent 9650 selective retrieval of the streams by the client in order to preserve 9651 the artistic effect of the combined media presentation. Similarly, 9652 in such a tightly bound presentation, it is desirable to be able to 9653 control all the streams via a single control message using an 9654 aggregate URI. 9656 The following is an example of using a single RTSP session to control 9657 multiple streams. It also illustrates the use of aggregate URIs. In 9658 a container file it is also desirable to not write any URI parts 9659 which is not kept, when the container is distributed, like the host 9660 and most of the path element. Therefore this example also uses the 9661 "*" and relative URI in the delivered SDP. 9663 Client C requests a presentation from media server M. The movie is 9664 stored in a container file. The client has obtained an RTSP URI to 9665 the container file. 9667 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 9668 CSeq: 1 9669 User-Agent: PhonyClient/1.2 9671 M->C: RTSP/2.0 200 OK 9672 CSeq: 1 9673 Server: PhonyServer/1.0 9674 Date: Thu, 23 Jan 1997 15:35:06 GMT 9675 Content-Type: application/sdp 9676 Content-Length: 271 9677 Content-Base: rtsp://example.com/twister.3gp/ 9678 Expires: 24 Jan 1997 15:35:06 GMT 9680 v=0 9681 o=- 2890844256 2890842807 IN IP4 192.0.2.5 9682 s=RTSP Session 9683 i=An Example of RTSP Session Usage 9684 e=adm@example.com 9685 c=IN IP4 0.0.0.0 9686 a=control: * 9687 a=range: npt=0-0:10:34.10 9688 t=0 0 9689 m=audio 0 RTP/AVP 0 9690 a=control: trackID=1 9691 m=video 0 RTP/AVP 26 9692 a=control: trackID=4 9694 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 9695 CSeq: 2 9696 User-Agent: PhonyClient/1.2 9697 Require: play.basic 9698 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 9699 Accept-Ranges: NPT, SMPTE, UTC 9701 M->C: RTSP/2.0 200 OK 9702 CSeq: 2 9703 Server: PhonyServer/1.0 9704 Transport: RTP/AVP;unicast; ssrc=93CB001E; 9705 dest_addr="192.0.2.53:8000"/"192.0.2.53:8001"; 9706 src_addr="192.0.2.5:9000"/"192.0.2.5:9001" 9707 Session: 12345678 9708 Expires: 24 Jan 1997 15:35:12 GMT 9709 Date: 23 Jan 1997 15:35:12 GMT 9710 Accept-Ranges: NPT 9711 Media-Properties: Random-Access=0.02, Unmutable, Unlimited 9713 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/2.0 9714 CSeq: 3 9715 User-Agent: PhonyClient/1.2 9716 Require: play.basic 9717 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 9718 Session: 12345678 9719 Accept-Ranges: NPT, SMPTE, UTC 9721 M->C: RTSP/2.0 200 OK 9722 CSeq: 3 9723 Server: PhonyServer/1.0 9724 Transport: RTP/AVP;unicast; ssrc=A813FC13; 9725 dest_addr="192.0.2.53:8002"/"192.0.2.53:8003"; 9726 src_addr="192.0.2.5:9002"/"192.0.2.5:9003"; 9728 Session: 12345678 9729 Expires: 24 Jan 1997 15:35:13 GMT 9730 Date: 23 Jan 1997 15:35:13 GMT 9731 Accept-Range: NPT 9732 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 9734 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9735 CSeq: 4 9736 User-Agent: PhonyClient/1.2 9737 Range: npt=30- 9738 Seek-Style: RAP 9739 Session: 12345678 9741 M->C: RTSP/2.0 200 OK 9742 CSeq: 4 9743 Server: PhonyServer/1.0 9744 Date: 23 Jan 1997 15:35:14 GMT 9745 Session: 12345678 9746 Range: npt=30-623.10 9747 Seek-Style: RAP 9748 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9749 ssrc=0D12F123:seq=12345;rtptime=3450012, 9750 url="rtsp://example.com/twister.3gp/trackID=1" 9751 ssrc=4F312DD8:seq=54321;rtptime=2876889 9753 C->M: PAUSE rtsp://example.com/twister.3gp/ RTSP/2.0 9754 CSeq: 5 9755 User-Agent: PhonyClient/1.2 9756 Session: 12345678 9758 M->C: RTSP/2.0 200 OK 9759 CSeq: 5 9760 Server: PhonyServer/1.0 9761 Date: 23 Jan 1997 15:36:01 GMT 9762 Session: 12345678 9763 Range: npt=34.57-623.10 9765 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9766 CSeq: 6 9767 User-Agent: PhonyClient/1.2 9768 Range: npt=34.57-623.10 9769 Seek-Style: Next 9770 Session: 12345678 9772 M->C: RTSP/2.0 200 OK 9773 CSeq: 6 9774 Server: PhonyServer/1.0 9775 Date: 23 Jan 1997 15:36:01 GMT 9776 Session: 12345678 9777 Range: npt=34.57-623.10 9778 Seek-Style: Next 9779 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9780 ssrc=0D12F123:seq=12555;rtptime=6330012, 9781 url="rtsp://example.com/twister.3gp/trackID=1" 9782 ssrc=4F312DD8:seq=55021;rtptime=3132889 9784 A.2. Media on Demand using Pipelining 9786 This example is basically the example above (Appendix A.1), but now 9787 utilizing pipelining to speed up the setup. It requires only two 9788 round trip times until the media starts flowing. First of all, the 9789 session description is retrieved to determine what media resources 9790 need to be setup. In the second step, one sends the necessary SETUP 9791 requests and the PLAY request to initiate media delivery. 9793 Client C requests a presentation from media server M. The movie is 9794 stored in a container file. The client has obtained an RTSP URI to 9795 the container file. 9797 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 9798 CSeq: 1 9799 User-Agent: PhonyClient/1.2 9801 M->C: RTSP/2.0 200 OK 9802 CSeq: 1 9803 Server: PhonyServer/1.0 9804 Date: Thu, 23 Jan 1997 15:35:06 GMT 9805 Content-Type: application/sdp 9806 Content-Length: 271 9807 Content-Base: rtsp://example.com/twister.3gp/ 9808 Expires: 24 Jan 1997 15:35:06 GMT 9810 v=0 9811 o=- 2890844256 2890842807 IN IP4 192.0.2.5 9812 s=RTSP Session 9813 i=An Example of RTSP Session Usage 9814 e=adm@example.com 9815 c=IN IP4 0.0.0.0 9816 a=control: * 9817 a=range: npt=0-0:10:34.10 9818 t=0 0 9819 m=audio 0 RTP/AVP 0 9820 a=control: trackID=1 9821 m=video 0 RTP/AVP 26 9822 a=control: trackID=4 9824 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 9825 CSeq: 2 9826 User-Agent: PhonyClient/1.2 9827 Require: play.basic 9828 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 9829 Accept-Ranges: NPT, SMPTE, UTC 9830 Pipelined-Requests: 7654 9832 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/2.0 9833 CSeq: 3 9834 User-Agent: PhonyClient/1.2 9835 Require: play.basic 9836 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 9837 Accept-Ranges: NPT, SMPTE, UTC 9838 Pipelined-Requests: 7654 9840 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9841 CSeq: 4 9842 User-Agent: PhonyClient/1.2 9843 Range: npt=0- 9844 Seek-Style: RAP 9845 Session: 12345678 9846 Pipelined-Requests: 7654 9848 M->C: RTSP/2.0 200 OK 9849 CSeq: 2 9850 Server: PhonyServer/1.0 9851 Transport: RTP/AVP;unicast; 9852 dest_addr="192.0.2.53:8000"/"192.0.2.53:8001"; 9853 src_addr="192.0.2.5:9000"/"192.0.2.5:9001"; 9854 ssrc=93CB001E 9855 Session: 12345678 9856 Expires: 24 Jan 1997 15:35:12 GMT 9857 Date: 23 Jan 1997 15:35:12 GMT 9858 Accept-Ranges: NPT 9859 Pipelined-Requests: 7654 9860 Media-Properties: Random-Access=0.2, Unmutable, Unlimited 9862 M->C: RTSP/2.0 200 OK 9863 CSeq: 3 9864 Server: PhonyServer/1.0 9865 Transport: RTP/AVP;unicast; 9866 dest_addr="192.0.2.53:8002"/"192.0.2.53:8003; 9867 src_addr="192.0.2.5:9002"/"192.0.2.5:9003"; 9868 ssrc=A813FC13 9869 Session: 12345678 9870 Expires: 24 Jan 1997 15:35:13 GMT 9871 Date: 23 Jan 1997 15:35:13 GMT 9872 Accept-Range: NPT 9873 Pipelined-Requests: 7654 9874 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 9876 M->C: RTSP/2.0 200 OK 9877 CSeq: 4 9878 Server: PhonyServer/1.0 9879 Date: 23 Jan 1997 15:35:14 GMT 9880 Session: 12345678 9881 Range: npt=0-623.10 9882 Seek-Style: RAP 9883 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9884 ssrc=0D12F123:seq=12345;rtptime=3450012, 9886 url="rtsp://example.com/twister.3gp/trackID=1" 9887 ssrc=4F312DD8:seq=54321;rtptime=2876889 9888 Pipelined-Requests: 7654 9890 A.3. Media on Demand (Unicast) 9892 An alternative example of media on demand with a bit more tweaks is 9893 the following. Client C requests a movie distributed from two 9894 different media servers A (audio.example.com) and V ( 9895 video.example.com). The media description is stored on a web server 9896 W. The media description contains descriptions of the presentation 9897 and all its streams, including the codecs that are available, dynamic 9898 RTP payload types, the protocol stack, and content information such 9899 as language or copyright restrictions. It may also give an 9900 indication about the timeline of the movie. 9902 In this example, the client is only interested in the last part of 9903 the movie. 9905 C->W: GET /twister.sdp HTTP/1.1 9906 Host: www.example.com 9907 Accept: application/sdp 9909 W->C: HTTP/1.0 200 OK 9910 Date: Thu, 23 Jan 1997 15:35:06 GMT 9911 Content-Type: application/sdp 9912 Content-Length: 278 9913 Expires: 23 Jan 1998 15:35:06 GMT 9915 v=0 9916 o=- 2890844526 2890842807 IN IP4 192.0.2.5 9917 s=RTSP Session 9918 e=adm@example.com 9919 c=IN IP4 0.0.0.0 9920 a=range:npt=0-1:49:34 9921 t=0 0 9922 m=audio 0 RTP/AVP 0 9923 a=control:rtsp://audio.example.com/twister/audio.en 9924 m=video 0 RTP/AVP 31 9925 a=control:rtsp://video.example.com/twister/video 9927 C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/2.0 9928 CSeq: 1 9929 User-Agent: PhonyClient/1.2 9930 Transport: RTP/AVP/UDP;unicast;dest_addr=":3056"/":3057", 9931 RTP/AVP/TCP;unicast;interleaved=0-1 9932 Accept-Ranges: NPT, SMPTE, UTC 9934 A->C: RTSP/2.0 200 OK 9935 CSeq: 1 9936 Session: 12345678 9937 Transport: RTP/AVP/UDP;unicast; 9938 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057"; 9939 src_addr="192.0.2.5:5000"/"192.0.2.5:5001" 9940 Date: 23 Jan 1997 15:35:12 GMT 9941 Server: PhonyServer/1.0 9942 Expires: 24 Jan 1997 15:35:12 GMT 9943 Cache-Control: public 9944 Accept-Ranges: NPT, SMPTE 9945 Media-Properties: Random-Access=0.02, Unmutable, Unlimited 9947 C->V: SETUP rtsp://video.example.com/twister/video RTSP/2.0 9948 CSeq: 1 9949 User-Agent: PhonyClient/1.2 9950 Transport: RTP/AVP/UDP;unicast; 9951 dest_addr="192.0.2.53:3058"/"192.0.2.53:3059", 9952 RTP/AVP/TCP;unicast;interleaved=0-1 9953 Accept-Ranges: NPT, SMPTE, UTC 9955 V->C: RTSP/2.0 200 OK 9956 CSeq: 1 9957 Session: 23456789 9958 Transport: RTP/AVP/UDP;unicast; 9959 dest_addr="192.0.2.53:3058"/"192.0.2.53:3059"; 9960 src_addr="192.0.2.5:5002"/"192.0.2.5:5003" 9961 Date: 23 Jan 1997 15:35:12 GMT 9962 Server: PhonyServer/1.0 9963 Cache-Control: public 9964 Expires: 24 Jan 1997 15:35:12 GMT 9965 Accept-Ranges: NPT, SMPTE 9966 Media-Properties: Random-Access=1.2, Unmutable, Unlimited 9968 C->V: PLAY rtsp://video.example.com/twister/video RTSP/2.0 9969 CSeq: 2 9970 User-Agent: PhonyClient/1.2 9971 Session: 23456789 9972 Range: smpte=0:10:00- 9974 V->C: RTSP/2.0 200 OK 9975 CSeq: 2 9976 Session: 23456789 9977 Range: smpte=0:10:00-1:49:23 9978 Seek-Style: First-Prior 9979 RTP-Info: url="rtsp://video.example.com/twister/video" 9980 ssrc=A17E189D:seq=12312232;rtptime=78712811 9981 Server: PhonyServer/2.0 9982 Date: 23 Jan 1997 15:35:13 GMT 9984 C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/2.0 9985 CSeq: 2 9986 User-Agent: PhonyClient/1.2 9987 Session: 12345678 9988 Range: smpte=0:10:00- 9990 A->C: RTSP/2.0 200 OK 9991 CSeq: 2 9992 Session: 12345678 9993 Range: smpte=0:10:00-1:49:23 9994 Seek-Style: First-Prior 9995 RTP-Info: url="rtsp://audio.example.com/twister/audio.en" 9996 ssrc=3D124F01:seq=876655;rtptime=1032181 9997 Server: PhonyServer/1.0 9998 Date: 23 Jan 1997 15:35:13 GMT 10000 C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/2.0 10001 CSeq: 3 10002 User-Agent: PhonyClient/1.2 10003 Session: 12345678 10005 A->C: RTSP/2.0 200 OK 10006 CSeq: 3 10007 Server: PhonyServer/1.0 10008 Date: 23 Jan 1997 15:36:52 GMT 10010 C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/2.0 10011 CSeq: 3 10012 User-Agent: PhonyClient/1.2 10013 Session: 23456789 10015 V->C: RTSP/2.0 200 OK 10016 CSeq: 3 10017 Server: PhonyServer/2.0 10018 Date: 23 Jan 1997 15:36:52 GMT 10020 Even though the audio and video track are on two different servers 10021 that may start at slightly different times and may drift with respect 10022 to each other over time, the client can perform initial 10023 synchronization of the two media using RTP-Info and Range received in 10024 the PLAY responses. If the two servers are time synchronized the 10025 RTCP packets can also be used to maintain synchronization. 10027 A.4. Single Stream Container Files 10029 Some RTSP servers may treat all files as though they are "container 10030 files", yet other servers may not support such a concept. Because of 10031 this, clients needs to use the rules set forth in the session 10032 description for Request-URIs, rather than assuming that a consistent 10033 URI may always be used throughout. Below are an example of how a 10034 multi-stream server might expect a single-stream file to be served: 10036 C->S: DESCRIBE rtsp://foo.com/test.wav RTSP/2.0 10037 Accept: application/x-rtsp-mh, application/sdp 10038 CSeq: 1 10039 User-Agent: PhonyClient/1.2 10041 S->C: RTSP/2.0 200 OK 10042 CSeq: 1 10043 Content-base: rtsp://foo.com/test.wav/ 10044 Content-type: application/sdp 10045 Content-length: 163 10046 Server: PhonyServer/1.0 10047 Date: Thu, 23 Jan 1997 15:35:06 GMT 10048 Expires: 23 Jan 1997 17:00:00 GMT 10050 v=0 10051 o=- 872653257 872653257 IN IP4 192.0.2.5 10052 s=mu-law wave file 10053 i=audio test 10054 c=IN IP4 0.0.0.0 10055 t=0 0 10056 a=control: * 10057 m=audio 0 RTP/AVP 0 10058 a=control:streamid=0 10060 C->S: SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/2.0 10061 Transport: RTP/AVP/UDP;unicast; 10062 dest_addr=":6970"/":6971";mode="PLAY" 10063 CSeq: 2 10064 User-Agent: PhonyClient/1.2 10065 Accept-Ranges: NPT, SMPTE, UTC 10067 S->C: RTSP/2.0 200 OK 10068 Transport: RTP/AVP/UDP;unicast; 10069 dest_addr="192.0.2.53:6970"/"192.0.2.53:6971"; 10070 src_addr="192.0.2.5:6970"/"192.0.2.5:6971"; 10071 mode="PLAY";ssrc=EAB98712 10072 CSeq: 2 10073 Session: 2034820394 10074 Expires: 23 Jan 1997 16:00:00 GMT 10075 Server: PhonyServer/1.0 10076 Date: 23 Jan 1997 15:35:07 GMT 10077 Accept-Ranges: NPT 10078 Media-Properties: Beginning-Only, Unmutable, Unlimited 10080 C->S: PLAY rtsp://foo.com/test.wav/ RTSP/2.0 10081 CSeq: 3 10082 User-Agent: PhonyClient/1.2 10083 Session: 2034820394 10085 S->C: RTSP/2.0 200 OK 10086 CSeq: 3 10087 Server: PhonyServer/1.0 10088 Date: 23 Jan 1997 15:35:08 GMT 10089 Session: 2034820394 10090 Range: npt=0-600 10091 Seek-Style: RAP 10092 RTP-Info: url="rtsp://foo.com/test.wav/streamid=0" 10093 ssrc=0D12F123:seq=981888;rtptime=3781123 10095 Note the different URI in the SETUP command, and then the switch back 10096 to the aggregate URI in the PLAY command. This makes complete sense 10097 when there are multiple streams with aggregate control, but is less 10098 than intuitive in the special case where the number of streams is 10099 one. However, the server has declared that the aggregated control 10100 URI in the SDP and therefore this is legal. 10102 In this case, it is also required that servers accept implementations 10103 that use the non-aggregated interpretation and use the individual 10104 media URI, like this: 10106 C->S: PLAY rtsp://example.com/test.wav/streamid=0 RTSP/2.0 10107 CSeq: 3 10108 User-Agent: PhonyClient/1.2 10109 Session: 2034820394 10111 A.5. Live Media Presentation Using Multicast 10113 The media server M chooses the multicast address and port. Here, it 10114 is assumed that the web server only contains a pointer to the full 10115 description, while the media server M maintains the full description. 10117 C->W: GET /sessions.html HTTP/1.1 10118 Host: www.example.com 10120 W->C: HTTP/1.1 200 OK 10121 Content-Type: text/html 10123 10124 ... 10125 10127 ... 10128 10130 C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/2.0 10131 CSeq: 1 10132 Supported: play.basic, play.scale 10133 User-Agent: PhonyClient/1.2 10135 M->C: RTSP/2.0 200 OK 10136 CSeq: 1 10137 Content-Type: application/sdp 10138 Content-Length: 183 10139 Server: PhonyServer/1.0 10140 Date: Thu, 23 Jan 1997 15:35:06 GMT 10141 Supported: play.basic 10143 v=0 10144 o=- 2890844526 2890842807 IN IP4 192.0.2.5 10145 s=RTSP Session 10146 t=0 0 10147 m=audio 3456 RTP/AVP 0 10148 c=IN IP4 233.252.0.54/16 10149 a=control: rtsp://live.example.com/concert/audio 10150 a=range:npt=0- 10152 C->M: SETUP rtsp://live.example.com/concert/audio RTSP/2.0 10153 CSeq: 2 10154 Transport: RTP/AVP;multicast 10155 Accept-Ranges: NPT, SMPTE, UTC 10156 User-Agent: PhonyClient/1.2 10158 M->C: RTSP/2.0 200 OK 10159 CSeq: 2 10160 Server: PhonyServer/1.0 10161 Date: Thu, 23 Jan 1997 15:35:06 GMT 10162 Transport: RTP/AVP;multicast; 10163 dest_addr="233.252.0.54:3456"/"233.252.0.54:3457";ttl=16 10164 Session: 0456804596 10165 Accept-Ranges: NPT, UTC 10166 Media-Properties: No-Seeking, Time-Progressing, Time-Duration=0 10168 C->M: PLAY rtsp://live.example.com/concert/audio RTSP/2.0 10169 CSeq: 3 10170 Session: 0456804596 10171 User-Agent: PhonyClient/1.2 10173 M->C: RTSP/2.0 200 OK 10174 CSeq: 3 10175 Server: PhonyServer/1.0 10176 Date: 23 Jan 1997 15:35:07 GMT 10177 Session: 0456804596 10178 Seek-Style: Next 10179 Range:npt=1256- 10180 RTP-Info: url="rtsp://live.example.com/concert/audio" 10181 ssrc=0D12F123:seq=1473; rtptime=80000 10183 A.6. Capability Negotiation 10185 This examples illustrate how the client and server determines their 10186 capability to support a special feature, in this case "play.scale". 10187 The server, through the clients request and the included Supported 10188 header, learns the client supports RTSP 2.0, and also supports the 10189 playback time scaling feature of RTSP. The server's response 10190 contains the following feature related information to the client; it 10191 supports the basic media delivery functions (play.basic), the 10192 extended functionality of time scaling of content (play.scale), and 10193 one "example.com" proprietary feature (com.example.flight). The 10194 client also learns the methods supported (Public header) by the 10195 server for the indicated resource. 10197 C->S: OPTIONS rtsp://media.example.com/movie/twister.3gp RTSP/2.0 10198 CSeq: 1 10199 Supported: play.basic, play.scale 10200 User-Agent: PhonyClient/1.2 10202 S->C: RTSP/2.0 200 OK 10203 CSeq: 1 10204 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 10205 Server: PhonyServer/2.0 10206 Supported: play.basic, play.scale, com.example.flight 10208 When the client sends its SETUP request it tells the server that it 10209 requires support of the play.scale feature for this session by 10210 including the Require header. 10212 C->S: SETUP rtsp://media.example.com/twister.3gp/trackID=1 RTSP/2.0 10213 CSeq: 3 10214 User-Agent: PhonyClient/1.2 10215 Transport: RTP/AVP/UDP;unicast; 10216 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057", 10217 RTP/AVP/TCP;unicast;interleaved=0-1 10218 Require: play.scale 10219 Accept-Ranges: NPT, SMPTE, UTC 10220 User-Agent: PhonyClient/1.2 10222 S->C: RTSP/2.0 200 OK 10223 CSeq: 3 10224 Session: 12345678 10225 Transport: RTP/AVP/UDP;unicast; 10226 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057"; 10227 src_addr="192.0.2.5:5000"/"192.0.2.5:5001" 10228 Server: PhonyServer/2.0 10229 Accept-Ranges: NPT, SMPTE 10230 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 10232 Appendix B. RTSP Protocol State Machine 10234 The RTSP session state machine describes the behavior of the protocol 10235 from RTSP session initialization through RTSP session termination. 10237 The State machine is defined on a per session basis which is uniquely 10238 identified by the RTSP session identifier. The session may contain 10239 one or more media streams depending on state. If a single media 10240 stream is part of the session it is in non-aggregated control. If 10241 two or more is part of the session it is in aggregated control. 10243 The below state machine is a normative description of the protocols 10244 behavior. However, in case of ambiguity with the earlier parts of 10245 this specification, the description in the earlier parts MUST take 10246 precedence. 10248 B.1. States 10250 The state machine contains three states, described below. For each 10251 state there exist a table which shows which requests and events that 10252 are allowed and if they will result in a state change. 10254 Init: Initial state no session exist. 10256 Ready: Session is ready to start playing. 10258 Play: Session is playing, i.e. sending media stream data in the 10259 direction S->C. 10261 B.2. State variables 10263 This representation of the state machine needs more than its state to 10264 work. A small number of variables are also needed and is explained 10265 below. 10267 NRM: The number of media streams part of this session. 10269 RP: Resume point, the point in the presentation time line at which 10270 a request to continue will resume from. A time format for the 10271 variable is not mandated. 10273 B.3. Abbreviations 10275 To make the state tables more compact a number of abbreviations are 10276 used, which are explained below. 10278 IFI: IF Implemented. 10280 md: Media 10282 PP: Pause Point, the point in the presentation time line at which 10283 the presentation was paused. 10285 Prs: Presentation, the complete multimedia presentation. 10287 RedP: Redirect Point, the point in the presentation time line at 10288 which a REDIRECT was specified to occur. 10290 SES: Session. 10292 B.4. State Tables 10294 This section contains a table for each state. The table contains all 10295 the requests and events that this state is allowed to act on. The 10296 events which is method names are, unless noted, requests with the 10297 given method in the direction client to server (C->S). In some cases 10298 there exist one or more requisite. The response column tells what 10299 type of response actions should be performed. Possible actions that 10300 is requested for an event includes: response codes, e.g. 200, headers 10301 that MUST be included in the response, setting of state variables, or 10302 setting of other session related parameters. The new state column 10303 tells which state the state machine changes to. 10305 The response to a valid request meeting the requisites is normally a 10306 2xx (SUCCESS) unless other noted in the response column. The 10307 exceptions need to be given a response according to the response 10308 column. If the request does not meet the requisite, is erroneous or 10309 some other type of error occur, the appropriate response code MUST be 10310 sent. If the response code is a 4xx the session state is unchanged. 10311 A response code of 3rr will result in that the session is ended and 10312 its state is changed to Init. A response code of 304 results in no 10313 state change. However, there exist restrictions to when a 3rr 10314 response may be used. A 5xx response MUST NOT result in any change 10315 of the session state, except if the error is not possible to recover 10316 from. A unrecoverable error MUST result the ending of the session. 10317 As it in the general case can't be determined if it was a 10318 unrecoverable error or not the client will be required to test. In 10319 the case that the next request after a 5xx is responded with 454 10320 (Session Not Found) the client knows that the session has ended. 10322 The server will timeout the session after the period of time 10323 specified in the SETUP response, if no activity from the client is 10324 detected. Therefore there exist a timeout event for all states 10325 except Init. 10327 In the case that NRM = 1 the presentation URI is equal to the media 10328 URI or a specified presentation URI. For NRM > 1 the presentation 10329 URI MUST be other than any of the medias that are part of the 10330 session. This applies to all states. 10332 +---------------+-----------------+---------------------------------+ 10333 | Event | Prerequisite | Response | 10334 +---------------+-----------------+---------------------------------+ 10335 | DESCRIBE | Needs REDIRECT | 3rr, Redirect | 10336 | | | | 10337 | DESCRIBE | | 200, Session description | 10338 | | | | 10339 | OPTIONS | Session ID | 200, Reset session timeout | 10340 | | | timer | 10341 | | | | 10342 | OPTIONS | | 200 | 10343 | | | | 10344 | SET_PARAMETER | Valid parameter | 200, change value of parameter | 10345 | | | | 10346 | GET_PARAMETER | Valid parameter | 200, return value of parameter | 10347 +---------------+-----------------+---------------------------------+ 10349 Table 13: None state-machine changing events 10351 The methods in Table 13 do not have any effect on the state machine 10352 or the state variables. However, some methods do change other 10353 session related parameters, for example SET_PARAMETER which will set 10354 the parameter(s) specified in its body. Also all of these methods 10355 that allows Session header will also update the keep-alive timer for 10356 the session. 10358 +------------------+----------------+-----------+-------------------+ 10359 | Action | Requisite | New State | Response | 10360 +------------------+----------------+-----------+-------------------+ 10361 | SETUP | | Ready | NRM=1, RP=0.0 | 10362 | | | | | 10363 | SETUP | Needs Redirect | Init | 3rr Redirect | 10364 | | | | | 10365 | S -> C: REDIRECT | No Session hdr | Init | Terminate all SES | 10366 +------------------+----------------+-----------+-------------------+ 10368 Table 14: State: Init 10370 The initial state of the state machine, see Table 14 can only be left 10371 by processing a correct SETUP request. As seen in the table the two 10372 state variables are also set by a correct request. This table also 10373 shows that a correct SETUP can in some cases be redirected to another 10374 URI and/or server by a 3rr response. 10376 +--------------+-----------------+-----------+----------------------+ 10377 | Action | Requisite | New State | Response | 10378 +--------------+-----------------+-----------+----------------------+ 10379 | SETUP | New URI | Ready | NRM +=1 | 10380 | | | | | 10381 | SETUP | URI Setup prior | Ready | Change transport | 10382 | | | | param | 10383 | | | | | 10384 | TEARDOWN | Prs URI, | Init | No session hdr, NRM | 10385 | | | | = 0 | 10386 | | | | | 10387 | TEARDOWN | md URI,NRM=1 | Init | No Session hdr, NRM | 10388 | | | | = 0 | 10389 | | | | | 10390 | TEARDOWN | md URI,NRM>1 | Ready | Session hdr, NRM -= | 10391 | | | | 1 | 10392 | | | | | 10393 | PLAY | Prs URI, No | Play | Play from RP | 10394 | | range | | | 10395 | | | | | 10396 | PLAY | Prs URI, Range | Play | According to range | 10397 | | | | | 10398 | PAUSE | Prs URI | Ready | Return PP | 10399 | | | | | 10400 | SC:REDIRECT | Range hdr | Ready | Set RedP | 10401 | | | | | 10402 | SC:REDIRECT | no range hdr | Init | Session is removed | 10403 | | | | | 10404 | Timeout | | Init | | 10405 | | | | | 10406 | RedP reached | | Init | TEARDOWN of session | 10407 +--------------+-----------------+-----------+----------------------+ 10409 Table 15: State: Ready 10411 In the Ready state, see Table 15, some of the actions are depending 10412 on the number of media streams (NRM) in the session, i.e. aggregated 10413 or non-aggregated control. A setup request in the ready state can 10414 either add one more media stream to the session or, if the media 10415 stream (same URI) already is part of the session, change the 10416 transport parameters. TEARDOWN is depending on both the Request-URI 10417 and the number of media stream within the session. If the Request- 10418 URI is the presentations URI the whole session is torn down. If a 10419 media URI is used in the TEARDOWN request and more than one media 10420 exist in the session, the session will remain and a session header 10421 MUST be returned in the response. If only a single media stream 10422 remains in the session when performing a TEARDOWN with a media URI 10423 the session is removed. The number of media streams remaining after 10424 tearing down a media stream determines the new state. 10426 +--------------+-----------------+-----------+----------------------+ 10427 | Action | Requisite | New State | Response | 10428 +--------------+-----------------+-----------+----------------------+ 10429 | PAUSE | PrsURI | Ready | Set RP to present | 10430 | | | | point | 10431 | | | | | 10432 | PP reached | | Ready | RP = PP | 10433 | | | | | 10434 | End of media | All media | Play | Set RP = End of | 10435 | | | | media | 10436 | | | | | 10437 | End of range | | Play | Set RP = End of | 10438 | | | | range | 10439 | | | | | 10440 | PLAY | Prs URI, No | Play | Play from present | 10441 | | range | | point | 10442 | | | | | 10443 | PLAY | Prs URI, Range | Play | According to range | 10444 | | | | | 10445 | PLAY_NOTIFY | | Play | 200 | 10446 | | | | | 10447 | SETUP | New URI | Play | 455 | 10448 | | | | | 10449 | SETUP | Setuped URI | Play | 455 | 10450 | | | | | 10451 | SETUP | Setuped URI, | Play | Change transport | 10452 | | IFI | | param. | 10453 | | | | | 10454 | TEARDOWN | Prs URI | Init | No session hdr | 10455 | | | | | 10456 | TEARDOWN | md URI,NRM=1 | Init | No Session hdr, | 10457 | | | | NRM=0 | 10458 | | | | | 10459 | TEARDOWN | md URI | Play | 455 | 10460 | | | | | 10461 | SC:REDIRECT | Range hdr | Play | Set RedP | 10462 | | | | | 10463 | SC:REDIRECT | no range hdr | Init | Session is removed | 10464 | | | | | 10465 | RedP reached | | Init | TEARDOWN of session | 10466 | | | | | 10467 | Timeout | | Init | Stop Media playout | 10468 +--------------+-----------------+-----------+----------------------+ 10470 Table 16: State: Play 10472 The Play state table, see Table 16, is the largest. The table 10473 contains an number of requests that has presentation URI as a 10474 prerequisite on the Request-URI, this is due to the exclusion of non- 10475 aggregated stream control in sessions with more than one media 10476 stream. 10478 To avoid inconsistencies between the client and server, automatic 10479 state transitions are avoided. This can be seen at for example "End 10480 of media" event when all media has finished playing, the session 10481 still remain in Play state. An explicit PAUSE request MUST be sent 10482 to change the state to Ready. It may appear that there exist an 10483 automatic transitions in "RedP reached" and "PP reached", however, 10484 they are requested and acknowledge before they take place. The time 10485 at which the transition will happen is known by looking at the range 10486 header. If the client sends request close in time to these 10487 transitions it needs to be prepared for getting error message as the 10488 state may or may not have changed. 10490 Appendix C. Media Transport Alternatives 10492 This section defines how certain combinations of protocols, profiles 10493 and lower transports are used. This includes the usage of the 10494 Transport header's source and destination address parameters 10495 "src_addr" and "dest_addr". 10497 C.1. RTP 10499 This section defines the interaction of RTSP with respect to the RTP 10500 protocol [RFC3550]. It also defines any necessary media transport 10501 signalling with regards to RTP. 10503 The available RTP profiles and lower layer transports are described 10504 below along with rules on signalling the available combinations. 10506 C.1.1. AVP 10508 The usage of the "RTP Profile for Audio and Video Conferences with 10509 Minimal Control" [RFC3551] when using RTP for media transport over 10510 different lower layer transport protocols is defined below in regards 10511 to RTSP. 10513 One such case is defined within this document, the use of embedded 10514 (interleaved) binary data as defined in Section 14. The usage of 10515 this method is indicated by include the "interleaved" parameter. 10517 When using embedded binary data the "src_addr" and "dest_addr" MUST 10518 NOT be used. This addressing and multiplexing is used as defined 10519 with use of channel numbers and the interleaved parameter. 10521 C.1.2. AVP/UDP 10523 This part describes sending of RTP [RFC3550] over lower transport 10524 layer UDP [RFC0768] according to the profile "RTP Profile for Audio 10525 and Video Conferences with Minimal Control" defined in RFC 3551 10526 [RFC3551]. This profile requires one or two uni- or bi-directional 10527 UDP flows per media stream. The first UDP flow is for RTP and the 10528 second is for RTCP. Embedding of RTP data with the RTSP messages, in 10529 accordance with Section 14, SHOULD NOT be performed when RTSP 10530 messages are transported over unreliable transport protocols, like 10531 UDP [RFC0768]. 10533 The RTP/UDP and RTCP/UDP flows can be established using the Transport 10534 header's "src_addr", and "dest_addr" parameters. 10536 In RTSP PLAY mode, the transmission of RTP packets from client to 10537 server is unspecified. The behavior in regards to such RTP packets 10538 MAY be defined in future. 10540 The "src_addr" and "dest_addr" parameters are used in the following 10541 way for media delivery and playback mode, i.e. Mode=PLAY: 10543 o The "src_addr" and "dest_addr" parameters MUST contain either 1 or 10544 2 address specifications. 10546 o Each address specification for RTP/AVP/UDP or RTP/AVP/TCP MUST 10547 contain either: 10549 * both an address and a port number, or 10551 * a port number without an address. 10553 o The first address and port pair given in either of the parameters 10554 applies to the RTP stream. The second address and port pair if 10555 present applies to the RTCP stream. 10557 o The RTP/UDP packets from the server to the client MUST be sent to 10558 the address and port given by first address and port pair of the 10559 "dest_addr" parameter. 10561 o The RTCP/UDP packets from the server to the client MUST be sent to 10562 the address and port given by the second address and port pair of 10563 the "dest_addr" parameter. If no second pair is specified RTCP 10564 MUST NOT be sent. 10566 o The RTCP/UDP packets from the client to the server MUST be sent to 10567 the address and port given by the second address and port pair of 10568 the "src_addr" parameter. If no second pair is given RTCP MUST 10569 NOT be sent. 10571 o The RTP/UDP packets from the client to the server MUST be sent to 10572 the address and port given by the first address and port pair of 10573 the "src_addr" parameter. 10575 o RTP and RTCP Packets SHOULD be sent from the corresponding 10576 receiver port, i.e. RTCP packets from server should be sent from 10577 the "src_addr" parameters second address port pair. 10579 C.1.3. AVPF/UDP 10581 The RTP profile "Extended RTP Profile for RTCP-based Feedback (RTP/ 10582 AVPF)"[RFC4585] MAY be used as RTP profiles in session using RTP. 10583 All that is defined for AVP MUST also apply for AVPF. 10585 The usage of AVPF is indicated by the media initialization protocol 10586 used. In the case of SDP it is indicated by media lines (m=) 10587 containing the profile RTP/AVPF. That SDP MAY also contain further 10588 AVPF related SDP attributes configuring the AVPF session regarding 10589 reporting interval and feedback messages that shall be used that MUST 10590 be followed. 10592 C.1.4. SAVP/UDP 10594 The RTP profile "The Secure Real-time Transport Protocol (SRTP)" 10595 [RFC3711] is an RTP profile (SAVP) that MAY be used in RTSP sessions 10596 using RTP. All that is defined for AVP MUST also apply for SAVP. 10598 The usage of SRTP requires that a security association is 10599 established. The RECOMMENDED mechanism for establishing that 10600 security association is to use MIKEY with RTSP as defined in RFC 4567 10601 [RFC4567]. 10603 C.1.5. SAVPF/UDP 10605 The RTP profile "Extended Secure RTP Profile for RTCP-based Feedback 10606 (RTP/SAVPF)" [RFC5124] is an RTP profile (SAVPF) that MAY be used in 10607 RTSP sessions using RTP. All that is defined for AVP MUST also apply 10608 for SAVPF. 10610 The usage of SRTP requires that a security association is 10611 established. The RECOMMENDED mechanism for establishing that 10612 security association is to use MIKEY[RFC3830] with RTSP as defined in 10613 RFC 4567 [RFC4567]. 10615 C.1.6. RTCP usage with RTSP 10617 RTCP has several usages when RTP is used for media transport as 10618 explained below. Due to that RTCP MUST be supported if an RTSP agent 10619 handles RTP. 10621 C.1.6.1. Media synchronization 10623 RTCP provides media synchronization and clock drift compensation. 10624 The initial media synchronization is available from RTP-Info header. 10625 However, to be able to handle any clock drift between the media 10626 streams, RTCP is needed. 10628 C.1.6.2. RTSP Session keep-alive 10630 RTCP traffic from the RTSP client to the RTSP server MUST function as 10631 keep-alive. Which requires an RTSP server supporting RTP to use the 10632 received RTCP packets as indications that the client desires the 10633 related RTSP session to be kept alive. 10635 C.1.6.3. Bit-rate adaption 10637 RTCP Receiver reports and any additional feedback from the client 10638 MUST be used adapt the bit-rate used over the transport for all cases 10639 when RTP is sent over UDP. An RTP sender without reserved resources 10640 MUST NOT use more than its fair share of the available resources. 10641 This can be determined by comparing on short to medium term (some 10642 seconds) the used bit-rate and adapt it so that the RTP sender sends 10643 at a bit-rate comparable to what a TCP sender would achieve on 10644 average over the same path. 10646 C.1.6.4. RTP and RTCP Multiplexing 10648 RTSP can be used to negotiate the usage of RTP and RTCP multiplexing 10649 as described in [I-D.ietf-avt-rtp-and-rtcp-mux]. This allows servers 10650 and client to reduce the amount of resources required for the session 10651 by only requiring one underlying transport stream per media stream 10652 instead of two when using RTP and RTCP. This lessens the server port 10653 consumption and also the necessary state and keep-alive work when 10654 operating across Network and Address Translators [RFC2663]. 10656 Content must be prepared with some consideration for RTP and RTCP 10657 multiplexing, mainly ensuring that the RTP payload types used does 10658 not collide with the ones used for RTCP packet types this option 10659 likely needs explicit support from the content unless the RTP payload 10660 types can be remapped by the server and that is correctly reflected 10661 in the session description. Beyond that support of this feature 10662 should come at little cost and much gain. 10664 It is recommended that if the content and server supports RTP and 10665 RTCP multiplexing that this is indicated in the session description, 10666 for example using the SDP attribute "a=rtcp-mux". If the SDP message 10667 contains the a=rtcp-mux attribute for a media stream, the server MUST 10668 support RTP and RTCP multiplexing. If indicated or otherwise desired 10669 by the client it can include the Transport parameter "RTCP-mux" in 10670 any transport specification where it desires to use RTCP-mux. The 10671 server will indicate if it supports RTCP-mux. Server and Client 10672 SHOULD support RTP and RTCP multiplexing. 10674 For capability exchange, an RTSP feature tag for RTP and RTCP 10675 multiplexing is defined: "setup.rtp.rtcp.mux". 10677 C.2. RTP over TCP 10679 Transport of RTP over TCP can be done in two ways, over independent 10680 TCP connections using RFC 4571 [RFC4571] or interleaved in the RTSP 10681 control connection. In both cases the protocol MUST be "rtp" and the 10682 lower layer MUST be TCP. The profile may be any of the above 10683 specified ones; AVP, AVPF, SAVP or SAVPF. 10685 C.2.1. Interleaved RTP over TCP 10687 The use of embedded (interleaved) binary data transported on the RTSP 10688 connection is possible as specified in Section 14. When using this 10689 declared combination of interleaved binary data the RTSP messages 10690 MUST be transported over TCP. TLS may or may not be used. 10692 One should, however, consider that this will result that all media 10693 streams go through any proxy. Using independent TCP connections can 10694 avoid that issue. 10696 C.2.2. RTP over independent TCP 10698 In this Appendix, we describe the sending of RTP [RFC3550] over lower 10699 transport layer TCP [RFC0793] according to "Framing Real-time 10700 Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over 10701 Connection-Oriented Transport" [RFC4571]. This Appendix adapts the 10702 guidelines for using RTP over TCP within SIP/SDP [RFC4145] to work 10703 with RTSP. 10705 A client codes the support of RTP over independent TCP by specifying 10706 an RTP/AVP/TCP transport option without an interleaved parameter in 10707 the Transport line of a SETUP request. This transport option MUST 10708 include the "unicast" parameter. 10710 If the client wishes to use RTP with RTCP, two ports (or two address/ 10711 port pairs) are specified by the dest_addr parameter. If the client 10712 wishes to use RTP without RTCP, one port (or one address/port pair) 10713 is specified by the dest_addr parameter. Ordering rules of dest_addr 10714 ports follow the rules for RTP/AVP/UDP. 10716 If the client wishes to play the active role in initiating the TCP 10717 connection, it MAY set the "setup" parameter (See Section 16.52) on 10718 the Transport line to be "active", or it MAY omit the setup 10719 parameter, as active is the default. If the client signals the 10720 active role, the ports for all dest_addr values MUST be set to 9 (the 10721 discard port). 10723 If the client wishes to play the passive role in TCP connection 10724 initiation, it MUST set the "setup" parameter on the Transport line 10725 to be "passive". If the client is able to assume the active or the 10726 passive role, it MUST set the "setup" parameter on the Transport line 10727 to be "actpass". In either case, the dest_addr port value for RTP 10728 MUST be set to the TCP port number on which the client is expecting 10729 to receive the RTP stream connection, and the dest_addr port value 10730 for RTCP MUST be set to the TCP port number on which the client is 10731 expecting to receive the RTCP stream connection. 10733 If upon receipt of a non-interleaved RTP/AVP/TCP SETUP request, a 10734 server decides to accept this requested option, the 2xx reply MUST 10735 contain a Transport option that specifies RTP/AVP/TCP (without using 10736 the interleaved parameter, and with using the unicast parameter). 10737 The dest_addr parameter value MUST be echoed from the parameter value 10738 in the client request unless the destination address (only port) was 10739 not provided in which can the server MAY include the source address 10740 of the RTSP TCP connection with the port number unchanged. 10742 In addition, the server reply MUST set the setup parameter on the 10743 Transport line, to indicate the role the server will play in the 10744 connection setup. Permissible values are "active" (if a client set 10745 "setup" to "passive" or "actpass") and "passive" (if a client set 10746 "setup" to "active" or "actpass"). 10748 If a server sets "setup" to "passive", the "src_addr" in the reply 10749 MUST indicate the ports the server is willing to receive an RTP 10750 connection and (if the client requested an RTCP connection by 10751 specifying two dest_addr ports or address/port pairs) and RTCP 10752 connection. If a server sets "setup" to "active", the ports 10753 specified in "src_addr" MUST be set to 9. The server MAY use the 10754 "ssrc" parameter, following the guidance in Section 16.52. Port 10755 ordering for src_addr follows the rules for RTP/AVP/UDP. 10757 For cases when servers have a public IP-address it is RECOMMENDED 10758 that the server take the passive role and the client the active role. 10759 This help in cases when the client is behind a NAT. 10761 After sending (receiving) a 2xx reply for a SETUP method for a non- 10762 interleaved RTP/AVP/TCP media stream, the active party SHOULD 10763 initiate the TCP connection as soon as possible. The client MUST NOT 10764 send a PLAY request prior to the establishment of all the TCP 10765 connections negotiated using SETUP for the session. In case the 10766 server receives a PLAY request in a session that has not yet 10767 established all the TCP connections, it MUST respond using the 464 10768 "Data Transport Not Ready Yet" (Section 15.4.29) error code. 10770 Once the PLAY request for a media resource transported over non- 10771 interleaved RTP/AVP/TCP occurs, media begins to flow from server to 10772 client over the RTP TCP connection, and RTCP packets flow 10773 bidirectionally over the RTCP TCP connection. As in the RTP/UDP 10774 case, client to server traffic on the TCP port is unspecified by this 10775 memo. The packets that travel on these connections MUST be framed 10776 using the protocol defined in [RFC4571], not by the framing defined 10777 for interleaving RTP over the RTSP control connection defined in 10778 Section 14. 10780 A successful PAUSE request for a media being transported over RTP/ 10781 AVP/TCP pauses the flow of packets over the connections, without 10782 closing the connections. A successful TEARDOWN request signals that 10783 the TCP connections for RTP and RTCP are to be closed as soon as 10784 possible. 10786 Subsequent SETUP requests on an already-SETUP RTP/AVP/TCP URI may be 10787 ambiguous in the following way: does the client wish to open up new 10788 TCP RTP and RTCP connections for the URI, or does the client wish to 10789 continue using the existing TCP RTP and RTCP connections? The client 10790 SHOULD use the "connection" parameter (defined in Section 16.52) on 10791 the Transport line to make its intention clear in the regard (by 10792 setting "connection" to "new" if new connections are needed, and by 10793 setting "connection" to "existing" if the existing connections are to 10794 be used). After a 2xx reply for a SETUP request for a new 10795 connection, parties should close the pre-existing connections, after 10796 waiting a suitable period for any stray RTP or RTCP packets to 10797 arrive. 10799 Below, we rewrite part of the example media on demand example shown 10800 in Appendix A.1 to use RTP/AVP/TCP non-interleaved: 10802 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 10803 CSeq: 1 10804 User-Agent: PhonyClient/1.2 10806 M->C: RTSP/2.0 200 OK 10807 CSeq: 1 10808 Server: PhonyServer/1.0 10809 Date: Thu, 23 Jan 1997 15:35:06 GMT 10810 Content-Type: application/sdp 10811 Content-Length: 227 10812 Content-Base: rtsp://example.com/twister.3gp/ 10813 Expires: 24 Jan 1997 15:35:06 GMT 10815 v=0 10816 o=- 2890844256 2890842807 IN IP4 192.0.2.5 10817 s=RTSP Session 10818 i=An Example of RTSP Session Usage 10819 e=adm@example.com 10820 c=IN IP4 0.0.0.0 10821 a=control: * 10822 a=range: npt=0-0:10:34.10 10823 t=0 0 10824 m=audio 0 RTP/AVP 0 10825 a=control: trackID=1 10827 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 10828 CSeq: 2 10829 User-Agent: PhonyClient/1.2 10830 Require: play.basic 10831 Transport: RTP/AVP/TCP;unicast;dest_addr=":9"/":9"; 10832 setup=active;connection=new 10833 Accept-Ranges: NPT, SMPTE, UTC 10835 M->C: RTSP/2.0 200 OK 10836 CSeq: 2 10837 Server: PhonyServer/1.0 10838 Transport: RTP/AVP/TCP;unicast; 10839 dest_addr=":9"/":9"; 10840 src_addr="192.0.2.5:9000"/"192.0.2.5:9001"; 10841 setup=passive;connection=new;ssrc=93CB001E 10842 Session: 12345678 10843 Expires: 24 Jan 1997 15:35:12 GMT 10844 Date: 23 Jan 1997 15:35:12 GMT 10845 Accept-Ranges: NPT 10846 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 10848 C->M: TCP Connection Establishment 10850 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 10851 CSeq: 4 10852 User-Agent: PhonyClient/1.2 10853 Range: npt=30- 10854 Session: 12345678 10856 M->C: RTSP/2.0 200 OK 10857 CSeq: 4 10858 Server: PhonyServer/1.0 10859 Date: 23 Jan 1997 15:35:14 GMT 10860 Session: 12345678 10861 Range: npt=30-623.10 10862 Seek-Style: First-Prior 10863 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=1" 10864 ssrc=4F312DD8:seq=54321;rtptime=2876889 10866 C.3. Handling Media Clock Time Jumps in the RTP Media Layer 10868 RTSP allows media clients to control selected, non-contiguous 10869 sections of media presentations, rendering those streams with an RTP 10870 media layer [RFC3550]. Two cases occur, the first is when a new PLAY 10871 request replaces an old ongoing request and the new request results 10872 in a jump in the media. This should produce in the RTP layer a 10873 continuous media stream. A client may also directly following a 10874 completed PLAY request perform a new PLAY request. This will result 10875 in some gap in the media layer. The below text will look into both 10876 cases. 10878 A PLAY request that replaces a ongoing request allows the media layer 10879 rendering the RTP stream without being affected by jumps in media 10880 clock time. The RTP timestamps for the new media range is set so 10881 that they become continuous with the previous media range in the 10882 previous request. The RTP sequence number for the first packet in 10883 the new range will be the next following the last packet in the 10884 previous range, i.e. monotonically increasing. The goal is to allow 10885 the media rendering layer to work without interruption or 10886 reconfiguration across the jumps in media clock. This should be 10887 possible in all cases of replaced PLAY requests for media that has 10888 random-access properties. In this case care is needed to align 10889 frames or similar media dependent structures. 10891 In cases where jumps in media clock time are a result of RTSP 10892 signalling operations arriving after a completed PLAY operation, the 10893 request timing will result in that media becomes non-continuous. The 10894 server becomes unable to send the media so that it arrive timely and 10895 still carry timestamps to make the media stream continuous. In these 10896 cases the server will produce RTP streams where there are gaps in the 10897 RTP timeline for the media. In such cases, if the media has frame 10898 structure, aligning the timestamp for the next frame with the 10899 previous structure reduces the burden to render this media. The gap 10900 should represent the time the server hasn't been serving media, e.g. 10901 the time between the end of the media stream or a PAUSE request and 10902 the new PLAY request. In these cases the RTP sequence number would 10903 normally be monotonically increasing across the gap. 10905 For RTSP sessions with media that lacks random access properties, 10906 like live streams, any media clock jump is commonly result of 10907 correspondingly long pause of delivery. The RTP timestamp will have 10908 increased in direct proportion to the duration of the paused 10909 delivery. Note also that in this case the RTP sequence number should 10910 be the next packet number. If not, the RTCP packet loss reporting 10911 will indicate as loss all packets not received between the point of 10912 pausing and later resuming. This may trigger congestion avoidance 10913 mechanisms. An allowed exception from the above recommendation on 10914 monotonically increasing RTP sequence number is live media streams, 10915 likely being relayed. In this case, when the client resumes 10916 delivery, it will get the media that is currently being delivered to 10917 the server itself. For this type of basic delivery of live streams 10918 to multiple users over unicast, individual rewriting of RTP sequence 10919 numbers becomes quite a burden. For solutions that anyway caches 10920 media, timeshifts, etc, the rewriting should be a minor issue. 10922 The goal when handling jumps in media clock time is that the provided 10923 stream is continuous without gaps in RTP timestamp or sequence 10924 number. However, when delivery has been halted for some reason the 10925 RTP timestamp when resuming MUST represent the duration the delivery 10926 was halted. RTP sequence number MUST generally be the next number, 10927 i.e. monotonically increasing modulo 65536. For media resources with 10928 the properties Time-Progressing and Time-Duration=0.0 the server MAY 10929 create RTP media streams with RTP sequence number jumps in them due 10930 to client first halting delivery and later resuming it (PAUSE and 10931 then later PLAY). However, servers utilizing this exception must 10932 take into consideration the resulting RTCP receiver reports that 10933 likely contains loss report for all the packets part of the 10934 discontinuity. A client can not rely on that a server will align 10935 when resuming playing even if it is RECOMMENDED. The RTP-Info header 10936 will provide information on how the server acts in each case. 10938 We cannot assume that the RTSP client can communicate with the RTP 10939 media agent, as the two may be independent processes. If the RTP 10940 timestamp shows the same gap as the NPT, the media agent will 10941 assume that there is a pause in the presentation. If the jump in 10942 NPT is large enough, the RTP timestamp may roll over and the media 10943 agent may believe later packets to be duplicates of packets just 10944 played out. Having the RTP timestamp jump will also affect the 10945 RTCP measurements based on this. 10947 As an example, assume a RTP timestamp frequency of 8000 Hz, a 10948 packetization interval of 100 ms and an initial sequence number and 10949 timestamp of zero. 10951 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 10952 CSeq: 4 10953 Session: abcdefgh 10954 Range: npt=10-15 10955 User-Agent: PhonyClient/1.2 10957 S->C: RTSP/2.0 200 OK 10958 CSeq: 4 10959 Session: abcdefgh 10960 Range: npt=10-15 10961 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 10962 ssrc=0D12F123:seq=0;rtptime=0 10964 The ensuing RTP data stream is depicted below: 10966 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 10967 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 10968 . . . 10969 S -> C: RTP packet - seq = 49, rtptime = 39200, NPT time = 14.9s 10971 Upon the completion of the requested delivery the server sends a 10972 PLAY_NOFIFY 10973 S->C: PLAY_NOTIFY rtsp://example.com/fizzle RTSP/2.0 10974 CSeq: 5 10975 Notify-Reason: end-of-stream 10976 Request-Status: cseq=4 status=200 reason="OK" 10977 Range: npt=-15 10978 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 10979 ssrc=0D12F123:seq=49;rtptime=39200 10980 Session: abcdefgh 10982 C->S: RTSP/2.0 200 OK 10983 CSeq: 5 10984 User-Agent: PhonyClient/1.2 10986 Upon the completion of the play range, the client follows up with a 10987 request to PLAY from a new NPT. 10989 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 10990 CSeq: 6 10991 Session: abcdefg 10992 Range: npt=18-20 10993 User-Agent: PhonyClient/1.2 10995 S->C: RTSP/2.0 200 OK 10996 CSeq: 6 10997 Session: abcdefg 10998 Range: npt=18-20 10999 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11000 ssrc=0D12F123:seq=50;rtptime=40100 11002 The ensuing RTP data stream is depicted below: 11004 S->C: RTP packet - seq = 50, rtptime = 40100, NPT time = 18s 11005 S->C: RTP packet - seq = 51, rtptime = 40900, NPT time = 18.1s 11006 . . . 11007 S->C: RTP packet - seq = 69, rtptime = 55300, NPT time = 19.9s 11009 In this example, first, NPT 10 through 15 is played, then the client 11010 request the server to skip ahead and play NPT 18 through 20. The 11011 first segment is presented as RTP packets with sequence numbers 0 11012 through 49 and timestamp 0 through 39,200. The second segment 11013 consists of RTP packets with sequence number 50 through 69, with 11014 timestamps 40,100 through 55,200. While there is a gap in the NPT, 11015 there is no gap in the sequence number space of the RTP data stream. 11017 The RTP timestamp gap is present in the above example due to the time 11018 it takes to perform the second play request, in this case 12.5 ms 11019 (100/8000). 11021 C.4. Handling RTP Timestamps after PAUSE 11023 During a PAUSE / PLAY interaction in an RTSP session, the duration of 11024 time for which the RTP transmission was halted MUST be reflected in 11025 the RTP timestamp of each RTP stream. The duration can be calculated 11026 for each RTP stream as the time elapsed from when the last RTP packet 11027 was sent before the PAUSE request was received and when the first RTP 11028 packet was sent after the subsequent PLAY request was received. The 11029 duration includes all latency incurred and processing time required 11030 to complete the request. 11032 The RTP RFC [RFC3550] states that: The RTP timestamp for each unit 11033 [packet] would be related to the wallclock time at which the unit 11034 becomes current on the virtual presentation timeline. 11036 In order to satisfy the requirements of [RFC3550], the RTP 11037 timestamp space needs to increase continuously with real time. 11038 While this is not optimal for stored media, it is required for RTP 11039 and RTCP to function as intended. Using a continuous RTP 11040 timestamp space allows the same timestamp model for both stored 11041 and live media and allows better opportunity to integrate both 11042 types of media under a single control. 11044 As an example, assume a clock frequency of 8000 Hz, a packetization 11045 interval of 100 ms and an initial sequence number and timestamp of 11046 zero. 11048 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 11049 CSeq: 4 11050 Session: abcdefg 11051 Range: npt=10-15 11052 User-Agent: PhonyClient/1.2 11054 S->C: RTSP/2.0 200 OK 11055 CSeq: 4 11056 Session: abcdefg 11057 Range: npt=10-15 11058 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11059 ssrc=0D12F123:seq=0;rtptime=0 11061 The ensuing RTP data stream is depicted below: 11063 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 11064 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 11065 S -> C: RTP packet - seq = 2, rtptime = 1600, NPT time = 10.2s 11066 S -> C: RTP packet - seq = 3, rtptime = 2400, NPT time = 10.3s 11068 The client then sends a PAUSE request: 11070 C->S: PAUSE rtsp://example.com/fizzle RTSP/2.0 11071 CSeq: 5 11072 Session: abcdefg 11073 User-Agent: PhonyClient/1.2 11075 S->C: RTSP/2.0 200 OK 11076 CSeq: 5 11077 Session: abcdefg 11078 Range: npt=10.4-15 11080 20 seconds elapse and then the client sends a PLAY request. In 11081 addition the server requires 15 ms to process the request: 11083 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 11084 CSeq: 6 11085 Session: abcdefg 11086 User-Agent: PhonyClient/1.2 11088 S->C: RTSP/2.0 200 OK 11089 CSeq: 6 11090 Session: abcdefg 11091 Range: npt=10.4-15 11092 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11093 ssrc=0D12F123:seq=4;rtptime=164400 11095 The ensuing RTP data stream is depicted below: 11097 S -> C: RTP packet - seq = 4, rtptime = 164400, NPT time = 10.4s 11098 S -> C: RTP packet - seq = 5, rtptime = 165200, NPT time = 10.5s 11099 S -> C: RTP packet - seq = 6, rtptime = 166000, NPT time = 10.6s 11101 First, NPT 10 through 10.3 is played, then a PAUSE is received by the 11102 server. After 20 seconds a PLAY is received by the server which take 11103 15ms to process. The duration of time for which the session was 11104 paused is reflected in the RTP timestamp of the RTP packets sent 11105 after this PLAY request. 11107 A client can use the RTSP range header and RTP-Info header to map NPT 11108 time of a presentation with the RTP timestamp. 11110 Note: In RFC 2326 [RFC2326], this matter was not clearly defined and 11111 was misunderstood commonly. However, for RTSP 2.0 it is expected 11112 that this will be handled correctly and no exception handling will be 11113 required. 11115 Note Further: To ensure correct media decoding and usually jitter- 11116 buffer handling reseting some of the state when issuing a PLAY 11117 request is needed. 11119 C.5. RTSP / RTP Integration 11121 For certain datatypes, tight integration between the RTSP layer and 11122 the RTP layer will be necessary. This by no means precludes the 11123 above restrictions. Combined RTSP/RTP media clients should use the 11124 RTP-Info field to determine whether incoming RTP packets were sent 11125 before or after a seek or before or after a PAUSE. 11127 C.6. Scaling with RTP 11129 For scaling (see Section 16.44), RTP timestamps should correspond to 11130 the rendering timing. For example, when playing video recorded at 30 11131 frames/second at a scale of two and speed (Section 16.48) of one, the 11132 server would drop every second frame to maintain and deliver video 11133 packets with the normal timestamp spacing of 3,000 per frame, but NPT 11134 would increase by 1/15 second for each video frame. 11136 Note: The above scaling puts requirements on the media codec or a 11137 media stream to support it. For example motion JPEG or other non- 11138 predictive video coding can easier handle the above example. 11140 C.7. Maintaining NPT synchronization with RTP timestamps 11142 The client can maintain a correct display of NPT (Normal Play Time) 11143 by noting the RTP timestamp value of the first packet arriving after 11144 repositioning. The sequence parameter of the RTP-Info 11145 (Section 16.43) header provides the first sequence number of the next 11146 segment. 11148 C.8. Continuous Audio 11150 For continuous audio, the server SHOULD set the RTP marker bit at the 11151 beginning of serving a new PLAY request or at jumps in timeline. 11152 This allows the client to perform playout delay adaptation. 11154 C.9. Multiple Sources in an RTP Session 11156 Note that more than one SSRC MAY be sent in the media stream. If it 11157 happens all sources are expected to be rendered simultaneously. 11159 C.10. Usage of SSRCs and the RTCP BYE Message During an RTSP Session 11161 The RTCP BYE message indicates the end of use of a given SSRC. If 11162 all sources leave an RTP session, it can, in most cases, be assumed 11163 to have ended. Therefore, a client or server MUST NOT send a RTCP 11164 BYE message until it has finished using a SSRC. A server SHOULD keep 11165 using a SSRC until the RTP session is terminated. Prolonging the use 11166 of a SSRC allows the established synchronization context associated 11167 with that SSRC to be used to synchronize subsequent PLAY requests 11168 even if the PLAY response is late. 11170 An SSRC collision with the SSRC that transmits media does also have 11171 consequences, as it will force the media sender to change its SSRC in 11172 accordance with the RTP specification[RFC3550]. This will result in 11173 a loss of synchronization context, and require any receiver to wait 11174 for RTCP sender reports for all media requiring synchronization 11175 before being able to play out synchronized. Due to these reasons a 11176 client joining a session should take care to not select the same SSRC 11177 as the server. Any SSRC signalled in the Transport header SHOULD be 11178 avoided. A client detecting a collision prior to sending any RTP or 11179 RTCP messages can also select a new SSRC. 11181 C.11. Future Additions 11183 It is the intention that any future protocol or profile regarding 11184 both for media delivery and lower transport should be easy to add to 11185 RTSP. This section provides the necessary steps that needs to be 11186 meet. 11188 The following things needs to be considered when adding a new 11189 protocol or profile for use with RTSP: 11191 o The protocol or profile needs to define a name tag representing 11192 it. This tag is required to be a ABNF "token" to be possible to 11193 use in the Transport header specification. 11195 o The useful combinations of protocol, profiles and lower layer 11196 transport for this extension needs to be defined. For each 11197 combination declare the necessary parameters to use in the 11198 Transport header. 11200 o For new media protocols the interaction with RTSP needs to be 11201 addressed. One important factor will be the media 11202 synchronization. May need new headers similar to RTP info to 11203 carry information. 11205 o Discuss congestion control for media, especially if transport 11206 without built in congestion control is used. 11208 See the IANA section (Section 22) for information how to register new 11209 attributes. 11211 Appendix D. Use of SDP for RTSP Session Descriptions 11213 The Session Description Protocol (SDP, [RFC4566]) may be used to 11214 describe streams or presentations in RTSP. This description is 11215 typically returned in reply to a DESCRIBE request on an URI from a 11216 server to a client, or received via HTTP from a server to a client. 11218 This appendix describes how an SDP file determines the operation of 11219 an RTSP session. SDP as is provides no mechanism by which a client 11220 can distinguish, without human guidance, between several media 11221 streams to be rendered simultaneously and a set of alternatives 11222 (e.g., two audio streams spoken in different languages). However 11223 ,the SDP extension "Grouping of Media Lines in the Session 11224 Description Protocol (SDP)" [RFC3388] may provide such functionality 11225 depending on need. Also future grouping semantics may in the future 11226 be developed. 11228 D.1. Definitions 11230 The terms "session-level", "media-level" and other key/attribute 11231 names and values used in this appendix are to be used as defined in 11232 SDP (RFC 4566 [RFC4566]): 11234 D.1.1. Control URI 11236 The "a=control:" attribute is used to convey the control URI. This 11237 attribute is used both for the session and media descriptions. If 11238 used for individual media, it indicates the URI to be used for 11239 controlling that particular media stream. If found at the session 11240 level, the attribute indicates the URI for aggregate control 11241 (presentation URI). The session level URI MUST be different from any 11242 media level URI. The presence of a session level control attribute 11243 MUST be interpreted as support for aggregated control. The control 11244 attribute MUST be present on media level unless the presentation only 11245 contains a single media stream, in which case the attribute MAY only 11246 be present on the session level. 11248 ABNF for the attribute is defined in Section 20.3. 11250 Example: 11251 a=control:rtsp://example.com/foo 11253 This attribute MAY contain either relative or absolute URIs, 11254 following the rules and conventions set out in RFC 3986 [RFC3986]. 11255 Implementations MUST look for a base URI in the following order: 11257 1. the RTSP Content-Base field; 11258 2. the RTSP Content-Location field; 11260 3. the RTSP Request-URI. 11262 If this attribute contains only an asterisk (*), then the URI MUST be 11263 treated as if it were an empty embedded URI, and thus inherit the 11264 entire base URI. 11266 Note, RFC 2326 was very unclear on the processing of relative URI 11267 and several RTSP 1.0 implementations at the point of publishing 11268 this document did not perform RFC 3986 processing to determine the 11269 resulting URI, instead simple concatenation is common. To avoid 11270 this issue completely it is recommended to use absolute URI in the 11271 SDP. 11273 The URI handling for SDPs from container files need special 11274 consideration. For example lets assume that a container file has the 11275 URI: "rtsp://example.com/container.mp4". Lets further assume this 11276 URI is the base URI, and that there is a absolute media level URI: 11277 "rtsp://example.com/container.mp4/trackID=2". A relative media level 11278 URI that resolves in accordance with RFC 3986 [RFC3986] to the above 11279 given media URI is: "container.mp4/trackID=2". It is usually not 11280 desirable to need to include in or modify the SDP stored within the 11281 container file with the server local name of the container file. To 11282 avoid this, one can modify the base URI used to include a trailing 11283 slash, e.g. "rtsp://example.com/container.mp4/". In this case the 11284 relative URI for the media will only need to be: "trackID=2". 11285 However, this will also mean that using "*" in the SDP will result in 11286 control URI including the trailing slash, i.e. 11287 "rtsp://example.com/container.mp4/". 11289 Note: The usage of TrackID in the above is not an standardized 11290 form, but one example out of several similar strings such as 11291 TrackID, Track_ID, StreamID that is used by different server 11292 vendors to indicate a particular piece of media inside a container 11293 file. 11295 D.1.2. Media Streams 11297 The "m=" field is used to enumerate the streams. It is expected that 11298 all the specified streams will be rendered with appropriate 11299 synchronization. If the session is over multicast, the port number 11300 indicated SHOULD be used for reception. The client MAY try to 11301 override the destination port, through the Transport header. The 11302 servers MAY allow this, the response will indicate if allowed or not. 11303 If the session is unicast, the port numbers are the ones RECOMMENDED 11304 by the server to the client, about which receiver ports to use; the 11305 client MUST still include its receiver ports in its SETUP request. 11307 The client MAY ignore this recommendation. If the server has no 11308 preference, it SHOULD set the port number value to zero. 11310 The "m=" lines contain information about which transport protocol, 11311 profile, and possibly lower-layer is to be used for the media stream. 11312 The combination of transport, profile and lower layer, like RTP/AVP/ 11313 UDP needs to be defined for how to be used with RTSP. The currently 11314 defined combinations are defined in Appendix C, further combinations 11315 MAY be specified. 11317 Usage of grouping of media lines [RFC3388] to determine which media 11318 lines should or should not be included in a RTSP session is 11319 unspecified. 11321 Example: 11322 m=audio 0 RTP/AVP 31 11324 D.1.3. Payload Type(s) 11326 The payload type(s) are specified in the "m=" line. In case the 11327 payload type is a static payload type from RFC 3551 [RFC3551], no 11328 other information may be required. In case it is a dynamic payload 11329 type, the media attribute "rtpmap" is used to specify what the media 11330 is. The "encoding name" within the "rtpmap" attribute may be one of 11331 those specified in RFC 3551 (Sections 5 and 6), or an MIME type 11332 registered with IANA, or an experimental encoding as specified in SDP 11333 (RFC 4566 [RFC4566]). Codec-specific parameters are not specified in 11334 this field, but rather in the "fmtp" attribute described below. 11336 D.1.4. Format-Specific Parameters 11338 Format-specific parameters are conveyed using the "fmtp" media 11339 attribute. The syntax of the "fmtp" attribute is specific to the 11340 encoding(s) that the attribute refers to. Note that some of the 11341 format specific parameters may be specified outside of the fmtp 11342 parameters, like for example the "ptime" attribute for most audio 11343 encodings. 11345 D.1.5. Directionality of media stream 11347 The SDP attributes "a=sendrecv", "a=recvonly" and "a=sendonly" 11348 provides instructions on which direction the media streams flow 11349 within a session. When using RTSP the SDP can be delivered to a 11350 client using either RTSP DESCRIBE or a number of RTSP external 11351 methods, like HTTP, FTP, and email. Based on this the SDP applies to 11352 how the RTSP client will see the complete session. Thus for media 11353 streams delivered from the RTSP server to the client would be given 11354 the "a=recvonly" attribute. 11356 The direction attributes are not commonly used in SDPs for RTSP, but 11357 may occur. "a=recvonly" in a SDP provided to the RTSP client MUST 11358 indicate that media delivery will only occur in the direction from 11359 the RTSP server to the client. In SDP provided to the RTSP client 11360 that lacks any of the directionality attributes (a=recvonly, 11361 a=sendonly, a=sendrecv) MUST behave as if the "a=recvonly" attribute 11362 was received. Note that this overrules the normal default rule 11363 defined in SDP[RFC4566]. The usage of "a=sendonly" or "a=sendrecv" 11364 is not defined, nor is the interpretation of SDP by other entities 11365 than the RTSP client. 11367 D.1.6. Range of Presentation 11369 The "a=range" attribute defines the total time range of the stored 11370 session or an individual media. Non-seekable live sessions can be 11371 indicated, while the length of live sessions can be deduced from the 11372 "t" and "r" SDP parameters. 11374 The attribute is both a session and a media level attribute. For 11375 presentations that contains media streams of the same durations, the 11376 range attribute SHOULD only be used at session-level. In case of 11377 different length the range attribute MUST be given at media level for 11378 all media, and SHOULD NOT be given at session level. If the 11379 attribute is present at both media level and session level the media 11380 level values MUST be used. 11382 Note: Usually one will specify the same length for all media, even if 11383 there isn't media available for the full duration on all media. 11384 However, that requires that the server accepts PLAY requests within 11385 that range. 11387 Servers MUST take care to provide RTSP Range (see Section 16.38) 11388 values that are consistent with what is presented in the SDP for the 11389 content. There is no reason for non dynamic content, like media 11390 clips provided on demand to have inconsistent values. Inconsistent 11391 values between the SDP and the actual values for the content handled 11392 by the server is likely to generate some failure, like 457 "Invalid 11393 Range", in case the client uses PLAY requests with a Range header. 11394 In case the content is dynamic in length and it is infeasible to 11395 provide a correct value in the SDP the server is recommended to 11396 describe this as non-seekable content (see below). The server MAY 11397 override that property in the response to a PLAY request using the 11398 correct values in the Range header. 11400 The unit is specified first, followed by the value range. The units 11401 and their values are as defined in Section 4.4, Section 4.5 and 11402 Section 4.6 and MAY be extended with further formats. Any open ended 11403 range (start-), i.e. without stop range, is of unspecified duration 11404 and MUST be considered as non-seekable content unless this property 11405 is overridden. Multiple instances carrying different clock formats 11406 MAY be included at either session or media level. 11408 ABNF for the attribute is defined in Section 20.3. 11410 Examples: 11411 a=range:npt=0-34.4368 11412 a=range:clock=19971113T211503Z-19971113T220300Z 11413 Non seekable stream of unknown duration: 11414 a=range:npt=0- 11416 D.1.7. Time of Availability 11418 The "t=" field MUST contain suitable values for the start and stop 11419 times for both aggregate and non-aggregate stream control. The 11420 server SHOULD indicate a stop time value for which it guarantees the 11421 description to be valid, and a start time that is equal to or before 11422 the time at which the DESCRIBE request was received. It MAY also 11423 indicate start and stop times of 0, meaning that the session is 11424 always available. 11426 For sessions that are of live type, i.e. specific start time, unknown 11427 stop time, likely unseekable, the "t=" and "r=" field SHOULD be used 11428 to indicate the start time of the event. The stop time SHOULD be 11429 given so that the live event will have ended at that time, while 11430 still not be unnecessary long into the future. 11432 D.1.8. Connection Information 11434 In SDP, the "c=" field contains the destination address for the media 11435 stream. For on-demand unicast streams and some multicast streams, 11436 the destination address MAY be specified by the client via the SETUP 11437 request, thus overriding any specified address. To identify streams 11438 without a fixed destination address, where the client is required to 11439 specify a destination address, the "c=" field SHOULD be set to a null 11440 value. For addresses of type "IP4", this value MUST be "0.0.0.0", 11441 and for type "IP6", this value MUST be "0:0:0:0:0:0:0:0" (can also be 11442 written as "::"), i.e. the unspecified address according to RFC 4291 11443 [RFC4291]. 11445 D.1.9. Message Body Tag 11447 The optional "a=mtag" attribute identifies a version of the session 11448 description. It is opaque to the client. SETUP requests may include 11449 this identifier in the If-Match field (see Section 16.23) to only 11450 allow session establishment if this attribute value still corresponds 11451 to that of the current description. The attribute value is opaque 11452 and may contain any character allowed within SDP attribute values. 11454 ABNF for the attribute is defined in Section 20.3. 11456 Example: 11457 a=mtag:"158bb3e7c7fd62ce67f12b533f06b83a" 11459 One could argue that the "o=" field provides identical 11460 functionality. However, it does so in a manner that would put 11461 constraints on servers that need to support multiple session 11462 description types other than SDP for the same piece of media 11463 content. 11465 D.2. Aggregate Control Not Available 11467 If a presentation does not support aggregate control no session level 11468 "a=control:" attribute is specified. For a SDP with multiple media 11469 sections specified, each section will have its own control URI 11470 specified via the "a=control:" attribute. 11472 Example: 11473 v=0 11474 o=- 2890844256 2890842807 IN IP4 192.0.2.56 11475 s=I came from a web page 11476 e=adm@example.com 11477 c=IN IP4 0.0.0.0 11478 t=0 0 11479 m=video 8002 RTP/AVP 31 11480 a=control:rtsp://audio.com/movie.aud 11481 m=audio 8004 RTP/AVP 3 11482 a=control:rtsp://video.com/movie.vid 11484 Note that the position of the control URI in the description implies 11485 that the client establishes separate RTSP control sessions to the 11486 servers audio.com and video.com. 11488 It is recommended that an SDP file contains the complete media 11489 initialization information even if it is delivered to the media 11490 client through non-RTSP means. This is necessary as there is no 11491 mechanism to indicate that the client should request more detailed 11492 media stream information via DESCRIBE. 11494 D.3. Aggregate Control Available 11496 In this scenario, the server has multiple streams that can be 11497 controlled as a whole. In this case, there are both a media-level 11498 "a=control:" attributes, which are used to specify the stream URIs, 11499 and a session-level "a=control:" attribute which is used as the 11500 Request-URI for aggregate control. If the media-level URI is 11501 relative, it is resolved to absolute URIs according to Appendix D.1.1 11502 above. 11504 Example: 11505 C->M: DESCRIBE rtsp://example.com/movie RTSP/2.0 11506 CSeq: 1 11507 User-Agent: PhonyClient/1.2 11509 M->C: RTSP/2.0 200 OK 11510 CSeq: 1 11511 Date: Thu, 23 Jan 1997 15:35:06 GMT 11512 Content-Type: application/sdp 11513 Content-Base: rtsp://example.com/movie/ 11514 Content-Length: 227 11516 v=0 11517 o=- 2890844256 2890842807 IN IP4 192.0.2.211 11518 s=I contain 11519 i= 11520 e=adm@example.com 11521 c=IN IP4 0.0.0.0 11522 a=control:* 11523 t=0 0 11524 m=video 8002 RTP/AVP 31 11525 a=control:trackID=1 11526 m=audio 8004 RTP/AVP 3 11527 a=control:trackID=2 11529 In this example, the client is required to establish a single RTSP 11530 session to the server, and uses the URIs 11531 rtsp://example.com/movie/trackID=1 and 11532 rtsp://example.com/movie/trackID=2 to set up the video and audio 11533 streams, respectively. The URI rtsp://example.com/movie/, which is 11534 resolved from the "*", controls the whole presentation (movie). 11536 A client is not required to issues SETUP requests for all streams 11537 within an aggregate object. Servers should allow the client to ask 11538 for only a subset of the streams. 11540 D.4. RTSP external SDP delivery 11542 There are some considerations that need to be made when the session 11543 description is delivered to the client outside of RTSP, for example 11544 via HTTP or email. 11546 First of all, the SDP needs to contain absolute URIs, since relative 11547 will in most cases not work as the delivery will not correctly 11548 forward the base URI. 11550 The writing of the SDP session availability information, i.e. "t=" 11551 and "r=", needs to be carefully considered. When the SDP is fetched 11552 by the DESCRIBE method, the probability that it is valid is very 11553 high. However, the same are much less certain for SDPs distributed 11554 using other methods. Therefore the publisher of the SDP should take 11555 care to follow the recommendations about availability in the SDP 11556 specification [RFC4566]. 11558 Appendix E. RTSP Use Cases 11560 This Appendix describes the most important and considered use cases 11561 for RTSP. They are listed in descending order of importance in 11562 regards to ensuring that all necessary functionality is present. 11563 This specification only fully supports usage of the two first. Also 11564 in these first two cases, there are special cases or exceptions that 11565 are not supported without extensions, e.g. the redirection of media 11566 to another address than the controlling entity. 11568 E.1. On-demand Playback of Stored Content 11570 An RTSP capable server stores content suitable for being streamed to 11571 a client. A client desiring playback of any of the stored content 11572 uses RTSP to set up the media transport required to deliver the 11573 desired content. RTSP is then used to initiate, halt and manipulate 11574 the actual transmission (playout) of the content. RTSP is also 11575 required to provide necessary description and synchronization 11576 information for the content. 11578 The above high level description can be broken down into a number of 11579 functions that RTSP needs to be capable of. 11581 Presentation Description: Provide initialization information about 11582 the presentation (content); for example, which media codecs are 11583 needed for the content. Other information that is important 11584 includes the number of media stream the presentation contains, 11585 the transport protocols used for the media streams, and 11586 identifiers for these media streams. This information is 11587 required before setup of the content is possible and to 11588 determine if the client is even capable of using the content. 11590 This information need not be sent using RTSP; other external 11591 protocols can be used to transmit the transport presentation 11592 descriptions. Two good examples are the use of HTTP [RFC2616] 11593 or email to fetch or receive presentation descriptions like SDP 11594 [RFC4566] 11596 Setup: Set up some or all of the media streams in a presentation. 11597 The setup itself consist of selecting the protocol for media 11598 transport and the necessary parameters for the protocol, like 11599 addresses and ports. 11601 Control of Transmission: After the necessary media streams have been 11602 established the client can request the server to start 11603 transmitting the content. The client must be allowed to start 11604 or stop the transmission of the content at arbitrary times. 11605 The client must also be able to start the transmission at any 11606 point in the timeline of the presentation. 11608 Synchronization: For media transport protocols like RTP [RFC3550] it 11609 might be beneficial to carry synchronization information within 11610 RTSP. This may be due to either the lack of inter-media 11611 synchronization within the protocol itself, or the potential 11612 delay before the synchronization is established (which is the 11613 case for RTP when using RTCP). 11615 Termination: Terminate the established contexts. 11617 For this use case there are a number of assumptions about how it 11618 works. These are: 11620 On-Demand content: The content is stored at the server and can be 11621 accessed at any time during a time period when it is intended 11622 to be available. 11624 Independent sessions: A server is capable of serving a number of 11625 clients simultaneously, including from the same piece of 11626 content at different points in that presentations time-line. 11628 Unicast Transport: Content for each individual client is transmitted 11629 to them using unicast traffic. 11631 It is also possible to redirect the media traffic to a different 11632 destination than that of the entity controlling the traffic. 11633 However, allowing this without appropriate mechanisms for checking 11634 that the destination approves of this allows for distributed denial 11635 of service attacks (DDoS). 11637 E.2. Unicast Distribution of Live Content 11639 This use case is similar to the above on-demand content case (see 11640 Appendix E.1) the difference is the nature of the content itself. 11641 Live content is continuously distributed as it becomes available from 11642 a source; i.e., the main difference from on-demand is that one starts 11643 distributing content before the end of it has become available to the 11644 server. 11646 In many cases the consumer of live content is only interested in 11647 consuming what is actually happens "now"; i.e., very similar to 11648 broadcast TV. However, in this case it is assumed that there exist 11649 no broadcast or multicast channel to the users, and instead the 11650 server functions as a distribution node, sending the same content to 11651 multiple receivers, using unicast traffic between server and client. 11652 This unicast traffic and the transport parameters are individually 11653 negotiated for each receiving client. 11655 Another aspect of live content is that it often has a very limited 11656 time of availability, as it is only is available for the duration of 11657 the event the content covers. An example of such a live content 11658 could be a music concert which lasts 2 hour and starts at a 11659 predetermined time. Thus there is need to announce when and for how 11660 long the live content is available. 11662 In some cases, the server providing live content may be saving some 11663 or all of the content to allow clients to pause the stream and resume 11664 it from the paused point, or to "rewind" and play continuously from a 11665 point earlier than the live point. Hence, this use case does not 11666 necessarily exclude playing from other than the live point of the 11667 stream, playing with scales other than 1.0, etc. 11669 E.3. On-demand Playback using Multicast 11671 It is possible to use RTSP to request that media be delivered to a 11672 multicast group. The entity setting up the session (the controller) 11673 will then control when and what media is delivered to the group. 11674 This use case has some potential for denial of service attacks by 11675 flooding a multicast group. Therefore, a mechanism is needed to 11676 indicate that the group actually accepts the traffic from the RTSP 11677 server. 11679 An open issue in this use case is how one ensures that all receivers 11680 listening to the multicast or broadcast receives the session 11681 presentation configuring the receivers. This memo has to rely on a 11682 external solution to solve this issue. 11684 E.4. Inviting an RTSP server into a conference 11686 If one has an established conference or group session, it is possible 11687 to have an RTSP server distribute media to the whole group. 11688 Transmission to the group is simplest when controlled by a single 11689 participant or leader of the conference. Shared control might be 11690 possible, but would require further investigation and possibly 11691 extensions. 11693 This use case assumes that there exists either multicast or a 11694 conference focus that redistribute media to all participants. 11696 This use case is intended to be able to handle the following 11697 scenario: A conference leader or participant (hereafter called the 11698 controller) has some pre-stored content on an RTSP server that he 11699 wants to share with the group. The controller sets up an RTSP 11700 session at the streaming server for this content and retrieves the 11701 session description for the content. The destination for the media 11702 content is set to the shared multicast group or conference focus. 11704 When desired by the controller, he/she can start and stop the 11705 transmission of the media to the conference group. 11707 There are several issues with this use case that are not solved by 11708 this core specification for RTSP: 11710 Denial of service: To avoid an RTSP server from being an unknowing 11711 participant in a denial of service attack the server needs to 11712 be able to verify the destination's acceptance of the media. 11713 Such a mechanism to verify the approval of received media does 11714 not yet exist; instead, only policies can be used, which can be 11715 made to work in controlled environments. 11717 Distributing the presentation description to all participants in the 11718 group: To enable a media receiver to correctly decode the content 11719 the media configuration information needs to be distributed 11720 reliably to all participants. This will most likely require 11721 support from an external protocol. 11723 Passing control of the session: If it is desired to pass control of 11724 the RTSP session between the participants, some support will be 11725 required by an external protocol to exchange state information 11726 and possibly floor control of who is controlling the RTSP 11727 session. 11729 If there interest in this use case, further work is required on the 11730 necessary extensions. 11732 E.5. Live Content using Multicast 11734 This use case in its simplest form does not require any use of RTSP 11735 at all; this is what multicast conferences being announced with SAP 11736 [RFC2974] and SDP are intended to handle. However, in use cases 11737 where more advanced features like access control to the multicast 11738 session are desired, RTSP could be used for session establishment. 11740 A client desiring to join a live multicasted media session with 11741 cryptographic (encryption) access control could use RTSP in the 11742 following way. The source of the session announces the session and 11743 gives all interested an RTSP URI. The client connects to the server 11744 and requests the presentation description, allowing configuration for 11745 reception of the media. In this step it is possible for the client 11746 to use secured transport and any desired level of authentication; for 11747 example, for billing or access control. An RTSP link also allows for 11748 load balancing between multiple servers. 11750 If these were the only goals, they could be achieved by simply using 11751 HTTP. However, for cases where the sender likes to keep track of 11752 each individual receiver of a session, and possibly use the session 11753 as a side channel for distributing key-updates or other information 11754 on a per-receiver basis, and the full set of receivers is not know 11755 prior to the session start, the state establishment that RTSP 11756 provides can be beneficial. In this case a client would establish an 11757 RTSP session for this multicast group with the RTSP server. The RTSP 11758 server will not transmit any media, but instead will point to the 11759 multicast group. The client and server will be able to keep the 11760 session alive for as long as the receiver participates in the session 11761 thus enabling, for example, the server to push updates to the client. 11763 This use case will most likely not be able to be implemented without 11764 some extensions to the server-to-client push mechanism. Here the 11765 PLAY_NOTIFY method (see Section 13.5) with a suitable extension could 11766 provide clear benefits. 11768 Appendix F. Text format for Parameters 11770 A resource of type "text/parameters" consists of either 1) a list of 11771 parameters (for a query) or 2) a list of parameters and associated 11772 values (for an response or setting of the parameter). Each entry of 11773 the list is a single line of text. Parameters are separated from 11774 values by a colon. The parameter name MUST only use US-ASCII visible 11775 characters while the values are UTF-8 text strings. The media type 11776 registration template is in Section 22.16. 11778 There exist a potential interoperability issue for this format. It 11779 was named in RFC 2326 but never defined, even if used in examples 11780 that hint at the syntax. This format matches the purpose and its 11781 syntax supports the examples provided. However, it goes further by 11782 allowing UTF-8 in the value part, thus usage of UTF-8 strings may not 11783 be supported. However, as individual parameters are not defined, the 11784 using application anyway needs to have out-of-band agreement or using 11785 feature-tag to determine if the end-point supports the parameters. 11787 The ABNF [RFC5234] grammar for "text/parameters" content is: 11789 file = *((parameter / parameter-value) CRLF) 11790 parameter = 1*visible-except-colon 11791 parameter-value = parameter *WSP ":" value 11792 visible-except-colon = %x21-39 / %x3B-7E ; VCHAR - ":" 11793 value = *(TEXT-UTF8char / WSP) 11794 TEXT-UTF8char = %x21-7E / UTF8-NONASCII 11795 UTF8-NONASCII = %xC0-DF 1UTF8-CONT 11796 / %xE0-EF 2UTF8-CONT 11797 / %xF0-F7 3UTF8-CONT 11798 / %xF8-FB 4UTF8-CONT 11799 / %xFC-FD 5UTF8-CONT 11800 UTF8-CONT = %x80-BF 11801 WSP = ; Space or HTAB 11802 VCHAR = 11803 CRLF = 11805 Appendix G. Requirements for Unreliable Transport of RTSP 11807 This section provides anyone intending to define how to transport of 11808 RTSP messages over a unreliable transport protocol with some 11809 information learned by the attempt in RFC 2326 [RFC2326]. RFC 2326 11810 define both an URI scheme and some basic functionality for transport 11811 of RTSP messages over UDP, however, it was not sufficient for 11812 reliable usage and successful interoperability. 11814 The RTSP scheme defined for unreliable transport of RTSP messages was 11815 "rtspu". It has been reserved by this specification as at least one 11816 commercial implementation exist, thus avoiding any collisions in the 11817 name space. 11819 The following considerations should exist for operation of RTSP over 11820 an unreliable transport protocol: 11822 o Request shall be acknowledged by the receiver. If there is no 11823 acknowledgement, the sender may resend the same message after a 11824 timeout of one round-trip time (RTT). Any retransmissions due to 11825 lack of acknowledgement must carry the same sequence number as the 11826 original request. 11828 o The round-trip time can be estimated as in TCP (RFC 1123) 11829 [RFC1123], with an initial round-trip value of 500 ms. An 11830 implementation may cache the last RTT measurement as the initial 11831 value for future connections. 11833 o If RTSP is used over a small-RTT LAN, standard procedures for 11834 optimizing initial TCP round trip estimates, such as those used in 11835 T/TCP (RFC 1644) [RFC1644], can be beneficial. 11837 o The Timestamp header (Section 16.51) is used to avoid the 11838 retransmission ambiguity problem [Stevens98]. 11840 o The registered default port for RTSP over UDP for the server is 11841 554. 11843 o RTSP messages can be carried over any lower-layer transport 11844 protocol that is 8-bit clean. 11846 o RTSP messages are vulnerable to bit errors and should not be 11847 subjected to them. 11849 o Source authentication, or at least validation that RTSP messages 11850 comes from the same entity becomes extremely important, as session 11851 hijacking may be substantially easier for RTSP message transport 11852 using an unreliable protocol like UDP than for TCP. 11854 There exist two RTSP headers thats primarily are intended for being 11855 used by the unreliable handling of RTSP messages and which will be 11856 maintained: 11858 o [CSeq] See Section 16.19 11860 o [Timestamp] See Section 16.51 11862 Appendix H. Backwards Compatibility Considerations 11864 This section contains notes on issues about backwards compatibility 11865 with clients or servers being implemented according to RFC 2326 11866 [RFC2326]. Note that there exist no requirement to implement RTSP 11867 1.0, in fact we recommend against it as it is difficult to do in an 11868 interoperable way. 11870 A server implementing RTSP/2.0 MUST include a RTSP-Version of 11871 RTSP/2.0 in all responses to requests containing RTSP-Version 11872 RTSP/2.0. If a server receives a RTSP/1.0 request, it MAY respond 11873 with a RTSP/1.0 response if it chooses to support RFC 2326. If the 11874 server chooses not to support RFC 2326, it MUST respond with a 505 11875 (RTSP Version not supported) status code. A server MUST NOT respond 11876 to a RTSP-Version RTSP/1.0 request with a RTSP-Version RTSP/2.0 11877 response. 11879 Clients implementing RTSP/2.0 MAY use an OPTIONS request with a RTSP- 11880 Version of 2.0 to determine whether a server supports RTSP/2.0. If 11881 the server responds with either a RTSP-Version of 1.0 or a status 11882 code of 505 (RTSP Version not supported), the client will have to use 11883 RTSP/1.0 requests if it chooses to support RFC 2326. 11885 H.1. Play Request in Play mode 11887 The behavior in the server when a Play is received in Play mode has 11888 changed (Section 13.4). In RFC 2326, the new PLAY request would be 11889 queued until the current Play completed. Any new PLAY request now 11890 take effect immediately replacing the previous request. 11892 H.2. Using Persistent Connections 11894 Some server implementations of RFC 2326 maintain a one-to-one 11895 relationship between a connection and an RTSP session. Such 11896 implementations require clients to use a persistent connection to 11897 communicate with the server and when a client closes its connection, 11898 the server may remove the RTSP session. This is worth noting if a 11899 RTSP 2.0 client also supporting 1.0 connects to a 1.0 server. 11901 Appendix I. Open Issues 11903 Open issues are filed and tracked in the bug and feature trackers at 11904 http://rtspspec.sourceforge.net. Open issues are discussed on MMUSIC 11905 list. 11907 Appendix J. Changes 11909 Compared to RTSP 1.0 (RFC 2326), the below changes has been made when 11910 defining RTSP 2.0. Note that this list does not reflect minor 11911 changes in wording or correction of typographical errors. 11913 o The section on minimal implementation was deleted without 11914 substitution. 11916 o The Transport header has been changed in the following way: 11918 * The ABNF has been changed to define that extensions are 11919 possible, and that unknown extension parameters are to be 11920 ignored. 11922 * To prevent backwards compatibility issues, any extension or new 11923 parameter requires the usage of a feature-tag combined with the 11924 Require header. 11926 * Syntax unclarities with the Mode parameter has been resolved. 11928 * Syntax error with ";" for multicast and unicast has been 11929 resolved. 11931 * Two new addressing parameters has been defined, src_addr and 11932 dest_addr. These replaces the parameters "port", 11933 "client_port", "server_port", "destination", "source". 11935 * Support for IPv6 explicit addresses in all address fields has 11936 been included. 11938 * To handle URI definitions that contain ";" or "," a quoted URI 11939 format has been introduced and is required. 11941 * Defined IANA registries for the transport headers parameters, 11942 transport-protocol, profile, lower-transport, and mode. 11944 * The transport headers interleaved parameter's text was made 11945 more strict and use formal requirements levels. It was also 11946 clarified that the interleaved channels are symmetric and that 11947 it is the server that sets the channel numbers. 11949 * It has been clarified that the client can't request of the 11950 server to use a certain RTP SSRC, using a request with the 11951 transport parameter SSRC. 11953 * Syntax definition for SSRC has been clarified to require 8HEX. 11954 It has also been extended to allow multiple values for clients 11955 supporting this version. 11957 * Clarified the text on the transport headers "dest_addr" 11958 parameters regarding what security precautions the server is 11959 required to perform. 11961 o The Range formats has been changed in the following way: 11963 * The NPT format has been given a initial NPT identifier that 11964 must now be used. 11966 * All formats now support initial open ended formats of type 11967 "npt=-10". 11969 o RTSP message handling has been changed in the following way: 11971 * RTSP messages now uses URIs rather then URLs. 11973 * It has been clarified that a 4xx message due to missing CSeq 11974 header shall be returned without a CSeq header. 11976 * The 300 (Multiple Choices) response code has been removed. 11978 * Rules for how to handle timing out RTSP messages has been 11979 added. 11981 * Extended Pipelining rules allowing for quick session startup. 11983 o The HTTP references has been updated to RFC 2616 and RFC 2617. 11984 This has resulted in that the Public, and the Content-Base header 11985 needed to be defined in the RTSP specification. Known effects on 11986 RTSP due to HTTP clarifications: 11988 * Content-Encoding header can include encoding of type 11989 "identity". 11991 o The state machine section has completely been rewritten. It 11992 includes now more details and are also more clear about the model 11993 used. 11995 o A IANA section has been included with contains a number of 11996 registries and their rules. This will allow us to use IANA to 11997 keep track of RTSP extensions. 11999 o The transport of RTSP messages has seen the following changes: 12001 * The use of UDP for RTSP message transport has been deprecated 12002 due to missing interest and to broken specification. 12004 * The rules for how TCP connections is to be handled has been 12005 clarified. Now it is made clear that servers should not close 12006 the TCP connection unless they have been unused for significant 12007 time. 12009 * Strong recommendations why server and clients should use 12010 persistent connections has also been added. 12012 * There is now a requirement on the servers to handle non- 12013 persistent connections as this provides fault tolerance. 12015 * Added wording on the usage of Connection:Close for RTSP. 12017 * specified usage of TLS for RTSP messages, including a scheme to 12018 approve a proxies TLS connection to the next hop. 12020 o The following header related changes have been made: 12022 * Accept-Ranges response header is added. This header clarifies 12023 which range formats that can be used for a resource. 12025 * Fixed the missing definitions for the Cache-Control header. 12026 Also added to the syntax definition the missing delta-seconds 12027 for max-stale and min-fresh parameters. 12029 * Put requirement on CSeq header that the value is increased by 12030 one for each new RTSP request. A Recommendation to start at 1 12031 has also been added. 12033 * Added requirement that the Date header must be used for all 12034 messages with message body and the Server should always include 12035 it. 12037 * Removed possibility of using Range header with Scale header to 12038 indicate when it is to be activated, since it can't work as 12039 defined. Also added rule that lack of Scale header in response 12040 indicates lack of support for the header. Feature-tags for 12041 scaled playback has been defined. 12043 * The Speed header must now be responded to indicate support and 12044 the actual speed going to be used. A feature-tag is defined. 12045 Notes on congestion control was also added. 12047 * The Supported header was borrowed from SIP [RFC3261] to help 12048 with the feature negotiation in RTSP. 12050 * Clarified that the Timestamp header can be used to resolve 12051 retransmission ambiguities. 12053 * The Session header text has been expanded with a explanation on 12054 keep alive and which methods to use. SET_PARAMETER is now 12055 recommended to use if only keep-alive within RTSP is desired. 12057 * It has been clarified how the Range header formats is used to 12058 indicate pause points in the PAUSE response. 12060 * Clarified that RTP-Info URIs that are relative, use the 12061 Request-URI as base URI. Also clarified that the used URI must 12062 be the one that was used in the SETUP request. The URIs are 12063 now also required to be quoted. The header also expresses the 12064 SSRC for the provided RTP timestamp and sequence number values. 12066 * Added text that requires the Range to always be present in PLAY 12067 responses. Clarified what should be sent in case of live 12068 streams. 12070 * The headers table has been updated using a structured borrowed 12071 from SIP. Those tables carries much more information and 12072 should provide a good overview of the available headers. 12074 * It has been clarified that any message with a message body is 12075 required to have a Content-Length header. This was the case in 12076 RFC 2326, but could be misinterpreted. 12078 * ETag has changed name to MTag. 12080 * To resolve functionality around MTag. The MTag and If-None- 12081 Match header has been added from HTTP with necessary 12082 clarification in regards to RTSP operation. 12084 * Imported the Public header from HTTP RFC 2068 [RFC2068] since 12085 it has been removed from HTTP due to lack of use. Public is 12086 used quite frequently in RTSP. 12088 * Clarified rules for populating the Public header so that it is 12089 an intersection of the capabilities of all the RTSP agents in a 12090 chain. 12092 * Added the Media-Range header for listing the current 12093 availability of the media range. 12095 * Added the Notify-Reason header for giving the reason when 12096 sending PLAY_NOTIFY requests. 12098 o The Protocol Syntax has been changed in the following way: 12100 * All ABNF definitions are updated according to the rules defined 12101 in RFC 5234 [RFC5234] and has been gathered in a separate 12102 Section 20. 12104 * The ABNF for the User-Agent and Server headers has been 12105 corrected so now only the description is in the HTTP 12106 specification. 12108 * Some definitions in the introduction regarding the RTSP session 12109 has been changed. 12111 * The protocol has been made fully IPv6 capable. Certain of the 12112 functionality, like using explicit IPv6 addresses in fields 12113 requires that the protocol support this updated specification. 12115 * Added a fragment part to the RTSP URI. This seem to be 12116 indicated by the note below the definition, however, it was not 12117 part of the ABNF. 12119 * The CHAR rule has been changed to exclude NULL. 12121 o The Status codes have been changed in the following way: 12123 * The use of status code 303 "See Other" has been deprecated as 12124 it does not make sense to use in RTSP. 12126 * When sending response 451 and 458 the response body should 12127 contain the offending parameters. 12129 * Clarification on when a 3rr redirect status code can be 12130 received has been added. This includes receiving 3rr as a 12131 result of request within a established session. This provides 12132 clarification to a previous unspecified behavior. 12134 * Removed the 201 (Created) and 250 (Low On Storage Space) status 12135 codes as they are only relevant to recording, which is 12136 deprecated. 12138 o The following functionality has been deprecated from the protocol: 12140 * The use of Queued Play. 12142 * The use of PLAY method for keep-alive in play state. 12144 * The RECORD and ANNOUNCE methods and all related functionality. 12145 Some of the syntax has been removed. 12147 * The possibility to use timed execution of methods with the time 12148 parameter in the Range header. 12150 * The description on how rtspu works is not part of the core 12151 specification and will require external description. Only that 12152 it exist is defined here and some requirements for the 12153 transport is provided. 12155 o The following changes has been made in relation to methods: 12157 * The OPTIONS method has been clarified with regards to the use 12158 of the Public and Allow headers. 12160 * The RECORD and ANNOUNCE methods are removed as they are lacking 12161 implementation and not considered necessary in the core 12162 specification. Any work on these methods should be done as a 12163 extension document to RTSP. 12165 * Added text clarifying the usage of SET_PARAMETER for keep-alive 12166 and usage without any body. 12168 * PLAY method is now allowed to be pipelined with the pipelining 12169 of one or more SETUP requests following the initial that 12170 generates the session for aggregated control. 12172 * REDIRECT has been expanded and diversified for different 12173 situations. 12175 o Wrote a new section about how to setup different media transport 12176 alternatives and their profiles, and lower layer protocols. This 12177 resulted that the appendix on RTP interaction was moved there 12178 instead in the part describing RTP. The section also includes 12179 guidelines what to consider when writing usage guidelines for new 12180 protocols and profiles. 12182 o Setup and usage of independent TCP connections for transport of 12183 RTP has been specified. 12185 o Added a new section describing the available mechanisms to 12186 determine if functionality is supported, called "Capability 12187 Handling". Renamed option-tags to feature-tags. 12189 o Added a contributors section with people who have contributed 12190 actual text to the specification. 12192 o Added a section Use Cases that describes the major use cases for 12193 RTSP. 12195 o Clarified the usage of a=range and how to indicate live content 12196 that are not seekable with this header. 12198 o Text specifying the special behavior of PLAY for live content. 12200 o Added a new method PLAY_NOTIFY. This method is used by the RTSP 12201 server to asynchronously notify clients about session changes. 12203 Appendix K. Acknowledgements 12205 This memorandum defines RTSP version 2.0 which is a revision of the 12206 Proposed Standard RTSP version 1.0 which is defined in [RFC2326]. 12207 The authors of this RFC are Henning Schulzrinne, Anup Rao, and Robert 12208 Lanphier. 12210 Both RTSP version 1.0 and RTSP version 2.0 borrow format and 12211 descriptions from HTTP/1.1. 12213 This document has benefited greatly from the comments of all those 12214 participating in the MMUSIC-WG. In addition to those already 12215 mentioned, the following individuals have contributed to this 12216 specification: 12218 Rahul Agarwal, Jeff Ayars, Milko Boic, Torsten Braun, Brent Browning, 12219 Bruce Butterfield, Steve Casner, Francisco Cortes, Kelly Djahandari, 12220 Martin Dunsmuir, Eric Fleischman, Jay Geagan, Andy Grignon, V. 12221 Guruprasad, Peter Haight, Mark Handley, Brad Hefta-Gaub, Volker Hilt, 12222 John K. Ho, Go Hori, Philipp Hoschka, Anne Jones, Ingemar Johansson, 12223 Anders Klemets, Ruth Lang, Stephanie Leif, Jonathan Lennox, Eduardo 12224 F. Llach, Thomas Marshall, Rob McCool, David Oran, Joerg Ott, Maria 12225 Papadopouli, Sujal Patel, Ema Patki, Alagu Periyannan, Colin Perkins, 12226 Igor Plotnikov, Jonathan Sergent, Pinaki Shah, David Singer, Lior 12227 Sion, Jeff Smith, Alexander Sokolsky, Dale Stammen, John Francis 12228 Stracke, Maureen Chesire, David Walker, Geetha Srikantan, Stephan 12229 Wenger, Pekka Pessi, Jae-Hwan Kim, Holger Schmidt, Stephen Farrell, 12230 Xavier Marjou, Joe Pallas, Martti Mela, and Patrick Hoffman. 12232 K.1. Contributors 12234 The following people have made written contributions that were 12235 included in the specification: 12237 o Tom Marshall contributed text on the usage of 3rr status codes. 12239 o Thomas Zheng contributed text on the usage of the Range in PLAY 12240 responses and proposed an earlier version of the PLAY_NOTIFY 12241 method. 12243 o Sean Sheedy contributed text on the timeout behavior of RTSP 12244 messages and connections, the 463 status code, and proposed an 12245 earlier version of the PLAY_NOTIFY method. 12247 o Greg Sherwood proposed an earlier version of the PLAY_NOTIFY 12248 method. 12250 o Fredrik Lindholm contributed text about the RTSP security 12251 framework. 12253 o John Lazzaro contributed the text for RTP over Independent TCP. 12255 o Aravind Narasimhan contributed by rewriting Media Transport 12256 Alternatives (Appendix C) and editorial improvements on a number 12257 of places in the specification. 12259 o Torbjorn Einarsson has done some editorial approvements of the 12260 text. 12262 Appendix L. RFC Editor Consideration 12264 Please replace RFC XXXX with the RFC number this specification 12265 receives. 12267 Authors' Addresses 12269 Henning Schulzrinne 12270 Columbia University 12271 1214 Amsterdam Avenue 12272 New York, NY 10027 12273 USA 12275 Email: schulzrinne@cs.columbia.edu 12277 Anup Rao 12278 Cisco 12279 USA 12281 Email: anrao@cisco.com 12283 Rob Lanphier 12284 Seattle, WA 12285 USA 12287 Email: robla@robla.net 12289 Magnus Westerlund 12290 Ericsson AB 12291 Faeroegatan 6 12292 STOCKHOLM, SE-164 80 12293 SWEDEN 12295 Email: magnus.westerlund@ericsson.com 12297 Martin Stiemerling 12298 NEC Laboratories Europe, NEC Europe Ltd. 12299 Kurfuersten-Anlage 36 12300 Heidelberg 69115 12301 Germany 12303 Phone: +49 (0) 6221 4342 113 12304 Email: stiemerling@nw.neclab.eu