idnits 2.17.1 draft-ietf-mmusic-rfc2326bis-21.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 multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 -- 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 9557 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 (June 19, 2009) is 5424 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 4022, but not defined == Missing Reference: 'H15' is mentioned on line 8479, but not defined == Missing Reference: 'CSeq' is mentioned on line 11855, but not defined == Missing Reference: 'Timestamp' is mentioned on line 11857, 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-07 -- 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: December 21, 2009 8 M. Westerlund 9 Ericsson AB 10 M. Stiemerling (Ed.) 11 NEC 12 June 19, 2009 14 Real Time Streaming Protocol 2.0 (RTSP) 15 draft-ietf-mmusic-rfc2326bis-21 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 December 21, 2009. 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 1.1. Notes on Copyright . . . . . . . . . . . . . . . . . . . 11 80 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 13 81 2.1. Content Description . . . . . . . . . . . . . . . . . . 13 82 2.2. Session Establishment . . . . . . . . . . . . . . . . . 14 83 2.3. Media Delivery Control . . . . . . . . . . . . . . . . . 15 84 2.4. Session Parameter Manipulations . . . . . . . . . . . . 17 85 2.5. Media Delivery . . . . . . . . . . . . . . . . . . . . . 17 86 2.5.1. Media Delivery Manipulations . . . . . . . . . . . . 18 87 2.6. Session Maintenance and Termination . . . . . . . . . . 20 88 2.7. Extending RTSP . . . . . . . . . . . . . . . . . . . . . 21 89 3. Document Conventions . . . . . . . . . . . . . . . . . . . . 23 90 3.1. Notational Conventions . . . . . . . . . . . . . . . . . 23 91 3.2. Terminology . . . . . . . . . . . . . . . . . . . . . . 23 92 4. Protocol Parameters . . . . . . . . . . . . . . . . . . . . . 27 93 4.1. RTSP Version . . . . . . . . . . . . . . . . . . . . . . 27 94 4.2. RTSP IRI and URI . . . . . . . . . . . . . . . . . . . . 27 95 4.3. Session Identifiers . . . . . . . . . . . . . . . . . . 29 96 4.4. SMPTE Relative Timestamps . . . . . . . . . . . . . . . 29 97 4.5. Normal Play Time . . . . . . . . . . . . . . . . . . . . 30 98 4.6. Absolute Time . . . . . . . . . . . . . . . . . . . . . 31 99 4.7. Feature-Tags . . . . . . . . . . . . . . . . . . . . . . 31 100 4.8. Message Body Tags . . . . . . . . . . . . . . . . . . . 31 101 4.9. Media Properties . . . . . . . . . . . . . . . . . . . . 32 102 4.9.1. Random Access . . . . . . . . . . . . . . . . . . . 33 103 4.9.2. Retention . . . . . . . . . . . . . . . . . . . . . 33 104 4.9.3. Content Modifications . . . . . . . . . . . . . . . 33 105 4.9.4. Supported Scale Factors . . . . . . . . . . . . . . 34 106 4.9.5. Mapping to the Attributes . . . . . . . . . . . . . 34 107 5. RTSP Message . . . . . . . . . . . . . . . . . . . . . . . . 35 108 5.1. Message Types . . . . . . . . . . . . . . . . . . . . . 35 109 5.2. Message Headers . . . . . . . . . . . . . . . . . . . . 36 110 5.3. Message Body . . . . . . . . . . . . . . . . . . . . . . 36 111 5.4. Message Length . . . . . . . . . . . . . . . . . . . . . 37 112 6. General Header Fields . . . . . . . . . . . . . . . . . . . . 38 113 7. Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 114 7.1. Request Line . . . . . . . . . . . . . . . . . . . . . . 39 115 7.2. Request Header Fields . . . . . . . . . . . . . . . . . 41 116 8. Response . . . . . . . . . . . . . . . . . . . . . . . . . . 43 117 8.1. Status-Line . . . . . . . . . . . . . . . . . . . . . . 43 118 8.1.1. Status Code and Reason Phrase . . . . . . . . . . . 43 119 8.2. Response Headers . . . . . . . . . . . . . . . . . . . . 46 120 9. Message Body . . . . . . . . . . . . . . . . . . . . . . . . 49 121 9.1. Message Body Header Fields . . . . . . . . . . . . . . . 49 122 9.2. Message Body . . . . . . . . . . . . . . . . . . . . . . 50 123 10. Connections . . . . . . . . . . . . . . . . . . . . . . . . . 51 124 10.1. Reliability and Acknowledgements . . . . . . . . . . . . 51 125 10.2. Using Connections . . . . . . . . . . . . . . . . . . . 52 126 10.3. Closing Connections . . . . . . . . . . . . . . . . . . 54 127 10.4. Timing Out Connections and RTSP Messages . . . . . . . . 55 128 10.5. Showing Liveness . . . . . . . . . . . . . . . . . . . . 55 129 10.6. Use of IPv6 . . . . . . . . . . . . . . . . . . . . . . 56 130 11. Capability Handling . . . . . . . . . . . . . . . . . . . . . 57 131 12. Pipelining Support . . . . . . . . . . . . . . . . . . . . . 59 132 13. Method Definitions . . . . . . . . . . . . . . . . . . . . . 60 133 13.1. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 61 134 13.2. DESCRIBE . . . . . . . . . . . . . . . . . . . . . . . . 62 135 13.3. SETUP . . . . . . . . . . . . . . . . . . . . . . . . . 64 136 13.3.1. Changing Transport Parameters . . . . . . . . . . . 67 137 13.4. PLAY . . . . . . . . . . . . . . . . . . . . . . . . . . 68 138 13.4.1. General Usage . . . . . . . . . . . . . . . . . . . 68 139 13.4.2. Aggregated Sessions . . . . . . . . . . . . . . . . 72 140 13.4.3. Updating current PLAY Requests . . . . . . . . . . . 73 141 13.4.4. Playing On-Demand Media . . . . . . . . . . . . . . 74 142 13.4.5. Playing Dynamic On-Demand Media . . . . . . . . . . 75 143 13.4.6. Playing Live Media . . . . . . . . . . . . . . . . . 75 144 13.4.7. Playing Live with Recording . . . . . . . . . . . . 76 145 13.4.8. Playing Live with Time-Shift . . . . . . . . . . . . 76 146 13.5. PLAY_NOTIFY . . . . . . . . . . . . . . . . . . . . . . 77 147 13.5.1. End-of-Stream . . . . . . . . . . . . . . . . . . . 78 148 13.5.2. Media-Properties-Update . . . . . . . . . . . . . . 79 149 13.5.3. Scale-Change . . . . . . . . . . . . . . . . . . . . 80 150 13.6. PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . 81 151 13.7. TEARDOWN . . . . . . . . . . . . . . . . . . . . . . . . 84 152 13.7.1. Client to Server . . . . . . . . . . . . . . . . . . 84 153 13.7.2. Server to Client . . . . . . . . . . . . . . . . . . 85 154 13.8. GET_PARAMETER . . . . . . . . . . . . . . . . . . . . . 86 155 13.9. SET_PARAMETER . . . . . . . . . . . . . . . . . . . . . 87 156 13.10. REDIRECT . . . . . . . . . . . . . . . . . . . . . . . . 89 157 14. Embedded (Interleaved) Binary Data . . . . . . . . . . . . . 92 158 15. Status Code Definitions . . . . . . . . . . . . . . . . . . . 94 159 15.1. Success 1xx . . . . . . . . . . . . . . . . . . . . . . 94 160 15.1.1. 100 Continue . . . . . . . . . . . . . . . . . . . . 94 161 15.2. Success 2xx . . . . . . . . . . . . . . . . . . . . . . 94 162 15.2.1. 200 OK . . . . . . . . . . . . . . . . . . . . . . . 94 163 15.3. Redirection 3xx . . . . . . . . . . . . . . . . . . . . 94 164 15.3.1. 301 Moved Permanently . . . . . . . . . . . . . . . 95 165 15.3.2. 302 Found . . . . . . . . . . . . . . . . . . . . . 95 166 15.3.3. 303 See Other . . . . . . . . . . . . . . . . . . . 95 167 15.3.4. 304 Not Modified . . . . . . . . . . . . . . . . . . 95 168 15.3.5. 305 Use Proxy . . . . . . . . . . . . . . . . . . . 96 169 15.4. Client Error 4xx . . . . . . . . . . . . . . . . . . . . 96 170 15.4.1. 400 Bad Request . . . . . . . . . . . . . . . . . . 96 171 15.4.2. 401 Unauthorized . . . . . . . . . . . . . . . . . . 96 172 15.4.3. 402 Payment Required . . . . . . . . . . . . . . . . 97 173 15.4.4. 403 Forbidden . . . . . . . . . . . . . . . . . . . 97 174 15.4.5. 404 Not Found . . . . . . . . . . . . . . . . . . . 97 175 15.4.6. 405 Method Not Allowed . . . . . . . . . . . . . . . 97 176 15.4.7. 406 Not Acceptable . . . . . . . . . . . . . . . . . 97 177 15.4.8. 407 Proxy Authentication Required . . . . . . . . . 98 178 15.4.9. 408 Request Timeout . . . . . . . . . . . . . . . . 98 179 15.4.10. 410 Gone . . . . . . . . . . . . . . . . . . . . . . 98 180 15.4.11. 411 Length Required . . . . . . . . . . . . . . . . 98 181 15.4.12. 412 Precondition Failed . . . . . . . . . . . . . . 99 182 15.4.13. 413 Request Message Body Too Large . . . . . . . . . 99 183 15.4.14. 414 Request-URI Too Long . . . . . . . . . . . . . . 99 184 15.4.15. 415 Unsupported Media Type . . . . . . . . . . . . . 99 185 15.4.16. 451 Parameter Not Understood . . . . . . . . . . . . 99 186 15.4.17. 452 reserved . . . . . . . . . . . . . . . . . . . . 99 187 15.4.18. 453 Not Enough Bandwidth . . . . . . . . . . . . . . 100 188 15.4.19. 454 Session Not Found . . . . . . . . . . . . . . . 100 189 15.4.20. 455 Method Not Valid in This State . . . . . . . . . 100 190 15.4.21. 456 Header Field Not Valid for Resource . . . . . . 100 191 15.4.22. 457 Invalid Range . . . . . . . . . . . . . . . . . 100 192 15.4.23. 458 Parameter Is Read-Only . . . . . . . . . . . . . 100 193 15.4.24. 459 Aggregate Operation Not Allowed . . . . . . . . 100 194 15.4.25. 460 Only Aggregate Operation Allowed . . . . . . . . 100 195 15.4.26. 461 Unsupported Transport . . . . . . . . . . . . . 101 196 15.4.27. 462 Destination Unreachable . . . . . . . . . . . . 101 197 15.4.28. 463 Destination Prohibited . . . . . . . . . . . . . 101 198 15.4.29. 464 Data Transport Not Ready Yet . . . . . . . . . . 101 199 15.4.30. 465 Notification Reason Unknown . . . . . . . . . . 101 200 15.4.31. 470 Connection Authorization Required . . . . . . . 101 201 15.4.32. 471 Connection Credentials not accepted . . . . . . 102 202 15.4.33. 472 Failure to establish secure connection . . . . . 102 203 15.5. Server Error 5xx . . . . . . . . . . . . . . . . . . . . 102 204 15.5.1. 500 Internal Server Error . . . . . . . . . . . . . 102 205 15.5.2. 501 Not Implemented . . . . . . . . . . . . . . . . 102 206 15.5.3. 502 Bad Gateway . . . . . . . . . . . . . . . . . . 102 207 15.5.4. 503 Service Unavailable . . . . . . . . . . . . . . 102 208 15.5.5. 504 Gateway Timeout . . . . . . . . . . . . . . . . 103 209 15.5.6. 505 RTSP Version Not Supported . . . . . . . . . . . 103 210 15.5.7. 551 Option not supported . . . . . . . . . . . . . . 103 211 16. Header Field Definitions . . . . . . . . . . . . . . . . . . 104 212 16.1. Accept . . . . . . . . . . . . . . . . . . . . . . . . . 113 213 16.2. Accept-Credentials . . . . . . . . . . . . . . . . . . . 114 214 16.3. Accept-Encoding . . . . . . . . . . . . . . . . . . . . 114 215 16.4. Accept-Language . . . . . . . . . . . . . . . . . . . . 115 216 16.5. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . 116 217 16.6. Allow . . . . . . . . . . . . . . . . . . . . . . . . . 116 218 16.7. Authorization . . . . . . . . . . . . . . . . . . . . . 117 219 16.8. Bandwidth . . . . . . . . . . . . . . . . . . . . . . . 118 220 16.9. Blocksize . . . . . . . . . . . . . . . . . . . . . . . 118 221 16.10. Cache-Control . . . . . . . . . . . . . . . . . . . . . 118 222 16.11. Connection . . . . . . . . . . . . . . . . . . . . . . . 121 223 16.12. Connection-Credentials . . . . . . . . . . . . . . . . . 121 224 16.13. Content-Base . . . . . . . . . . . . . . . . . . . . . . 122 225 16.14. Content-Encoding . . . . . . . . . . . . . . . . . . . . 122 226 16.15. Content-Language . . . . . . . . . . . . . . . . . . . . 123 227 16.16. Content-Length . . . . . . . . . . . . . . . . . . . . . 124 228 16.17. Content-Location . . . . . . . . . . . . . . . . . . . . 124 229 16.18. Content-Type . . . . . . . . . . . . . . . . . . . . . . 124 230 16.19. CSeq . . . . . . . . . . . . . . . . . . . . . . . . . . 125 231 16.20. Date . . . . . . . . . . . . . . . . . . . . . . . . . . 125 232 16.21. Expires . . . . . . . . . . . . . . . . . . . . . . . . 126 233 16.22. From . . . . . . . . . . . . . . . . . . . . . . . . . . 127 234 16.23. If-Match . . . . . . . . . . . . . . . . . . . . . . . . 127 235 16.24. If-Modified-Since . . . . . . . . . . . . . . . . . . . 128 236 16.25. If-None-Match . . . . . . . . . . . . . . . . . . . . . 128 237 16.26. Last-Modified . . . . . . . . . . . . . . . . . . . . . 129 238 16.27. Location . . . . . . . . . . . . . . . . . . . . . . . . 129 239 16.28. Media-Properties . . . . . . . . . . . . . . . . . . . . 130 240 16.29. Media-Range . . . . . . . . . . . . . . . . . . . . . . 132 241 16.30. MTag . . . . . . . . . . . . . . . . . . . . . . . . . . 132 242 16.31. Notify-Reason . . . . . . . . . . . . . . . . . . . . . 133 243 16.32. Pipelined-Requests . . . . . . . . . . . . . . . . . . . 133 244 16.33. Proxy-Authenticate . . . . . . . . . . . . . . . . . . . 134 245 16.34. Proxy-Authorization . . . . . . . . . . . . . . . . . . 134 246 16.35. Proxy-Require . . . . . . . . . . . . . . . . . . . . . 135 247 16.36. Proxy-Supported . . . . . . . . . . . . . . . . . . . . 135 248 16.37. Public . . . . . . . . . . . . . . . . . . . . . . . . . 136 249 16.38. Range . . . . . . . . . . . . . . . . . . . . . . . . . 137 250 16.39. Referer . . . . . . . . . . . . . . . . . . . . . . . . 138 251 16.40. Retry-After . . . . . . . . . . . . . . . . . . . . . . 139 252 16.41. Request-Status . . . . . . . . . . . . . . . . . . . . . 139 253 16.42. Require . . . . . . . . . . . . . . . . . . . . . . . . 139 254 16.43. RTP-Info . . . . . . . . . . . . . . . . . . . . . . . . 140 255 16.44. Scale . . . . . . . . . . . . . . . . . . . . . . . . . 142 256 16.45. Seek-Style . . . . . . . . . . . . . . . . . . . . . . . 143 257 16.46. Speed . . . . . . . . . . . . . . . . . . . . . . . . . 145 258 16.47. Server . . . . . . . . . . . . . . . . . . . . . . . . . 145 259 16.48. Session . . . . . . . . . . . . . . . . . . . . . . . . 146 260 16.49. Supported . . . . . . . . . . . . . . . . . . . . . . . 147 261 16.50. Terminate-Reason . . . . . . . . . . . . . . . . . . . . 147 262 16.51. Timestamp . . . . . . . . . . . . . . . . . . . . . . . 148 263 16.52. Transport . . . . . . . . . . . . . . . . . . . . . . . 148 264 16.53. Unsupported . . . . . . . . . . . . . . . . . . . . . . 155 265 16.54. User-Agent . . . . . . . . . . . . . . . . . . . . . . . 155 266 16.55. Vary . . . . . . . . . . . . . . . . . . . . . . . . . . 156 267 16.56. Via . . . . . . . . . . . . . . . . . . . . . . . . . . 156 268 16.57. WWW-Authenticate . . . . . . . . . . . . . . . . . . . . 157 269 17. Proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 270 17.1. Proxies and Protocol Extensions . . . . . . . . . . . . 159 271 18. Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 272 18.1. Validation Model (HTTP) . . . . . . . . . . . . . . . . 162 273 18.1.1. Last-Modified Dates . . . . . . . . . . . . . . . . 163 274 18.1.2. Message Body Tag Cache Validators . . . . . . . . . 163 275 18.1.3. Weak and Strong Validators . . . . . . . . . . . . . 163 276 18.1.4. Rules for When to Use Entity Tags and 277 Last-Modified Dates . . . . . . . . . . . . . . . . 166 278 18.1.5. Non-validating Conditionals . . . . . . . . . . . . 167 279 18.2. Invalidation After Updates or Deletions (HTTP) . . . . . 167 280 19. Security Framework . . . . . . . . . . . . . . . . . . . . . 169 281 19.1. RTSP and HTTP Authentication . . . . . . . . . . . . . . 169 282 19.2. RTSP over TLS . . . . . . . . . . . . . . . . . . . . . 169 283 19.3. Security and Proxies . . . . . . . . . . . . . . . . . . 170 284 19.3.1. Accept-Credentials . . . . . . . . . . . . . . . . . 171 285 19.3.2. User approved TLS procedure . . . . . . . . . . . . 172 286 20. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 287 20.1. Base Syntax . . . . . . . . . . . . . . . . . . . . . . 174 288 20.2. RTSP Protocol Definition . . . . . . . . . . . . . . . . 176 289 20.2.1. Generic Protocol elements . . . . . . . . . . . . . 176 290 20.2.2. Message Syntax . . . . . . . . . . . . . . . . . . . 179 291 20.2.3. Header Syntax . . . . . . . . . . . . . . . . . . . 183 292 20.3. SDP extension Syntax . . . . . . . . . . . . . . . . . . 192 293 21. Security Considerations . . . . . . . . . . . . . . . . . . . 193 294 21.1. Remote denial of Service Attack . . . . . . . . . . . . 195 295 22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 197 296 22.1. Feature-tags . . . . . . . . . . . . . . . . . . . . . . 197 297 22.1.1. Description . . . . . . . . . . . . . . . . . . . . 197 298 22.1.2. Registering New Feature-tags with IANA . . . . . . . 198 299 22.1.3. Registered entries . . . . . . . . . . . . . . . . . 198 301 22.2. RTSP Methods . . . . . . . . . . . . . . . . . . . . . . 198 302 22.2.1. Description . . . . . . . . . . . . . . . . . . . . 198 303 22.2.2. Registering New Methods with IANA . . . . . . . . . 198 304 22.2.3. Registered Entries . . . . . . . . . . . . . . . . . 199 305 22.3. RTSP Status Codes . . . . . . . . . . . . . . . . . . . 199 306 22.3.1. Description . . . . . . . . . . . . . . . . . . . . 199 307 22.3.2. Registering New Status Codes with IANA . . . . . . . 199 308 22.3.3. Registered Entries . . . . . . . . . . . . . . . . . 199 309 22.4. RTSP Headers . . . . . . . . . . . . . . . . . . . . . . 199 310 22.4.1. Description . . . . . . . . . . . . . . . . . . . . 199 311 22.4.2. Registering New Headers with IANA . . . . . . . . . 200 312 22.4.3. Registered entries . . . . . . . . . . . . . . . . . 200 313 22.5. Accept-Credentials . . . . . . . . . . . . . . . . . . . 201 314 22.5.1. Accept-Credentials policies . . . . . . . . . . . . 201 315 22.5.2. Accept-Credentials hash algorithms . . . . . . . . . 201 316 22.6. Cache-Control Cache Directive Extensions . . . . . . . 202 317 22.7. Media Properties . . . . . . . . . . . . . . . . . . . . 202 318 22.7.1. Description . . . . . . . . . . . . . . . . . . . . 203 319 22.7.2. Registration Rules . . . . . . . . . . . . . . . . . 203 320 22.7.3. Registered Values . . . . . . . . . . . . . . . . . 203 321 22.8. Notify-Reason header . . . . . . . . . . . . . . . . . . 203 322 22.8.1. Description . . . . . . . . . . . . . . . . . . . . 203 323 22.8.2. Registration Rules . . . . . . . . . . . . . . . . . 203 324 22.8.3. Registered Values . . . . . . . . . . . . . . . . . 204 325 22.9. Range header formats . . . . . . . . . . . . . . . . . . 204 326 22.10. Terminate-Reason Header . . . . . . . . . . . . . . . . 204 327 22.10.1. Redirect Reasons . . . . . . . . . . . . . . . . . . 204 328 22.10.2. Terminate-Reason Header Parameters . . . . . . . . . 205 329 22.11. RTP-Info header parameters . . . . . . . . . . . . . . . 205 330 22.11.1. Description . . . . . . . . . . . . . . . . . . . . 205 331 22.11.2. Registration Rules . . . . . . . . . . . . . . . . . 205 332 22.11.3. Registered Values . . . . . . . . . . . . . . . . . 205 333 22.12. Seek-Style Policies . . . . . . . . . . . . . . . . . . 206 334 22.12.1. Description . . . . . . . . . . . . . . . . . . . . 206 335 22.12.2. Registration Rules . . . . . . . . . . . . . . . . . 206 336 22.12.3. Registered Values . . . . . . . . . . . . . . . . . 206 337 22.13. Transport Header Registries . . . . . . . . . . . . . . 206 338 22.13.1. Transport Protocol Specification . . . . . . . . . . 207 339 22.13.2. Transport modes . . . . . . . . . . . . . . . . . . 208 340 22.13.3. Transport Parameters . . . . . . . . . . . . . . . . 208 341 22.14. URI Schemes . . . . . . . . . . . . . . . . . . . . . . 209 342 22.14.1. The rtsp URI Scheme . . . . . . . . . . . . . . . . 209 343 22.14.2. The rtsps URI Scheme . . . . . . . . . . . . . . . . 210 344 22.14.3. The rtspu URI Scheme . . . . . . . . . . . . . . . . 211 345 22.15. SDP attributes . . . . . . . . . . . . . . . . . . . . . 211 346 22.16. Media Type Registration for text/parameters . . . . . . 212 347 23. References . . . . . . . . . . . . . . . . . . . . . . . . . 214 348 23.1. Normative References . . . . . . . . . . . . . . . . . . 214 349 23.2. Informative References . . . . . . . . . . . . . . . . . 216 350 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 218 351 A.1. Media on Demand (Unicast) . . . . . . . . . . . . . . . 218 352 A.2. Media on Demand using Pipelining . . . . . . . . . . . . 221 353 A.3. Media on Demand (Unicast) . . . . . . . . . . . . . . . 224 354 A.4. Single Stream Container Files . . . . . . . . . . . . . 228 355 A.5. Live Media Presentation Using Multicast . . . . . . . . 230 356 A.6. Capability Negotiation . . . . . . . . . . . . . . . . . 231 357 Appendix B. RTSP Protocol State Machine . . . . . . . . . . . . 233 358 B.1. States . . . . . . . . . . . . . . . . . . . . . . . . . 233 359 B.2. State variables . . . . . . . . . . . . . . . . . . . . 233 360 B.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . 233 361 B.4. State Tables . . . . . . . . . . . . . . . . . . . . . . 234 362 Appendix C. Media Transport Alternatives . . . . . . . . . . . . 239 363 C.1. RTP . . . . . . . . . . . . . . . . . . . . . . . . . . 239 364 C.1.1. AVP . . . . . . . . . . . . . . . . . . . . . . . . 239 365 C.1.2. AVP/UDP . . . . . . . . . . . . . . . . . . . . . . 239 366 C.1.3. AVPF/UDP . . . . . . . . . . . . . . . . . . . . . . 240 367 C.1.4. SAVP/UDP . . . . . . . . . . . . . . . . . . . . . . 241 368 C.1.5. SAVPF/UDP . . . . . . . . . . . . . . . . . . . . . 241 369 C.1.6. RTCP usage with RTSP . . . . . . . . . . . . . . . . 241 370 C.2. RTP over TCP . . . . . . . . . . . . . . . . . . . . . . 242 371 C.2.1. Interleaved RTP over TCP . . . . . . . . . . . . . . 243 372 C.2.2. RTP over independent TCP . . . . . . . . . . . . . . 243 373 C.3. Handling Media Clock Time Jumps in the RTP Media Layer . 247 374 C.4. Handling RTP Timestamps after PAUSE . . . . . . . . . . 251 375 C.5. RTSP / RTP Integration . . . . . . . . . . . . . . . . . 253 376 C.6. Scaling with RTP . . . . . . . . . . . . . . . . . . . . 253 377 C.7. Maintaining NPT synchronization with RTP timestamps . . 253 378 C.8. Continuous Audio . . . . . . . . . . . . . . . . . . . . 253 379 C.9. Multiple Sources in an RTP Session . . . . . . . . . . . 253 380 C.10. Usage of SSRCs and the RTCP BYE Message During an 381 RTSP Session . . . . . . . . . . . . . . . . . . . . . . 253 382 C.11. Future Additions . . . . . . . . . . . . . . . . . . . . 254 383 Appendix D. Use of SDP for RTSP Session Descriptions . . . . . . 255 384 D.1. Definitions . . . . . . . . . . . . . . . . . . . . . . 255 385 D.1.1. Control URI . . . . . . . . . . . . . . . . . . . . 255 386 D.1.2. Media Streams . . . . . . . . . . . . . . . . . . . 256 387 D.1.3. Payload Type(s) . . . . . . . . . . . . . . . . . . 257 388 D.1.4. Format-Specific Parameters . . . . . . . . . . . . . 257 389 D.1.5. Directionality of media stream . . . . . . . . . . . 257 390 D.1.6. Range of Presentation . . . . . . . . . . . . . . . 258 391 D.1.7. Time of Availability . . . . . . . . . . . . . . . . 259 392 D.1.8. Connection Information . . . . . . . . . . . . . . . 259 393 D.1.9. Message Body Tag . . . . . . . . . . . . . . . . . . 259 394 D.2. Aggregate Control Not Available . . . . . . . . . . . . 260 395 D.3. Aggregate Control Available . . . . . . . . . . . . . . 260 396 D.4. RTSP external SDP delivery . . . . . . . . . . . . . . . 261 398 Appendix E. RTSP Use Cases . . . . . . . . . . . . . . . . . . . 263 399 E.1. On-demand Playback of Stored Content . . . . . . . . . . 263 400 E.2. Unicast Distribution of Live Content . . . . . . . . . . 264 401 E.3. On-demand Playback using Multicast . . . . . . . . . . . 265 402 E.4. Inviting an RTSP server into a conference . . . . . . . 265 403 E.5. Live Content using Multicast . . . . . . . . . . . . . . 266 404 Appendix F. Text format for Parameters . . . . . . . . . . . . . 268 405 Appendix G. Requirements for Unreliable Transport of RTSP . . . 269 406 Appendix H. Backwards Compatibility Considerations . . . . . . . 271 407 H.1. Play Request in Play mode . . . . . . . . . . . . . . . 271 408 H.2. Using Persistent Connections . . . . . . . . . . . . . . 271 409 Appendix I. Open Issues . . . . . . . . . . . . . . . . . . . . 272 410 Appendix J. Changes . . . . . . . . . . . . . . . . . . . . . . 273 411 Appendix K. Acknowledgements . . . . . . . . . . . . . . . . . . 280 412 K.1. Contributors . . . . . . . . . . . . . . . . . . . . . . 280 413 Appendix L. RFC Editor Consideration . . . . . . . . . . . . . . 282 414 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 283 416 1. Introduction 418 This memo defines version 2.0 of the Real Time Streaming Protocol 419 (RTSP 2.0). RTSP 2.0 is an application-level protocol for setup and 420 control over the delivery of data with real-time properties, 421 typically streaming media. Streaming media is, for instance, video 422 on demand or audio live streaming. Put simply, RTSP acts as a 423 "network remote control" for multimedia servers, as you know it from 424 your TV set. 426 The protocol operates between RTSP 2.0 clients and servers, but also 427 supports the usage of proxies placed between clients and servers. 428 Clients can request information about streaming media from servers, 429 by asking for a description of the media or use media description 430 provided externally. Then the media delivery protocol is used to 431 establish the media streams described by the media description. 432 Clients can then request to play out the media, pause it, or stop it 433 completely, as known from a regular DVD player remote control. The 434 requested media can consist of multiple audio and video streams that 435 are delivered as a time-synchronized streams from servers to clients. 437 RTSP 2.0 is an replacement of RTSP 1.0 [RFC2326] that obsoletes that 438 specification. This protocol is based on RTSP 1.0 but not backwards 439 compatible other than in the basic version negotiation mechanism. 440 The changes are documented in Appendix J. There are many reasons why 441 RTSP 2.0 can't be backwards compatible with RTSP 1.0 but some of the 442 main ones are; that most header that needed to be extensible did not 443 define the allowed syntax preventing safe deployment of extensions; 444 the changed behavior of the PLAY method when received in playing 445 state; changed behavior of the extensibility model and its mechanism; 446 the change of syntax for some headers. The summary is that there are 447 so many small details that changing version become necessary to 448 enable clarification and consistent behavior. 450 This document is structured in the way that it begins with an 451 overview of the protocol operations and its functions in an informal 452 way. Then a set of definitions of used terms and document 453 conventions is introduced. Then comes the actual protocol 454 specification. In the appendix some functionality that isn't core 455 RTSP defined, but still important to enable some usage, like RTP and 456 SDP usage with RTSP. This is followed by a number of informational 457 parts discussing the changes, use cases, different considerations or 458 motivations. 460 1.1. Notes on Copyright 462 The IETF has adopted new IPR contributor rules in [RFC5378], which 463 results in a changed model of copyright. The baseline is that "The 464 IETF Trust and the IETF must obtain the right to publish an IETF 465 Contribution as an RFC or an Internet-Draft from the Contributors." 466 (taken from Section 3.1 of [RFC5378]). 468 This memo has plenty of text taken from [RFC2326] and thus the 469 associated copyright. Magnus Westerlund has solicited the authors of 470 [RFC2326] and this memo to transfer the copyright to the new model, 471 i.e., to the IETF trust and the IETF. Most of the authors have 472 responded and transferred their copyright. However, not all of them 473 have. This is the first reason for the currently used boiler plate 474 (and thus the current status), i.e., with pre5378Trust200902. See 475 also this document [IETF-Trust-License-Policy] for more information. 477 Furthermore, this memo does contain text that has been copied and 478 modified from [RFC2616]. Older versions of this memo solely linked 479 to the particular places. Linking to the HTTP/1.1 specification was 480 not appropriate anymore, as the text was not fitting to RTSP 2.0 481 needs and had to be adapted. Thus text copied from HTTP/1.1 is still 482 under copyright prior to [RFC5378]. 484 2. Protocol Overview 486 This section provides a informative overview of the different 487 mechanisms in the RTSP 2.0 protocol, to give the reader a high level 488 understanding before getting into all the different details. In case 489 of conflict with this description and the later sections, the later 490 sections take precedence. For more information about considered use 491 cases for RTSP see Appendix E. 493 RTSP 2.0 is a bi-directional request and response protocol that first 494 establish a context including content resources (the media) and then 495 controls the delivery of these content resources from the server to 496 the client. RTSP has three fundamental parts of interest: Session 497 Establishment, Playback Control, and an extensibility model described 498 below. The protocol is based on some assumptions on existing 499 functionality to provide a complete solution for client controlled 500 real-time media delivery. 502 RTSP uses text-based messages, requests and responses, that may 503 contain a binary message body. An RTSP request starts with a method 504 line that identifies the method, the protocol and version and the 505 resource to act on. Following the method line follows a number of 506 RTSP headers. This part is ended by two consecutive carriage return 507 line feed (CRLF) character pairs. The message body if present 508 follows the two CRLF and the bodies length are described by a message 509 header. RTSP responses are similar, but start with a response line 510 with protocol and version, followed by a status code and a reason 511 phrase. RTSP messages are sent over a reliable transport protocol 512 between the client and server. RTSP 2.0 requires clients and servers 513 to implement TCP, and TLS over TCP, as mandatory transports for RTSP 514 messages. 516 2.1. Content Description 518 RTSP exists to provide access to multi-media content, but tries to be 519 agnostic to the media type or the actual media delivery protocol that 520 is used. To enable a client to implement a complete system, an RTSP- 521 external mechanism for describing the content and the delivery 522 protocol(s) is used. RTSP assumes that this description is either 523 delivered completely out of bands or as a data object in the response 524 to a client's request using the DESCRIBE method (Section 13.2). 526 Parameters that commonly have to be included in the Content 527 Description are the following: 529 o Number of media streams 530 o The resource identifier for each media stream/resource that is to 531 be controlled by RTSP 533 o The protocol that each media stream is to be delivered over 535 o Transport protocol parameters that are not negotiated or varies 536 with each client 538 o Media encoding information enabling client to correctly decode it 539 upon reception 541 o An aggregate control resource identifier 543 RTSP uses its own URI schemes ("rtsp" and "rtsps") to reference media 544 resources and aggregates under common control. 546 This specification describes in Appendix D how one uses SDP [RFC4566] 547 for Content Description 549 2.2. Session Establishment 551 The RTSP client can request the establishment of an RTSP session 552 after having used the content description to determine which media 553 streams are available, and also which media delivery protocol is used 554 and their particular resource identifiers. The RTSP session is a 555 common context between the client and the server that consist of one 556 or more media resource that is to be under common playback control. 558 The client creates an RTSP session by sending an request using the 559 SETUP method (Section 13.3) to the server. In the SETUP request the 560 client also includes all the transport parameter necessary to enable 561 the media delivery protocol to function in the "Transport" header 562 (Section 16.52). This includes parameters that are pre-established 563 by the content description but necessary for any middlebox to 564 correctly handle the media delivery protocols. The Transport header 565 in a request may contain multiple alternatives for media delivery in 566 a prioritized list, which the server can select from. These 567 alternatives are typically based on information in the content 568 description. 570 The server determines if the media resource is available upon 571 receiving a SETUP request and if any of the transport parameter 572 specifications are acceptable. If that is successful, an RTSP 573 session context is created and the relevant parameters and state is 574 stored. An identifier is created for the RTSP session and included 575 in the response in the Session header (Section 16.48). The SETUP 576 response includes a Transport header that specifies which of the 577 alternatives that have been selected and relevant parameters. 579 A SETUP request that references an existing RTSP session but 580 identifies a new media resource is a request to add that media 581 resource under common control with the already present media 582 resources in an aggregated session. A client can expect this to work 583 for all media resources under RTSP control within a multi-media 584 content. However, aggregating resources from different content are 585 likely to be refused by the server. The RTSP session as aggregate is 586 referenced by the aggregate control URI, even if the RTSP session 587 only contains a single media. 589 To avoid an extra round trip in the session establishment of 590 aggregated RTSP sessions, RTSP 2.0 supports pipelined requests, i.e., 591 the client can send multiple requests back to back without waiting 592 first for the completion of any of them. The client uses client 593 selected identifier in the Pipelined-Requests header to instruct the 594 server to bind multiple requests together as if they included the 595 session identifier. 597 The SETUP response also provides additional information about the 598 established sessions in a couple of different headers. The Media- 599 Properties header include a number of properties that apply for the 600 aggregate that is valuable when doing playback control and 601 configuring user interface. The Accept-Ranges header inform the 602 client about which range formats that the server supports with these 603 media resources. The Media-Range header inform the client about the 604 time range of the media currently available. 606 2.3. Media Delivery Control 608 After having established an RTSP session, the client can start 609 controlling the media delivery. The basic operations are Start by 610 using the PLAY method (Section 13.4) and Halt by using the PAUSE 611 method (Section 13.6). PLAY also allows for choosing the starting 612 media position from which the server should deliver the media. The 613 positioning is done using the Range header (Section 16.38) that 614 supports several different time formats: Normal Play Time 615 (Section 4.5), SMPTE Timestamps (Section 4.4) and absolute time 616 (Section 4.6). The Range header does further allow the client to 617 specify a position where delivery should end, thus allowing a 618 specific interval to be delivered. 620 The support for positioning/searching within a content depends on the 621 content's media properties. Content exists in a number of different 622 types, such as: on-demand, live, and live with simultaneous 623 recording. Even within these categories there are differences in how 624 the content is generated and distributed, which affect how it can be 625 accessed for playback. The properties applicable for the RTSP 626 session are provided by the server in the SETUP response using the 627 Media-Properties header (Section 16.28). These are expressed using 628 one or several independent attributes. A first attribute is Random 629 Access, which expresses if positioning can be done, and with what 630 granularity. Another aspect is whether the content will change 631 during the lifetime of the session. While on-demand content will 632 provided in its completeness from the beginning, a live stream being 633 recorded results in that the length of the accessible content grows 634 as the session goes on. There also exist content that is dynamically 635 built by another protocol than RTSP and thus also changes in steps 636 during the session, but maybe not continuously. Furthermore, when 637 content is recorded, there are cases where not the complete content 638 is maintained, but, for example, only the last hour. All these 639 properties result in the need for mechanisms that will be discussed 640 below. 642 When the client accesses on-demand content, that is possible to 643 perform random access in, the client can issue the PLAY request for 644 any point in the content between the start and the end. The server 645 will deliver media from the closest random access point prior to the 646 requested point and indicate that in its PLAY response. If the 647 client issues a pause the delivery will be halted and the point at 648 which the server stopped will be reported back in the response. The 649 client can later resume by a PLAY request without a range header. 650 When the server is about to completed the PLAY request by delivering 651 the end of the content or the requested range the server will send a 652 PLAY_NOTIFY request indicating this. 654 When playing live content with no extra functions, such as recording, 655 the client will receive the live media from the server after having 656 sent a PLAY request. Seeking in such content is not working as the 657 server does not store it, but only forwards it from the source of the 658 session. Thus delivery continues until the client sends a PAUSE 659 request, tears down the session, or the content ends. 661 For live sessions that are being recorded the client will need to 662 keep track of how the recording progresses. Upon session 663 establishment the client will learn the current duration of the 664 recording from the Media-Range header. As the recording is ongoing 665 the content grows in direct relation to the passed time. Therefore, 666 each server's response to a PLAY request will contain the current 667 Media-Range header. The server should also send regularly every 5 668 minutes the current media range in a PLAY_NOTIFY request. If the 669 live transmission ends, the server must send a PLAY_NOTIFY request 670 with the updated Media-Properties indicating that the content stopped 671 being a recorded live session and instead become a on-demand content. 672 The request also contains the final media range. While the live 673 delivery continues the client can request to play what is delivered 674 just now by using the NPT timescale symbol "now", or it can request a 675 specific point in the available content by an explicit range request 676 for that point. If the requested point is outside of the available 677 interval the server will adjust the position to the closest available 678 point, i.e., either at the beginning or the end. 680 A special case of recording is, where the recording is not retained 681 longer than a specific time period, thus as the live delivery 682 continues the client can access any media within a moving window that 683 covers for example "now" to "now" minus 1 hour. A client that pauses 684 on a specific point within the content may not be able to retrieve 685 the content anymore. If the client waits too long before resuming 686 the pause point, the content may no longer be available. In this 687 case the pause point will be adjusted to the end of the available 688 media. 690 2.4. Session Parameter Manipulations 692 A session may have additional state or functionality that effects how 693 the server or client treats the session, content, how it functions, 694 or feedback on how well the session works. Such extensions are not 695 defined in this specification, but may be done in various extensions. 696 RTSP has two methods for retrieving and setting parameter values on 697 either the client or the server: GET_PARAMETER (Section 13.8) and 698 SET_PARAMETER (Section 13.9). These methods carry the parameters in 699 a message body of the appropriate format. One can also headers to 700 query state with the GET_PARAMETER method. As an example, clients 701 needing to know the current Media-Range for a time-progressing 702 session can use the GET_PARAMETER method and include the media-range. 703 Furthermore, synchronization information can be requested by using a 704 combination of RTP-Info and Range. 706 RTSP 2.0 does not have a strong mechanism for providing negotiation 707 of which headers, or parameters and their formats, that can be used. 708 However, responses will indicate request headers or parameters that 709 are not supported. A priori determination of what features are 710 available needs to be done through out-of-band mechanisms, like the 711 session description, or through the usage of feature tags 712 (Section 4.7). 714 2.5. Media Delivery 716 The delivery of media to the RTSP client is done with a protocol 717 outside of RTSP and this protocol is determined during the session 718 establishment. This document specifies how media is delivered with 719 RTP over UDP, TCP or the RTSP control connection. Additional 720 protocols may be specified in the future based on demand. 722 The usage of RTP as media delivery protocol requires some additional 723 information to function well. The PLAY responses contains 724 synchronization information to enable reliable and timely deliver of 725 how a client should synchronize different sources in the different 726 RTP sessions. It also provides a mapping between RTP timestamps and 727 the content time scale. When the server is notifying the client 728 about the end of the media delivery requested using PLAY, it sends a 729 PLAY_NOTIFY request to the client. The PLAY_NOTIFY request includes 730 information about the last RTP sequence numbers for each stream, and 731 thus enables correct handling of the buffer drainage at the end. 733 2.5.1. Media Delivery Manipulations 735 The basic playback functionality of RTSP is to request content for a 736 particular range to be delivered to the client in a pace that enables 737 playback as intended by the creator. However, RTSP can also 738 manipulate how this delivery is done to the client in two ways. 740 Scale: The ratio of media content time delivered per unit playback 741 time. 743 Speed: The ratio of playback time delivered per unit of wallclock 744 time. 746 Both affect the media delivery per time unit. However, they 747 manipulate two independent time scales and the effects are possible 748 to combine. 750 Scale is used for fast forward or slow motion control as it changes 751 the amount of content timescale that should be played back per time 752 unit. Scale > 1.0, means fast forward, e.g. Scale=2.0 results in 753 that 2 seconds of content is played back every second of playback. 754 Scale = 1.0 is the default value that is used if no Scale is 755 specified, i.e. playback at the contents original rate. Scale values 756 between 0 and 1.0 is providing for slow motion. Scale can be 757 negative to allow for reverse playback in either regular pace (Scale 758 = -1.0) or fast backwards (Scale < -1.0) or slow motion backwards 759 (-1.0 < Scale < 0). Scale = 0 is equal to pause and is not allowed. 761 In most cases the realization of scale means server side manipulation 762 of the media to ensure that the client can actually play it back. 763 These media manipulation and when they are needed are highly media 764 type dependent. Lets exemplify with two common media types audio and 765 video. 767 It is very difficult to modify the playback rate of audio. A maximum 768 of 10-30% is possible by changing the pitch-rate of speech. Music 769 goes out of tune if one tries to manipulate the playback rate by 770 resampling it. This is a well known problem and audio is commonly 771 muted or played back in short segments with skips to keep up with the 772 current playback point. 774 For video is possible to manipulate the number of frames that is 775 displayed per second, but the rendering capabilities are often 776 limited to certain frame rates. The decoding, handling capabilities 777 and bitrate of received encoded content also limits the number of 778 frames that can be delivered. Therefore, when providing fast 779 forward, one generally picks a subset of the frames from the original 780 content to be displayed. However, the video encoding methods used 781 will commonly limit the possibilities on which frames that can be 782 chosen and still be decoded by the receiver. 784 Due to the media restrictions, a particular content will commonly be 785 restricted to a limited set of possible scale ratios. To handle this 786 correctly, RTSP has a mechanism to indicate the supported Scale 787 ratios for the content. To support aggregated or dynamic content, 788 where this may change during the ongoing session and dependent on the 789 location within the content, a mechanism for updating the media 790 properties and the current used scale factor exist. 792 Speed affects how much of the playback timeline that is delivered in 793 a given wallclock period. The default is Speed = 1 which is to 794 deliver at the same rate the media is consumed. Speed > 1 means that 795 the receiver will get content faster than it regularly would consume 796 it. Speed < 1 means that delivery is slower than the regular media 797 rate. Speed values of 0 or lower has no meaning and are not allowed. 798 This mechanism enables two general functionalities. Client side 799 scale operations, i.e. the client receives all the frames and makes 800 the adjustment to the playback locally. The second usage is to 801 control delivery for buffering of media. By specifying a speed over 802 1.0 the client can build up the amount of playback time it has 803 present in its buffers to a level that is sufficient for its needs. 805 A naive implementation of Speed would only affect the transmission 806 schedule of the media and has a clear impact on the needed bandwidth. 807 This would result in the data rate being proportional to the speed 808 factor. Speed = 1.5, i.e. 50% faster than normal delivery, will then 809 result in a 50% increase in the data transport rate. If that can be 810 supported or not depends solely on the underlying network path. 811 Scale may also have some impact on the required bandwidth due to the 812 manipulation of the content in the new playback schedule. An example 813 is fast forward where only the independently decodable intra frames 814 are included in the media stream. This usage of solely intra frames 815 increase the data rate significantly compared to a normal sequence 816 with the same number of frames where most frames are encoded using 817 prediction. 819 This potential increase of the data rate needs to be handled by the 820 media sender. The client has requested that the media is delivered 821 in a specific way, which should be honored. However, the media 822 sender can not ignore if the network path between the sender and the 823 receiver can't handle the resulting media stream. In that case the 824 media stream needs to be adapted to fit the available resources of 825 the path. This can result in that media quality has be reduced due 826 to the delivery modifications that the client has requested. 828 The need for bitrate adaptation becomes especially problematic in 829 connection to Speed. If the goal is to fill up the buffer, the 830 client may not want to do that at the cost of reduced quality. If 831 you like to do local playout changes then you may actually require 832 that the requested speed is honored. To resolve this issue, the 833 usage of speed specifies a range so that both usages can be 834 supported. The server is requested to use the highest possible speed 835 value within the range which is compatible with the available 836 bandwidth. As long as the server can maintain a speed value within 837 the range it shall not change the media quality, but instead modify 838 the speed value in response to available bandwidth. However, if this 839 is not possible, the server should instead modify the media quality 840 to respect the lowest speed value and the available bandwidth. 842 This functionality enables the local scaling implementation to use a 843 tight range, or even a range where the lower bound equals the upper 844 bound, to identify that it requires the server to deliver the 845 requested amount of media time per delivery time independent of how 846 much it needs to adapt the media quality to fit within the available 847 path bandwidth. For buffer fill up, it is suitable to use a range 848 with a reasonable span and with a lower bound at the nominal media 849 rate 1.0, such as 1.0 - 2.5. If the client wants to reduce the 850 buffer, it can specify an upper bound that is below 1.0 to force the 851 server to deliver slower than the nominal media rate. 853 2.6. Session Maintenance and Termination 855 The session context that has been established is kept alive by having 856 the client show liveness. This is done in two main ways: 858 o Media transport protocol keep-alive. RTCP is possible to use when 859 using RTP. 861 o Any RTSP request referencing the session context. 863 Section 10.5 discusses the methods for showing liveness in more 864 depth. If the client fails to show liveness for more than the 865 established session timeout value (normally 60 seconds), the server 866 may terminate the context. Other values may be selected by the 867 server through the inclusion of the timeout parameter in the session 868 header. 870 The session context is normally terminated by the client by sending a 871 TEARDOWN request to the server referencing the aggregated control 872 URI. An individual media resource can be removed from a session 873 context by a TEARDOWN request referencing that particular media 874 resource. If all media resources are removed from a session context, 875 the session context is terminated. 877 A client may keep the session alive indefinitely if allowed by the 878 server, however it is recommend to release the session context when 879 an extended period of time without media delivery activity has 880 passed. It can re-establish the session context if required later. 881 One issue is that what is extended periods of time is dependent on 882 the server and its usage. It is recommended that the client 883 terminates the session before 10*times the session timeout value has 884 passed. A server may terminate the session after one session timeout 885 period without any client activity beyond keep-alive. When a server 886 terminates the session context, it does that by sending a TEARDOWN 887 request indicating the reason. 889 A server can also request that the client tear down the session and 890 re-establish it at an alternative server, as may be needed for 891 maintenance. This is done by using the REDIRECT method. The 892 Terminate-Reason header is used to indicate when and why. The 893 Location header indicates where it should connect if there is an 894 alternative server available. When the deadline expires, the server 895 simply stops providing the service. To achieve a clean closure, the 896 client needs to initiate session termination prior to the deadline. 897 In case the server has no other server to redirect to, and likes to 898 close the session for maintenance, it shall use the TEARDOWN method 899 with a Terminate-Reason header. 901 2.7. Extending RTSP 903 RTSP is quite a versatile protocol which supports extensions in many 904 different directions. Even this core specification contains several 905 blocks of functionality that are optional to implement. The use case 906 and need for the protocol deployment is what should determine what is 907 implemented. Allowing for extensions makes it possible for RTSP to 908 reach out to additional use cases. However, extensions will affect 909 the interoperability of the protocol and therefore it is important 910 that it can be done in a structured way. 912 The client can learn the servers capability through the usage of the 913 OPTIONS method (Section 13.1) and the Supported header 914 (Section 16.49). It can also try and possibly fail by using new 915 methods or require that particular features are supported using the 916 Require or Proxy-Require header. 918 The RTSP protocol in itself can be extended in three ways, listed 919 here in order of the magnitude of changes supported: 921 o Existing methods can be extended with new parameters, for example, 922 headers, as long as these parameters can be safely ignored by the 923 recipient. If the client needs negative acknowledgement when a 924 method extension is not supported, a tag corresponding to the 925 extension may be added in the field of the Require or Proxy- 926 Require headers (see Section 16.35). 928 o New methods can be added. If the recipient of the message does 929 not understand the request, it must respond with error code 501 930 (Not Implemented) so that the sender can avoid using this method 931 again. A client may also use the OPTIONS method to inquire about 932 methods supported by the server. The server must list the methods 933 it supports using the Public response header. 935 o A new version of the protocol can be defined, allowing almost all 936 aspects (except the position of the protocol version number) to 937 change. A new version of the protocol must be registered through 938 an IETF standard track document. 940 The basic capability discovery mechanism can be used to both discover 941 support for a certain feature and to ensure that a feature is 942 available when performing a request. For a detailed explanation of 943 this see Section 11. 945 New media delivery protocols may be added and negotiated at session 946 establishment, in addition to extension to the core protocol. 947 Certain types of protocol manipulations can be done through parameter 948 formats using SET_PARAMETER and GET_PARAMETER. 950 3. Document Conventions 952 3.1. Notational Conventions 954 Since a few of the definitions are identical to HTTP/1.1, this 955 specification only points to the section where they are defined 956 rather than copying it. For brevity, [HX.Y] is to be taken to refer 957 to Section X.Y of the current HTTP/1.1 specification ([RFC2616]). 959 All the mechanisms specified in this document are described in both 960 prose and the Augmented Backus-Naur form (ABNF) described in detail 961 in [RFC5234]. 963 Indented and smaller-type paragraphs are used to provide informative 964 background and motivation. This is intended to give readers who were 965 not involved with the formulation of the specification an 966 understanding of why things are the way they are in RTSP. 968 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 969 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 970 document are to be interpreted as described in [RFC2119]. 972 The word, "unspecified" is used to indicate functionality or features 973 that are not defined in this specification. Such functionality 974 cannot be used in a standardized manner without further definition in 975 an extension specification to RTSP. 977 3.2. Terminology 979 Aggregate control: The concept of controlling multiple streams using 980 a single timeline, generally maintained by the server. A client, 981 for example, uses aggregate control when it issues a single play 982 or pause message to simultaneously control both the audio and 983 video in a movie. A session which is under aggregate control is 984 referred to as an aggregated session. 986 Aggregate control URI: The URI used in an RTSP request to refer to 987 and control an aggregated session. It normally, but not always, 988 corresponds to the presentation URI specified in the session 989 description. See Section 13.3 for more information. 991 Client: The client requests media service from the media server. 993 Connection: A transport layer virtual circuit established between 994 two programs for the purpose of communication. 996 Container file: A file which may contain multiple media streams 997 which often constitutes a presentation when played together. The 998 concept of a container file is not embedded in the protocol. 999 However, RTSP servers may offer aggregate control on the media 1000 streams within these files. 1002 Continuous media: Data where there is a timing relationship between 1003 source and sink; that is, the sink needs to reproduce the timing 1004 relationship that existed at the source. The most common examples 1005 of continuous media are audio and motion video. Continuous media 1006 can be real-time (interactive or conversational), where there is a 1007 "tight" timing relationship between source and sink, or streaming 1008 (playback), where the relationship is less strict. 1010 Feature-tag: A tag representing a certain set of functionality, i.e. 1011 a feature. 1013 IRI: Internationalized Resource Identifier, is the same as an URI, 1014 with the exception that it allows characters from the whole 1015 Universal Character Set (Unicode/ISO 10646), rather than the US- 1016 ASCII only. See [RFC3987] for more information. 1018 Live: Normally used to describe a presentation or session with media 1019 coming from an ongoing event. This generally results in the 1020 session having an unbound or only loosely defined duration, and 1021 sometimes no seek operations are possible. 1023 Media initialization: Datatype/codec specific initialization. This 1024 includes such things as clock rates, color tables, etc. Any 1025 transport-independent information which is required by a client 1026 for playback of a media stream occurs in the media initialization 1027 phase of stream setup. 1029 Media parameter: Parameter specific to a media type that may be 1030 changed before or during stream playback. 1032 Media server: The server providing playback services for one or more 1033 media streams. Different media streams within a presentation may 1034 originate from different media servers. A media server may reside 1035 on the same host or on a different host from which the 1036 presentation is invoked. 1038 (Media) stream: A single media instance, e.g., an audio stream or a 1039 video stream as well as a single whiteboard or shared application 1040 group. When using RTP, a stream consists of all RTP and RTCP 1041 packets created by a source within an RTP session. 1043 Message: The basic unit of RTSP communication, consisting of a 1044 structured sequence of octets matching the syntax defined in 1045 Section 20 and transmitted over a connection or a connectionless 1046 transport. A message is either a Request or a Response. 1048 Message Body: The information transferred as the payload of a 1049 message. A message body consists of meta-information in the form 1050 of message-header and content in the form of an message-body, as 1051 described in Section 9. 1053 Non-Aggregated Control: Control of a single media stream. 1055 Presentation: A set of one or more streams presented to the client 1056 as a complete media feed and described by a presentation 1057 description as defined below. Presentations with more than one 1058 media stream are often handled in RTSP under aggregate control. 1060 Presentation description: A presentation description contains 1061 information about one or more media streams within a presentation, 1062 such as the set of encodings, network addresses and information 1063 about the content. Other IETF protocols such as SDP ([RFC4566]) 1064 use the term "session" for a presentation. The presentation 1065 description may take several different formats, including but not 1066 limited to the session description protocol format, SDP. 1068 Response: An RTSP response to a Request. One type of RTSP message. 1069 If an HTTP response is meant, it is indicated explicitly. 1071 Request: An RTSP request. One type of RTSP message. If an HTTP 1072 request is meant, it is indicated explicitly. 1074 Request-URI: The URI used in a request to indicate the resource on 1075 which the request is to be performed. 1077 RTSP agent: Refers to either an RTSP client, an RTSP server, or an 1078 RTSP proxy. In this specification, there are many capabilities 1079 that are common to these three entities such as the capability to 1080 send requests or receive responses. This term will be used when 1081 describing functionality that is applicable to all three of these 1082 entities. 1084 RTSP session: A stateful abstraction upon which the main control 1085 methods of RTSP operate. An RTSP session is a server entity; it 1086 is created, maintained and destroyed by the server. It is 1087 established by an RTSP server upon the completion of a successful 1088 SETUP request (when a 200 OK response is sent) and is labelled 1089 with a session identifier at that time. The session exists until 1090 timed out by the server or explicitly removed by a TEARDOWN 1091 request. An RTSP session is a stateful entity; an RTSP server 1092 maintains an explicit session state machine (see Appendix A) where 1093 most state transitions are triggered by client requests. The 1094 existence of a session implies the existence of state about the 1095 session's media streams and their respective transport mechanisms. 1096 A given session can have one or more media streams associated with 1097 it. An RTSP server uses the session to aggregate control over 1098 multiple media streams. 1100 Transport initialization: The negotiation of transport information 1101 (e.g., port numbers, transport protocols) between the client and 1102 the server. 1104 URI: Universal Resource Identifier, see [RFC3986]. The URIs used in 1105 RTSP are generally URLs as they give a location for the resource. 1106 As URLs are a subset of URIs, they will be referred to as URIs to 1107 cover also the cases when an RTSP URI would not be an URL. 1109 URL: Universal Resource Locator, is an URI which identifies the 1110 resource through its primary access mechanism, rather than 1111 identifying the resource by name or by some other attribute(s) of 1112 that resource. 1114 4. Protocol Parameters 1116 4.1. RTSP Version 1118 This specification defines version 2.0 of RTSP. 1120 RTSP uses a "." numbering scheme to indicate versions 1121 of the protocol. The protocol versioning policy is intended to allow 1122 the sender to indicate the format of a message and its capacity for 1123 understanding further RTSP communication, rather than the features 1124 obtained via that communication. No change is made to the version 1125 number for the addition of message components which do not affect 1126 communication behavior or which only add to extensible field values. 1128 The number is incremented when the changes made to the 1129 protocol add features which do not change the general message parsing 1130 algorithm, but which may add to the message semantics and imply 1131 additional capabilities of the sender. The number is 1132 incremented when the format of a message within the protocol is 1133 changed. The version of an RTSP message is indicated by an RTSP- 1134 Version field in the first line of the message. Note that the major 1135 and minor numbers MUST be treated as separate integers and that each 1136 MAY be incremented higher than a single digit. Thus, RTSP/2.4 is a 1137 lower version than RTSP/2.13, which in turn is lower than RTSP/12.3. 1138 Leading zeros MUST be ignored by recipients and MUST NOT be sent. 1140 4.2. RTSP IRI and URI 1142 RTSP 2.0 defines and registers three URI schemes "rtsp", "rtsps" and 1143 "rtspu". The usage of the last, "rtspu", is unspecified in RTSP 2.0, 1144 and is defined here to register and reserve the URI scheme that is 1145 defined in RTSP 1.0. The "rtspu" scheme indicates undefined 1146 transport of the RTSP messages over unreliable transport (UDP). The 1147 syntax of "rtsp" and "rtsps" URIs has been changed from RTSP 1.0. 1149 This specification also defines the format of the RTSP IRI [RFC3987] 1150 that can be used as RTSP resource identifiers and locators, in web 1151 pages, user interfaces, on paper, etc. However, the RTSP request 1152 message format only allows usage of the absolute URI format. The 1153 RTSP IRI format MUST use the rules and transformation for IRIs 1154 defined in [RFC3987]. This way RTSP 2.0 URIs for request can be 1155 produced from an RTSP IRI. 1157 The RTSP IRI and URI are both syntax restricted compared to the 1158 generic syntax defined in [RFC3986] and RFC [RFC3987]: 1160 o An absolute URI requires the authority part; i.e., a host identity 1161 must be provided. 1163 o Parameters in the path element are prefixed with the reserved 1164 separator ";". 1166 The RTSP URI and IRI is case sensitive, with the exception of those 1167 parts that [RFC3986] and [RFC3987] defines as case-insensitive; for 1168 example, the scheme and host part. 1170 The fragment identifier is used as defined in sections 3.5 and 4.3 of 1171 [RFC3986], i.e. the fragment is to be stripped from the IRI by the 1172 requester and not included in the request URI. The user agent needs 1173 to interpret the value of the fragment based on the media type the 1174 request relates to; i.e., the media type indicated in Content-Type 1175 header in the response to DESCRIBE. 1177 The syntax of any URI query string is unspecified and responder 1178 (usually the server) specific. The query is, from the requester's 1179 perspective, an opaque string and needs to be handled as such. 1180 Please note that relative URI with queries are difficult to handle 1181 due to the RFC 3986 relative URI handling rules. Any change of the 1182 path element using a relative URI results in the stripping of the 1183 query. Which means the relative part needs to contain the query. 1185 The URI scheme "rtsp" requires that commands are issued via a 1186 reliable protocol (within the Internet, TCP), while the scheme 1187 "rtsps" identifies a reliable transport using secure transport (TLS 1188 [RFC5246], see (Section 19). 1190 For the scheme "rtsp", if no port number is provided in the authority 1191 part of the URI port number 554 MUST be used. For the scheme 1192 "rtsps", the TCP port 322 is registered and MUST be assumed. 1194 A presentation or a stream is identified by a textual media 1195 identifier, using the character set and escape conventions of URIs 1196 [RFC3986]. URIs may refer to a stream or an aggregate of streams; 1197 i.e., a presentation. Accordingly, requests described in 1198 (Section 13) can apply to either the whole presentation or an 1199 individual stream within the presentation. Note that some request 1200 methods can only be applied to streams, not presentations, and vice 1201 versa. 1203 For example, the RTSP URI: 1205 rtsp://media.example.com:554/twister/audiotrack 1207 may identify the audio stream within the presentation "twister", 1208 which can be controlled via RTSP requests issued over a TCP 1209 connection to port 554 of host media.example.com. 1211 Also, the RTSP URI: 1213 rtsp://media.example.com:554/twister 1215 identifies the presentation "twister", which may be composed of audio 1216 and video streams, but could also be something else like a random 1217 media redirector. 1219 This does not imply a standard way to reference streams in URIs. 1220 The presentation description defines the hierarchical 1221 relationships in the presentation and the URIs for the individual 1222 streams. A presentation description may name a stream "a.mov" and 1223 the whole presentation "b.mov". 1225 The path components of the RTSP URI are opaque to the client and do 1226 not imply any particular file system structure for the server. 1228 This decoupling also allows presentation descriptions to be used 1229 with non-RTSP media control protocols simply by replacing the 1230 scheme in the URI. 1232 4.3. Session Identifiers 1234 Session identifiers are strings of any arbitrary length but with a 1235 minimum length of 8 characters. A session identifier MUST be chosen 1236 cryptographically random (see [RFC4086]) and MUST be at least 8 1237 characters long (can contain a maximum of 48 bits of entropy) to make 1238 guessing it more difficult. It is RECOMMENDED that it contains 128 1239 bits of entropy, i.e. approximately 22 characters from a high quality 1240 generator. (see Section 21.) However, it needs to be noted that the 1241 session identifier does not provide any security against session 1242 hijacking unless it is kept confidential between client, server and 1243 trusted proxies. 1245 4.4. SMPTE Relative Timestamps 1247 A SMPTE relative timestamp expresses time relative to the start of 1248 the clip. Relative timestamps are expressed as SMPTE time codes for 1249 frame-level access accuracy. The time code has the format 1251 hours:minutes:seconds:frames.subframes, 1253 with the origin at the start of the clip. The default SMPTE format 1254 is "SMPTE 30 drop" format, with frame rate is 29.97 frames per 1255 second. Other SMPTE codes MAY be supported (such as "SMPTE 25") 1256 through the use of alternative use of "smpte-type". For SMPTE 30, 1257 the "frames" field in the time value can assume the values 0 through 1258 29. The difference between 30 and 29.97 frames per second is handled 1259 by dropping the first two frame indices (values 00 and 01) of every 1260 minute, except every tenth minute. If the frame and the subframe 1261 values are zero, they may be omitted. Subframes are measured in one- 1262 hundredth of a frame. 1264 Examples: 1266 smpte=10:12:33:20- 1267 smpte=10:07:33- 1268 smpte=10:07:00-10:07:33:05.01 1269 smpte-25=10:07:00-10:07:33:05.01 1271 4.5. Normal Play Time 1273 Normal play time (NPT) indicates the stream absolute position 1274 relative to the beginning of the presentation, not to be confused 1275 with the Network Time Protocol (NTP) [RFC1305]. The timestamp 1276 consists of a decimal fraction. The part left of the decimal may be 1277 expressed in either seconds or hours, minutes, and seconds. The part 1278 right of the decimal point measures fractions of a second. 1280 The beginning of a presentation corresponds to 0.0 seconds. Negative 1281 values are not defined. 1283 The special constant "now" is defined as the current instant of a 1284 live event. It MAY only be used for live events, and MUST NOT be 1285 used for on-demand (i.e., non-live) content. 1287 NPT is defined as in DSM-CC [ISO.13818-6.1995]: "Intuitively, NPT is 1288 the clock the viewer associates with a program. It is often 1289 digitally displayed on a VCR. NPT advances normally when in normal 1290 play mode (scale = 1), advances at a faster rate when in fast scan 1291 forward (high positive scale ratio), decrements when in scan reverse 1292 (high negative scale ratio) and is fixed in pause mode. NPT is 1293 (logically) equivalent to SMPTE time codes." 1295 Examples: 1297 npt=123.45-125 1298 npt=12:05:35.3- 1299 npt=now- 1301 The syntax conforms to ISO 8601 [ISO.8601.2000]. The npt-sec 1302 notation is optimized for automatic generation, the npt-hhmmss 1303 notation for consumption by human readers. The "now" constant 1304 allows clients to request to receive the live feed rather than the 1305 stored or time-delayed version. This is needed since neither 1306 absolute time nor zero time are appropriate for this case. 1308 4.6. Absolute Time 1310 Absolute time is expressed as ISO 8601 [ISO.8601.2000] timestamps, 1311 using UTC (GMT). Fractions of a second may be indicated. 1313 Example for November 8, 1996 at 14h37 and 20 and a quarter seconds 1314 UTC: 1316 19961108T143720.25Z 1318 4.7. Feature-Tags 1320 Feature-tags are unique identifiers used to designate features in 1321 RTSP. These tags are used in Require (Section 16.42), Proxy-Require 1322 (Section 16.35), Proxy-Supported (Section 16.36), and Unsupported 1323 (Section 16.53) header fields. 1325 A feature-tag definition MUST indicate which combination of clients, 1326 servers or proxies they applies to. 1328 The creator of a new RTSP feature-tag should either prefix the 1329 feature-tag with a reverse domain name (e.g., 1330 "com.example.mynewfeature" is an apt name for a feature whose 1331 inventor can be reached at "example.com"), or register the new 1332 feature-tag with the Internet Assigned Numbers Authority (IANA) (see 1333 IANA Section 22). 1335 The usage of feature-tags is further described in Section 11 that 1336 deals with capability handling. 1338 4.8. Message Body Tags 1340 Message body tags are opaque strings that are used to compare two 1341 message bodies from the same resource, for example in caches or to 1342 optimize setup after a redirect. Message body tags can be carried in 1343 the MTag header (see Section 16.30) or in SDP (see Appendix D.1.9). 1345 A message body tag MUST be unique across all versions of all message 1346 bodies associated with a particular resource. A given message body 1347 tag value MAY be used for message body obtained by requests on 1348 different URIs. The use of the same message body tag value in 1349 conjunction with message bodies obtained by requests on different 1350 URIs does not imply the equivalence of those message bodies 1352 Message body tags are used in RTSP to make some methods conditional. 1353 The methods are made conditional through the inclusion of headers, 1354 see Section 16.23 and Section 16.25. Note that RTSP message body 1355 tags apply to the complete presentation; i.e., both the session 1356 description and the individual media streams. Thus message body tags 1357 can be used to verify at setup time after a redirect that the same 1358 session description applies to the media at the new location using 1359 the If-Match header. 1361 4.9. Media Properties 1363 When RTSP handles media, it is important to consider the different 1364 properties a media instance for playback can have. This 1365 specification considers the below listed media properties in its 1366 protocol operations. They are derived from the differences between a 1367 number of supported usages. 1369 On-demand: Media that has a fixed (given) duration that doesn't 1370 change during the life time of the RTSP session and are known at 1371 the time of the creation of the session. It is expected that the 1372 content of the media will not change, even if the representation, 1373 i.e, encoding, quality, etc, may change. Generally one can seek 1374 within the media, i.e., randomly access any range of the media 1375 stream to playback. 1377 Dynamic On-demand: This is a variation of the on-demand case where 1378 external methods are used to manipulate the actual content of the 1379 media setup for the RTSP session. The main example is where a 1380 playlist determines the content of the session. 1382 Live: Live media represents a progressing content stream (such as 1383 broadcast TV) where the duration may or may not be known. It is 1384 not seekable, only the content presently being delivered can be 1385 accessed. 1387 Live with Recording: A Live stream that is combined with a server 1388 side capability to store and retain the content of the live 1389 session for random access playback within the part of the already 1390 recorded content. The actual behavior of the media stream is very 1391 much depending on the retention policy for the media stream. 1392 Either the server will be able to capture the complete media 1393 stream, or it will have a limitation in how much will be retained. 1394 The media range will dynamically change as the session progress. 1395 For servers with a limited amount of storage available for 1396 recording, there will be a sliding window that goes forwards while 1397 data is made available and content that is older than the 1398 limitation will be discarded. 1400 Considering the above usages one get the following media properties 1401 and their different instance values. 1403 4.9.1. Random Access 1405 Random Access, i.e. if one can request that the playback point is 1406 moved from one point in the media duration to another. The following 1407 different values are considered: 1409 Random Access: Yes the media are seekable to any out of a large 1410 number of points within the media. Due to media encoding 1411 limitations a particular point may not be reachable, but seeking 1412 to a point close by is enabled. A floating point number of 1413 seconds may be provided to express the worst case distance between 1414 random access points. 1416 Return To Start: Seeking is only possible to beginning of the 1417 content. 1419 No seeking: Seeking is not possible at all. 1421 4.9.2. Retention 1423 Media may have different retention policy in place that affect the 1424 operation on the media. The following different media retention 1425 policies are envisioned and taken into consideration where 1426 applicable. 1428 Unlimited: The media will not be removed as long as the RTSP session 1429 is in existence. 1431 Time Limited: The media will at least not be removed before given 1432 wallclock time. After that time it may or may not be available 1433 any more. 1435 Duration limited: Each individual unit of the media will be retained 1436 for the specified duration. 1438 4.9.3. Content Modifications 1440 There is also the question of how the content may change during time 1441 for a give media resource: 1443 Immutable: The content of the media will not change, even if the 1444 representation, i.e encoding, quality, etc, may change. 1446 Dynamic: Between explicit updates the media content will not change, 1447 but the content may change due to external methods or triggers, 1448 such as playlists. 1450 Time Progressing: As times progress new content will become 1451 available. If the content also is retained it will become longer 1452 and longer as everything between the start point and the point in 1453 currently being made available can be accessed. 1455 4.9.4. Supported Scale Factors 1457 The content is often limiting the possible rates of scale that can be 1458 supported when delivering the media. To enable the client to know 1459 what values or ranges of scale operations that the whole content or 1460 the current position supports a media properties attribute for this 1461 is defined. It contains a list with the values and/or ranges that 1462 are supported. The attribute is named "Scales". It may be updated 1463 at any point in the content due to content consisting of spliced 1464 pieces or content being dynamically updated by out of bands 1465 mechanisms. 1467 4.9.5. Mapping to the Attributes 1469 This section exemplifies how one would map the above listed usages to 1470 the properties and their values. 1472 On-demand: Random Access: Random Access=5s, Content Modifications: 1473 Immutable, Retention: unlimited or time limited. 1475 Dynamic On-demand: Random Access: Random Access=3s, Content 1476 Modifications: Dynamic, Retention: unlimited or time limited. 1478 Live: Random Access: No seeking, Content Modifications: Time 1479 Progressing, Retention: Duration limited=0.0s 1481 Live with Recording: Random Access: Random Access=3s, Content 1482 Modifications: Time Progressing, Retention: Duration limited=2H 1484 5. RTSP Message 1486 RTSP is a text-based protocol and uses the ISO 10646 character set in 1487 UTF-8 encoding (RFC 3629 [RFC3629]). Lines MUST be terminated by 1488 CRLF. 1490 Text-based protocols make it easier to add optional parameters in 1491 a self-describing manner. Since the number of parameters and the 1492 frequency of commands is low, processing efficiency is not a 1493 concern. Text-based protocols, if done carefully, also allow easy 1494 implementation of research prototypes in scripting languages such 1495 as TCL, Visual Basic and Perl. 1497 The ISO 10646 character set avoids tricky character set switching, 1498 but is invisible to the application as long as US-ASCII is being 1499 used. This is also the encoding used for RTCP [RFC3550]. ISO 8859-1 1500 translates directly into Unicode with a high-order octet of zero. 1501 ISO 8859-1 characters with the most-significant bit set are 1502 represented as 1100001x 10xxxxxx. (See RFC 3629 [RFC3629]) 1504 Requests contain methods, the object the method is operating upon and 1505 parameters to further describe the method. Methods are idempotent 1506 unless otherwise noted. Methods are also designed to require little 1507 or no state maintenance at the media server. 1509 5.1. Message Types 1511 RTSP messages consist of requests from client to server, or server to 1512 client, and responses in the reverse direction. Request ( 1513 (Section 7) ) and Response (Section 8) messages use the generic 1514 message format of RFC 822 [RFC0822] for transferring entities (the 1515 payload of the message). Both types of message consist of a start- 1516 line, zero or more header fields (also known as "headers"), an empty 1517 line (i.e., a line with nothing preceding the CRLF) indicating the 1518 end of the header, and possibly a message-body. 1520 generic-message = start-line 1521 *(message-header CRLF) 1522 CRLF 1523 [ message-body ] 1524 start-line = Request-Line | Status-Line 1526 In the interest of robustness, servers SHOULD ignore any empty 1527 line(s) received where a Request-Line is expected. In other words, 1528 if the server is reading the protocol stream at the beginning of a 1529 message and receives a CRLF first, it should ignore the CRLF. 1531 5.2. Message Headers 1533 RTSP header fields (see Section 16) include general-header, request- 1534 header, response-header, and entity-header fields. 1536 The order in which header fields with differing field names are 1537 received is not significant. However, it is "good practice" to send 1538 general-header fields first, followed by request-header or response- 1539 header fields, and ending with the entity-header fields. 1541 Multiple message-header fields with the same field-name MAY be 1542 present in a message if and only if the entire field-value for that 1543 header field is defined as a comma-separated list [i.e., #(values)]. 1544 It MUST be possible to combine the multiple header fields into one 1545 "field-name: field-value" pair, without changing the semantics of the 1546 message, by appending each subsequent field-value to the first, each 1547 separated by a comma. The order in which header fields with the same 1548 field-name are received is therefore significant to the 1549 interpretation of the combined field value, and thus a proxy MUST NOT 1550 change the order of these field values when a message is forwarded. 1552 Unknown message headers MUST be ignored by a RTSP server or client. 1553 An RTSP Proxy MUST forward unknown message headers. Message headers 1554 defined outside of this specification that are required to be 1555 interpret by the RTSP agent will need to use feature tags 1556 (Section 4.7) and include it in the appropriate Require 1557 (Section 16.42) or Proxy-Require (Section 16.35) header. 1559 5.3. Message Body 1561 The message-body (if any) of an RTSP message is used to carry further 1562 information for a particular resource associated with the request or 1563 response. An example for a message body is the Session Description 1564 Protocol (SDP). 1566 The presence of a message-body in either a request or a response MUST 1567 be signaled by the inclusion of a Content-Length header (see 1568 Section 16.16). 1570 The presence of a message-body in a request is signaled by the 1571 inclusion of a Content-Length header field in the RTSP message. A 1572 message-body MUST NOT be included in a request or response if the 1573 specification of the particular method (see Method Definitions 1574 (Section 13)) does not allow sending an message body. A server 1575 SHOULD read and forward a message-body on any request; if the request 1576 method does not include defined semantics for a message body, then 1577 the message-body SHOULD be ignored when handling the request. 1579 5.4. Message Length 1581 When a message body is included with a message, the length of that 1582 body is determined by one of the following (in order of precedence): 1584 1. Any response message which MUST NOT include a message body (such 1585 as the 1xx, 204, and 304 responses) is always terminated by the 1586 first empty line after the header fields, regardless of the 1587 message-header fields present in the message. (Note: An empty 1588 line is a line with nothing preceding the CRLF.) 1590 2. If a Content-Length header(Section 16.16) is present, its value 1591 in bytes represents the length of the message-body. If this 1592 header field is not present, a value of zero is assumed. 1594 Unlike an HTTP message, an RTSP message MUST contain a Content-Length 1595 header whenever it contains a message body. Note that RTSP does not 1596 support the HTTP/1.1 "chunked" transfer coding (see [H3.6.1]). 1598 Given the moderate length of presentation descriptions returned, 1599 the server should always be able to determine its length, even if 1600 it is generated dynamically, making the chunked transfer encoding 1601 unnecessary. 1603 6. General Header Fields 1605 The general headers are listed in Table 1: 1607 +--------------------+--------------------+ 1608 | Header Name | Defined in Section | 1609 +--------------------+--------------------+ 1610 | Cache-Control | Section 16.10 | 1611 | | | 1612 | Connection | Section 16.11 | 1613 | | | 1614 | CSeq | Section 16.19 | 1615 | | | 1616 | Date | Section 16.20 | 1617 | | | 1618 | Media-Properties | Section 16.28 | 1619 | | | 1620 | Media-Range | Section 16.29 | 1621 | | | 1622 | Pipelined-Requests | Section 16.32 | 1623 | | | 1624 | Proxy-Supported | Section 16.36 | 1625 | | | 1626 | Seek-Style | Section 16.45 | 1627 | | | 1628 | Supported | Section 16.49 | 1629 | | | 1630 | Timestamp | Section 16.51 | 1631 | | | 1632 | Via | Section 16.56 | 1633 +--------------------+--------------------+ 1635 Table 1: The general headers used in RTSP 1637 7. Request 1639 A request message uses the format outlined below regardless of the 1640 direction of a request, client to server or server to client: 1642 o Request line, containing the method to be applied to the resource, 1643 the identifier of the resource, and the protocol version in use; 1645 o Zero or more Header lines, that can be of the following types: 1646 general (Section 6), request (Section 7.2), or message 1647 body(Section 9.1); 1649 o One empty line (CRLF) to indicate the end of the header section; 1651 o Optionally a message-body, consisting of one or more lines. The 1652 length of the message body in bytes is indicated by the Content- 1653 Length message header. 1655 7.1. Request Line 1657 The request line provides the key information about the request: what 1658 method, on what resources and using which RTSP version. The methods 1659 that are defined by this specification are listed in Table 2. 1661 +---------------+--------------------+ 1662 | Method | Defined in Section | 1663 +---------------+--------------------+ 1664 | DESCRIBE | Section 13.2 | 1665 | | | 1666 | GET_PARAMETER | Section 13.8 | 1667 | | | 1668 | OPTIONS | Section 13.1 | 1669 | | | 1670 | PAUSE | Section 13.6 | 1671 | | | 1672 | PLAY | Section 13.4 | 1673 | | | 1674 | PLAY_NOTIFY | Section 13.5 | 1675 | | | 1676 | REDIRECT | Section 13.10 | 1677 | | | 1678 | SETUP | Section 13.3 | 1679 | | | 1680 | SET_PARAMETER | Section 13.9 | 1681 | | | 1682 | TEARDOWN | Section 13.7 | 1683 +---------------+--------------------+ 1685 Table 2: The RTSP Methods 1687 The syntax of the RTSP request line is the following: 1689 CRLF 1691 Note: This syntax cannot be freely changed in future versions of 1692 RTSP. This line needs to remain parsable by older RTSP 1693 implementations since it indicates the RTSP version of the message. 1695 In contrast to HTTP/1.1 [RFC2616], RTSP requests identify the 1696 resource through an absolute RTSP URI (scheme, host, and port) (see 1697 Section 4.2) rather than just the absolute path. 1699 HTTP/1.1 requires servers to understand the absolute URI, but 1700 clients are supposed to use the Host request header. This is 1701 purely needed for backward-compatibility with HTTP/1.0 servers, a 1702 consideration that does not apply to RTSP. 1704 An asterisk "*" can be used instead of an absolute URI in the 1705 Request-URI part to indicate that the request does not apply to a 1706 particular resource, but to the server or proxy itself, and is only 1707 allowed when the request method does not necessarily apply to a 1708 resource. 1710 For example: 1712 OPTIONS * RTSP/2.0 1714 An OPTIONS in this form will determine the capabilities of the server 1715 or the proxy that first receives the request. If the capability of 1716 the specific server needs to be determined, without regard to the 1717 capability of an intervening proxy, the server should be addressed 1718 explicitly with an absolute URI that contains the server's address. 1720 For example: 1722 OPTIONS rtsp://example.com RTSP/2.0 1724 7.2. Request Header Fields 1726 The RTSP headers in Table 3 can be included in a request, as request 1727 headers, to modify the specifics of the request. Some of these 1728 headers may also be used in the response to a request, as response 1729 headers, to modify the specifics of a response (Section 8.2). 1731 +--------------------+--------------------+ 1732 | Header | Defined in Section | 1733 +--------------------+--------------------+ 1734 | Accept | Section 16.1 | 1735 | | | 1736 | Accept-Credentials | Section 16.2 | 1737 | | | 1738 | Accept-Encoding | Section 16.3 | 1739 | | | 1740 | Accept-Language | Section 16.4 | 1741 | | | 1742 | Authorization | Section 16.7 | 1743 | | | 1744 | Bandwidth | Section 16.8 | 1745 | | | 1746 | Blocksize | Section 16.9 | 1747 | | | 1748 | From | Section 16.22 | 1749 | | | 1750 | If-Match | Section 16.23 | 1751 | | | 1752 | If-Modified-Since | Section 16.24 | 1753 | | | 1754 | If-None-Match | Section 16.25 | 1755 | | | 1756 | Notify-Reason | Section 16.31 | 1757 | | | 1758 | Proxy-Require | Section 16.35 | 1759 | | | 1760 | Range | Section 16.38 | 1761 | | | 1762 | Terminate-Reason | Section 16.50 | 1763 | | | 1764 | Referer | Section 16.39 | 1765 | | | 1766 | Request-Status | Section 16.41 | 1767 | | | 1768 | Require | Section 16.42 | 1769 | | | 1770 | Scale | Section 16.44 | 1771 | | | 1772 | Session | Section 16.48 | 1773 | | | 1774 | Speed | Section 16.46 | 1775 | | | 1776 | Supported | Section 16.49 | 1777 | | | 1778 | Transport | Section 16.52 | 1779 | | | 1780 | User-Agent | Section 16.54 | 1781 +--------------------+--------------------+ 1783 Table 3: The RTSP request headers 1785 Detailed headers definition are provided in Section 16. 1787 New request headers may be defined. If the receiver of the request 1788 is required to understand the request header, the request MUST 1789 include a corresponding feature tag in a Require or Proxy-Require 1790 header to ensure the processing of the header. 1792 8. Response 1794 After receiving and interpreting a request message, the recipient 1795 responds with an RTSP response message. The final response is 1796 exactly one message, and final responses are any using the response 1797 code classes from the list; 2xx, 3xx, 4xx and 5xx classes. Only for 1798 responses using the response code class 1xx, is it allowed to send 1799 one or more 1xx response messages prior to the final response 1800 message. 1802 The valid response codes and the methods they can be used with are 1803 listed in Table 4. 1805 8.1. Status-Line 1807 The first line of a Response message is the Status-Line, consisting 1808 of the protocol version followed by a numeric status code and the 1809 textual phrase associated with the status code, with each element 1810 separated by SP characters. No CR or LF is allowed except in the 1811 final CRLF sequence. 1813 SP SP CRLF 1815 8.1.1. Status Code and Reason Phrase 1817 The Status-Code element is a 3-digit integer result code of the 1818 attempt to understand and satisfy the request. These codes are fully 1819 defined in Section 15. The Reason-Phrase is intended to give a short 1820 textual description of the Status-Code. The Status-Code is intended 1821 for use by automata and the Reason-Phrase is intended for the human 1822 user. The client is not required to examine or display the Reason- 1823 Phrase. 1825 The first digit of the Status-Code defines the class of response. 1826 The last two digits do not have any categorization role. There are 5 1827 values for the first digit: 1829 1xx: Informational - Request received, continuing process 1831 2xx: Success - The action was successfully received, understood, and 1832 accepted 1834 3rr: Redirection - Further action needs to be taken in order to 1835 complete the request 1837 4xx: Client Error - The request contains bad syntax or cannot be 1838 fulfilled 1840 5xx: Server Error - The server failed to fulfill an apparently valid 1841 request 1843 The individual values of the numeric status codes defined for 1844 RTSP/2.0, and an example set of corresponding Reason-Phrases, are 1845 presented in Table 4. The reason phrases listed here are only 1846 recommended; they may be replaced by local equivalents without 1847 affecting the protocol. Note that RTSP adopts most HTTP/1.1 1848 [RFC2616] status codes and adds RTSP-specific status codes starting 1849 at x50 to avoid conflicts with newly defined HTTP status codes. 1851 RTSP status codes are extensible. RTSP applications are not required 1852 to understand the meaning of all registered status codes, though such 1853 understanding is obviously desirable. However, applications MUST 1854 understand the class of any status code, as indicated by the first 1855 digit, and treat any unrecognized response as being equivalent to the 1856 x00 status code of that class, with the exception that an 1857 unrecognized response MUST NOT be cached. For example, if an 1858 unrecognized status code of 431 is received by the client, it can 1859 safely assume that there was something wrong with its request and 1860 treat the response as if it had received a 400 status code. In such 1861 cases, user agents SHOULD present to the user the message body 1862 returned with the response, since that message body is likely to 1863 include human-readable information which will explain the unusual 1864 status. 1866 +------+----------------------------------------+-----------------+ 1867 | Code | Reason | Method | 1868 +------+----------------------------------------+-----------------+ 1869 | 100 | Continue | all | 1870 | | | | 1871 | | | | 1872 | 200 | OK | all | 1873 | | | | 1874 | | | | 1875 | 301 | Moved Permanently | all | 1876 | | | | 1877 | 302 | Found | all | 1878 | | | | 1879 | 304 | Not Modified | all | 1880 | | | | 1881 | 305 | Use Proxy | all | 1882 | | | | 1883 | | | | 1884 | 400 | Bad Request | all | 1885 | 401 | Unauthorized | all | 1886 | | | | 1887 | 402 | Payment Required | all | 1888 | | | | 1889 | 403 | Forbidden | all | 1890 | | | | 1891 | 404 | Not Found | all | 1892 | | | | 1893 | 405 | Method Not Allowed | all | 1894 | | | | 1895 | 406 | Not Acceptable | all | 1896 | | | | 1897 | 407 | Proxy Authentication Required | all | 1898 | | | | 1899 | 408 | Request Timeout | all | 1900 | | | | 1901 | 410 | Gone | all | 1902 | | | | 1903 | 411 | Length Required | all | 1904 | | | | 1905 | 412 | Precondition Failed | DESCRIBE, SETUP | 1906 | | | | 1907 | 413 | Request Message Body Too Large | all | 1908 | | | | 1909 | 414 | Request-URI Too Long | all | 1910 | | | | 1911 | 415 | Unsupported Media Type | all | 1912 | | | | 1913 | 451 | Parameter Not Understood | SET_PARAMETER | 1914 | | | | 1915 | 452 | reserved | n/a | 1916 | | | | 1917 | 453 | Not Enough Bandwidth | SETUP | 1918 | | | | 1919 | 454 | Session Not Found | all | 1920 | | | | 1921 | 455 | Method Not Valid In This State | all | 1922 | | | | 1923 | 456 | Header Field Not Valid | all | 1924 | | | | 1925 | 457 | Invalid Range | PLAY, PAUSE | 1926 | | | | 1927 | 458 | Parameter Is Read-Only | SET_PARAMETER | 1928 | | | | 1929 | 459 | Aggregate Operation Not Allowed | all | 1930 | | | | 1931 | 460 | Only Aggregate Operation Allowed | all | 1932 | | | | 1933 | 461 | Unsupported Transport | all | 1934 | | | | 1935 | 462 | Destination Unreachable | all | 1936 | | | | 1937 | 463 | Destination Prohibited | SETUP | 1938 | | | | 1939 | 464 | Data Transport Not Ready Yet | PLAY | 1940 | | | | 1941 | 465 | Notification Reason Unknown | PLAY_NOTIFY | 1942 | | | | 1943 | 470 | Connection Authorization Required | all | 1944 | | | | 1945 | 471 | Connection Credentials not accepted | all | 1946 | | | | 1947 | 472 | Failure to establish secure connection | all | 1948 | | | | 1949 | | | | 1950 | 500 | Internal Server Error | all | 1951 | | | | 1952 | 501 | Not Implemented | all | 1953 | | | | 1954 | 502 | Bad Gateway | all | 1955 | | | | 1956 | 503 | Service Unavailable | all | 1957 | | | | 1958 | 504 | Gateway Timeout | all | 1959 | | | | 1960 | 505 | RTSP Version Not Supported | all | 1961 | | | | 1962 | 551 | Option not support | all | 1963 +------+----------------------------------------+-----------------+ 1965 Table 4: Status codes and their usage with RTSP methods 1967 8.2. Response Headers 1969 The response-header allow the request recipient to pass additional 1970 information about the response which cannot be placed in the Status- 1971 Line. This header give information about the server and about 1972 further access to the resource identified by the Request-URI. All 1973 headers currently classified as response headers are listed in 1974 Table 5. 1976 +------------------------+--------------------+ 1977 | Header | Defined in Section | 1978 +------------------------+--------------------+ 1979 | Accept-Credentials | Section 16.2 | 1980 | | | 1981 | Accept-Ranges | Section 16.5 | 1982 | | | 1983 | Connection-Credentials | Section 16.12 | 1984 | | | 1985 | MTag | Section 16.30 | 1986 | | | 1987 | Location | Section 16.27 | 1988 | | | 1989 | Proxy-Authenticate | Section 16.33 | 1990 | | | 1991 | Public | Section 16.37 | 1992 | | | 1993 | Range | Section 16.38 | 1994 | | | 1995 | Retry-After | Section 16.40 | 1996 | | | 1997 | RTP-Info | Section 16.43 | 1998 | | | 1999 | Scale | Section 16.44 | 2000 | | | 2001 | Session | Section 16.48 | 2002 | | | 2003 | Server | Section 16.47 | 2004 | | | 2005 | Speed | Section 16.46 | 2006 | | | 2007 | Transport | Section 16.52 | 2008 | | | 2009 | Unsupported | Section 16.53 | 2010 | | | 2011 | Vary | Section 16.55 | 2012 | | | 2013 | WWW-Authenticate | Section 16.57 | 2014 +------------------------+--------------------+ 2016 Table 5: The RTSP response headers 2018 Response-headers names can be extended reliably only in combination 2019 with a change in the protocol version. However the usage of feature- 2020 tags in the request allows the responding party to learn the 2021 capability of the receiver of the response. New or experimental 2022 header MAY be given the semantics of response-header if all parties 2023 in the communication recognize them to be response-header. 2025 Unrecognized headers in responses are treated as message-headers. 2027 9. Message Body 2029 Request and Response messages MAY transfer a message body if not 2030 otherwise restricted by the request method or response status code. 2031 An message body consists of message-header fields and an message- 2032 body, although some responses will only include the message-headers. 2034 The SET_PARAMETER and GET_PARAMETER request and response, and 2035 DESCRIBE response MAY have an message body. All 4xx and 5xx 2036 responses MAY also have an message body. 2038 In this section, both sender and recipient refer to either the client 2039 or the server, depending on who sends and who receives the message 2040 body. 2042 9.1. Message Body Header Fields 2044 message-header fields define meta-information about the message-body 2045 or, if no body is present, about the resource identified by the 2046 request. The message body header fields are listed in Table 6. 2048 +------------------+--------------------+ 2049 | Header | Defined in Section | 2050 +------------------+--------------------+ 2051 | Allow | Section 16.6 | 2052 | | | 2053 | Content-Base | Section 16.13 | 2054 | | | 2055 | Content-Encoding | Section 16.14 | 2056 | | | 2057 | Content-Language | Section 16.15 | 2058 | | | 2059 | Content-Length | Section 16.16 | 2060 | | | 2061 | Content-Location | Section 16.17 | 2062 | | | 2063 | Content-Type | Section 16.18 | 2064 | | | 2065 | Expires | Section 16.21 | 2066 | | | 2067 | Last-Modified | Section 16.26 | 2068 +------------------+--------------------+ 2070 Table 6: The RTSP message body headers 2072 The extension-header mechanism allows additional message-header 2073 fields to be defined without changing the protocol, but these fields 2074 cannot be assumed to be recognizable by the recipient. Unrecognized 2075 header fields SHOULD be ignored by the recipient and forwarded by 2076 proxies. 2078 9.2. Message Body 2080 RTSP message with an message body MUST include the Content-Type and 2081 Content-Length headers if a message body is included. 2083 When an message body is included with a message, the data type of 2084 that body is determined via the header fields Content-Type and 2085 Content-Encoding. 2087 Content-Type specifies the media type of the underlying data. 2088 Content-Encoding may be used to indicate any additional content 2089 codings applied to the data, usually for the purpose of data 2090 compression, that are a property of the requested resource. There is 2091 no default encoding. 2093 The Content-Length of a message is the length of the message-body. 2095 10. Connections 2097 RTSP requests can be transmitted using the two different connection 2098 scenarios listed below: 2100 o persistent - a transport connection is used for several request/ 2101 response transactions; 2103 o transient - a transport connection is used for a single request/ 2104 response transaction. 2106 RFC 2326 attempted to specify an optional mechanism for transmitting 2107 RTSP messages in connectionless mode over a transport protocol such 2108 as UDP. However, it was not specified in sufficient detail to allow 2109 for interoperable implementations. In an attempt to reduce 2110 complexity and scope, and due to lack of interest, RTSP 2.0 does not 2111 attempt to define a mechanism for supporting RTSP over UDP or other 2112 connectionless transport protocols. A side-effect of this is that 2113 RTSP requests MUST NOT be sent to multicast groups since no 2114 connection can be established with a specific receiver in multicast 2115 environments. 2117 Certain RTSP headers, such as the CSeq header (Section 16.19), which 2118 may appear to be relevant only to connectionless transport scenarios 2119 are still retained and must be implemented according to the 2120 specification. In the case of CSeq, it is quite useful for matching 2121 responses to requests if the requests are pipelined (see Section 12). 2122 It is also useful in proxies for keeping track of the different 2123 requests when aggregating several client requests on a single TCP 2124 connection. 2126 10.1. Reliability and Acknowledgements 2128 When RTSP messages are transmitted using reliable transport 2129 protocols, they MUST NOT be retransmitted at the RTSP protocol level. 2130 Instead, the implementation must rely on the underlying transport to 2131 provide reliability. The RTSP implementation may use any indication 2132 of reception acknowledgement of the message from the underlying 2133 transport protocols to optimize the RTSP behavior. 2135 If both the underlying reliable transport such as TCP and the RTSP 2136 application retransmit requests, each packet loss or message loss 2137 may result in two retransmissions. The receiver typically cannot 2138 take advantage of the application-layer retransmission since the 2139 transport stack will not deliver the application-layer 2140 retransmission before the first attempt has reached the receiver. 2141 If the packet loss is caused by congestion, multiple 2142 retransmissions at different layers will exacerbate the 2143 congestion. 2145 Lack of acknowledgement of an RTSP request should be handled within 2146 the constraints of the connection timeout considerations described 2147 below (Section 10.4). 2149 10.2. Using Connections 2151 A TCP transport can be used for both persistent connections (for 2152 several message exchanges) and transient connections (for a single 2153 message exchange). Implementations of this specification MUST 2154 support RTSP over TCP. The scheme of the RTSP URI (Section 4.2) 2155 indicates the default port that the server will listen on. 2157 A server MUST handle both persistent and transient connections. 2159 Transient connections facilitate mechanisms for fault tolerance. 2160 They also allow for application layer mobility. A server and 2161 client pair that support transient connections can survive the 2162 loss of a TCP connection; e.g., due to a NAT timeout. When the 2163 client has discovered that the TCP connection has been lost, it 2164 can set up a new one when there is need to communicate again. 2166 A persistent connection is RECOMMENDED be used for all transactions 2167 between the server and client, including messages for multiple RTSP 2168 sessions. However a persistent connection MAY be closed after a few 2169 message exchanges. For example, a client may use a persistent 2170 connection for the initial SETUP and PLAY message exchanges in a 2171 session and then close the connection. Later, when the client wishes 2172 to send a new request, such as a PAUSE for the session, a new 2173 connection would be opened. This connection may either be transient 2174 or persistent. 2176 An RTSP agent SHOULD NOT have more than one connection to the server 2177 at any given point. If a client or proxy handles multiple RTSP 2178 sessions on the same server, it SHOULD use only one connection for 2179 managing those sessions. 2181 This saves connection resources on the server. It also reduces 2182 complexity by and enabling the server to maintain less state about 2183 its sessions and connections. 2185 RTSP allows a server to send requests to a client. However, this can 2186 be supported only if a client establishes a persistent connection 2187 with the server. In cases where a persistent connection does not 2188 exist between a server and its client, due to the lack of a 2189 signalling channel the server may be forced to silently discard RTSP 2190 messages, and may even drop an RTSP session without notifying the 2191 client. An example of such a case is when the server desires to send 2192 a REDIRECT request for an RTSP session to the client but is not able 2193 to do so because it cannot reach the client. A server that attempt 2194 to send a request to a client that has no connection currently to the 2195 server SHOULD discard the request directly, it MAY queue it for later 2196 delivery. However, if the server queue the request it should when 2197 adding additional requests to the queue ensure to remove older 2198 requests that are now redundant. 2200 Without a persistent connection between the client and the server, 2201 the media server has no reliable way of reaching the client. 2202 Because the likely failure of server to client established 2203 connections the server will not even attempt establishing any 2204 connection. 2206 The client and server sending requests can be asynchronous events. 2207 To avoid deadlock situations both client and server MUST be able to 2208 send and receive requests simultaneously. As an RTSP response may be 2209 queue up for transmission, reception or processing behind the peer 2210 RTSP agent's own requests, all RTSP agents are required to have a 2211 certain capability of handling outstanding messages. The issue is 2212 that outstanding requests may timeout despite them being processed by 2213 the peer due to the response is caught in the queue behind a number 2214 of request that the RTSP agent is processing but that take some time 2215 to complete. To avoid this problem an RTSP agent is recommended to 2216 buffer incoming messages locally so that any response messages can be 2217 processed immediately upon reception. If responses are separated 2218 from requests and directly forwarded for processing can not only the 2219 result be used immediately, the state associated with that 2220 outstanding request can also be released. However, buffering a 2221 number of requests on the receiving RTSP agent consumes resources and 2222 enables a resource exhaustion attack on the agent. Therefore this 2223 buffer should be limited so that an unreasonable number of requests 2224 or total message size is not allowed to consume the receiving agents 2225 resources. In most APIs having the receiving agent stop reading from 2226 the TCP socket will result in TCP's window being clamped. Thus 2227 forcing the buffering on the sending agent when the load is larger 2228 than expected. However, as both RTSP message sizes and frequency may 2229 be changed in the future by protocol extension an agent should be 2230 careful against taking harsher measurements against a potential 2231 attack. When under attack an RTSP agent can close TCP connections 2232 and release state associated with that TCP connection. 2234 To provide some guidance on what is reasonable the following 2235 guidelines are given. An RTSP agent should not have more than 10 2236 outstanding requests per RTSP session. An RTSP agent should not have 2237 more than 10 outstanding requests that aren't related to an RTSP 2238 session or that are requesting to create an RTSP session. 2240 In light of the above, it is RECOMMENDED that clients use persistent 2241 connections whenever possible. A client that supports persistent 2242 connections MAY "pipeline" its requests (see Section 12). 2244 10.3. Closing Connections 2246 The client MAY close a connection at any point when no outstanding 2247 request/response transactions exist for any RTSP session being 2248 managed through the connection. The server, however, SHOULD NOT 2249 close a connection until all RTSP sessions being managed through the 2250 connection have been timed out (Section 16.48). A server SHOULD NOT 2251 close a connection immediately after responding to a session-level 2252 TEARDOWN request for the last RTSP session being controlled through 2253 the connection. Instead, it should wait for a reasonable amount of 2254 time for the client to receive the TEARDOWN response, take 2255 appropriate action, and initiate the connection closing. The server 2256 SHOULD wait at least 10 seconds after sending the TEARDOWN response 2257 before closing the connection. 2259 This is to ensure that the client has time to issue a SETUP for a 2260 new session on the existing connection after having torn the last 2261 one down. 10 seconds should give the client ample opportunity get 2262 its message to the server. 2264 A server SHOULD NOT close the connection directly as a result of 2265 responding to a request with an error code. 2267 Certain error responses such as "460 Only Aggregate Operation 2268 Allowed" (Section 15.4.25) are used for negotiating capabilities 2269 of a server with respect to content or other factors. In such 2270 cases, it is inefficient for the server to close a connection on 2271 an error response. Also, such behavior would prevent 2272 implementation of advanced/special types of requests or result in 2273 extra overhead for the client when testing for new features. On 2274 the flip side, keeping connections open after sending an error 2275 response poses a Denial of Service security risk (Section 21). 2277 If a server closes a connection while the client is attempting to 2278 send a new request, the client will have to close its current 2279 connection, establish a new connection and send its request over the 2280 new connection. 2282 An RTSP message should not be terminated by closing the connection. 2283 Such a message MAY be considered to be incomplete by the receiver and 2284 discarded. An RTSP message is properly terminated as defined in 2285 Section 5. 2287 10.4. Timing Out Connections and RTSP Messages 2289 Receivers of a request (responder) SHOULD respond to requests in a 2290 timely manner even when a reliable transport such as TCP is used. 2291 Similarly, the sender of a request (requester) SHOULD wait for a 2292 sufficient time for a response before concluding that the responder 2293 will not be acting upon its request. 2295 A responder SHOULD respond to all requests within 5 seconds. If the 2296 responder recognizes that processing of a request will take longer 2297 than 5 seconds, it SHOULD send a 100 (Continue) response as soon as 2298 possible. It SHOULD continue sending a 100 response every 5 seconds 2299 thereafter until it is ready to send the final response to the 2300 requester. After sending a 100 response, the receiver MUST send a 2301 final response indicating the success or failure of the request. 2303 A requester SHOULD wait at least 10 seconds for a response before 2304 concluding that the responder will not be responding to its request. 2305 After receiving a 100 response, the requester SHOULD continue waiting 2306 for further responses. If more than 10 seconds elapses without 2307 receiving any response, the requester MAY assume that the responder 2308 is unresponsive and abort the connection. 2310 A requester SHOULD wait longer than 10 seconds for a response if it 2311 is experiencing significant transport delays on its connection to the 2312 responder. The requester is capable of determining the RTT of the 2313 request/response cycle using the Timestamp header (Section 16.51) in 2314 any RTSP request. 2316 10 seconds was chosen for the following reasons. It gives TCP 2317 time to perform a couple of retransmissions, even if operating on 2318 default values. It is short enough that users may not abandon the 2319 process themselves. However, it should be noted that 10 seconds 2320 can be aggressive on certain type of networks. The 5 seconds 2321 value for 1xx messages is half the timeout giving a reasonable 2322 change of successful delivery before timeout happens on the 2323 requestor side. 2325 10.5. Showing Liveness 2327 The mechanisms for showing liveness of the client is, any RTSP 2328 request with a Session header, if RTP & RTCP is used an RTCP message, 2329 or through any other used media protocol capable of indicating 2330 liveness of the RTSP client. It is RECOMMENDED that a client does 2331 not wait to the last second of the timeout before trying to send a 2332 liveness message. The RTSP message may be lost or when using 2333 reliable protocols, such as TCP, the message may take some time to 2334 arrive safely at the receiver. To show liveness between RTSP request 2335 issued to accomplish other things, the following mechanisms can be 2336 used, in descending order of preference: 2338 RTCP: If RTP is used for media transport RTCP SHOULD be used. If 2339 RTCP is used to report transport statistics, it MUST also work 2340 as keep alive. The server can determine the client by used 2341 network address and port together with the fact that the client 2342 is reporting on the servers SSRC(s). A downside of using RTCP 2343 is that it only gives statistical guarantees to reach the 2344 server. However that probability is so low that it can be 2345 ignored in most cases. For example, a session with 60 seconds 2346 timeout and enough bitrate assigned to RTCP messages to send a 2347 message from client to server on average every 5 seconds. That 2348 client have for a network with 5 % packet loss, the probability 2349 to fail showing liveness sign in that session within the 2350 timeout interval of 2.4*E-16. In sessions with shorter timeout 2351 times, or much higher packet loss, or small RTCP bandwidths 2352 SHOULD also use any of the mechanisms below. 2354 SET_PARAMETER: When using SET_PARAMETER for keep alive, no body 2355 SHOULD be included. This method is the RECOMMENDED RTSP method 2356 to use in request only intended to perform keep-alive. 2358 OPTIONS: This method is also usable, but it causes the server to 2359 perform more unnecessary processing and result in bigger 2360 responses than necessary for the task. The reason is that the 2361 server needs to determine the capabilities associated with the 2362 media resource to correctly populate the Public and Allow 2363 headers. 2365 The timeout parameter MAY be included in a SETUP response, and MUST 2366 NOT be included in requests. The server uses it to indicate to the 2367 client how long the server is prepared to wait between RTSP commands 2368 or other signs of life before closing the session due to lack of 2369 activity (see below and Appendix B). The timeout is measured in 2370 seconds, with a default of 60 seconds. The length of the session 2371 timeout MUST NOT be changed in a established session. 2373 10.6. Use of IPv6 2375 Explicit IPv6 support was not present in RTSP 1.0 (RFC 2326). RTSP 2376 2.0 has been updated for explicit IPv6 support. Implementations of 2377 RTSP 2.0 MUST understand literal IPv6 addresses in URIs and headers. 2379 11. Capability Handling 2381 This section describes the available capability handling mechanism 2382 which allows RTSP to be extended. Extensions to this version of the 2383 protocol are basically done in two ways. First, new headers can be 2384 added. Secondly, new methods can be added. The capability handling 2385 mechanism is designed to handle both cases. 2387 When a method is added, the involved parties can use the OPTIONS 2388 method to discover whether it is supported. This is done by issuing 2389 a OPTIONS request to the other party. Depending on the URI it will 2390 either apply in regards to a certain media resource, the whole server 2391 in general, or simply the next hop. The OPTIONS response MUST 2392 contain a Public header which declares all methods supported for the 2393 indicated resource. 2395 It is not necessary to use OPTIONS to discover support of a method, 2396 the client could simply try the method. If the receiver of the 2397 request does not support the method it will respond with an error 2398 code indicating the method is either not implemented (501) or does 2399 not apply for the resource (405). The choice between the two 2400 discovery methods depends on the requirements of the service. 2402 Feature-Tags are defined to handle functionality additions that are 2403 not new methods. Each feature-tag represents a certain block of 2404 functionality. The amount of functionality that a feature-tag 2405 represents can vary significantly. A feature-tag can for example 2406 represent the functionality a single RTSP header provides. Another 2407 feature-tag can represent much more functionality, such as the 2408 "play.basic" feature-tag which represents the minimal playback 2409 implementation. 2411 Feature-tags are used to determine whether the client, server or 2412 proxy supports the functionality that is necessary to achieve the 2413 desired service. To determine support of a feature-tag, several 2414 different headers can be used, each explained below: 2416 Supported: This header is used to determine the complete set of 2417 functionality that both client and server have. The intended 2418 usage is to determine before one needs to use a functionality 2419 that it is supported. It can be used in any method, however 2420 OPTIONS is the most suitable one as it at the same time 2421 determines all methods that are implemented. When sending a 2422 request the requester declares all its capabilities by 2423 including all supported feature-tags. This results in that the 2424 receiver learns the requesters feature support. The receiver 2425 then includes its set of features in the response. 2427 Proxy-Supported: This header is used similar to the Supported 2428 header, but instead of giving the supported functionality of 2429 the client or server it provides both the requester and the 2430 responder a view of what functionality the proxy chain between 2431 the two supports. Proxies are required to add this header 2432 whenever the Supported header is present, but proxies may 2433 independently of the requester add it. 2435 Require: The header can be included in any request where the end- 2436 point, i.e. the client or server, is required to understand the 2437 feature to correctly perform the request. This can, for 2438 example, be a SETUP request where the server is required to 2439 understand a certain parameter to be able to set up the media 2440 delivery correctly. Ignoring this parameter would not have the 2441 desired effect and is not acceptable. Therefore the end-point 2442 receiving a request containing a Require MUST negatively 2443 acknowledge any feature that it does not understand and not 2444 perform the request. The response in cases where features are 2445 not supported are 551 (Option Not Supported). Also the 2446 features that are not supported are given in the Unsupported 2447 header in the response. 2449 Proxy-Require: This header has the same purpose and workings as 2450 Require except that it only applies to proxies and not the end- 2451 point. Features that needs to be supported by both proxies and 2452 end-point needs to be included in both the Require and Proxy- 2453 Require header. 2455 Unsupported: This header is used in a 551 error response, to 2456 indicate which features were not supported. Such a response is 2457 only the result of the usage of the Require and/or Proxy- 2458 Require header where one or more feature where not supported. 2459 This information allows the requester to make the best of 2460 situations as it knows which features are not supported. 2462 12. Pipelining Support 2464 Pipelining is a general method to improve performance of request 2465 response protocols by allowing the requesting entity to have more 2466 than one request outstanding and send them over the same persistent 2467 connection. For RTSP, where the relative order of requests will 2468 matter, it is important to maintain the order of the requests. 2469 Because of this, the responding entity MUST process the incoming 2470 requests in their sending order. The sending order can be determined 2471 by the CSeq header and its sequence number. For TCP the delivery 2472 order will be the same as the sending order. The processing of the 2473 request MUST also have been finished before processing the next 2474 request from the same entity. The responses MUST be sent in the 2475 order the requests was processed. 2477 RTSP 2.0 has extended support for pipelining compared to RTSP 1.0. 2478 The major improvement is to allow all requests to setup and initiate 2479 media playback to be pipelined after each other. This is 2480 accomplished by the utilization of the Pipelined-Requests header (see 2481 Section 16.32). This header allows a client to request that two or 2482 more requests are processed in the same RTSP session context which 2483 the first request creates. In other words a client can request that 2484 two or more media streams are set-up and then played without needing 2485 to wait for a single response. This speeds up the initial startup 2486 time for an RTSP session with at least one RTT. 2488 If a pipelined request builds on the successful completion of one or 2489 more prior requests the requester must verify that all requests were 2490 executed as expected. A common example will be two SETUP requests 2491 and a PLAY request. In case one of the SETUP fails unexpectedly, the 2492 PLAY request can still be successfully executed. However, not as 2493 expected by the requesting client as only a single media instead of 2494 two will be played. In this case the client can send a PAUSE 2495 request, correct the failing SETUP request and then request it to be 2496 played. 2498 13. Method Definitions 2500 The method indicates what is to be performed on the resource 2501 identified by the Request-URI. The method name is case-sensitive. 2502 New methods may be defined in the future. Method names MUST NOT 2503 start with a $ character (decimal 24) and MUST be a token as defined 2504 by the ABNF [RFC5234] in the syntax chapter Section 20. The methods 2505 are summarized in Table 7. 2507 +---------------+-----------+--------+--------------+---------------+ 2508 | method | direction | object | Server req. | Client req. | 2509 +---------------+-----------+--------+--------------+---------------+ 2510 | DESCRIBE | C -> S | P,S | recommended | recommended | 2511 | | | | | | 2512 | GET_PARAMETER | C -> S | P,S | optional | optional | 2513 | | | | | | 2514 | | S -> C | | | | 2515 | | | | | | 2516 | OPTIONS | C -> S | P,S | R=Req, | Sd=Req, R=Opt | 2517 | | | | Sd=Opt | | 2518 | | | | | | 2519 | | S -> C | | | | 2520 | | | | | | 2521 | PAUSE | C -> S | P,S | required | required | 2522 | | | | | | 2523 | PLAY | C -> S | P,S | required | required | 2524 | | | | | | 2525 | PLAY_NOTIFY | S -> C | P,S | required | required | 2526 | | | | | | 2527 | REDIRECT | S -> C | P,S | optional | required | 2528 | | | | | | 2529 | SETUP | C -> S | S | required | required | 2530 | | | | | | 2531 | SET_PARAMETER | C -> S | P,S | required | optional | 2532 | | | | | | 2533 | | S -> C | | | | 2534 | | | | | | 2535 | TEARDOWN | C -> S | P,S | required | required | 2536 | | | | | | 2537 | | S -> C | | required | required | 2538 +---------------+-----------+--------+--------------+---------------+ 2540 Table 7: Overview of RTSP methods, their direction, and what objects 2541 (P: presentation, S: stream) they operate on. Legend: R=Respond, 2542 Sd=Send, Opt: Optional, Req: Required 2544 Note on Table 7: GET_PARAMETER is optional, but SET_PARAMETER is 2545 required due to its usage for keep-alive. PAUSE is now required 2546 due to that it is the only way of getting out of the state 2547 machines play state without terminating the whole session. 2549 If an RTSP agent does not support a particular method, it MUST return 2550 501 (Not Implemented) and the requesting RTSP agent, in turn, SHOULD 2551 NOT try this method again for the given agent / resource combination. 2552 An RTSP proxy who's main function is to log or audit and not modify 2553 transport or media handling in any way MAY forward RTSP messages with 2554 unknown methods. Note, the proxy still needs to perform the minimal 2555 required processing, like adding the Via header. 2557 13.1. OPTIONS 2559 The semantics of the RTSP OPTIONS method is similar to that of the 2560 HTTP OPTIONS method described in [H9.2]. In RTSP however, OPTIONS is 2561 bi-directional, in that a client can request it to a server and vice 2562 versa. A client MUST implement the capability to send an OPTIONS 2563 request and a server or a proxy MUST implement the capability to 2564 respond to an OPTIONS request. The client, server or proxy MAY also 2565 implement the converse of their required capability. 2567 An OPTIONS request may be issued at any time. Such a request does 2568 not modify the session state. However, it may prolong the session 2569 lifespan (see below). The URI in an OPTIONS request determines the 2570 scope of the request and the corresponding response. If the Request- 2571 URI refers to a specific media resource on a given host, the scope is 2572 limited to the set of methods supported for that media resource by 2573 the indicated RTSP agent. A Request-URI with only the host address 2574 limits the scope to the specified RTSP agent's general capabilities 2575 without regard to any specific media. If the Request-URI is an 2576 asterisk ("*"), the scope is limited to the general capabilities of 2577 the next hop (i.e. the RTSP agent in direct communication with the 2578 request sender). 2580 Regardless of scope of the request, the Public header MUST always be 2581 included in the OPTIONS response listing the methods that are 2582 supported by the responding RTSP agent. In addition, if the scope of 2583 the request is limited to a media resource, the Allow header MUST be 2584 included in the response to enumerate the set of methods that are 2585 allowed for that resource unless the set of methods completely 2586 matches the set in the Public header. If the given resource is not 2587 available, the RTSP agent SHOULD return an appropriate response code 2588 such as 3rr or 4xx. The Supported header MAY be included in the 2589 request to query the set of features that are supported by the 2590 responding RTSP agent. 2592 The OPTIONS method can be used to keep an RTSP session alive. 2593 However, it is not the preferred means of session keep-alive 2594 signalling, see Section 16.48. An OPTIONS request intended for 2595 keeping alive an RTSP session MUST include the Session header with 2596 the associated session ID. Such a request SHOULD also use the media 2597 or the aggregated control URI as the Request-URI. 2599 Example: 2601 C->S: OPTIONS * RTSP/2.0 2602 CSeq: 1 2603 User-Agent: PhonyClient/1.2 2604 Require: 2605 Proxy-Require: gzipped-messages 2606 Supported: play.basic 2608 S->C: RTSP/2.0 200 OK 2609 CSeq: 1 2610 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE 2611 Supported: play.basic, implicit-play, gzipped-messages 2612 Server: PhonyServer/1.1 2614 Note that some of the feature-tags in Require and Proxy-Require are 2615 fictional features. 2617 13.2. DESCRIBE 2619 The DESCRIBE method is used to retrieve the description of a 2620 presentation or media object from a server. The Request-URI of the 2621 DESCRIBE request identifies the media resource of interest. The 2622 client MAY include the Accept header in the request to list the 2623 description formats that it understands. The server MUST respond 2624 with a description of the requested resource and return the 2625 description in the message body of the response. The DESCRIBE reply- 2626 response pair constitutes the media initialization phase of RTSP. 2628 Example: 2630 C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/2.0 2631 CSeq: 312 2632 User-Agent: PhonyClient 1.2 2633 Accept: application/sdp, application/example 2635 S->C: RTSP/2.0 200 OK 2636 CSeq: 312 2637 Date: Thu, 23 Jan 1997 15:35:06 GMT 2638 Server: PhonyServer 1.1 2639 Content-Base: rtsp://server.example.com/fizzle/foo/ 2640 Content-Type: application/sdp 2641 Content-Length: 358 2643 v=0 2644 o=mhandley 2890844526 2890842807 IN IP4 192.0.2.46 2645 s=SDP Seminar 2646 i=A Seminar on the session description protocol 2647 u=http://www.example.com/lectures/sdp.ps 2648 e=seminar@example.com (Seminar Management) 2649 c=IN IP4 0.0.0.0 2650 a=recvonly 2651 a=control:* 2652 t=2873397496 2873404696 2653 m=audio 3456 RTP/AVP 0 2654 a=control:audio 2655 m=video 2232 RTP/AVP 31 2656 a=control:video 2658 The DESCRIBE response SHOULD contain all media initialization 2659 information for the resource(s) that it describes. Servers SHOULD 2660 NOT use the DESCRIBE response as a means of media indirection by 2661 having the description point at another server, instead usage of 3rr 2662 responses are recommended. 2664 By forcing a DESCRIBE response to contain all media initialization 2665 for the set of streams that it describes, and discouraging the use 2666 of DESCRIBE for media indirection, any looping problems can be 2667 avoided that might have resulted from other approaches. 2669 Media initialization is a requirement for any RTSP-based system, but 2670 the RTSP specification does not dictate that this is required to be 2671 done via the DESCRIBE method. There are three ways that an RTSP 2672 client may receive initialization information: 2674 o via an RTSP DESCRIBE request 2676 o via some other protocol (HTTP, email attachment, etc.) 2677 o via some form of a user interface 2679 If a client obtains a valid description from an alternate source, the 2680 client MAY use this description for initialization purposes without 2681 issuing a DESCRIBE request for the same media. 2683 It is RECOMMENDED that minimal servers support the DESCRIBE method, 2684 and highly recommended that minimal clients support the ability to 2685 act as "helper applications" that accept a media initialization file 2686 from a user interface, and/or other means that are appropriate to the 2687 operating environment of the clients. 2689 13.3. SETUP 2691 The SETUP request for an URI specifies the transport mechanism to be 2692 used for the streamed media. The SETUP method may be used in two 2693 different cases; Create an RTSP session and change the transport 2694 parameters of already set up media stream. SETUP can be used in all 2695 three states; INIT, and READY, for both purposes and in PLAY to 2696 change the transport parameters. There is also a third possible 2697 usage for the SETUP method which is not specified in this memo: 2698 adding a media to a session. Using SETUP to add media to an existing 2699 session, when the session is in PLAY state, is unspecified. 2701 The Transport header, see Section 16.52, specifies the media 2702 transport parameters acceptable to the client for data transmission; 2703 the response will contain the transport parameters selected by the 2704 server. This allows the client to enumerate in descending order of 2705 preference the transport mechanisms and parameters acceptable to it, 2706 while the server can select the most appropriate. It is expected 2707 that the session description format used will enable the client to 2708 select a limited number possible configurations that are offered to 2709 the server to choose from. All transport related parameters shall be 2710 included in the Transport header, the use of other headers for this 2711 purpose is discouraged due to middleboxes, such as firewalls or NATs. 2713 For the benefit of any intervening firewalls, a client MUST indicate 2714 the known transport parameters, even if it has no influence over 2715 these parameters, for example, where the server advertises a fixed 2716 multicast address as destination. 2718 Since SETUP includes all transport initialization information, 2719 firewalls and other intermediate network devices (which need this 2720 information) are spared the more arduous task of parsing the 2721 DESCRIBE response, which has been reserved for media 2722 initialization. 2724 The client MUST include the Accept-Ranges header in the request 2725 indicating all supported unit formats in the Range header. This 2726 allows the server to know which format it may use in future session 2727 related responses, such as PLAY response without any range in the 2728 request. If the client does not support a time format necessary for 2729 the presentation the server MUST respond using 456 (Header Field Not 2730 Valid for Resource) and include the Accept-Ranges header with the 2731 range unit formats supported for the resource. 2733 In a SETUP response the server MUST include the Accept-Ranges header 2734 (see Section 16.5) to indicate which time formats that are acceptable 2735 to use for this media resource. 2737 The SETUP response 200 OK MUST include the Media-Properties header 2738 (see Section 16.28 ). The combination of the parameters of the 2739 Media-Properties header indicate the nature of the content present in 2740 the session (see also Section 4.9). For example, a live stream with 2741 time shifting is indicated by 2743 o Random Access set to Random-Access, 2745 o Content Modifications set to Time Progressing, 2747 o Retention set to Time-Duration (with specific recording window 2748 time value). 2750 The SETUP response 200 OK MUST include the Media-Range header (see 2751 Section 16.29) if the media is Time-Progressing. 2753 A basic example for SETUP: 2755 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/2.0 2756 CSeq: 302 2757 Transport: RTP/AVP;unicast;dest_addr=":4588"/":4589", 2758 RTP/AVP/TCP;unicast;interleaved=0-1 2759 Accept-Ranges: NPT, UTC 2760 User-Agent: PhonyClient/1.2 2762 S->C: RTSP/2.0 200 OK 2763 CSeq: 302 2764 Date: Thu, 23 Jan 1997 15:35:06 GMT 2765 Server: PhonyServer 1.1 2766 Session: 47112344;timeout=60 2767 Transport: RTP/AVP;unicast;dest_addr="192.0.2.53:4588"/ 2768 "192.0.2.53:4589"; src_addr="192.0.2.241:6256"/ 2769 "192.0.2.241:6257"; ssrc=2A3F93ED 2770 Accept-Ranges: NPT 2771 Media-Properties: Random-Access=3.2, Time-Progressing, 2772 Time-Duration=3600.0 2774 Media-Range: npt=0-2893.23 2776 In the above example the client wants to create an RTSP session 2777 containing the media resource "rtsp://example.com/foo/bar/baz.rm". 2778 The transport parameters acceptable to the client is either RTP/AVP/ 2779 UDP (UDP per default) to be received on client port 4588 and 4589 or 2780 RTP/AVP interleaved on the RTSP control channel. The server selects 2781 the RTP/AVP/UDP transport and adds the ports it will send and 2782 received RTP and RTCP from, and the RTP SSRC that will be used by the 2783 server. 2785 The server MUST generate a session identifier in response to a 2786 successful SETUP request, unless a SETUP request to a server includes 2787 a session identifier, in which case the server MUST bundle this setup 2788 request into the existing session (aggregated session) or return 2789 error 459 (Aggregate Operation Not Allowed) (see Section 15.4.24). 2790 An Aggregate control URI MUST be used to control an aggregated 2791 session. This URI MUST be different from the stream control URIs of 2792 the individual media streams included in the aggregate. The 2793 Aggregate control URI is to be specified by the session description 2794 if the server supports aggregated control and aggregated control is 2795 desired for the session. However even if aggregated control is 2796 offered the client MAY chose to not set up the session in aggregated 2797 control. If an Aggregate control URI is not specified in the session 2798 description, it is normally an indication that non-aggregated control 2799 should be used. The SETUP of media streams in an aggregate which has 2800 not been given an aggregated control URI is unspecified. 2802 While the session ID sometimes carries enough information for 2803 aggregate control of a session, the Aggregate control URI is still 2804 important for some methods such as SET_PARAMETER where the control 2805 URI enables the resource in question to be easily identified. The 2806 Aggregate control URI is also useful for proxies, enabling them to 2807 route the request to the appropriate server, and for logging, 2808 where it is useful to note the actual resource that a request was 2809 operating on. 2811 A session will exist until it is either removed by a TEARDOWN request 2812 or is timed-out by the server. The server MAY remove a session that 2813 has not demonstrated liveness signs from the client(s) within a 2814 certain timeout period. The default timeout value is 60 seconds; the 2815 server MAY set this to a different value and indicate so in the 2816 timeout field of the Session header in the SETUP response. For 2817 further discussion see Section 16.48. Signs of liveness for an RTSP 2818 session are: 2820 o Any RTSP request from a client(s) which includes a Session header 2821 with that session's ID. 2823 o If RTP is used as a transport for the underlying media streams, an 2824 RTCP sender or receiver report from the client(s) for any of the 2825 media streams in that RTSP session. RTCP Sender Reports may for 2826 example be received in sessions where the server is invited into a 2827 conference session and is as valid for keep-alive. 2829 If a SETUP request on a session fails for any reason, the session 2830 state, as well as transport and other parameters for associated 2831 streams MUST remain unchanged from their values as if the SETUP 2832 request had never been received by the server. 2834 13.3.1. Changing Transport Parameters 2836 A client MAY issue a SETUP request for a stream that is already set 2837 up or playing in the session to change transport parameters, which a 2838 server MAY allow. If it does not allow changing of parameters, it 2839 MUST respond with error 455 (Method Not Valid In This State). 2840 Reasons to support changing transport parameters, is to allow for 2841 application layer mobility and flexibility to utilize the best 2842 available transport as it becomes available. If a client receives a 2843 455 when trying to change transport parameters while the server is in 2844 play state, it MAY try to put the server in ready state using PAUSE, 2845 before issuing the SETUP request again. If also that fails the 2846 changing of transport parameters will require that the client 2847 performs a TEARDOWN of the affected media and then setting it up 2848 again. In aggregated session avoiding tearing down all the media at 2849 the same time will avoid the creation of a new session. 2851 All transport parameters MAY be changed. However the primary usage 2852 expected is to either change transport protocol completely, like 2853 switching from Interleaved TCP mode to UDP or vise versa or change 2854 delivery address. 2856 In a SETUP response for a request to change the transport parameters 2857 while in Play state, the server MUST include the Range to indicate 2858 from what point the new transport parameters are used. Further, if 2859 RTP is used for delivery, the server MUST also include the RTP-Info 2860 header to indicate from what timestamp and RTP sequence number the 2861 change has taken place. If both RTP-Info and Range is included in 2862 the response the "rtp_time" parameter and start point in the Range 2863 header MUST be for the corresponding time, i.e. be used in the same 2864 way as for PLAY to ensure the correct synchronization information is 2865 available. 2867 If the transport parameters change while in PLAY state results in a 2868 change of synchronization related information, for example changing 2869 RTP SSRC, the server MUST provide in the SETUP response the necessary 2870 synchronization information. However the server is RECOMMENDED to 2871 avoid changing the synchronization information if possible. 2873 13.4. PLAY 2875 This section describes the usage of the PLAY method in general, for 2876 aggregated sessions, and in different usage scenarios. 2878 13.4.1. General Usage 2880 The PLAY method tells the server to start sending data via the 2881 mechanism specified in SETUP and which part of the media should be 2882 played out. PLAY requests are valid when the session is in READY or 2883 PLAY states. A PLAY request MUST include a Session header to 2884 indicate which session the request applies to. 2886 Upon receipt of the PLAY request, the server MUST position the normal 2887 play time to the beginning of the range specified in the received 2888 Range header and delivers stream data until the end of the range if 2889 given, or until a new PLAY request is received, else to the end of 2890 the media is reached. If no Range header is present in the PLAY 2891 request the server shall play from current pause point until the end 2892 of media. The pause point defaults at start to the beginning of the 2893 media. For media that is time-progressing and has no retention, the 2894 pause point will always be set equal to NPT "now", i.e. current 2895 playback point. The pause point may also be set to a particular 2896 point in the media by the PAUSE method, see Section 13.6. The pause 2897 point for media that is currently playing is equal to the current 2898 media position. For time-progressing media with time-limited 2899 retention, if the pause point represents a position that is older 2900 than what is retained by the server, the pause point will be moved to 2901 the oldest retained. 2903 What range values is valid depends on the type of content. For 2904 content that isn't time progressing the range value is valid if the 2905 given range is part of any media within the aggregate. In other 2906 words the valid media range for the aggregate is the super-set of all 2907 of the media components in the aggregate. If a given range value 2908 points outside of the media, the response MUST be the 457 (Invalid 2909 Range) error code and include the Media-Range header (Section 16.29) 2910 with the valid range for the media. For time progressing content 2911 where the client request a start point prior to what is retained, the 2912 start point is adjusted to the oldest retained content. For a start 2913 point that is beyond the media front edge, i.e. beyond the current 2914 value for "now", the server shall adjust the start value to the 2915 current front edge. The Range headers end point value may point 2916 beyond the current media edge. In that case the server shall deliver 2917 media from the requested (and possibly adjusted) start point until 2918 the provided end-point, or the end of the media is reached prior to 2919 the specified stop point. Please note that if one simply want to 2920 play from a particular start point until the end of media using an 2921 Range header with an implicit stop point is recommended. 2923 For media with random access properties a client may express its 2924 preference on which policy for start point selection the server shall 2925 use. This is done by including the Seek-Style header (Section 16.45) 2926 in the PLAY request. 2928 A client desiring to play the media from the beginning MUST send a 2929 PLAY request with a Range header pointing at the beginning, e.g. 2930 npt=0-. If a PLAY request is received without a Range header when 2931 media delivery has stopped at the end, the server SHOULD respond with 2932 a 457 "Invalid Range" error response. In that response the current 2933 pause point in a Range header MUST be included. 2935 All range specifiers in this specification allow for ranges with 2936 implicit start point (e.g. "npt=-30"). When used in a PLAY request, 2937 the server treats this as a request to start/resume playback from the 2938 current pause point, ending at the end time specified in the Range 2939 header. If the pause point is located later than the given end 2940 value, a 457 (Invalid Range) response MUST be given. 2942 The below example will play seconds 10 through 25. It also request 2943 the server to deliver media from the first Random Access Point prior 2944 to the indicated start point. 2946 C->S: PLAY rtsp://audio.example.com/audio RTSP/2.0 2947 CSeq: 835 2948 Session: 12345678 2949 Range: npt=10-25 2950 Seek-Style: RAP 2951 User-Agent: PhonyClient/1.2 2953 Server MUST include a "Range" header in any PLAY response, even if no 2954 Range header was present in the request. The response MUST use the 2955 same format as the request's range header contained. If no Range 2956 header was in the request, the format used in any previous PLAY 2957 request within the session SHOULD be used. If no format has been 2958 indicated in a previous request the server MAY use any time format 2959 supported by the media and indicated in the Accept-Ranges header in 2960 the SETUP response. It is RECOMMENDED that NPT is used if supported 2961 by the media. 2963 For any error response to a PLAY request, the server's response 2964 depends on the current session state. If the session is in ready 2965 state, the current pause-point is returned using Range header with 2966 the pause point as the explicit start-point and an implicit end- 2967 point. For time-progressing content where the pause-point moves with 2968 real-time due to limited retention, the current pause point is 2969 returned. For sessions in playing state, the current playout point 2970 and the remaining parts of the range request is returned. For any 2971 media with retention longer than 0 seconds the currently valid Media- 2972 Range header shall also be included in the response. 2974 A PLAY response MAY include a header(s) carrying synchronization 2975 information. As the information necessary is dependent on the media 2976 transport format, further rules specifying the header and its usage 2977 is needed. For RTP the RTP-Info header is specified, see 2978 Section 16.43, and used in the following example. 2980 Here is a simple example for a single audio stream where the client 2981 requests the media starting from 3.52 seconds and to the end. The 2982 server sends a 200 OK response with the actual play time which is 10 2983 m prior (3.51) and the RTP-Info header that contains the necessary 2984 parameters for the RTP stack. 2985 C->S: PLAY rtsp://example.com/audio RTSP/2.0 2986 CSeq: 836 2987 Session: 12345678 2988 Range: npt=3.52- 2989 User-Agent: PhonyClient/1.2 2991 S->C: RTSP/2.0 200 OK 2992 CSeq: 836 2993 Date: Thu, 23 Jan 1997 15:35:06 GMT 2994 Server: PhonyServer 1.0 2995 Range: npt=3.51-324.39 2996 Seek-Style: First-Prior 2997 RTP-Info:url="rtsp://example.com/audio" 2998 ssrc=0D12F123:seq=14783;rtptime=2345962545 3000 S->C: RTP Packet TS=2345962545 => NPT=3.51 3001 Duration=0.16 seconds 3003 The server reply with the actual start point that will be delivered. 3004 This may differ from the requested range if alignment of the 3005 requested range to valid frame boundaries is required for the media 3006 source. Note that some media streams in an aggregate may need to be 3007 delivered from even earlier points. Also, some media format have a 3008 very long duration per individual data unit, therefore it might be 3009 necessary for the client to parse the data unit, and select where to 3010 start. The server shall also indicate which policy it uses for 3011 selecting the actual start point by including a Seek-Style header. 3013 In the following example the client receives the first media packet 3014 that stretches all the way up and past the requested playtime. Thus, 3015 it is the client's decision if to render to the user the time between 3016 3.52 and 7.05, or to skip it. In most cases it is probably most 3017 suitable to not render that time period. 3018 C->S: PLAY rtsp://example.com/audio RTSP/2.0 3019 CSeq: 836 3020 Session: 12345678 3021 Range: npt=7.05- User-Agent: PhonyClient/1.2 3023 S->C: RTSP/2.0 200 OK 3024 CSeq: 836 3025 Date: Thu, 23 Jan 1997 15:35:06 GMT 3026 Server: PhonyServer 1.0 3027 Range: npt=3.52- 3028 Seek-Style: First-Prior 3029 RTP-Info:url="rtsp://example.com/audio" 3030 ssrc=0D12F123:seq=14783;rtptime=2345962545 3032 S->C: RTP Packet TS=2345962545 => NPT=3.52 3033 Duration=4.15 seconds 3035 After playing the desired range, the presentation does NOT transition 3036 to the READY state, media delivery simply stops. A PAUSE request 3037 MUST be issued before the stream enters the READY state. A PLAY 3038 request while the stream is still in the PLAYING state is legal, and 3039 can be issued without an intervening PAUSE request. Such a request 3040 MUST replace the current PLAY action with the new one requested, i.e. 3041 being handle the same as the request was received in ready state. In 3042 the case the range in Range header has a implicit start time 3043 (-endtime), the server MUST continue to play from where it currently 3044 was until the specified end point. This is useful to change end at 3045 another point than in the previous request. 3047 The following example plays the whole presentation starting at SMPTE 3048 time code 0:10:20 until the end of the clip. Note: The RTP-Info 3049 headers has been broken into several lines to fit the page. 3051 C->S: PLAY rtsp://audio.example.com/twister.en RTSP/2.0 3052 CSeq: 833 3053 Session: 12345678 3054 Range: smpte=0:10:20- 3055 User-Agent: PhonyClient/1.2 3057 S->C: RTSP/2.0 200 OK 3058 CSeq: 833 3059 Date: Thu, 23 Jan 1997 15:35:06 GMT 3060 Server: PhonyServer 1.0 3061 Range: smpte=0:10:22-0:15:45 3062 Seek-Style: Next 3063 RTP-Info:url="rtsp://example.com/twister.en" 3064 ssrc=0D12F123:seq=14783;rtptime=2345962545 3066 For playing back a recording of a live presentation, it may be 3067 desirable to use clock units: 3068 C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/2.0 3069 CSeq: 835 3070 Session: 12345678 3071 Range: clock=19961108T142300Z-19961108T143520Z 3072 User-Agent: PhonyClient/1.2 3074 S->C: RTSP/2.0 200 OK 3075 CSeq: 835 3076 Date: Thu, 23 Jan 1997 15:35:06 GMT 3077 Server: PhonyServer 1.0 3078 Range: clock=19961108T142300Z-19961108T143520Z 3079 Seek-Style: Next 3080 RTP-Info:url="rtsp://example.com/meeting.en" 3081 ssrc=0D12F123:seq=53745;rtptime=484589019 3083 13.4.2. Aggregated Sessions 3085 PLAY requests can operate on sessions controlling a single media and 3086 on aggregated sessions controlling multiple media. 3088 In an aggregated session the PLAY request MUST contain an aggregated 3089 control URI. A server MUST response with error 460 (Only Aggregate 3090 Operation Allowed) if the client PLAY Request-URI is for one of the 3091 media. The media in an aggregate MUST be played in sync. If a 3092 client wants individual control of the media it needs to use separate 3093 RTSP sessions for each media. 3095 For aggregated sessions where the initial SETUP request (creating a 3096 session) is followed by one or more additional SETUP request, a PLAY 3097 request MAY be pipelined after those additional SETUP requests 3098 without awaiting their responses. This procedure can reduce the 3099 delay from start of session establishment until media play-out has 3100 started with one round trip time. However, a client needs to be 3101 aware that using this procedure will result in the playout of the 3102 server state established at the time of processing the PLAY, i.e., 3103 after the processing of all the requests prior to the PLAY request in 3104 the pipeline. This may not be the intended one due to failure of any 3105 of the prior requests. However, a client can easily determine this 3106 based on the responses from those requests. In case of failure the 3107 client can halt the media playout using PAUSE and try to establish 3108 the intended state again before issuing another PLAY request. 3110 13.4.3. Updating current PLAY Requests 3112 Clients can issue PLAY requests while the stream is in PLAYING state 3113 and thus updating their request. 3115 The important difference compared to a PLAY request in ready state is 3116 the handling of the current play point and how the range header in 3117 request is constructed. The session is actively playing media and 3118 the play point will be moving making the exact time a request will 3119 take action is hard to predict. Depending on how the PLAY header 3120 appears two different cases exist: total replacement or continuation. 3121 A total replacement is signalled by having the first range 3122 specification have an explicit start value, e.g. npt=45- or 3123 npt=45-60, in which case the server stops playout at the current 3124 playout point and then starts delivering media according to the Range 3125 header. This is equivalent to having the client first send a PAUSE 3126 and then a new play request that isn't based on the pause point. In 3127 the case of continuation the first range specifier has an implicit 3128 start point and a explicit stop value (Z), e.g. npt=-60, which 3129 indicate that it MUST convert the range specifier being played prior 3130 to this PLAY request (X to Y) into (X to Z) and continue as this was 3131 the request originally played. 3133 An example of this behavior. The server has received requests to 3134 play ranges 10 to 15. If the new PLAY request arrives at the server 3135 4 seconds after the previous one, it will take effect while the 3136 server still plays the first range (10-15). Thus changing the 3137 behavior of this range to continue to play to 25 seconds, i.e. the 3138 equivalent single request would be PLAY with range: npt=10-25. 3140 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3141 CSeq: 834 3142 Session: 12345678 3143 Range: npt=10-15 3144 User-Agent: PhonyClient/1.2 3146 S->C: RTSP/2.0 200 OK 3147 CSeq: 834 3148 Date: Thu, 23 Jan 1997 15:35:06 GMT 3149 Server: PhonyServer 1.0 3150 Range: npt=10-15 3151 Seek-Style: Next 3152 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3153 ssrc=0D12F123:seq=5712;rtptime=934207921, 3154 url="rtsp://example.com/fizzle/videotrack" 3155 ssrc=789DAF12:seq=57654;rtptime=2792482193 3156 Session: 12345678 3158 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3159 CSeq: 835 3160 Session: 12345678 3161 Range: npt=-25 3162 User-Agent: PhonyClient/1.2 3164 S->C: RTSP/2.0 200 OK 3165 CSeq: 835 3166 Date: Thu, 23 Jan 1997 15:35:09 GMT 3167 Server: PhonyServer 1.0 3168 Range: npt=14-25 3169 Seek-Style: Next 3170 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3171 ssrc=0D12F123:seq=5712;rtptime=934239921, 3172 url="rtsp://example.com/fizzle/videotrack" 3173 ssrc=789DAF12:seq=57654;rtptime=2792842193 3174 Session: 12345678 3176 13.4.4. Playing On-Demand Media 3178 On-demand media is indicated by the content of the Media-Properties 3179 header in the SETUP response by (see also Section 16.28): 3181 o Random-Access property is set to Random Access; 3183 o Content Modifications set to Immutable; 3185 o Retention set Unlimited or Time-Limited. 3187 Playing on-demand media follows the general usage as described in 3188 Section 13.4.1. 3190 13.4.5. Playing Dynamic On-Demand Media 3192 Dynamic on-demand media is indicated by the content of the Media- 3193 Properties header in the SETUP response by (see also Section 16.28): 3195 o Random-Access set to Random Access; 3197 o Content Modifications set to dynamic; 3199 o Retention set Unlimited or Time-Limited. 3201 Playing on-demand media follows the general usage as described in 3202 Section 13.4.1 as long as the media has not been changed. 3204 There are ways for the client to get informed about changed of media 3205 resources in play state, if the resource was changed. The client 3206 will receive a PLAY_NOTIFY request with Notify-Reason header set to 3207 media-properties-update (see Section 13.5.2). The client can use the 3208 value of the Media-Range to decide further actions, if the Media- 3209 Range header is present in the PLAY_NOTIFY request. The second way 3210 is that the client issues a GET_PARAMETER request without a body but 3211 including a Media-Range header. The 200 OK response MUST include the 3212 current Media-Range header (see Section 16.29). 3214 13.4.6. Playing Live Media 3216 Live media is indicated by the content of the Media-Properties header 3217 in the SETUP response by (see also Section 16.28): 3219 o Random-Access set to no-seeking; 3221 o Content Modifications set to Time-Progressing; 3223 o Retention with Time-Duration set to 0.0. 3225 For live media, the SETUP response 200 OK MUST include the Media- 3226 Range header (see Section 16.29). 3228 A client MAY send PLAY requests without the Range header, if the 3229 request include the Range header it MUST use a symbolic value 3230 representing "now". For NPT that range specification is "npt=now-". 3231 The server MUST include the Range header in the response and it MUST 3232 indicate an explicit time value and not a symbolic value. In other 3233 words npt=now- is not a valid to use in the response. Instead the 3234 time since session start is recommended expressed as an open 3235 interval, e.g. "npt=96.23-". An absolute time value (clock) for the 3236 corresponding time MAY be given, i.e. "clock=20030213T143205Z-". The 3237 UTC clock format can only be used if client has shown support for it 3238 using the Accept-Ranges header. 3240 13.4.7. Playing Live with Recording 3242 Certain media server may offer recording services of live sessions to 3243 their clients. This recording would normally be from the beginning 3244 of the media session. Clients can randomly access the media between 3245 now and the beginning of the media session. This live media with 3246 recording is indicated by the content of the Media-Properties header 3247 in the SETUP response by (see also Section 16.28): 3249 o Random-Access set to random-access; 3251 o Content Modifications set to Time-Progressing; 3253 o Retention set to Time-limited or Unlimited 3255 The SETUP response 200 OK MUST include the Media-Range header (see 3256 Section 16.29) for this type of media. For live media with recording 3257 the Range header indicates the current playback time in the media and 3258 the Media-Range header indicates the currently available media window 3259 around the current time. This window can cover recorded content in 3260 the past (seen from current time in the media) or recorded content in 3261 the future (seen from current time in the media). The server adjusts 3262 the play point to the requested border of the window, if the client 3263 requests a play point that is located outside the recording windows, 3264 e.g., if requested to far in the past, the server selects the oldest 3265 range in the recording. The considerations in Section 13.5.3 apply, 3266 if a client requests playback at Scale (Section 16.44) values other 3267 than 1.0 (Normal playback rate) while playing live media with 3268 recording. 3270 13.4.8. Playing Live with Time-Shift 3272 Certain media server may offer time-shift services to their clients. 3273 This time shift records a fixed interval in the past, i.e., a sliding 3274 window recording mechanism, but not past this interval. Clients can 3275 randomly access the media between now and the interval. This live 3276 media with recording is indicated by the content of the Media- 3277 Properties header in the SETUP response by (see also Section 16.28): 3279 o Random-Access set to random-access; 3281 o Content Modifications set to Time-Progressing; 3282 o Retention set to Time-Duration and a value indicating the 3283 recording interval (>0). 3285 The SETUP response 200 OK MUST include the Media-Range header (see 3286 Section 16.29) for this type of media. For live media with recording 3287 the Range header indicates the current time in the media and the 3288 Media Range indicates a window around the current time. This window 3289 can cover recorded content in the past (seen from current time in the 3290 media) or recorded content in the future (seen from current time in 3291 the media). The server adjusts the play point to the requested 3292 border of the window, if the client requests a play point that is 3293 located outside the recording windows, e.g., if requested too far in 3294 the past, the server selects the oldest range in the recording. The 3295 considerations in Section 13.5.3 apply, if a client requests playback 3296 at Scale (Section 16.44) values other than 1.0 (Normal playback rate) 3297 while playing live media with time-shift. 3299 13.5. PLAY_NOTIFY 3301 The PLAY_NOTIFY method is issued by a server to inform a client about 3302 an asynchronously event for a session in play state. The Session 3303 header MUST be presented in a PLAY_NOTIFY request and indicates the 3304 scope of the request. Sending of PLAY_NOTIFY requests requires a 3305 persistent connection between server and client, otherwise there is 3306 no way for the server to send this request method to the client. 3308 PLAY_NOTIFY requests have an end-to-end (i.e. server to client) 3309 scope, as they carry the Session header, and apply only to the given 3310 session. The client SHOULD immediately return a response to the 3311 server. 3313 PLAY_NOTIFY requests MAY be used with a message body, depending on 3314 the value of the Notify-Reason header. It is described in the 3315 particular section for each Notify-Reason if a message body is used. 3316 However, currently there is no Notify-Reason that allows using a 3317 message body. There is in this case a need to obey some limitations 3318 when adding new Notify-Reasons that intend to use a message body: The 3319 server can send any type of message body, but it is not ensured that 3320 the client can understand the received message body. This is related 3321 to DESCRIBE (see Section 13.2 ), but in this particular case the 3322 client can state its acceptable message bodies by using the Accept 3323 header. In the case of PLAY_NOTIFY, the server does not know which 3324 message bodies are understood by the client. 3326 The Notify-Reason header (see Section 16.31) specifies the reason why 3327 the server sends the PLAY_NOTIFY request. This is extensible and new 3328 reasons MAY be added in the future. In case the client does not 3329 understand the reason for the notification it MUST respond with an 3330 465 (Notification Reason Unknown) (Section 15.4.30) error code. 3331 Servers can send PLAY_NOTIFY with these types: 3333 o end-of-stream (see Section 13.5.1); 3335 o media-properties-update (see Section 13.5.2); 3337 o scale-change (see Section 13.5.3). 3339 13.5.1. End-of-Stream 3341 A PLAY_NOTIFY request with Notify-Reason header set to end-of-stream 3342 indicates the completion or near completion of the PLAY request and 3343 the ending delivery of the media stream(s). The request MUST NOT be 3344 issued unless the server is in the playing state. The end of the 3345 media stream delivery notification may be used to indicate either a 3346 successful completion of the PLAY request currently being served, or 3347 to indicate some error resulting in failure to complete the request. 3348 The Request-Status header (Section 16.41) MUST be included to 3349 indicate which request the notification is for and its completion 3350 status. The message response status codes (Section 8.1.1) are used 3351 to indicate how the PLAY request concluded. The sender of a 3352 PALY_NOTIFY can issue an updated PALY_NOTIFY, in the case of a 3353 PLAY_NOTIFY sent with wrong information. For instance, a PLAY_NOTIFY 3354 was issued before reaching the end-of-stream, but some error occurred 3355 resulting in that the previously sent PLAY_NOTIFY contained a wrong 3356 time when the stream will end. In this case a new PLAY_NOTIFY MUST 3357 be sent including the correct status for the completion and all 3358 additional information. 3360 PLAY_NOTIFY requests with Notify-Reason header set to end-of-stream 3361 MUST include a Range header and the Scale header if the scale value 3362 is not 1. The Range header indicates the point in the stream or 3363 streams where delivery is ending with the timescale that was used by 3364 the server in the PLAY response for the request being fulfilled. The 3365 server MUST NOT use the "now" constant in the Range header; it MUST 3366 use the actual numeric end position in the proper timescale. When 3367 end-of-stream notifications are issued prior to having sent the last 3368 media packets, this is evident as the end time in the Range header is 3369 beyond the current time in the media being received by the client, 3370 e.g., npt=-15, if npt is currently at 14.2 seconds. The Scale header 3371 is to be included so that it is evident if the media time scale is 3372 moving backwards and/or have a non-default pace. 3374 If RTP is used as media transport, a RTP-Info header MUST be 3375 included, and the RTP-Info header MUST indicate the last sequence 3376 number in the seq parameter. 3378 A PLAY_NOTIFY request with Notify-Reason header set to end-of-stream 3379 MUST NOT carry a message body. 3381 This example request notifies the client about a future end-of-stream 3382 event: 3384 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3385 CSeq: 854 3386 Notify-Reason: end-of-stream 3387 Request-Status: cseq=853 status=200 reason="OK" 3388 Range: npt=-145 3389 RTP-Info:url="rtsp://example.com/audio" 3390 ssrc=0D12F123:seq=14783;rtptime=2345962545 3391 Session: uZ3ci0K+Ld-M 3393 C->S: RTSP/2.0 200 OK 3394 CSeq: 854 3395 User-Agent: PhonyClient/1.2 3397 13.5.2. Media-Properties-Update 3399 A PLAY_NOTIFY request with Notify-Reason header set to media- 3400 properties-update indicates an update of the media properties for the 3401 given session (see Section 16.28) and/or the available media range 3402 that can be played as indicated by Media-Range (Section 16.29). 3403 PLAY_NOTIFY requests with Notify-Reason header set to media- 3404 properties-update MUST include a Media-Properties and Date header and 3405 SHOULD include a Media-Range header. 3407 This notification MUST be sent for media that are time-progressing 3408 every time an event happens that changes the basis for making 3409 estimations on how the media range progress. In addition it is 3410 RECOMMENDED that the server sends these notifications every 5 minutes 3411 for time-progressing content to ensure the long term stability of the 3412 client estimation and allowing for clock skew detection by the 3413 client. Requests for the just mentioned reasons MUST include Media- 3414 Range header to provide current Media duration and the Range header 3415 to indicate the current playing point and any remaining parts of the 3416 requested range. 3418 The recommendation for sending updates every 5 minutes is due to 3419 any clock skew issues. In 5 minutes the clock skew should not 3420 become too significant as this is not used for media playback and 3421 synchronization, only for determining which content is available 3422 to the user. 3424 A PLAY_NOTIFY request with Notify-Reason header set to media- 3425 properties-update MUST NOT carry a message body. 3427 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3428 Date: Tue, 14 Apr 2008 15:48:06 GMT 3429 CSeq: 854 3430 Notify-Reason: media-properties-update 3431 Session: uZ3ci0K+Ld-M 3432 Media-Properties: Time-Progressing, 3433 Time-Limited=20080415T153919.36Z, Random-Access=5.0 3434 Media-Range: npt=0-1:37:21.394 3435 Range: npt=1:15:49.873- 3437 C->S: RTSP/2.0 200 OK 3438 CSeq: 854 3439 User-Agent: PhonyClient/1.2 3441 13.5.3. Scale-Change 3443 The server may be forced to change the rate, when a client request 3444 playback at Scale (Section 16.44) values other than 1.0 (normal 3445 playback rate). For time progressing media with some retention, i.e. 3446 the server stores already sent content, a client requesting to play 3447 with Scale values larger than 1 may catch up with the front end of 3448 the media. The server will then be unable to continue to provide 3449 with content at Scale larger than 1 as content is only made available 3450 by the server at Scale=1. Another case is when Scale < 1 and the 3451 media retention is time-duration limited. In this case the playback 3452 point can reach the oldest media unit available, and further playback 3453 at this scale becomes impossible as there will be no media available. 3454 To avoid having the client loose any media, the scale will need to be 3455 adjusted to the same rate which the media is removed from the storage 3456 buffer, commonly scale = 1.0. 3458 Another case is when the content itself consist of spliced pieces or 3459 is dynamically updated. In these cases the server may be required to 3460 change from one supported scale value (different than Scale=1.0) to 3461 another. In this case the server will pick the closest value and 3462 inform the client of what it has picked. In these case the media 3463 properties will also be sent updating the supported Scale values. 3464 This enables a client to adjust the used Scale value. 3466 To minimize impact on playback in any of the above cases the server 3467 MUST modify the playback properties and set Scale to a supportable 3468 value and continue delivery the media. When doing this modification 3469 it MUST send a PLAY_NOTIFY message with the Notify-Reason header set 3470 to "scale-change". The request MUST contain a Range header with the 3471 media time where the change took effect, a Scale header with the new 3472 value in use, Session header with the ID for the session it applies 3473 to and a Date header with the server wallclock time of the change. 3474 For time progressing content also the Media-Range and the Media- 3475 Properties at this point in time MUST be included. The Media- 3476 Properties header MUST be included if the scale change was due to the 3477 content changing what scale values that is supported. 3479 For media streams being delivered using RTP also a RTP-Info header 3480 MUST be included. It MUST contain the rtptime parameter with a value 3481 corresponding to the point of change in that media and optionally 3482 also the sequence number. 3484 A PLAY_NOTIFY request with Notify-Reason header set to "Scale-Change" 3485 MUST NOT carry a message body. 3487 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3488 Date: Tue, 14 Apr 2008 15:48:06 GMT 3489 CSeq: 854 3490 Notify-Reason: scale-change 3491 Session: uZ3ci0K+Ld-M 3492 Media-Properties: Time-Progressing, 3493 Time-Limited=20080415T153919.36Z, Random-Access=5.0 3494 Media-Range: npt=0-1:37:21.394 3495 Range: npt=1:37:21.394- 3496 Scale: 1 3497 RTP-Info: url="rtsp://example.com/fizzle/foo/audio" 3498 ssrc=0D12F123:rtptime=2345962545 3500 C->S: RTSP/2.0 200 OK 3501 CSeq: 854 3502 User-Agent: PhonyClient/1.2 3504 13.6. PAUSE 3506 The PAUSE request causes the stream delivery to immediately be 3507 interrupted (halted). A PAUSE request MUST be done either with the 3508 aggregated control URI for aggregated sessions, resulting in all 3509 media being halted, or the media URI for non-aggregated sessions. 3510 Any attempt to do muting of a single media with an PAUSE request in 3511 an aggregated session MUST be responded with error 460 (Only 3512 Aggregate Operation Allowed). After resuming playback, 3513 synchronization of the tracks MUST be maintained. Any server 3514 resources are kept, though servers MAY close the session and free 3515 resources after being paused for the duration specified with the 3516 timeout parameter of the Session header in the SETUP message. 3518 Example: 3520 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3521 CSeq: 834 3522 Session: 12345678 3523 User-Agent: PhonyClient/1.2 3525 S->C: RTSP/2.0 200 OK 3526 CSeq: 834 3527 Date: Thu, 23 Jan 1997 15:35:06 GMT 3528 Range: npt=45.76- 3530 The PAUSE request causes stream delivery to be interrupted 3531 immediately on receipt of the message and the pause point is set to 3532 the current point in the presentation. That pause point in the media 3533 stream needs to be maintained. A subsequent PLAY request without 3534 Range header resume from the pause point and play until media end. 3536 The pause point after any PAUSE request MUST be returned to the 3537 client by adding a Range header with what remains unplayed of the 3538 PLAY request's range. For media with random access properties, if 3539 one desires to resume playing a ranged request, one simply includes 3540 the Range header from the PAUSE response and include the Seek-Style 3541 header with the Next policy in the PLAY request. For media that is 3542 time-progressing and has retention duration=0 the follow-up PLAY 3543 request to start media delivery again, will need to use "npt=now-" 3544 and not the answer given in the response to PAUSE. 3546 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3547 CSeq: 834 3548 Session: 12345678 3549 Range: npt=10-30 3550 User-Agent: PhonyClient/1.2 3552 S->C: RTSP/2.0 200 OK 3553 CSeq: 834 3554 Date: Thu, 23 Jan 1997 15:35:06 GMT 3555 Server: PhonyServer 1.0 3556 Range: npt=10-30 3557 Seek-Style: First-Prior 3558 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3559 ssrc=0D12F123:seq=5712;rtptime=934207921, 3560 url="rtsp://example.com/fizzle/videotrack" 3561 ssrc=4FAD8726:seq=57654;rtptime=2792482193 3562 Session: 12345678 3564 After 11 seconds, i.e. at 21 seconds into the presentation: 3565 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3566 CSeq: 835 3567 Session: 12345678 3568 User-Agent: PhonyClient/1.2 3570 S->C: RTSP/2.0 200 OK 3571 CSeq: 835 3572 Date: 23 Jan 1997 15:35:09 GMT 3573 Server: PhonyServer 1.0 3574 Range: npt=21-30 3575 Session: 12345678 3577 If a client issues a PAUSE request and the server acknowledges and 3578 enters the READY state, the proper server response, if the player 3579 issues another PAUSE, is still 200 OK. The 200 OK response MUST 3580 include the Range header with the current pause point. See examples 3581 below: 3583 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3584 CSeq: 834 3585 Session: 12345678 3586 User-Agent: PhonyClient/1.2 3588 S->C: RTSP/2.0 200 OK 3589 CSeq: 834 3590 Session: 12345678 3591 Date: Thu, 23 Jan 1997 15:35:06 GMT 3592 Range: npt=45.76-98.36 3594 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3595 CSeq: 835 3596 Session: 12345678 3597 User-Agent: PhonyClient/1.2 3599 S->C: RTSP/2.0 200 OK 3600 CSeq: 835 3601 Session: 12345678 3602 Date: 23 Jan 1997 15:35:07 GMT 3603 Range: npt=45.76-98.36 3605 13.7. TEARDOWN 3607 13.7.1. Client to Server 3609 The TEARDOWN client to server request stops the stream delivery for 3610 the given URI, freeing the resources associated with it. A TEARDOWN 3611 request MAY be performed on either an aggregated or a media control 3612 URI. However some restrictions apply depending on the current state. 3613 The TEARDOWN request MUST contain a Session header indicating what 3614 session the request applies to. 3616 A TEARDOWN using the aggregated control URI or the media URI in a 3617 session under non-aggregated control (single media session) MAY be 3618 done in any state (Ready, and Play). A successful request MUST 3619 result in that media delivery is immediately halted and the session 3620 state is destroyed. This MUST be indicated through the lack of a 3621 Session header in the response. 3623 A TEARDOWN using a media URI in an aggregated session MAY only be 3624 done in Ready state. Such a request only removes the indicated media 3625 stream and associated resources from the session. This may result in 3626 that a session returns to non-aggregated control, due to that it only 3627 contains a single media after the requests completion. A session 3628 that will exist after the processing of the TEARDOWN request MUST in 3629 the response to that TEARDOWN request contain a Session header. Thus 3630 the presence of the Session header indicates to the receiver of the 3631 response if the session is still existing or has been removed. 3633 Example: 3635 C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/2.0 3636 CSeq: 892 3637 Session: 12345678 3638 User-Agent: PhonyClient/1.2 3640 S->C: RTSP/2.0 200 OK 3641 CSeq: 892 3642 Server: PhonyServer 1.0 3644 13.7.2. Server to Client 3646 The server can send TEARDOWN requests in the server to client 3647 direction to indicate that the server has been forced to terminate 3648 the ongoing session. This may happen for several reasons such as, 3649 server maintenance without available backup, or session have been 3650 inactive for extended periods of time. The reason is provided in the 3651 Terminate-Reason header (Section 16.50). 3653 When a RTSP client has maintained a RTSP session that otherwise is 3654 inactive for an extended period of time the server may reclaim the 3655 resources. That is done by issuing a REDIRECT request with the 3656 Terminate-Reason set to "Session-Timeout". This MAY be done when the 3657 client has been inactive in the RTSP session for more than one 3658 Session Timeout period (Section 16.48). However, the server is 3659 RECOMMENDED to not perform this operation until an extended period of 3660 inactivity has passed. The time period is considered extended when 3661 it is 10 times the Session Timeout period. Consideration of the 3662 application of the server and its content should be performed when 3663 configuring what is considered as extended periods of time. 3665 In case the server needs to stop provide service to the established 3666 sessions and their is no server to point at in a REDIRECT request 3667 TEARDOWN shall be used to terminate the session. This method can 3668 also be used when non-recoverable internal errors have happened and 3669 the server has no other option then to terminate the sessions. 3671 The TEARDOWN request is normally done on the session aggregate 3672 control URI and MUST include the following headers; Session and 3673 Terminate-Reason headers. The request only applies to the session 3674 identified in the Session header. The server may include a message 3675 to the client's user with the "user-msg" parameter. 3677 The TEARDOWN request may alternatively be done on the wild card URI * 3678 and without any session header. The scope of such a request is 3679 limited to the next-hop (i.e. the RTSP agent in direct communication 3680 with the server) and applies, as well, to the control connection 3681 between the next-hop RTSP agent and the server. This request 3682 indicates that all sessions and pending requests being managed via 3683 the control connection are terminated. Any intervening proxies 3684 SHOULD do all of the following in the order listed: 3686 1. respond to the TEARDOWN request 3688 2. disconnect the control channel from the requesting server 3690 3. pass the TEARDOWN request to each applicable client (typically 3691 those clients with an active session or an unanswered request) 3693 Note: The proxy is responsible for accepting TEARDOWN responses 3694 from its clients; these responses MUST NOT be passed on to either 3695 the original server or the redirected server. 3697 13.8. GET_PARAMETER 3699 The GET_PARAMETER request retrieves the value of any specified 3700 parameter or parameters for a presentation or stream specified in the 3701 URI. If the Session header is present in a request, the value of a 3702 parameter MUST be retrieved in the specified session context. There 3703 are two ways of specifying the parameters to be retrieved. The first 3704 is by including headers which have been defined such that you can use 3705 them for this purpose. Header for this purpose should allow empty, 3706 or stripped value parts to avoid having to specify bogus data when 3707 indicating the desire to retrieve a value. The successful completion 3708 of the request should also be evident from any filled out values in 3709 the response. The Media-Range header (Section 16.29) is one such 3710 header. The other is to specify a message body that lists the 3711 parameter(s) that are desirable to retrieve. The Content-Type header 3712 (Section 16.18) is used to specify which format the message body has. 3714 The headers that MAY be used for retrieving their current value using 3715 GET_PARAMETER are: 3717 o Accept-Ranges 3719 o Media-Range 3721 o Media-Properties 3723 o Range 3725 o RTP-Info 3726 The method MAY also be used without a message body or any header that 3727 request parameters for keep-alive purpose. Any request that is 3728 successful, i.e., a 200 OK response is received, then the keep-alive 3729 timer has been updated. Any non-required header present in such a 3730 request may or may not been processed. Normally the presence of 3731 filled out values in the header will be indication that the header 3732 has been processed. However, for cases when this is difficult to 3733 determine, it is recommended to use a feature-tag and the Require 3734 header. Due to this reason it is usually easier if any parameters to 3735 be retrieved are sent in the body, rather than using any header. 3737 Parameters specified within the body of the message must all be 3738 understood by the request receiving agent. If one or more parameters 3739 are not understood a 451 (Parameter Not Understood) MUST be sent 3740 including a body listing these parameters that wasn't understood. If 3741 all parameters are understood their value is filled in and returned 3742 in the response message body. 3744 Example: 3746 S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/2.0 3747 CSeq: 431 3748 Content-Type: text/parameters 3749 Session: 12345678 3750 Content-Length: 26 3751 User-Agent: PhonyClient/1.2 3753 packets_received 3754 jitter 3756 C->S: RTSP/2.0 200 OK 3757 CSeq: 431 3758 Session: 12345678 3759 Content-Length: 38 3760 Content-Type: text/parameters 3762 packets_received: 10 3763 jitter: 0.3838 3765 13.9. SET_PARAMETER 3767 This method requests to set the value of a parameter or a set of 3768 parameters for a presentation or stream specified by the URI. The 3769 method MAY also be used without a message body. It is the 3770 RECOMMENDED method to use in request sent for the sole purpose of 3771 updating the keep-alive timer. If this request is successful, i.e. a 3772 200 OK response is received, then the keep-alive timer has been 3773 updated. Any non-required header present in such a request may or 3774 may not been processed. To allow a client to determine if any such 3775 header has been processed, it is necessary to use a feature tag and 3776 the Require header. Due to this reason it is RECOMMENDED that any 3777 parameters are sent in the body, rather than using any header. 3779 A request is RECOMMENDED to only contain a single parameter to allow 3780 the client to determine why a particular request failed. If the 3781 request contains several parameters, the server MUST only act on the 3782 request if all of the parameters can be set successfully. A server 3783 MUST allow a parameter to be set repeatedly to the same value, but it 3784 MAY disallow changing parameter values. If the receiver of the 3785 request does not understand or cannot locate a parameter, error 451 3786 (Parameter Not Understood) MUST be used. In the case a parameter is 3787 not allowed to change, the error code is 458 (Parameter Is Read- 3788 Only). The response body MUST contain only the parameters that have 3789 errors. Otherwise no body MUST be returned. 3791 Note: transport parameters for the media stream MUST only be set with 3792 the SETUP command. 3794 Restricting setting transport parameters to SETUP is for the 3795 benefit of firewalls. 3797 The parameters are split in a fine-grained fashion so that there 3798 can be more meaningful error indications. However, it may make 3799 sense to allow the setting of several parameters if an atomic 3800 setting is desirable. Imagine device control where the client 3801 does not want the camera to pan unless it can also tilt to the 3802 right angle at the same time. 3804 Example: 3806 C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/2.0 3807 CSeq: 421 3808 User-Agent: PhonyClient/1.2 3809 Content-length: 20 3810 Content-type: text/parameters 3812 barparam: barstuff 3814 S->C: RTSP/2.0 451 Parameter Not Understood 3815 CSeq: 421 3816 Content-length: 10 3817 Content-type: text/parameters 3819 barparam: barstuff 3821 13.10. REDIRECT 3823 The REDIRECT method is issued by a server to inform a client that the 3824 service provided will be terminated and where a corresponding service 3825 can be provided instead. This happens for different reasons. One is 3826 that the server is being administrated such that it must stop 3827 providing service. Thus the client is required to connect to another 3828 server location to access the resource indicated by the Request-URI. 3830 The REDIRECT request SHALL contain a Terminate-Reason header 3831 (Section 16.50) to inform the client of the reason for the request. 3832 Additional parameters related to the reason may also be included. 3833 The intention here is to allow an server administrator to do a 3834 controlled shutdown of the RTSP server. That requires sufficient 3835 time to inform all entities having associated state with the server 3836 and for them to perform a controlled migration from this server to a 3837 fall back server. 3839 A REDIRECT request with a Session header has end-to-end (i.e. server 3840 to client) scope and applies only to the given session. Any 3841 intervening proxies SHOULD NOT disconnect the control channel while 3842 there are other remaining end-to-end sessions. The REQUIRED Location 3843 header MUST contain a complete absolute URI pointing to the resource 3844 to which the client SHOULD reconnect. Specifically, the Location 3845 MUST NOT contain just the host and port. A client may receive a 3846 REDIRECT request with a Session header, if and only if, an end-to-end 3847 session has been established. 3849 A client may receive a REDIRECT request without a Session header at 3850 any time when it has communication or a connection established with a 3851 server. The scope of such a request is limited to the next-hop (i.e. 3852 the RTSP agent in direct communication with the server) and applies 3853 to all sessions controlled, as well as the control connection between 3854 the next-hop RTSP agent and the server. A REDIRECT request without a 3855 Session header indicates that all sessions and pending requests being 3856 managed via the control connection MUST be redirected. The REQUIRED 3857 Location header, if included in such a request, SHOULD contain an 3858 absolute URI with only the host address and the OPTIONAL port number 3859 of the server to which the RTSP agent SHOULD reconnect. Any 3860 intervening proxies SHOULD do all of the following in the order 3861 listed: 3863 1. respond to the REDIRECT request 3865 2. disconnect the control channel from the requesting server 3867 3. connect to the server at the given host address 3868 4. pass the REDIRECT request to each applicable client (typically 3869 those clients with an active session or an unanswered request) 3871 Note: The proxy is responsible for accepting REDIRECT responses 3872 from its clients; these responses MUST NOT be passed on to either 3873 the original server or the redirected server. 3875 When the server lacks any alternative server and needs to terminate a 3876 session or all sessions the TEARDOWN request SHALL be used instead. 3878 When no Terminate-Reason "time" parameter are included in a REDIRECT 3879 request, the client SHALL perform the redirection immediately and 3880 return a response to the server. The server shall consider the 3881 session as terminated and can free any associated state after it 3882 receives the successful (2xx) response. The server MAY close the 3883 signalling connection upon receiving the response and the client 3884 SHOULD close the signalling connection after sending the 2xx 3885 response. The exception to this is when the client has several 3886 sessions on the server being managed by the given signalling 3887 connection. In this case, the client SHOULD close the connection 3888 when it has received and responded to REDIRECT requests for all the 3889 sessions managed by the signalling connection. 3891 The Terminate-Reason header "time" parameter MAY be used to indicate 3892 the wallclock time by when the redirection MUST have take place. To 3893 allow a client to determine that redirect time without being time 3894 synchronized with the server, the server MUST include a Date header 3895 in the request. The client should have before the redirection time- 3896 line terminated the session and close the control connection. The 3897 server MAY simple cease to provide service when the deadline time has 3898 been reached, or it may issue TEARDOWN requests to the remaining 3899 sessions. 3901 The differentiation of REDIRECT requests with and without range 3902 header is to allow for clear and explicit state handling. As the 3903 state in the server needs to be kept until the point of 3904 redirection, the handling becomes more clear if the client is 3905 required to TEARDOWN the session at the redirect point. 3907 If the REDIRECT request times out following the rules in Section 10.4 3908 the server MAY terminate the session or transport connection that 3909 would be redirected by the request. This is a safeguard against 3910 misbehaving clients that refuses to respond to a REDIRECT request. 3911 That should not provide any benefit. 3913 After a REDIRECT request has been processed, a client that wants to 3914 continue to send or receive media for the resource identified by the 3915 Request-URI will have to establish a new session with the designated 3916 host. If the URI given in the Location header is a valid resource 3917 URI, a client SHOULD issue a DESCRIBE request for the URI. 3919 Note: The media resource indicated by the Location header can be 3920 identical, slightly different or totally different. This is the 3921 reason why a new DESCRIBE request SHOULD be issued. 3923 If the Location header contains only a host address, the client MAY 3924 assume that the media on the new server is identical to the media on 3925 the old server, i.e. all media configuration information from the old 3926 session is still valid except for the host address. However the 3927 usage of conditional SETUP using MTag identifiers are RECOMMENDED to 3928 verify the assumption. 3930 This example request redirects traffic for this session to the new 3931 server at the given absolute time: 3933 S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/2.0 3934 CSeq: 732 3935 Location: rtsp://s2.example.com:8001 3936 Terminate-Reason: Server-Admin ;time=19960213T143205Z 3937 Session: uZ3ci0K+Ld-M 3938 Date: Thu, 13 Feb 1996 14:30:43 GMT 3940 C->S: RTSP/2.0 200 OK 3941 CSeq: 732 3942 User-Agent: PhonyClient/1.2 3944 14. Embedded (Interleaved) Binary Data 3946 In order to fulfill certain requirements on the network side, e.g. in 3947 conjunction with network address translators that block RTP traffic 3948 over UDP, it may be necessary to interleave RTSP messages and media 3949 stream data. This interleaving should generally be avoided unless 3950 necessary since it complicates client and server operation and 3951 imposes additional overhead. Also head of line blocking may cause 3952 problems. Interleaved binary data SHOULD only be used if RTSP is 3953 carried over TCP. 3955 Stream data such as RTP packets is encapsulated by an ASCII dollar 3956 sign (24 decimal), followed by a one-byte channel identifier, 3957 followed by the length of the encapsulated binary data as a binary, 3958 two-byte integer in network byte order. The stream data follows 3959 immediately afterwards, without a CRLF, but including the upper-layer 3960 protocol headers. Each $ block MUST contain exactly one upper-layer 3961 protocol data unit, e.g., one RTP packet. 3962 0 1 2 3 3963 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 3964 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3965 | "$" = 24 | Channel ID | Length in bytes | 3966 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3967 : Length number of bytes of binary data : 3968 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3970 The channel identifier is defined in the Transport header with the 3971 interleaved parameter (Section 16.52). 3973 When the transport choice is RTP, RTCP messages are also interleaved 3974 by the server over the TCP connection. The usage of RTCP messages is 3975 indicated by including a interval containing a second channel in the 3976 interleaved parameter of the Transport header, see Section 16.52. If 3977 RTCP is used, packets MUST be sent on the first available channel 3978 higher than the RTP channel. The channels are bi-directional and 3979 therefore RTCP traffic are sent on the second channel in both 3980 directions. 3982 RTCP is sometime needed for synchronization when two or more 3983 streams are interleaved in such a fashion. Also, this provides a 3984 convenient way to tunnel RTP/RTCP packets through the TCP control 3985 connection when required by the network configuration and transfer 3986 them onto UDP when possible. 3988 C->S: SETUP rtsp://example.com/bar.file RTSP/2.0 3989 CSeq: 2 3990 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 3991 Accept-Ranges: NPT, SMPTE, UTC 3992 User-Agent: PhonyClient/1.2 3994 S->C: RTSP/2.0 200 OK 3995 CSeq: 2 3996 Date: Thu, 05 Jun 1997 18:57:18 GMT 3997 Transport: RTP/AVP/TCP;unicast;interleaved=5-6 3998 Session: 12345678 3999 Accept-Ranges: NPT 4000 Media-Properties: Random-Access=0.2, Unmutable, Unlimited 4002 C->S: PLAY rtsp://example.com/bar.file RTSP/2.0 4003 CSeq: 3 4004 Session: 12345678 4005 User-Agent: PhonyClient/1.2 4007 S->C: RTSP/2.0 200 OK 4008 CSeq: 3 4009 Session: 12345678 4010 Date: Thu, 05 Jun 1997 18:59:15 GMT 4011 RTP-Info: url="rtsp://example.com/bar.file" 4012 ssrc=0D12F123:seq=232433;rtptime=972948234 4013 Range: npt=0-56.8 4014 Seek-Style: RAP 4016 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 4017 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 4018 S->C: $006{2 byte length}{"length" bytes RTCP packet} 4020 15. Status Code Definitions 4022 Where applicable, HTTP status [H10] codes are reused. Status codes 4023 that have the same meaning are not repeated here. See Table 4 for a 4024 listing of which status codes may be returned by which requests. All 4025 error messages, 4xx and 5xx MAY return a body containing further 4026 information about the error. 4028 15.1. Success 1xx 4030 15.1.1. 100 Continue 4032 The client SHOULD continue with its request. This interim response 4033 is used to inform the client that the initial part of the request has 4034 been received and has not yet been rejected by the server. The 4035 client SHOULD continue by sending the remainder of the request or, if 4036 the request has already been completed, ignore this response. The 4037 server MUST send a final response after the request has been 4038 completed. 4040 15.2. Success 2xx 4042 This class of status code indicates that the client's request was 4043 successfully received, understood, and accepted. 4045 15.2.1. 200 OK 4047 The request has succeeded. The information returned with the 4048 response is dependent on the method used in the request. 4050 15.3. Redirection 3xx 4052 The notation "3rr" indicates response codes from 300 to 399 inclusive 4053 which are meant for redirection. The response code 304 is excluded 4054 from this set, as it is not used for redirection. 4056 Within RTSP, redirection may be used for load balancing or 4057 redirecting stream requests to a server topologically closer to the 4058 client. Mechanisms to determine topological proximity are beyond the 4059 scope of this specification. 4061 An 3rr code MAY be used to respond to any request. It is RECOMMENDED 4062 that they are used if necessary before a session is established, 4063 i.e., in response to DESCRIBE or SETUP. However in cases where a 4064 server is not able to send a REDIRECT request to the client, the 4065 server MAY need to resort to using 3rr responses to inform a client 4066 with an established session about the need for redirecting the 4067 session. If an 3rr response is received for a request in relation to 4068 an established session, the client SHOULD send a TEARDOWN request for 4069 the session, and MAY reestablish the session using the resource 4070 indicated by the Location. 4072 If the Location header is used in a response it MUST contain an 4073 absolute URI pointing out the media resource the client is redirected 4074 to, the URI MUST NOT only contain the host name. 4076 15.3.1. 301 Moved Permanently 4078 The request resource are moved permanently and resides now at the URI 4079 given by the location header. The user client SHOULD redirect 4080 automatically to the given URI. This response MUST NOT contain a 4081 message-body. The Location header MUST be included in the response. 4083 15.3.2. 302 Found 4085 The requested resource resides temporarily at the URI given by the 4086 Location header. The Location header MUST be included in the 4087 response. This response is intended to be used for many types of 4088 temporary redirects; e.g., load balancing. It is RECOMMENDED that 4089 the server set the reason phrase to something more meaningful than 4090 "Found" in these cases. The user client SHOULD redirect 4091 automatically to the given URI. This response MUST NOT contain a 4092 message-body. 4094 This example shows a client being redirected to a different server: 4096 C->S: SETUP rtsp://example.com/fizzle/foo RTSP/2.0 4097 CSeq: 2 4098 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 4099 Accept-Ranges: NPT, SMPTE, UTC 4100 User-Agent: PhonyClient/1.2 4102 S->C: RTSP/2.0 302 Try Other Server 4103 CSeq: 2 4104 Location: rtsp://s2.example.com:8001/fizzle/foo 4106 15.3.3. 303 See Other 4108 This status code MUST NOT be used in RTSP. However, it was allowed 4109 to use in RTSP 1.0 (RFC 2326). 4111 15.3.4. 304 Not Modified 4113 If the client has performed a conditional DESCRIBE or SETUP (see 4114 Section 16.24) and the requested resource has not been modified, the 4115 server SHOULD send a 304 response. This response MUST NOT contain a 4116 message-body. 4118 The response MUST include the following header fields: 4120 o Date 4122 o MTag and/or Content-Location, if the header(s) would have been 4123 sent in a 200 response to the same request. 4125 o Expires, Cache-Control, and/or Vary, if the field-value might 4126 differ from that sent in any previous response for the same 4127 variant. 4129 This response is independent for the DESCRIBE and SETUP requests. 4130 That is, a 304 response to DESCRIBE does NOT imply that the resource 4131 content is unchanged (only the session description) and a 304 4132 response to SETUP does NOT imply that the resource description is 4133 unchanged. The MTag and If-Match headers may be used to link the 4134 DESCRIBE and SETUP in this manner. 4136 15.3.5. 305 Use Proxy 4138 The requested resource MUST be accessed through the proxy given by 4139 the Location field. The Location field gives the URI of the proxy. 4140 The recipient is expected to repeat this single request via the 4141 proxy. 305 responses MUST only be generated by origin servers. 4143 15.4. Client Error 4xx 4145 15.4.1. 400 Bad Request 4147 The request could not be understood by the server due to malformed 4148 syntax. The client SHOULD NOT repeat the request without 4149 modifications. If the request does not have a CSeq header, the 4150 server MUST NOT include a CSeq in the response. 4152 15.4.2. 401 Unauthorized 4154 The request requires user authentication. The response MUST include 4155 a WWW-Authenticate header (Section 16.57) field containing a 4156 challenge applicable to the requested resource. The client MAY 4157 repeat the request with a suitable Authorization header field. If 4158 the request already included Authorization credentials, then the 401 4159 response indicates that authorization has been refused for those 4160 credentials. If the 401 response contains the same challenge as the 4161 prior response, and the user agent has already attempted 4162 authentication at least once, then the user SHOULD be presented the 4163 entity that was given in the response, since that entity might 4164 include relevant diagnostic information. HTTP access authentication 4165 is explained in [RFC2617]. 4167 15.4.3. 402 Payment Required 4169 This code is reserved for future use. 4171 15.4.4. 403 Forbidden 4173 The server understood the request, but is refusing to fulfill it. 4174 Authorization will not help and the request SHOULD NOT be repeated. 4175 If the server wishes to make public why the request has not been 4176 fulfilled, it SHOULD describe the reason for the refusal in the 4177 entity. If the server does not wish to make this information 4178 available to the client, the status code 404 (Not Found) can be used 4179 instead. 4181 15.4.5. 404 Not Found 4183 The server has not found anything matching the Request-URI. No 4184 indication is given of whether the condition is temporary or 4185 permanent. The 410 (Gone) status code SHOULD be used if the server 4186 knows, through some internally configurable mechanism, that an old 4187 resource is permanently unavailable and has no forwarding address. 4188 This status code is commonly used when the server does not wish to 4189 reveal exactly why the request has been refused, or when no other 4190 response is applicable. 4192 15.4.6. 405 Method Not Allowed 4194 The method specified in the request is not allowed for the resource 4195 identified by the Request-URI. The response MUST include an Allow 4196 header containing a list of valid methods for the requested resource. 4197 This status code is also to be used if a request attempts to use a 4198 method not indicated during SETUP. 4200 15.4.7. 406 Not Acceptable 4202 The resource identified by the request is only capable of generating 4203 response entities which have content characteristics not acceptable 4204 according to the accept headers sent in the request. 4206 The response SHOULD include an message body containing a list of 4207 available entity characteristics and location(s) from which the user 4208 or user agent can choose the one most appropriate. The entity format 4209 is specified by the media type given in the Content-Type header 4210 field. Depending upon the format and the capabilities of the user 4211 agent, selection of the most appropriate choice MAY be performed 4212 automatically. However, this specification does not define any 4213 standard for such automatic selection. 4215 If the response could be unacceptable, a user agent SHOULD 4216 temporarily stop receipt of more data and query the user for a 4217 decision on further actions. 4219 15.4.8. 407 Proxy Authentication Required 4221 This code is similar to 401 (Unauthorized) (Section 15.4.2), but 4222 indicates that the client must first authenticate itself with the 4223 proxy. The proxy MUST return a Proxy-Authenticate header field 4224 (Section 16.33) containing a challenge applicable to the proxy for 4225 the requested resource. 4227 15.4.9. 408 Request Timeout 4229 The client did not produce a request within the time that the server 4230 was prepared to wait. The client MAY repeat the request without 4231 modifications at any later time. 4233 15.4.10. 410 Gone 4235 The requested resource is no longer available at the server and the 4236 forwarding address is not known. This condition is expected to be 4237 considered permanent. If the server does not know, or has no 4238 facility to determine, whether or not the condition is permanent, the 4239 status code 404 (Not Found) SHOULD be used instead. This response is 4240 cacheable unless indicated otherwise. 4242 The 410 response is primarily intended to assist the task of 4243 repository maintenance by notifying the recipient that the resource 4244 is intentionally unavailable and that the server owners desire that 4245 remote links to that resource be removed. Such an event is common 4246 for limited-time, promotional services and for resources belonging to 4247 individuals no longer working at the server's site. It is not 4248 necessary to mark all permanently unavailable resources as "gone" or 4249 to keep the mark for any length of time -- that is left to the 4250 discretion of the owner of the server. 4252 15.4.11. 411 Length Required 4254 The server refuses to accept the request without a defined Content- 4255 Length. The client MAY repeat the request if it adds a valid 4256 Content-Length header field containing the length of the message-body 4257 in the request message. 4259 15.4.12. 412 Precondition Failed 4261 The precondition given in one or more of the request-header fields 4262 evaluated to false when it was tested on the server. This response 4263 code allows the client to place preconditions on the current resource 4264 meta information (header field data) and thus prevent the requested 4265 method from being applied to a resource other than the one intended. 4267 15.4.13. 413 Request Message Body Too Large 4269 The server is refusing to process a request because the request 4270 message body is larger than the server is willing or able to process. 4271 The server MAY close the connection to prevent the client from 4272 continuing the request. 4274 If the condition is temporary, the server SHOULD include a Retry- 4275 After header field to indicate that it is temporary and after what 4276 time the client MAY try again. 4278 15.4.14. 414 Request-URI Too Long 4280 The server is refusing to service the request because the Request-URI 4281 is longer than the server is willing to interpret. This rare 4282 condition is only likely to occur when a client has used a request 4283 with long query information, when the client has descended into a URI 4284 "black hole" of redirection (e.g., a redirected URI prefix that 4285 points to a suffix of itself), or when the server is under attack by 4286 a client attempting to exploit security holes present in some servers 4287 using fixed-length buffers for reading or manipulating the Request- 4288 URI. 4290 15.4.15. 415 Unsupported Media Type 4292 The server is refusing to service the request because the entity of 4293 the request is in a format not supported by the requested resource 4294 for the requested method. 4296 15.4.16. 451 Parameter Not Understood 4298 The recipient of the request does not support one or more parameters 4299 contained in the request. When returning this error message the 4300 sender SHOULD return a message body containing the offending 4301 parameter(s). 4303 15.4.17. 452 reserved 4305 This error code was removed from RFC 2326 [RFC2326] as it is 4306 obsolete. This error code MUST NOT be used anymore. 4308 15.4.18. 453 Not Enough Bandwidth 4310 The request was refused because there was insufficient bandwidth. 4311 This may, for example, be the result of a resource reservation 4312 failure. 4314 15.4.19. 454 Session Not Found 4316 The RTSP session identifier in the Session header is missing, 4317 invalid, or has timed out. 4319 15.4.20. 455 Method Not Valid in This State 4321 The client or server cannot process this request in its current 4322 state. The response MUST contain an Allow header to make error 4323 recovery possible. 4325 15.4.21. 456 Header Field Not Valid for Resource 4327 The server could not act on a required request header. For example, 4328 if PLAY contains the Range header field but the stream does not allow 4329 seeking. This error message may also be used for specifying when the 4330 time format in Range is impossible for the resource. In that case 4331 the Accept-Ranges header MUST be returned to inform the client of 4332 which format(s) that are allowed. 4334 15.4.22. 457 Invalid Range 4336 The Range value given is out of bounds, e.g., beyond the end of the 4337 presentation. 4339 15.4.23. 458 Parameter Is Read-Only 4341 The parameter to be set by SET_PARAMETER can be read but not 4342 modified. When returning this error message the sender SHOULD return 4343 a message body containing the offending parameter(s). 4345 15.4.24. 459 Aggregate Operation Not Allowed 4347 The requested method may not be applied on the URI in question since 4348 it is an aggregate (presentation) URI. The method may be applied on 4349 a media URI. 4351 15.4.25. 460 Only Aggregate Operation Allowed 4353 The requested method may not be applied on the URI in question since 4354 it is not an aggregate control (presentation) URI. The method may be 4355 applied on the aggregate control URI. 4357 15.4.26. 461 Unsupported Transport 4359 The Transport field did not contain a supported transport 4360 specification. 4362 15.4.27. 462 Destination Unreachable 4364 The data transmission channel could not be established because the 4365 client address could not be reached. This error will most likely be 4366 the result of a client attempt to place an invalid dest_addr 4367 parameter in the Transport field. 4369 15.4.28. 463 Destination Prohibited 4371 The data transmission channel was not established because the server 4372 prohibited access to the client address. This error is most likely 4373 the result of a client attempt to redirect media traffic to another 4374 destination with a dest_addr parameter in the Transport header. 4376 15.4.29. 464 Data Transport Not Ready Yet 4378 The data transmission channel to the media destination is not yet 4379 ready for carrying data. However the responding entity still expects 4380 that the data transmission channel will be established at this point 4381 in time. Note however that this may result in a permanent failure 4382 like 462 "Destination Unreachable". 4384 An example when this error may occur is in the case a client sends a 4385 PLAY request to a server prior to ensuring that the TCP connections 4386 negotiated for carrying media data was successful established (In 4387 violation of this specification). The server would use this error 4388 code to indicate that the requested action could not be performed due 4389 to the failure of completing the connection establishment. 4391 15.4.30. 465 Notification Reason Unknown 4393 This indicates that the client has received a PLAY_NOTIFY 4394 (Section 13.5) with a Notify-Reason header (Section 16.31) unknown to 4395 the client. 4397 15.4.31. 470 Connection Authorization Required 4399 The secured connection attempt need user or client authorization 4400 before proceeding. The next hops certificate is included in this 4401 response in the Accept-Credentials header. 4403 15.4.32. 471 Connection Credentials not accepted 4405 When performing a secure connection over multiple connections, a 4406 intermediary has refused to connect to the next hop and carry out the 4407 request due to unacceptable credentials for the used policy. 4409 15.4.33. 472 Failure to establish secure connection 4411 A proxy fails to establish a secure connection to the next hop RTSP 4412 agent. This is primarily caused by a fatal failure at the TLS 4413 handshake, for example due to server not accepting any cipher suits. 4415 15.5. Server Error 5xx 4417 Response status codes beginning with the digit "5" indicate cases in 4418 which the server is aware that it has erred or is incapable of 4419 performing the request The server SHOULD include an entity containing 4420 an explanation of the error situation, and whether it is a temporary 4421 or permanent condition. User agents SHOULD display any included 4422 entity to the user. These response codes are applicable to any 4423 request method. 4425 15.5.1. 500 Internal Server Error 4427 The server encountered an unexpected condition which prevented it 4428 from fulfilling the request. 4430 15.5.2. 501 Not Implemented 4432 The server does not support the functionality required to fulfill the 4433 request. This is the appropriate response when the server does not 4434 recognize the request method and is not capable of supporting it for 4435 any resource. 4437 15.5.3. 502 Bad Gateway 4439 The server, while acting as a gateway or proxy, received an invalid 4440 response from the upstream server it accessed in attempting to 4441 fulfill the request. 4443 15.5.4. 503 Service Unavailable 4445 The server is currently unable to handle the request due to a 4446 temporary overloading or maintenance of the server. The implication 4447 is that this is a temporary condition which will be alleviated after 4448 some delay. If known, the length of the delay MAY be indicated in a 4449 Retry-After header. If no Retry-After is given, the client SHOULD 4450 handle the response as it would for a 500 response. 4452 Note: The existence of the 503 status code does not imply that 4453 a server must use it when becoming overloaded. Some servers 4454 may wish to simply refuse the connection. 4456 15.5.5. 504 Gateway Timeout 4458 The server, while acting as a proxy, did not receive a timely 4459 response from the upstream server specified by the URI or some other 4460 auxiliary server (e.g. DNS) it needed to access in attempting to 4461 complete the request. 4463 15.5.6. 505 RTSP Version Not Supported 4465 The server does not support, or refuses to support, the RTSP protocol 4466 version that was used in the request message. The server is 4467 indicating that it is unable or unwilling to complete the request 4468 using the same major version as the client other than with this error 4469 message. The response SHOULD contain an message body describing why 4470 that version is not supported and what other protocols are supported 4471 by that server. 4473 15.5.7. 551 Option not supported 4475 A feature-tag given in the Require or the Proxy-Require fields was 4476 not supported. The Unsupported header MUST be returned stating the 4477 feature for which there is no support. 4479 16. Header Field Definitions 4481 +---------------+----------------+--------+---------+------+ 4482 | method | direction | object | acronym | Body | 4483 +---------------+----------------+--------+---------+------+ 4484 | DESCRIBE | C -> S | P,S | DES | r | 4485 | | | | | | 4486 | GET_PARAMETER | C -> S, S -> C | P,S | GPR | R,r | 4487 | | | | | | 4488 | OPTIONS | C -> S | P,S | OPT | | 4489 | | | | | | 4490 | | S -> C | | | | 4491 | | | | | | 4492 | PAUSE | C -> S | P,S | PSE | | 4493 | | | | | | 4494 | PLAY | C -> S | P,S | PLY | | 4495 | | | | | | 4496 | PLAY_NOTIFY | S -> C | P,S | PNY | R | 4497 | | | | | | 4498 | REDIRECT | S -> C | P,S | RDR | | 4499 | | | | | | 4500 | SETUP | C -> S | S | STP | | 4501 | | | | | | 4502 | SET_PARAMETER | C -> S, S -> C | P,S | SPR | R,r | 4503 | | | | | | 4504 | TEARDOWN | C -> S | P,S | TRD | | 4505 +---------------+----------------+--------+---------+------+ 4507 Table 8: Overview of RTSP methods, their direction, and what objects 4508 (P: presentation, S: stream) they operate on. Body notes if a method 4509 is allowed to carry body and in which direction, R = Request, 4510 r=response. Note: It is allowed for all error messages 4xx and 5xx to 4511 have a body 4513 The general syntax for header fields is covered in Section 5.2. This 4514 section lists the full set of header fields along with notes on 4515 meaning, and usage. The syntax definition for header fields are 4516 present in Section 20.2.3. Throughout this section, we use [HX.Y] to 4517 informational refer to Section X.Y of the current HTTP/1.1 4518 specification RFC 2616 [RFC2616]. Examples of each header field are 4519 given. 4521 Information about header fields in relation to methods and proxy 4522 processing is summarized in Table 9, Table 10, Table 11, and 4523 Table 12. 4525 The "where" column describes the request and response types in which 4526 the header field can be used. Values in this column are: 4528 R: header field may only appear in requests; 4530 r: header field may only appear in responses; 4532 2xx, 4xx, etc.: A numerical value or range indicates response codes 4533 with which the header field can be used; 4535 c: header field is copied from the request to the response. 4537 An empty entry in the "where" column indicates that the header field 4538 may be present in both requests and responses. 4540 The "proxy" column describes the operations a proxy may perform on a 4541 header field. An empty proxy column indicates that the proxy MUST 4542 NOT do any changes to that header, all allowed operations are 4543 explicitly stated: 4545 a: A proxy can add or concatenate the header field if not present. 4547 m: A proxy can modify an existing header field value. 4549 d: A proxy can delete a header field value. 4551 r: A proxy needs to be able to read the header field, and thus 4552 this header field cannot be encrypted. 4554 The rest of the columns relate to the presence of a header field in a 4555 method. The method names when abbreviated, are according to Table 8: 4557 c: Conditional; requirements on the header field depend on the 4558 context of the message. 4560 m: The header field is mandatory. 4562 m*: The header field SHOULD be sent, but clients/servers need to be 4563 prepared to receive messages without that header field. 4565 o: The header field is optional. 4567 *: The header field MUST be present if the message body is not 4568 empty. See Section 16.16, Section 16.18 and Section 5.3 for 4569 details. 4571 -: The header field is not applicable. 4573 "Optional" means that a Client/Server MAY include the header field in 4574 a request or response. The Client/Server behavior when receiving 4575 such headers varies, for some it may ignore the header field, in 4576 other case it is request to process the header. This is regulated by 4577 the method and header descriptions. Example of headers that require 4578 processing are the Require and Proxy-Require header fields discussed 4579 in Section 16.42 and Section 16.35. A "mandatory" header field MUST 4580 be present in a request, and MUST be understood by the Client/Server 4581 receiving the request. A mandatory response header field MUST be 4582 present in the response, and the header field MUST be understood by 4583 the Client/Server processing the response. "Not applicable" means 4584 that the header field MUST NOT be present in a request. If one is 4585 placed in a request by mistake, it MUST be ignored by the Client/ 4586 Server receiving the request. Similarly, a header field labeled "not 4587 applicable" for a response means that the Client/Server MUST NOT 4588 place the header field in the response, and the Client/Server MUST 4589 ignore the header field in the response. 4591 An RTSP agent MUST ignore extension headers that are not understood. 4593 The From and Location header fields contain an URI. If the URI 4594 contains a comma, or semicolon, the URI MUST be enclosed in double 4595 quotes ("). Any URI parameters are contained within these quotes. 4596 If the URI is not enclosed in double quotas, any semicolon- delimited 4597 parameters are header-parameters, not URI parameters. 4599 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4600 | Header | Wher | Pro | DES | OPT | SETU | PLA | PAUS | TRD | 4601 | | e | xy | | | P | Y | E | | 4602 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4603 | Accept | R | | o | - | - | - | - | - | 4604 | | | | | | | | | | 4605 | Accept-Credent | R | r | o | o | o | o | o | o | 4606 | ials | | | | | | | | | 4607 | | | | | | | | | | 4608 | Accept-Encodin | R | r | o | - | - | - | - | - | 4609 | g | | | | | | | | | 4610 | | | | | | | | | | 4611 | Accept-Languag | R | r | o | - | - | - | - | - | 4612 | e | | | | | | | | | 4613 | | | | | | | | | | 4614 | Accept-Ranges | R | r | - | - | m | - | - | - | 4615 | | | | | | | | | | 4616 | Accept-Ranges | r | r | - | - | o | - | - | - | 4617 | | | | | | | | | | 4618 | Accept-Ranges | 456 | r | - | - | - | o | - | - | 4619 | | | | | | | | | | 4620 | Allow | r | am | c | c | c | - | - | - | 4621 | | | | | | | | | | 4622 | Allow | 405 | am | m | m | m | m | m | m | 4623 | | | | | | | | | | 4624 | Authorization | R | | o | o | o | o | o | o | 4625 | | | | | | | | | | 4626 | Bandwidth | R | | o | o | o | o | - | - | 4627 | | | | | | | | | | 4628 | Blocksize | R | | o | - | o | o | - | - | 4629 | | | | | | | | | | 4630 | Cache-Control | | r | o | - | o | - | - | - | 4631 | | | | | | | | | | 4632 | Connection | | | o | o | o | o | o | o | 4633 | | | | | | | | | | 4634 | Connection-Cre | 470, | ar | o | o | o | o | o | o | 4635 | dentials | 407 | | | | | | | | 4636 | | | | | | | | | | 4637 | Content-Base | r | | o | - | - | - | - | - | 4638 | | | | | | | | | | 4639 | Content-Base | 4xx, | | o | o | o | o | o | o | 4640 | | 5xx | | | | | | | | 4641 | | | | | | | | | | 4642 | Content-Encodi | R | r | - | - | - | - | - | - | 4643 | ng | | | | | | | | | 4644 | | | | | | | | | | 4645 | Content-Encodi | r | r | o | - | - | - | - | - | 4646 | ng | | | | | | | | | 4647 | | | | | | | | | | 4648 | Content-Encodi | 4xx, | r | o | o | o | o | o | o | 4649 | ng | 5xx | | | | | | | | 4650 | | | | | | | | | | 4651 | Content-Langua | R | r | - | - | - | - | - | - | 4652 | ge | | | | | | | | | 4653 | | | | | | | | | | 4654 | Content-Langua | r | r | o | - | - | - | - | - | 4655 | ge | | | | | | | | | 4656 | | | | | | | | | | 4657 | Content-Langua | 4xx, | r | o | o | o | o | o | o | 4658 | ge | 5xx | | | | | | | | 4659 | | | | | | | | | | 4660 | Content-Length | r | r | * | - | - | - | - | - | 4661 | | | | | | | | | | 4662 | Content-Length | 4xx, | r | * | * | * | * | * | * | 4663 | | 5xx | | | | | | | | 4664 | | | | | | | | | | 4665 | Content-Locati | r | | o | - | - | - | - | - | 4666 | on | | | | | | | | | 4667 | | | | | | | | | | 4668 | Content-Locati | 4xx, | | o | o | o | o | o | o | 4669 | on | 5xx | | | | | | | | 4670 | | | | | | | | | | 4671 | Content-Type | r | | * | - | - | - | - | - | 4672 | Content-Type | 4xx, | | * | * | * | * | * | * | 4673 | | 5xx | | | | | | | | 4674 | | | | | | | | | | 4675 | CSeq | Rc | rm | m | m | m | m | m | m | 4676 | | | | | | | | | | 4677 | Date | | am | o | o | o | o | o | o | 4678 | | | | | | | | | | 4679 | MTag | r | r | o | - | o | - | - | - | 4680 | | | | | | | | | | 4681 | Expires | r | r | o | - | - | - | - | - | 4682 | | | | | | | | | | 4683 | From | R | r | o | o | o | o | o | o | 4684 | | | | | | | | | | 4685 | If-Match | R | r | - | - | o | - | - | - | 4686 | | | | | | | | | | 4687 | If-Modified-Si | R | r | o | - | o | - | - | - | 4688 | nce | | | | | | | | | 4689 | | | | | | | | | | 4690 | If-None-Match | R | r | o | - | - | - | - | - | 4691 | | | | | | | | | | 4692 | Last-Modified | r | r | o | - | - | - | - | - | 4693 | | | | | | | | | | 4694 | Location | 3rr | | o | o | o | o | o | o | 4695 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4697 Table 9: Overview of RTSP header fields (A-L) related to methods 4698 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 4700 +--------------+-------+------+----+----+------+------+-------+-----+ 4701 | Header | Where | Prox | DE | OP | SETU | PLAY | PAUSE | TRD | 4702 | | | y | S | T | P | | | | 4703 +--------------+-------+------+----+----+------+------+-------+-----+ 4704 | Media- | | | - | - | r | r | r | - | 4705 | Properties | | | | | | | | | 4706 | | | | | | | | | | 4707 | Media- Range | | | - | - | r | r | r | - | 4708 | | | | | | | | | | 4709 | Pipelined- | | amdr | - | o | o | o | o | o | 4710 | Requests | | | | | | | | | 4711 | | | | | | | | | | 4712 | Proxy- | 407 | amr | m | m | m | m | m | m | 4713 | Authenticate | | | | | | | | | 4714 | | | | | | | | | | 4715 | Proxy- | R | rd | o | o | o | o | o | o | 4716 | Authorizatio | | | | | | | | | 4717 | n | | | | | | | | | 4718 | | | | | | | | | | 4719 | Proxy- | R | ar | o | o | o | o | o | o | 4720 | Require | | | | | | | | | 4721 | | | | | | | | | | 4722 | Proxy- | r | r | c | c | c | c | c | c | 4723 | Require | | | | | | | | | 4724 | | | | | | | | | | 4725 | Proxy- | R | amr | c | c | c | c | c | c | 4726 | Supported | | | | | | | | | 4727 | | | | | | | | | | 4728 | Proxy- | r | | c | c | c | c | c | c | 4729 | Supported | | | | | | | | | 4730 | | | | | | | | | | 4731 | Public | r | admr | - | m | - | - | - | - | 4732 | | | | | | | | | | 4733 | Public | 501 | admr | m | m | m | m | m | m | 4734 | | | | | | | | | | 4735 | Range | R | | - | - | - | o | - | - | 4736 | | | | | | | | | | 4737 | Range | r | | - | - | c | m | m | - | 4738 | | | | | | | | | | 4739 | Terminate-Re | R | r | - | - | - | - | - | - | 4740 | ason | | | | | | | | | 4741 | | | | | | | | | | 4742 | Referer | R | | o | o | o | o | o | o | 4743 | | | | | | | | | | 4744 | Request- | R | | - | - | - | - | - | - | 4745 | Status | | | | | | | | | 4746 | | | | | | | | | | 4747 | Require | R | | o | o | o | o | o | o | 4748 | | | | | | | | | | 4749 | Retry-After | 3rr,5 | | o | o | o | - | - | - | 4750 | | 03 | | | | | | | | 4751 | | | | | | | | | | 4752 | Retry-After | 413 | | o | o | o | o | o | o | 4753 | | | | | | | | | | 4754 | RTP-Info | r | | - | - | c | c | - | - | 4755 | | | | | | | | | | 4756 | Scale | | | - | - | - | o | - | - | 4757 | | | | | | | | | | 4758 | Seek-Style | R | | - | - | - | o | - | - | 4759 | | | | | | | | | | 4760 | Seek-Style | r | | - | - | - | m | - | - | 4761 | | | | | | | | | | 4762 | Session | R | r | - | o | o | m | m | m | 4763 | | | | | | | | | | 4764 | Session | r | r | - | c | m | m | m | o | 4765 | | | | | | | | | | 4766 | Server | R | r | - | o | - | - | - | - | 4767 | Server | r | r | o | o | o | o | o | o | 4768 | | | | | | | | | | 4769 | Speed | | | - | - | - | o | - | - | 4770 | | | | | | | | | | 4771 | Supported | R | amr | o | o | o | o | o | o | 4772 | | | | | | | | | | 4773 | Supported | r | amr | c | c | c | c | c | c | 4774 | | | | | | | | | | 4775 | Timestamp | R | admr | o | o | o | o | o | o | 4776 | | | | | | | | | | 4777 | Timestamp | c | admr | m | m | m | m | m | m | 4778 | | | | | | | | | | 4779 | Transport | | amr | - | - | m | - | - | - | 4780 | | | | | | | | | | 4781 | Unsupported | r | | c | c | c | c | c | c | 4782 | | | | | | | | | | 4783 | User-Agent | R | | m* | m* | m* | m* | m* | m* | 4784 | | | | | | | | | | 4785 | Vary | r | | c | c | c | c | c | c | 4786 | | | | | | | | | | 4787 | Via | R | amr | o | o | o | o | o | o | 4788 | | | | | | | | | | 4789 | Via | c | dr | m | m | m | m | m | m | 4790 | | | | | | | | | | 4791 | WWW- | 401 | | m | m | m | m | m | m | 4792 | Authenticate | | | | | | | | | 4793 +--------------+-------+------+----+----+------+------+-------+-----+ 4795 Table 10: Overview of RTSP header fields (P-W) related to methods 4796 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 4798 +------------------------+---------+-------+-----+-----+-----+-----+ 4799 | Header | Where | Proxy | GPR | SPR | RDR | PNY | 4800 +------------------------+---------+-------+-----+-----+-----+-----+ 4801 | Accept-Credentials | R | r | o | o | o | - | 4802 | | | | | | | | 4803 | Allow | 405 | amr | m | m | m | - | 4804 | | | | | | | | 4805 | Authorization | R | | o | o | o | - | 4806 | | | | | | | | 4807 | Bandwidth | R | | - | o | - | - | 4808 | | | | | | | | 4809 | Blocksize | R | | - | o | - | - | 4810 | | | | | | | | 4811 | Connection | | | o | o | o | - | 4812 | | | | | | | | 4813 | Connection-Credentials | 470,407 | ar | o | o | o | - | 4814 | | | | | | | | 4815 | Content-Base | R | | o | o | - | - | 4816 | | | | | | | | 4817 | Content-Base | r | | o | o | - | - | 4818 | | | | | | | | 4819 | Content-Base | 4xx,5xx | | o | o | o | - | 4820 | | | | | | | | 4821 | Content-Encoding | R | r | o | o | - | - | 4822 | | | | | | | | 4823 | Content-Encoding | r | r | o | o | - | - | 4824 | | | | | | | | 4825 | Content-Encoding | 4xx,5xx | r | o | o | o | - | 4826 | | | | | | | | 4827 | Content-Language | R | r | o | o | - | - | 4828 | | | | | | | | 4829 | Content-Language | r | r | o | o | - | - | 4830 | | | | | | | | 4831 | Content-Language | 4xx,5xx | r | o | o | o | - | 4832 | | | | | | | | 4833 | Content-Length | R | r | * | * | - | - | 4834 | | | | | | | | 4835 | Content-Length | r | r | * | * | - | - | 4836 | | | | | | | | 4837 | Content-Length | 4xx,5xx | r | * | * | * | - | 4838 | | | | | | | | 4839 | Content-Location | R | | o | o | - | - | 4840 | | | | | | | | 4841 | Content-Location | r | | o | o | - | - | 4842 | | | | | | | | 4843 | Content-Location | 4xx,5xx | | o | o | o | - | 4844 | | | | | | | | 4845 | Content-Type | R | | * | * | - | - | 4846 | | | | | | | | 4847 | Content-Type | r | | * | * | - | - | 4848 | | | | | | | | 4849 | Content-Type | 4xx | | * | * | * | - | 4850 | | | | | | | | 4851 | CSeq | R,c | mr | m | m | m | m | 4852 | | | | | | | | 4853 | Date | R | a | o | o | m | - | 4854 | | | | | | | | 4855 | Date | r | am | o | o | o | - | 4856 | | | | | | | | 4857 | From | R | r | o | o | o | - | 4858 | | | | | | | | 4859 | Last-Modified | R | r | - | - | - | - | 4860 | | | | | | | | 4861 | Last-Modified | r | r | o | - | - | - | 4862 | | | | | | | | 4863 | Location | 3rr | | o | o | o | - | 4864 | | | | | | | | 4865 | Location | R | | - | - | m | - | 4866 | | | | | | | | 4867 | Media-Properties | | | - | - | - | | 4868 | | | | | | | | 4869 | Media-Range | R | | o | - | - | c | 4870 | | | | | | | | 4871 | Media-Range | r | | c | - | - | - | 4872 | | | | | | | | 4873 | Notify-Reason | R | | - | - | - | m | 4874 | | | | | | | | 4875 | Pipelined-Requests | | amdr | o | o | o | - | 4876 | | | | | | | | 4877 | Proxy-Authenticate | 407 | amr | m | m | m | - | 4878 | | | | | | | | 4879 | Proxy-Authorization | R | rd | o | o | o | - | 4880 | | | | | | | | 4881 | Proxy-Require | R | ar | o | o | o | - | 4882 | | | | | | | | 4883 | Proxy-Require | r | r | c | c | c | - | 4884 | | | | | | | | 4885 | Proxy-Supported | R | amr | c | c | c | - | 4886 | | | | | | | | 4887 | Proxy-Supported | r | | c | c | c | - | 4888 | | | | | | | | 4889 | Public | 501 | admr | m | m | m | - | 4890 +------------------------+---------+-------+-----+-----+-----+-----+ 4892 Table 11: Overview of RTSP header fields (A-P) related to methods 4893 GET_PARAMETER, SET_PARAMETER, PLAY_NOTIFY, and REDIRECT. 4895 +------------------+-------------+-------+-----+-----+-----+-----+ 4896 | Header | Where | Proxy | GPR | SPR | RDR | PNY | 4897 +------------------+-------------+-------+-----+-----+-----+-----+ 4898 | Range | R | | - | - | o | m | 4899 | | | | | | | | 4900 | Terminate-Reason | R | r | - | - | m | - | 4901 | | | | | | | | 4902 | Referer | R | | o | o | o | - | 4903 | | | | | | | | 4904 | Request-Status | R | | - | - | - | m | 4905 | | | | | | | | 4906 | Require | R | r | o | o | o | - | 4907 | | | | | | | | 4908 | Retry-After | 3rr,413,503 | | o | o | - | - | 4909 | | | | | | | | 4910 | Retry-After | 413 | | o | o | o | o | 4911 | Scale | | | - | - | - | c | 4912 | | | | | | | | 4913 | Seek-Style | | | - | - | - | - | 4914 | | | | | | | | 4915 | Session | R | r | o | o | o | m | 4916 | | | | | | | | 4917 | Session | r | r | c | c | o | m | 4918 | | | | | | | | 4919 | Server | R | r | o | o | o | - | 4920 | | | | | | | | 4921 | Server | r | r | o | o | - | - | 4922 | | | | | | | | 4923 | Supported | R | adrm | o | o | o | - | 4924 | | | | | | | | 4925 | Supported | r | adrm | c | c | c | - | 4926 | | | | | | | | 4927 | Timestamp | R | adrm | o | o | o | - | 4928 | | | | | | | | 4929 | Timestamp | c | adrm | m | m | m | - | 4930 | | | | | | | | 4931 | Unsupported | r | arm | c | c | c | - | 4932 | | | | | | | | 4933 | User-Agent | R | r | m* | m* | - | - | 4934 | | | | | | | | 4935 | User-Agent | r | r | - | - | m* | - | 4936 | | | | | | | | 4937 | Vary | r | | c | c | - | - | 4938 | | | | | | | | 4939 | Via | R | amr | o | o | o | - | 4940 | | | | | | | | 4941 | Via | c | dr | m | m | m | - | 4942 | | | | | | | | 4943 | WWW-Authenticate | 401 | | m | m | m | - | 4944 +------------------+-------------+-------+-----+-----+-----+-----+ 4946 Table 12: Overview of RTSP header fields (R-W) related to methods 4947 GET_PARAMETER, SET_PARAMETER, PLAY_NOTIFY, and REDIRECT. 4949 16.1. Accept 4951 The Accept request-header field can be used to specify certain 4952 presentation description content types which are acceptable for the 4953 response. 4955 See Section 20.2.3 for the syntax. 4957 Example of use: 4958 Accept: application/example ;q=1.0, application/sdp 4960 16.2. Accept-Credentials 4962 The Accept-Credentials header is a request header used to indicate to 4963 any trusted intermediary how to handle further secured connections to 4964 proxies or servers. See Section 19 for the usage of this header. It 4965 MUST NOT be included in server to client requests. 4967 In a request the header MUST contain the method (User, Proxy, or Any) 4968 for approving credentials selected by the requester. The method MUST 4969 NOT be changed by any proxy, unless it is "proxy" when a proxy MAY 4970 change it to "user" to take the role of user approving each further 4971 hop. If the method is "User" the header contains zero or more of 4972 credentials that the client accepts. The header may contain zero 4973 credentials in the first RTSP request to a RTSP server when using the 4974 "User" method. This as the client has not yet received any 4975 credentials to accept. Each credential MUST consist of one URI 4976 identifying the proxy or server, the hash algorithm identifier, and 4977 the hash over that entity's DER encoded certificate [RFC5280] in 4978 Base64 [RFC4648]. All RTSP clients and proxies MUST implement the 4979 SHA-256[FIPS-pub-180-2] algorithm for computation of the hash of the 4980 DER encoded certificate. The SHA-256 algorithm is identified by the 4981 token "sha-256". 4983 The intention with allowing for other hash algorithms is to enable 4984 the future retirement of algorithms that are not implemented 4985 somewhere else than here. Thus the definition of future algorithms 4986 for this purpose is intended to be extremely limited. A feature tag 4987 can be used to ensure that support for the replacement algorithm 4988 exist. 4990 Example: 4991 Accept-Credentials:User 4992 "rtsps://proxy2.example.com/";sha-256;exaIl9VMbQMOFGClx5rXnPJKVNI=, 4993 "rtsps://server.example.com/";sha-256;lurbjj5khhB0NhIuOXtt4bBRH1M= 4995 16.3. Accept-Encoding 4997 The Accept-Encoding request-header field is similar to Accept, but 4998 restricts the content-codings that are acceptable in the response. 5000 A server tests whether a content-coding is acceptable, according to 5001 an Accept-Encoding field, using these rules: 5003 1. If the content-coding is one of the content-codings listed in the 5004 Accept-Encoding field, then it is acceptable, unless it is 5005 accompanied by a qvalue of 0. (As defined in section 3.9, a 5006 qvalue of 0 means "not acceptable.") 5008 2. The special "*" symbol in an Accept-Encoding field matches any 5009 available content-coding not explicitly listed in the header 5010 field. 5012 3. If multiple content-codings are acceptable, then the acceptable 5013 content-coding with the highest non-zero qvalue is preferred. 5015 4. The "identity" content-coding is always acceptable, unless 5016 specifically refused because the Accept-Encoding field includes 5017 "identity;q=0", or because the field includes "*;q=0" and does 5018 not explicitly include the "identity" content-coding. If the 5019 Accept-Encoding field-value is empty, then only the "identity" 5020 encoding is acceptable. 5022 If an Accept-Encoding field is present in a request, and if the 5023 server cannot send a response which is acceptable according to the 5024 Accept-Encoding header, then the server SHOULD send an error response 5025 with the 406 (Not Acceptable) status code. 5027 If no Accept-Encoding field is present in a request, the server MAY 5028 assume that the client will accept any content coding. In this case, 5029 if "identity" is one of the available content-codings, then the 5030 server SHOULD use the "identity" content-coding, unless it has 5031 additional information that a different content-coding is meaningful 5032 to the client. 5034 16.4. Accept-Language 5036 The Accept-Language request-header field is similar to Accept, but 5037 restricts the set of natural languages that are preferred as a 5038 response to the request. Note that the language specified applies to 5039 the presentation description and any reason phrases, but not the 5040 media content. 5042 A language tag identifies a natural language spoken, written, or 5043 otherwise conveyed by human beings for communication of information 5044 to other human beings. Computer languages are explicitly excluded. 5045 The syntax and registry of RTSP 2.0 language tags is the same as that 5046 defined by [RFC4646]. 5048 Each language-range MAY be given an associated quality value which 5049 represents an estimate of the user's preference for the languages 5050 specified by that range. The quality value defaults to "q=1". For 5051 example: 5053 Accept-Language: da, en-gb;q=0.8, en;q=0.7 5055 would mean: "I prefer Danish, but will accept British English and 5056 other types of English." A language-range matches a language-tag if 5057 it exactly equals the tag, or if it exactly equals a prefix of the 5058 tag such that the first tag character following the prefix is "-". 5059 The special range "*", if present in the Accept-Language field, 5060 matches every tag not matched by any other range present in the 5061 Accept-Language field. 5063 Note: This use of a prefix matching rule does not imply that 5064 language tags are assigned to languages in such a way that it is 5065 always true that if a user understands a language with a certain 5066 tag, then this user will also understand all languages with tags 5067 for which this tag is a prefix. The prefix rule simply allows the 5068 use of prefix tags if this is the case. 5070 The language quality factor assigned to a language-tag by the Accept- 5071 Language field is the quality value of the longest language- range in 5072 the field that matches the language-tag. If no language- range in 5073 the field matches the tag, the language quality factor assigned is 0. 5074 If no Accept-Language header is present in the request, the server 5075 SHOULD assume that all languages are equally acceptable. If an 5076 Accept-Language header is present, then all languages which are 5077 assigned a quality factor greater than 0 are acceptable. 5079 16.5. Accept-Ranges 5081 The Accept-Ranges request and response-header field allows indication 5082 of the format supported in the Range header. The client MUST include 5083 the header in SETUP requests to indicate which formats it support to 5084 receive in PLAY and PAUSE responses, and REDIRECT requests. The 5085 server MUST include the header in SETUP and 456 error responses to 5086 indicate the formats supported for the resource indicated by the 5087 request URI. The header MAY be included in GET_PARAMETER request and 5088 response pairs. The GET_PARAMETER request MUST contain a Session 5089 header to identify the session context the request are related to. 5090 The requester and responder will indicate their capabilities 5091 regarding Range formats respectively. 5092 Accept-Ranges: NPT, SMPTE 5094 The syntax is defined in Section 20.2.3. 5096 16.6. Allow 5098 The Allow message-header field lists the methods supported by the 5099 resource identified by the Request-URI. The purpose of this field is 5100 to strictly inform the recipient of valid methods associated with the 5101 resource. An Allow header field MUST be present in a 405 (Method Not 5102 Allowed) response. The Allow header MUST also be present in all 5103 OPTIONS responses where the content of the header will not include 5104 exactly the same methods as listed in the Public header. 5106 The Allow MUST also be included in SETUP and DESCRIBE responses, if 5107 the methods allowed for the resource is different than the minimal 5108 implementation set. 5110 Example of use: 5111 Allow: SETUP, PLAY, SET_PARAMETER, DESCRIBE 5113 16.7. Authorization 5115 An RTSP client that wishes to authenticate itself with a server, 5116 usually, but not necessarily, after receiving a 401 response, does so 5117 by including an Authorization request-header field with the request. 5118 The Authorization field value consists of credentials containing the 5119 authentication information of the user agent for the realm of the 5120 resource being requested. 5122 If a request is authenticated and a realm specified, the same 5123 credentials SHOULD be valid for all other requests within this realm 5124 (assuming that the authentication scheme itself does not require 5125 otherwise, such as credentials that vary according to a challenge 5126 value or using synchronized clocks). 5128 When a shared cache (see Section 18) receives a request containing an 5129 Authorization field, it MUST NOT return the corresponding response as 5130 a reply to any other request, unless one of the following specific 5131 exceptions holds: 5133 1. If the response includes the "maxage" cache-control directive, 5134 the cache MAY use that response in replying to a subsequent 5135 request. But (if the specified maximum age has passed) a proxy 5136 cache MUST first revalidate it with the origin server, using the 5137 request-headers from the new request to allow the origin server 5138 to authenticate the new request. (This is the defined behavior 5139 for maxage.) If the response includes "maxage=0", the proxy MUST 5140 always revalidate it before re-using it. 5142 2. If the response includes the "must-revalidate" cache-control 5143 directive, the cache MAY use that response in replying to a 5144 subsequent request. But if the response is stale, all caches 5145 MUST first revalidate it with the origin server, using the 5146 request-headers from the new request to allow the origin server 5147 to authenticate the new request. 5149 3. If the response includes the "public" cache-control directive, it 5150 MAY be returned in reply to any subsequent request. 5152 16.8. Bandwidth 5154 The Bandwidth request-header field describes the estimated bandwidth 5155 available to the client, expressed as a positive integer and measured 5156 in bits per second. The bandwidth available to the client may change 5157 during an RTSP session, e.g., due to mobility, congestion, etc. 5159 Example: 5160 Bandwidth: 62360 5162 16.9. Blocksize 5164 The Blocksize request-header field is sent from the client to the 5165 media server asking the server for a particular media packet size. 5166 This packet size does not include lower-layer headers such as IP, 5167 UDP, or RTP. The server is free to use a blocksize which is lower 5168 than the one requested. The server MAY truncate this packet size to 5169 the closest multiple of the minimum, media-specific block size, or 5170 override it with the media-specific size if necessary. The block 5171 size MUST be a positive decimal number, measured in octets. The 5172 server only returns an error (4xx) if the value is syntactically 5173 invalid. 5175 16.10. Cache-Control 5177 The Cache-Control general-header field is used to specify directives 5178 that MUST be obeyed by all caching mechanisms along the request/ 5179 response chain. 5181 Cache directives MUST be passed through by a proxy or gateway 5182 application, regardless of their significance to that application, 5183 since the directives may be applicable to all recipients along the 5184 request/response chain. It is not possible to specify a cache- 5185 directive for a specific cache. 5187 Cache-Control should only be specified in a SETUP request and its 5188 response. Note: Cache-Control does not govern the caching of 5189 responses as for HTTP, instead it applies to the media stream 5190 identified by the SETUP request. The RTSP requests are generally not 5191 cacheable, for further information see Section 18. Below is the 5192 description of the cache directives that can be included in the 5193 Cache-Control header. 5195 no-cache: Indicates that the media stream MUST NOT be cached 5196 anywhere. This allows an origin server to prevent caching even 5197 by caches that have been configured to return stale responses 5198 to client requests. Note, there is no security function 5199 enforcing that the content can't be cached. 5201 public: Indicates that the media stream is cacheable by any cache. 5203 private: Indicates that the media stream is intended for a single 5204 user and MUST NOT be cached by a shared cache. A private (non- 5205 shared) cache may cache the media streams. 5207 no-transform: An intermediate cache (proxy) may find it useful to 5208 convert the media type of a certain stream. A proxy might, for 5209 example, convert between video formats to save cache space or 5210 to reduce the amount of traffic on a slow link. Serious 5211 operational problems may occur, however, when these 5212 transformations have been applied to streams intended for 5213 certain kinds of applications. For example, applications for 5214 medical imaging, scientific data analysis and those using end- 5215 to-end authentication all depend on receiving a stream that is 5216 bit-for-bit identical to the original media stream. Therefore, 5217 if a response includes the no-transform directive, an 5218 intermediate cache or proxy MUST NOT change the encoding of the 5219 stream. Unlike HTTP, RTSP does not provide for partial 5220 transformation at this point, e.g., allowing translation into a 5221 different language. 5223 only-if-cached: In some cases, such as times of extremely poor 5224 network connectivity, a client may want a cache to return only 5225 those media streams that it currently has stored, and not to 5226 receive these from the origin server. To do this, the client 5227 may include the only-if-cached directive in a request. If it 5228 receives this directive, a cache SHOULD either respond using a 5229 cached media stream that is consistent with the other 5230 constraints of the request, or respond with a 504 (Gateway 5231 Timeout) status. However, if a group of caches is being 5232 operated as a unified system with good internal connectivity, 5233 such a request MAY be forwarded within that group of caches. 5235 max-stale: Indicates that the client is willing to accept a media 5236 stream that has exceeded its expiration time. If max-stale is 5237 assigned a value, then the client is willing to accept a 5238 response that has exceeded its expiration time by no more than 5239 the specified number of seconds. If no value is assigned to 5240 max-stale, then the client is willing to accept a stale 5241 response of any age. 5243 min-fresh: Indicates that the client is willing to accept a media 5244 stream whose freshness lifetime is no less than its current age 5245 plus the specified time in seconds. That is, the client wants 5246 a response that will still be fresh for at least the specified 5247 number of seconds. 5249 must-revalidate: When the must-revalidate directive is present in a 5250 SETUP response received by a cache, that cache MUST NOT use the 5251 entry after it becomes stale to respond to a subsequent request 5252 without first revalidating it with the origin server. That is, 5253 the cache is required to do an end-to-end revalidation every 5254 time, if, based solely on the origin server's Expires, the 5255 cached response is stale.) 5257 proxy-revalidate: The proxy-revalidate directive has the same 5258 meaning as the must-revalidate directive, except that it does 5259 not apply to non-shared user agent caches. It can be used on a 5260 response to an authenticated request to permit the user's cache 5261 to store and later return the response without needing to 5262 revalidate it (since it has already been authenticated once by 5263 that user), while still requiring proxies that service many 5264 users to revalidate each time (in order to make sure that each 5265 user has been authenticated). Note that such authenticated 5266 responses also need the public cache control directive in order 5267 to allow them to be cached at all. 5269 max-age: When an intermediate cache is forced, by means of a max- 5270 age=0 directive, to revalidate its own cache entry, and the 5271 client has supplied its own validator in the request, the 5272 supplied validator might differ from the validator currently 5273 stored with the cache entry. In this case, the cache MAY use 5274 either validator in making its own request without affecting 5275 semantic transparency. 5277 However, the choice of validator might affect performance. The best 5278 approach is for the intermediate cache to use its own validator when 5279 making its request. If the server replies with 304 (Not Modified), 5280 then the cache can return its now validated copy to the client with a 5281 200 (OK) response. If the server replies with a new entity and cache 5282 validator, however, the intermediate cache can compare the returned 5283 validator with the one provided in the client's request, using the 5284 strong comparison function. If the client's validator is equal to 5285 the origin server's, then the intermediate cache simply returns 304 5286 (Not Modified). Otherwise, it returns the new entity with a 200 (OK) 5287 response. 5289 16.11. Connection 5291 The Connection general-header field allows the sender to specify 5292 options that are desired for that particular connection and MUST NOT 5293 be communicated by proxies over further connections. 5295 RTSP 2.0 proxies MUST parse the Connection header field before a 5296 message is forwarded and, for each connection-token in this field, 5297 remove any header field(s) from the message with the same name as the 5298 connection-token. Connection options are signaled by the presence of 5299 a connection-token in the Connection header field, not by any 5300 corresponding additional header field(s), since the additional header 5301 field may not be sent if there are no parameters associated with that 5302 connection option. 5304 Message headers listed in the Connection header MUST NOT include end- 5305 to-end headers, such as Cache-Control. 5307 The use of the connection option "close" in RTSP messages SHOULD be 5308 limited to error messages when the server is unable to recover and 5309 therefore see it necessary to close the connection. The reason is 5310 that the client has the choice of continuing using a connection 5311 indefinitely, as long as it sends valid messages. 5313 16.12. Connection-Credentials 5315 The Connection-Credentials response header is used to carry the chain 5316 of credentials of any next hop that need to be approved by the 5317 requester. It MUST only be used in server to client responses. 5319 The Connection-Credentials header in an RTSP response MUST, if 5320 included, contain the credential information (in form of a list of 5321 certificates providing the chain of certification) of the next hop 5322 that an intermediary needs to securely connect to. The header MUST 5323 include the URI of the next hop (proxy or server) and a base64 5324 [RFC4648] encoded binary structure containing a sequence of DER 5325 encoded X.509v3 certificates[RFC5280] . 5327 The binary structure starts with the number of certificates 5328 (NR_CERTS) included as a 16 bit unsigned integer. This is followed 5329 by NR_CERTS number of 16 bit unsigned integers providing the size in 5330 octets of each DER encoded certificate. This is followed by NR_CERTS 5331 number of DER encoded X.509v3 certificates in a sequence (chain). 5332 The proxy or server's certificate must come first in the structure. 5333 Each following certificate must directly certify the one preceding 5334 it. Because certificate validation requires that root keys be 5335 distributed independently, the self-signed certificate which 5336 specifies the root certificate authority may optionally be omitted 5337 from the chain, under the assumption that the remote end must already 5338 possess it in order to validate it in any case. 5340 Example: 5342 Connection-Credentials:"rtsps://proxy2.example.com/";MIIDNTCC... 5344 Where MIIDNTCC... is a BASE64 encoding of the following structure: 5346 0 1 2 3 5347 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 5348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5349 | Number of certificates | Size of certificate #1 | 5350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5351 | Size of certificate #2 | Size of certificate #3 | 5352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5353 : DER Encoding of Certificate #1 : 5354 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5355 : DER Encoding of Certificate #2 : 5356 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5357 : DER Encoding of Certificate #3 : 5358 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5360 16.13. Content-Base 5362 The Content-Base message-header field may be used to specify the base 5363 URI for resolving relative URIs within the message body. 5364 Content-Base: rtsp://media.example.com/movie/twister 5365 If no Content-Base field is present, the base URI of an message body 5366 is defined either by its Content-Location (if that Content-Location 5367 URI is an absolute URI) or the URI used to initiate the request, in 5368 that order of precedence. Note, however, that the base URI of the 5369 contents within the message-body may be redefined within that 5370 message-body. 5372 16.14. Content-Encoding 5374 The Content-Encoding header field is used as a modifier to the media- 5375 type. When present, its value indicates what additional content 5376 codings have been applied to the message body, and thus what decoding 5377 mechanisms must be applied in order to obtain the media-type 5378 referenced by the Content-Type header field. Content-Encoding is 5379 primarily used to allow a document to be compressed without losing 5380 the identity of its underlying media type. 5382 The content-coding is a characteristic of the entity identified by 5383 the Request-URI. Typically, the message body is stored with this 5384 encoding and is only decoded before rendering or analogous usage. 5386 However, a non-transparent proxy MAY modify the content-coding if the 5387 new coding is known to be acceptable to the recipient, unless the 5388 "no-transform" cache-control directive is present in the message. 5390 If the content-coding of an message body is not "identity", then the 5391 response MUST include a Content-Encoding entity-header that lists the 5392 non-identity content-coding(s) used. 5394 If the content-coding of an message body in a request message is not 5395 acceptable to the origin server, the server SHOULD respond with a 5396 status code of 415 (Unsupported Media Type). 5398 If multiple encodings have been applied to a message body, the 5399 content codings MUST be listed in the order in which they were 5400 applied. Additional information about the encoding parameters MAY be 5401 provided by other header fields not defined by this specification. 5403 16.15. Content-Language 5405 The Content-Language header field describes the natural language(s) 5406 of the intended audience for the enclosed message body. Note that 5407 this might not be equivalent to all the languages used within the 5408 message body. 5410 Language tags are mentioned in Section 16.4. The primary purpose of 5411 Content-Language is to allow a user to identify and differentiate 5412 entities according to the user's own preferred language. Thus, if 5413 the body content is intended only for a Danish-literate audience, the 5414 appropriate field is 5416 Content-Language: da 5418 If no Content-Language is specified, the default is that the content 5419 is intended for all language audiences. This might mean that the 5420 sender does not consider it to be specific to any natural language, 5421 or that the sender does not know for which language it is intended. 5423 Multiple languages MAY be listed for content that is intended for 5424 multiple audiences. For example, a rendition of the "Treaty of 5425 Waitangi," presented simultaneously in the original Maori and English 5426 versions, would call for 5428 Content-Language: mi, en 5430 However, just because multiple languages are present within an entity 5431 does not mean that it is intended for multiple linguistic audiences. 5432 An example would be a beginner's language primer, such as "A First 5433 Lesson in Latin," which is clearly intended to be used by an English- 5434 literate audience. In this case, the Content-Language would properly 5435 only include "en". 5437 Content-Language MAY be applied to any media type -- it is not 5438 limited to textual documents. 5440 16.16. Content-Length 5442 The Content-Length general-header field contains the length of the 5443 message body of the RTSP message (i.e. after the double CRLF 5444 following the last header). Unlike HTTP, it MUST be included in all 5445 messages that carry a message body beyond the header portion of the 5446 RTSP message. If it is missing, a default value of zero is assumed. 5447 Any Content-Length greater than or equal to zero is a valid value. 5449 16.17. Content-Location 5451 The Content-Location header field MAY be used to supply the resource 5452 location for the entity enclosed in the message when that entity is 5453 accessible from a location separate from the requested resource's 5454 URI. A server SHOULD provide a Content-Location for the variant 5455 corresponding to the response entity; especially in the case where a 5456 resource has multiple entities associated with it, and those entities 5457 actually have separate locations by which they might be individually 5458 accessed, the server SHOULD provide a Content-Location for the 5459 particular variant which is returned. 5461 The Content-Location value is not a replacement for the original 5462 requested URI; it is only a statement of the location of the resource 5463 corresponding to this particular entity at the time of the request. 5464 Future requests MAY specify the Content-Location URI as the request- 5465 URI if the desire is to identify the source of that particular 5466 entity. 5468 A cache cannot assume that an entity with a Content-Location 5469 different from the URI used to retrieve it can be used to respond to 5470 later requests on that Content-Location URI. However, the Content- 5471 Location can be used to differentiate between multiple entities 5472 retrieved from a single requested resource. 5474 If the Content-Location is a relative URI, the relative URI is 5475 interpreted relative to the Request-URI. 5477 16.18. Content-Type 5479 The Content-Type header indicates the media type of the message body 5480 sent to the recipient. Note that the content types suitable for RTSP 5481 are likely to be restricted in practice to presentation descriptions 5482 and parameter-value types. 5484 16.19. CSeq 5486 The CSeq general-header field specifies the sequence number for an 5487 RTSP request-response pair. This field MUST be present in all 5488 requests and responses. For every RTSP request containing the given 5489 sequence number, the corresponding response will have the same 5490 number. Any retransmitted request MUST contain the same sequence 5491 number as the original (i.e. the sequence number is not incremented 5492 for retransmissions of the same request). For each new RTSP request 5493 the CSeq value MUST be incremented by one. The initial sequence 5494 number MAY be any number, however it is RECOMMENDED to start at 0. 5495 Each sequence number series is unique between each requester and 5496 responder, i.e. the client has one series for its request to a server 5497 and the server has another when sending request to the client. Each 5498 requester and responder is identified with its network address. 5500 Proxies that aggregate several sessions on the same transport will 5501 regularly need to renumber the CSeq header field in requests and 5502 responses to fulfill the rules for the header. 5504 Example: 5505 CSeq: 239 5507 16.20. Date 5509 The Date header field represents the date and time at which the 5510 message was originated. The inclusion of the Date header in RTSP 5511 message follows these rules: 5513 o An RTSP message, sent either by the client or the server, 5514 containing a body MUST include a Date header, if the sending host 5515 has a clock; 5517 o Clients and servers are RECOMMENDED to include a Date header in 5518 all other RTSP messages, if the sending host has a clock; 5520 o If the server does not have a clock that can provide a reasonable 5521 approximation of the current time, its responses MUST NOT include 5522 a Date header field. In this case, this rule MUST be followed: 5523 Some origin server implementations might not have a clock 5524 available. An origin server without a clock MUST NOT assign 5525 Expires or Last- Modified values to a response, unless these 5526 values were associated with the resource by a system or user with 5527 a reliable clock. It MAY assign an Expires value that is known, 5528 at or before server configuration time, to be in the past (this 5529 allows "pre-expiration" of responses without storing separate 5530 Expires values for each resource). 5532 A received message that does not have a Date header field MUST be 5533 assigned one by the recipient if the message will be cached by that 5534 recipient . An RTSP implementation without a clock MUST NOT cache 5535 responses without revalidating them on every use. An RTSP cache, 5536 especially a shared cache, SHOULD use a mechanism, such as NTP, to 5537 synchronize its clock with a reliable external standard. 5539 The RTSP-date sent in a Date header SHOULD NOT represent a date and 5540 time subsequent to the generation of the message. It SHOULD 5541 represent the best available approximation of the date and time of 5542 message generation, unless the implementation has no means of 5543 generating a reasonably accurate date and time. In theory, the date 5544 ought to represent the moment just before the entity is generated. 5545 In practice, the date can be generated at any time during the message 5546 origination without affecting its semantic value. 5548 16.21. Expires 5550 The Expires message-header field gives a date and time after which 5551 the description or media-stream should be considered stale. The 5552 interpretation depends on the method: 5554 DESCRIBE response: The Expires header indicates a date and time 5555 after which the presentation description (body) SHOULD be 5556 considered stale. 5558 SETUP response: The Expires header indicate a date and time after 5559 which the media stream SHOULD be considered stale. 5561 A stale cache entry may not normally be returned by a cache (either a 5562 proxy cache or an user agent cache) unless it is first validated with 5563 the origin server (or with an intermediate cache that has a fresh 5564 copy of the message body). See Section 18 for further discussion of 5565 the expiration model. 5567 The presence of an Expires field does not imply that the original 5568 resource will change or cease to exist at, before, or after that 5569 time. 5571 The format is an absolute date and time as defined by RTSP-date: 5573 An example of its use is 5574 Expires: Thu, 01 Dec 1994 16:00:00 GMT 5576 RTSP/2.0 clients and caches MUST treat other invalid date formats, 5577 especially including the value "0", as having occurred in the past 5578 (i.e., already expired). 5580 To mark a response as "already expired," an origin server should use 5581 an Expires date that is equal to the Date header value. To mark a 5582 response as "never expires," an origin server SHOULD use an Expires 5583 date approximately one year from the time the response is sent. 5584 RTSP/2.0 servers SHOULD NOT send Expires dates more than one year in 5585 the future. 5587 16.22. From 5589 The From request-header field, if given, SHOULD contain an Internet 5590 e-mail address for the human user who controls the requesting user 5591 agent. The address SHOULD be machine-usable, as defined by "mailbox" 5592 in [RFC1123]. 5594 This header field MAY be used for logging purposes and as a means for 5595 identifying the source of invalid or unwanted requests. It SHOULD 5596 NOT be used as an insecure form of access protection. The 5597 interpretation of this field is that the request is being performed 5598 on behalf of the person given, who accepts responsibility for the 5599 method performed. In particular, robot agents SHOULD include this 5600 header so that the person responsible for running the robot can be 5601 contacted if problems occur on the receiving end. 5603 The Internet e-mail address in this field MAY be separate from the 5604 Internet host which issued the request. For example, when a request 5605 is passed through a proxy the original issuer's address SHOULD be 5606 used. 5608 The client SHOULD NOT send the From header field without the user's 5609 approval, as it might conflict with the user's privacy interests or 5610 their site's security policy. It is strongly recommended that the 5611 user be able to disable, enable, and modify the value of this field 5612 at any time prior to a request. 5614 16.23. If-Match 5616 See [H14.24]. 5618 The If-Match request-header field is especially useful for ensuring 5619 the integrity of the presentation description, in both the case where 5620 it is fetched via means external to RTSP (such as HTTP), or in the 5621 case where the server implementation is guaranteeing the integrity of 5622 the description between the time of the DESCRIBE message and the 5623 SETUP message. By including the MTag given in or with the session 5624 description in a SETUP request, the client ensures that resources set 5625 up are matching the description. A SETUP request for which the MTag 5626 validation check fails, MUST response using 412 (Precondition 5627 Failed). 5629 This validation check is also very useful if a session has been 5630 redirected from one server to another. 5632 16.24. If-Modified-Since 5634 The If-Modified-Since request-header field is used with the DESCRIBE 5635 and SETUP methods to make them conditional. If the requested variant 5636 has not been modified since the time specified in this field, a 5637 description will not be returned from the server (DESCRIBE) or a 5638 stream will not be set up (SETUP). Instead, a 304 (Not Modified) 5639 response MUST be returned without any message-body. 5641 An example of the field is: 5642 If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT 5644 16.25. If-None-Match 5646 This request header can be used with one or several message body tags 5647 to make DESCRIBE requests conditional. A client that has one or more 5648 message bodies previously obtained from the resource, can verify that 5649 none of those entities is current by including a list of their 5650 associated message body tags in the If-None-Match header field. The 5651 purpose of this feature is to allow efficient updates of cached 5652 information with a minimum amount of transaction overhead. As a 5653 special case, the value "*" matches any current entity of the 5654 resource. 5656 If any of the message body tags match the message body tag of the 5657 message body that would have been returned in the response to a 5658 similar DESCRIBE request (without the If-None-Match header) on that 5659 resource, or if "*" is given and any current entity exists for that 5660 resource, then the server MUST NOT perform the requested method, 5661 unless required to do so because the resource's modification date 5662 fails to match that supplied in an If-Modified-Since header field in 5663 the request. Instead, if the request method was DESCRIBE, the server 5664 SHOULD respond with a 304 (Not Modified) response, including the 5665 cache- related header fields (particularly MTag) of one of the 5666 message bodies that matched. For all other request methods, the 5667 server MUST respond with a status of 412 (Precondition Failed). 5669 See Section 18.1.3 for rules on how to determine if two message body 5670 tags match. 5672 If none of the message body tags match, then the server MAY perform 5673 the requested method as if the If-None-Match header field did not 5674 exist, but MUST also ignore any If-Modified-Since header field(s) in 5675 the request. That is, if no message body tags match, then the server 5676 MUST NOT return a 304 (Not Modified) response. 5678 If the request would, without the If-None-Match header field, result 5679 in anything other than a 2xx or 304 status, then the If-None-Match 5680 header MUST be ignored. (See Section 18.1.4 for a discussion of 5681 server behavior when both If-Modified-Since and If-None-Match appear 5682 in the same request.) 5684 The meaning of "If-None-Match: *" is that the method MUST NOT be 5685 performed if the representation selected by the origin server (or by 5686 a cache, possibly using the Vary mechanism, see Section 16.55) 5687 exists, and SHOULD be performed if the representation does not exist. 5688 This feature is intended to be useful in preventing races between PUT 5689 operations. 5691 The result of a request having both an If-None-Match header field and 5692 either an If-Match or an If-Unmodified-Since header fields is 5693 undefined by this specification. 5695 16.26. Last-Modified 5697 The Last-Modified message-header field indicates the date and time at 5698 which the origin server believes the presentation description or 5699 media stream was last modified. For the method DESCRIBE, the header 5700 field indicates the last modification date and time of the 5701 description, for SETUP that of the media stream. 5703 An origin server MUST NOT send a Last-Modified date which is later 5704 than the server's time of message origination. In such cases, where 5705 the resource's last modification would indicate some time in the 5706 future, the server MUST replace that date with the message 5707 origination date. 5709 An origin server SHOULD obtain the Last-Modified value of the entity 5710 as close as possible to the time that it generates the Date value of 5711 its response. This allows a recipient to make an accurate assessment 5712 of the entity's modification time, especially if the entity changes 5713 near the time that the response is generated. 5715 RTSP servers SHOULD send Last-Modified whenever feasible. 5717 16.27. Location 5719 The Location response-header field is used to redirect the recipient 5720 to a location other than the Request-URI for completion of the 5721 request or identification of a new resource. For 3xx responses, the 5722 location SHOULD indicate the server's preferred URI for automatic 5723 redirection to the resource. The field value consists of a single 5724 absolute URI. 5726 Note: The Content-Location header field (Section 16.17) differs from 5727 Location in that the Content-Location identifies the original 5728 location of the entity enclosed in the request. It is therefore 5729 possible for a response to contain header fields for both Location 5730 and Content-Location. Also see Section 18.2 for cache requirements 5731 of some methods. 5733 16.28. Media-Properties 5735 This general header is used in SETUP response or PLAY_NOTIFY requests 5736 to indicate the media's properties that currently are applicable to 5737 the RTSP session. PLAY_NOTIFY MAY be used to modify these properties 5738 at any point. However, the client SHOULD have received the update 5739 prior to any action related to the new media properties take affect. 5740 For aggregated sessions the Media-Properties header will be returned 5741 in each SETUP response. The header received in the latest response 5742 is the one that applies on the whole session from this point until 5743 any future update. The header MAY be included without value in 5744 GET_PARAMETER requests to the server with a Session header included 5745 to query the current Media-Properties for the session. The responder 5746 MUST include the current session's media properties. 5748 The media properties expressed by this header is the one applicable 5749 to all media in the RTSP session. So for aggregated sessions the 5750 header expressed the combined media-properties. As a result 5751 aggregation of media MAY result in a change of the media properties, 5752 and thus the content of the Media-Properties header contained in 5753 subsequent SETUP responses. 5755 The header contains a list of property values that are applicable to 5756 the currently setup media or aggregate of media as indicated by the 5757 RTSP URI in the request. No ordering are enforced within the header. 5758 Property values should be grouped into a single group that handles a 5759 particular orthogonal property. Values or groups that express 5760 multiple properties SHOULD NOT be used. The list of properties that 5761 can be expressed MAY be extended at any time. Unknown property 5762 values MUST be ignored. 5764 This specification defines the following 4 groups and their property 5765 values: 5767 Random Access: 5769 Random-Access: Indicates that random access is possible. May 5770 optionally include a floating point value in seconds indicating 5771 the longest duration between any two random access points in 5772 the media. 5774 Begining-Only: Seeking is limited to the beginning only. 5776 No-Seeking: No seeking is possible. 5778 Content Modifications 5780 Immutable: The content will not be changed during the life-time 5781 of the RTSP session. 5783 Dynamic: The content may be changed based on external methods or 5784 triggers 5786 Time-Progressing The media accessible progress as wallclock time 5787 progresses. 5789 Retention 5791 Unlimited: Content will be retained for the duration of the life- 5792 time of the RTSP session. 5794 Time-Limited: Content will be retained at least until the 5795 specified wallclock time. The time must be provided in the 5796 absolute time format specified in Section Section 4.6. 5798 Time-Duration Each individual media unit is retained for at least 5799 the specified time duration. This definition allows for 5800 retaining data with a time based sliding window. The time 5801 duration is expressed as floating point number in seconds. 0.0 5802 is a valid value as this indicates that no data is retained in 5803 a time-progressing session. 5805 Supported Scale: 5807 Scales: A quoted comma separated list of one or more decimal 5808 values or ranges of scale values supported by the content. A 5809 range has a start and stop value separated by a colon. A range 5810 indicates that the content supports fine grained selection of 5811 scale values. Fine grained allows for steps at least as small 5812 as one tenth of a scale value. Negative values are supported. 5813 The value 0 have no meaning and must not be used. 5815 An Example of this header for first an on-demand content and then a 5816 live stream without recording. 5818 On-demand: 5819 Media-Properties: Random-Access=2.5s, Unlimited, Immutable, 5820 Scales="-20, -10, -4, 0.5:1.5, 4, 8, 10, 15, 20" 5822 Live stream without recording/timeshifting: 5823 Media-Properties: No-Seeking, Time-Progressing, Time-Duration=0.0 5825 16.29. Media-Range 5827 The Media-Range general header is used to give the range of the media 5828 at the time of sending the RTSP message. This header MUST be 5829 included in SETUP response, and PLAY and PAUSE response for media 5830 that are Time-Progressing, and PLAY and PAUSE response after any 5831 change for media that are Dynamic, and in PLAY_NOTIFY request that 5832 are sent due to Media-Property-Update. Media-Range header without 5833 any range specifications MAY be included in GET_PARAMETER requests to 5834 the server to request the current range. The server MUST in this 5835 case include the current range at the time of sending the response. 5837 The header MUST include range specifications for all time formats 5838 supported for the media, as indicated in Accept-Ranges header 5839 (Section 16.5) when setting up the media. The server MAY include 5840 more than one range specification of any given time format to 5841 indicate media that has non-continuous range. 5843 For media that has the Time-Progressing property, the Media-Range 5844 values will only be valid for the particular point in time when it 5845 was issued. As wallclock progresses so will also the media range. 5846 However it shall be assumed that media time progress in direct 5847 relationship to wallclock time (with the exception of clock skew) so 5848 that a reasonably accurate estimation of the media range can be 5849 calculated. 5851 16.30. MTag 5853 The MTag response header MAY be included in DESCRIBE or SETUP 5854 responses. The message body tags (Section 4.8) returned in a 5855 DESCRIBE response, and the one in SETUP refers to the presentation, 5856 i.e. both the returned session description and the media stream. 5857 This allows for verification that one has the right session 5858 description to a media resource at the time of the SETUP request. 5859 However it has the disadvantage that a change in any of the parts 5860 results in invalidation of all the parts. 5862 If the MTag is provided both inside the message body, e.g. within the 5863 "a=mtag" attribute in SDP, and in the response message, then both 5864 tags MUST be identical. It is RECOMMENDED that the MTag is primarily 5865 given in the RTSP response message, to ensure that caches can use the 5866 MTag without requiring content inspection. However for session 5867 descriptions that are distributed outside of RTSP, for example using 5868 HTTP, etc. it will be necessary to include the message body tag in 5869 the session description as specified in Appendix D.1.9. 5871 SETUP and DESCRIBE requests can be made conditional upon the MTag 5872 using the headers If-Match (Section 16.23) and If-None-Match ( 5873 Section 16.25). 5875 16.31. Notify-Reason 5877 The Notify Reason header is solely used in the PLAY_NOTIFY method. 5878 It indicates the reason why the server has sent the asynchronous 5879 PLAY_NOTIFY request (see Section 13.5). 5881 16.32. Pipelined-Requests 5883 The Pipelined-Requests general header is used to indicate that a 5884 request is to be executed in the context created by previous 5885 requests. The primary usage of this header is to allow pipelining of 5886 SETUP requests so that any additional SETUP request after the first 5887 one does not need to wait for the session ID to be sent back to the 5888 requesting entity. The header contains a unique identifier that is 5889 scoped by the persistent connection used to send the requests. 5891 Upon receiving a request with the Pipelined-Requests the responding 5892 entity MUST look up if there exist a binding between this Pipelined- 5893 Requests identifier for the current persistent connection and an RTSP 5894 session ID. If that exists then the received request is processed 5895 the same way as if it did contain the Session header with the looked 5896 up session ID. If there doesn't exist a mapping and no Session 5897 header is included in the request, the responding entity MUST create 5898 a binding upon the successful completion of a session creating 5899 request, i.e. SETUP. If the request failed to create an RTSP 5900 session no binding MUST be created. In case the request contains 5901 both a Session header and the Pipelined-Requests header the 5902 Pipelined-Requests MUST be ignored. 5904 Note: Based on the above definition at least the first request 5905 containing a new unique Pipelined-Requests will be required to be a 5906 SETUP request (unless the protocol is extended with new methods of 5907 creating a session). After that first one, additional SETUP requests 5908 or request of any type using the RTSP session context may include the 5909 Pipelined-Requests header. 5911 For all responses to request that contained the Pipelined-Requests, 5912 the Session header and the Pipelined-Requests MUST both be included, 5913 assuming that it is allowed for that response and that the binding 5914 between the header values exist. Pipelined-Requests SHOULD NOT be 5915 used in requests after that the client has received the RTSP Session 5916 ID. This as using the real session ID allows the request to be used 5917 also in cases the persistent connection has been terminated and a new 5918 connection is needed. 5920 It is the sender of the request that is responsible for using a 5921 previously unused identifier within this transport connection scope 5922 when a new RTSP session is to be created with this method. A server 5923 side binding MUST be deleted upon the termination of the related RTSP 5924 session. Note: Although this definition would allow for reusing 5925 previously used pipelining identifiers, this is NOT RECOMMENDED to 5926 allow for better error handling and logging. 5928 RTSP Proxies may need to translate Pipelined-Requests identifier 5929 values from incoming request to outgoing to allow for aggregation of 5930 requests onto a persistent connection. 5932 16.33. Proxy-Authenticate 5934 The Proxy-Authenticate response-header field MUST be included as part 5935 of a 407 (Proxy Authentication Required) response. The field value 5936 consists of a challenge that indicates the authentication scheme and 5937 parameters applicable to the proxy for this Request-URI. 5939 The HTTP access authentication process is described in [RFC2617]. 5940 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies 5941 only to the current connection and SHOULD NOT be passed on to 5942 downstream clients. However, an intermediate proxy might need to 5943 obtain its own credentials by requesting them from the downstream 5944 client, which in some circumstances will appear as if the proxy is 5945 forwarding the Proxy-Authenticate header field. 5947 16.34. Proxy-Authorization 5949 The Proxy-Authorization request-header field allows the client to 5950 identify itself (or its user) to a proxy which requires 5951 authentication. The Proxy-Authorization field value consists of 5952 credentials containing the authentication information of the user 5953 agent for the proxy and/or realm of the resource being requested. 5955 The HTTP access authentication process is described in [RFC2617]. 5956 Unlike Authorization, the Proxy-Authorization header field applies 5957 only to the next outbound proxy that demanded authentication using 5958 the Proxy- Authenticate field. When multiple proxies are used in a 5959 chain, the Proxy-Authorization header field is consumed by the first 5960 outbound proxy that was expecting to receive credentials. A proxy 5961 MAY relay the credentials from the client request to the next proxy 5962 if that is the mechanism by which the proxies cooperatively 5963 authenticate a given request. 5965 16.35. Proxy-Require 5967 The Proxy-Require request-header field is used to indicate proxy- 5968 sensitive features that MUST be supported by the proxy. Any Proxy- 5969 Require header features that are not supported by the proxy MUST be 5970 negatively acknowledged by the proxy to the client using the 5971 Unsupported header. The proxy MUST use the 551 (Option Not 5972 Supported) status code in the response. Any feature-tag included in 5973 the Proxy-Require does not apply to the end-point (server or client). 5974 To ensure that a feature is supported by both proxies and servers the 5975 tag needs to be included in also a Require header. 5977 See Section 16.42 for more details on the mechanics of this message 5978 and a usage example. See discussion in the proxies section 5979 (Section 17.1) about when to consider that a feature requires proxy 5980 support. 5982 Example of use: 5983 Proxy-Require: play.basic 5985 16.36. Proxy-Supported 5987 The Proxy-Supported header field enumerates all the extensions 5988 supported by the proxy using feature-tags. The header carries the 5989 intersection of extensions supported by the forwarding proxies. The 5990 Proxy-Supported header MAY be included in any request by a proxy. It 5991 MUST be added by any proxy if the Supported header is present in a 5992 request. When present in a request, the receiver MUST in the 5993 response copy the received Proxy-Supported header. 5995 The Proxy-Supported header field contains a list of feature-tags 5996 applicable to proxies, as described in Section 4.7. The list are the 5997 intersection of all feature-tags understood by the proxies. To 5998 achieve an intersection, the proxy adding the Proxy-Supported header 5999 includes all proxy feature-tags it understands. Any proxy receiving 6000 a request with the header, checks the list and removes any feature- 6001 tag it do not support. A Proxy-Supported header present in the 6002 response MUST NOT be touched by the proxies. 6004 Example: 6006 C->P1: OPTIONS rtsp://example.com/ RTSP/2.0 6007 Supported: foo, bar, blech 6008 User-Agent: PhonyClient/1.2 6010 P1->P2: OPTIONS rtsp://example.com/ RTSP/2.0 6011 Supported: foo, bar, blech 6012 Proxy-Supported: proxy-foo, proxy-bar, proxy-blech 6013 Via: 2.0 pro.example.com 6015 P2->S: OPTIONS rtsp://example.com/ RTSP/2.0 6016 Supported: foo, bar, blech 6017 Proxy-Supported: proxy-foo, proxy-blech 6018 Via: 2.0 pro.example.com, 2.0 prox2.example.com 6020 S->C: RTSP/2.0 200 OK 6021 Supported: foo, bar, baz 6022 Proxy-Supported: proxy-foo, proxy-blech 6023 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 6024 Via: 2.0 pro.example.com, 2.0 prox2.example.com 6026 16.37. Public 6028 The Public response header field lists the set of methods supported 6029 by the response sender. This header applies to the general 6030 capabilities of the sender and its only purpose is to indicate the 6031 sender's capabilities to the recipient. The methods listed may or 6032 may not be applicable to the Request-URI; the Allow header field 6033 (Section 16.6) MAY be used to indicate methods allowed for a 6034 particular URI. 6036 Example of use: 6037 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 6039 In the event that there are proxies between the sender and the 6040 recipient of a response, each intervening proxy MUST modify the 6041 Public header field to remove any methods that are not supported via 6042 that proxy. The resulting Public header field will contain an 6043 intersection of the sender's methods and the methods allowed through 6044 by the intervening proxies. 6046 In general, proxies should allow all methods to transparently pass 6047 through from the sending RTSP agent to the receiving RTSP agent, 6048 but there may be cases where this is not desirable for a given 6049 proxy. Modification of the Public response header field by the 6050 intervening proxies ensures that the request sender gets an 6051 accurate response indicating the methods that can be used on the 6052 target agent via the proxy chain. 6054 16.38. Range 6056 The Range header specifies a time range in PLAY (Section 13.4), PAUSE 6057 (Section 13.6), SETUP (Section 13.3), REDIRECT (Section 13.10), and 6058 PLAY_NOTIFY (Section 13.5) requests and responses. It MAY be 6059 included in GET_PARAMETER request from he client to the server with 6060 only a Range format and no value to request the current media 6061 position independent if the session is in playing or ready state in 6062 the included format. The server SHALL if supporting that range 6063 format respond with the current playing point or pause point as the 6064 start of the range. If an explicit stop point was used in the 6065 previous PLAY request, then that value shall be included as stop 6066 point. Note that if the server is currently under any type of media 6067 playback manipulation affecting the interpretation of Range, like 6068 Scale, that is also required to be included in any GET_PARAMETER 6069 response to provide complete information. 6071 The range can be specified in a number of units. This specification 6072 defines smpte (Section 4.4), npt (Section 4.5), and clock 6073 (Section 4.6) range units. While byte ranges [H14.35.1] and other 6074 extended units MAY be used, their behavior is unspecified since they 6075 are not normally meaningful in RTSP. Servers supporting the Range 6076 header MUST understand the NPT range format and SHOULD understand the 6077 SMPTE range format. If the Range header is sent in a time format 6078 that is not understood, the recipient SHOULD return 456 (Header Field 6079 Not Valid for Resource) and include an Accept-Ranges header 6080 indicating the supported time formats for the given resource. 6082 Example: 6083 Range: clock=19960213T143205Z- 6085 The Range header contains a range of one single range format. A 6086 range is a half-open interval with a start and an end point, 6087 including the start point, but excluding the end point. A range may 6088 either be fully specified with explicit values for start point and 6089 end point, or have either start or end point be implicit. An 6090 implicit start point indicates the session's pause point, and if no 6091 pause point is set the start of the content. An implicit end point 6092 indicates the end of the content. The usage of both implicit start 6093 and end point is not allowed in the same range header, however, the 6094 exclusion of the range header has that meaning, i.e. from pause point 6095 (or start) until end of content. 6097 Regarding the half-open intervals; a range of A-B starts exactly 6098 at time A, but ends just before B. Only the start time of a media 6099 unit such as a video or audio frame is relevant. For example, 6100 assume that video frames are generated every 40 ms. A range of 6101 10.0-10.1 would include a video frame starting at 10.0 or later 6102 time and would include a video frame starting at 10.08, even 6103 though it lasted beyond the interval. A range of 10.0-10.08, on 6104 the other hand, would exclude the frame at 10.08. 6106 Please note the difference between NPT time scales' "now" and an 6107 implicit start value. Implicit value reference the current pause- 6108 point. While "now" is the currently ongoing time. In a time- 6109 progressing session with recording (retention for some or full 6110 time) the pause point may be 2 min into the session while now 6111 could be 1 hour into the session. 6113 By default, range intervals increase, where the second point is 6114 larger than the first point. 6116 Example: 6117 Range: npt=10-15 6119 However, range intervals can also decrease if the Scale header (see 6120 Section 16.44) indicates a negative scale value. For example, this 6121 would be the case when a playback in reverse is desired. 6123 Example: 6124 Scale: -1 6125 Range: npt=15-10 6127 Decreasing ranges are still half open intervals as described above. 6128 Thus, for range A-B, A is closed and B is open. In the above 6129 example, 15 is closed and 10 is open. An exception to this rule is 6130 the case when B=0 in a decreasing range. In this case, the range is 6131 closed on both ends, as otherwise there would be no way to reach 0 on 6132 a reverse playback for formats that have such a notion, like NPT and 6133 SMPTE. 6135 Example: 6136 Scale: -1 6137 Range: npt=15-0 6139 In this range both 15 and 0 are closed. 6141 A decreasing range interval without a corresponding negative Scale 6142 header is not valid. 6144 16.39. Referer 6146 The Referer request-header field allows the client to specify, for 6147 the server's benefit, the address (URI) of the resource from which 6148 the Request-URI was obtained (the "referrer", although the header 6149 field is misspelled.) The URI refers to that of the presentation 6150 description, typically retrieved via HTTP. The Referer request- 6151 header allows a server to generate lists of back-links to resources 6152 for interest, logging, optimized caching, etc. It also allows 6153 obsolete or mistyped links to be traced for maintenance. The Referer 6154 field MUST NOT be sent if the Request-URI was obtained from a source 6155 that does not have its own URI, such as input from the user keyboard. 6157 If the field value is a relative URI, it SHOULD be interpreted 6158 relative to the Request-URI. The URI MUST NOT include a fragment. 6160 See [H15.1.3] for security considerations on Referer. 6162 16.40. Retry-After 6164 The Retry-After response-header field can be used with a 503 (Service 6165 Unavailable) response to indicate how long the service is expected to 6166 be unavailable to the requesting client. This field MAY also be used 6167 with any 3xx (Redirection) response to indicate the minimum time the 6168 user-agent is asked wait before issuing the redirected request. The 6169 value of this field can be either an RTSP-date or an integer number 6170 of seconds (in decimal) after the time of the response. 6172 Example: 6173 Retry-After: Fri, 31 Dec 1999 23:59:59 GMT 6174 Retry-After: 120 6176 In the latter example, the delay is 2 minutes. 6178 16.41. Request-Status 6180 This request header is used to indicate the end result for requests 6181 that takes time to complete, such a PLAY (Section 13.4). It is sent 6182 in PLAY_NOTIFY (Section 13.5) with the end-of-stream reason to report 6183 how the PLAY request concluded, either in success or in failure. The 6184 header carries a reference to the request is reports on using the 6185 CSeq number for the session indicated by the Session header in the 6186 request. It provides both a numerical status code (according to 6187 Section 8.1.1) and a human readable reason phrase. 6189 Example: 6190 Request-Status: cseq=63 status=500 reason="Media data unavailable" 6192 16.42. Require 6194 The Require request-header field is used by clients or servers to 6195 ensure that the other end-point supports features that are required 6196 in respect to this request. It can also be used to query if the 6197 other end-point supports certain features, however the use of the 6198 Supported (Section 16.49) is much more effective in this purpose. 6199 The server MUST respond to this header by using the Unsupported 6200 header to negatively acknowledge those feature-tags which are NOT 6201 supported. The response MUST use the error code 551 (Option Not 6202 Supported). This header does not apply to proxies, for the same 6203 functionality in respect to proxies see Proxy-Require header 6204 (Section 16.35) with the exception of media modifying proxies. Media 6205 modifying proxies due to their nature of handling media in a way that 6206 is very similar to what a server, do need to understand also the 6207 server features to correctly serve the client. 6209 This is to make sure that the client-server interaction will 6210 proceed without delay when all features are understood by both 6211 sides, and only slow down if features are not understood (as in 6212 the example below). For a well-matched client-server pair, the 6213 interaction proceeds quickly, saving a round-trip often required 6214 by negotiation mechanisms. In addition, it also removes state 6215 ambiguity when the client requires features that the server does 6216 not understand. 6218 Example (Not complete): 6219 C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/2.0 6220 CSeq: 302 6221 Require: funky-feature 6222 Funky-Parameter: funkystuff 6224 S->C: RTSP/2.0 551 Option not supported 6225 CSeq: 302 6226 Unsupported: funky-feature 6228 In this example, "funky-feature" is the feature-tag which indicates 6229 to the client that the fictional Funky-Parameter field is required. 6230 The relationship between "funky-feature" and Funky-Parameter is not 6231 communicated via the RTSP exchange, since that relationship is an 6232 immutable property of "funky-feature" and thus should not be 6233 transmitted with every exchange. 6235 Proxies and other intermediary devices MUST ignore this header. If a 6236 particular extension requires that intermediate devices support it, 6237 the extension should be tagged in the Proxy-Require field instead 6238 (see Section 16.35). See discussion in the proxies section 6239 (Section 17.1) about when to consider that a feature requires proxy 6240 support. 6242 16.43. RTP-Info 6244 The RTP-Info response-header field is used to set RTP-specific 6245 parameters in the PLAY response. For streams using RTP as transport 6246 protocol the RTP-Info header SHOULD be part of a 200 response to 6247 PLAY. 6249 The exclusion of the RTP-Info in a PLAY response for RTP 6250 transported media will result in that a client needs to 6251 synchronize the media streams using RTCP. This may have negative 6252 impact as the RTCP can be lost, and does not need to be 6253 particularly timely in their arrival. Also functionality as 6254 informing the client from which packet a seek has occurred is 6255 affected. 6257 The RTP-Info MAY be included in SETUP responses to provide 6258 synchronization information when changing transport parameters, see 6259 Section 13.3. The RTP-Info header MAY also be included in 6260 GET_PARAMETER requests from client to server without any value to 6261 indicate a request for this information. In such a case the Range 6262 header MUST also be included in the request. The server SHALL 6263 respond if the session is in playing state with the Range header 6264 filled in with the current playback point and with the corresponding 6265 RTP-Info values. 6267 The header can carry the following parameters: 6269 url: Indicates the stream URI which for which the following RTP 6270 parameters correspond, this URI MUST be the same used in the 6271 SETUP request for this media stream. Any relative URI MUST use 6272 the Request-URI as base URI. This parameter MUST be present. 6274 ssrc: The Synchronization source (SSRC) that the RTP timestamp and 6275 sequence number provide applies to. This parameter MUST be 6276 present. 6278 seq: Indicates the sequence number of the first packet of the stream 6279 that is direct result of the request. This allows clients to 6280 gracefully deal with packets when seeking. The client uses 6281 this value to differentiate packets that originated before the 6282 seek from packets that originated after the seek. Note that a 6283 client may not receive the packet with the expressed sequence 6284 number, and instead packets with a higher sequence number, due 6285 to packet loss or reordering. This parameter is RECOMMENDED to 6286 be present. 6288 rtptime: MUST indicate the RTP timestamp value corresponding to the 6289 start time value in the Range response header, or if not 6290 explicitly given the implied start point. The client uses this 6291 value to calculate the mapping of RTP time to NPT or other 6292 media timescale. This parameter SHOULD be present to ensure 6293 inter-media synchronization is achieved. There exist no 6294 requirement that any received RTP packet will have the same RTP 6295 timestamp value as the one in the parameter used to establish 6296 synchronization. 6298 A mapping from RTP timestamps to NTP timestamps (wallclock) is 6299 available via RTCP. However, this information is not sufficient 6300 to generate a mapping from RTP timestamps to media clock time 6301 (NPT, etc.). Furthermore, in order to ensure that this 6302 information is available at the necessary time (immediately at 6303 startup or after a seek), and that it is delivered reliably, this 6304 mapping is placed in the RTSP control channel. 6306 In order to compensate for drift for long, uninterrupted 6307 presentations, RTSP clients should additionally map NPT to NTP, 6308 using initial RTCP sender reports to do the mapping, and later 6309 reports to check drift against the mapping. 6311 Example: 6312 Range:npt=3.25-15 6313 RTP-Info:url="rtsp://example.com/foo/audio" ssrc=0A13C760:seq=45102; 6314 rtptime=12345678,url="rtsp://example.com/foo/video" 6315 ssrc=9A9DE123:seq=30211;rtptime=29567112 6317 Lets assume that Audio uses a 16kHz RTP timestamp clock and Video 6318 a 90kHz RTP timestamp clock. Then the media synchronization is 6319 depicted in the following way. 6321 NPT 3.0---3.1---3.2-X-3.3---3.4---3.5---3.6 6322 Audio PA A 6323 Video V PV 6325 X: NPT time value = 3.25, from Range header. 6326 A: RTP timestamp value for Audio from RTP-Info header (12345678). 6327 V: RTP timestamp value for Video from RTP-Info header (29567112). 6328 PA: RTP audio packet carrying an RTP timestamp of 12344878. Which 6329 corresponds to NPT = (12344878 - A) / 16000 + 3.25 = 3.2 6330 PV: RTP video packet carrying an RTP timestamp of 29573412. Which 6331 corresponds to NPT = (29573412 - V) / 90000 + 3.25 = 3.32 6333 16.44. Scale 6335 A scale value of 1 indicates normal play at the normal forward 6336 viewing rate. If not 1, the value corresponds to the rate with 6337 respect to normal viewing rate. For example, a ratio of 2 indicates 6338 twice the normal viewing rate ("fast forward") and a ratio of 0.5 6339 indicates half the normal viewing rate. In other words, a ratio of 2 6340 has content time increase at twice the playback time. For every 6341 second of elapsed (wallclock) time, 2 seconds of content will be 6342 delivered. A negative value indicates reverse direction. For 6343 certain media transports this may require certain considerations to 6344 work consistent, see Appendix C.1 for description on how RTP handles 6345 this. 6347 The transmitted data rate SHOULD NOT be changed by selection of a 6348 different scale value. The resulting bit-rate should be in 6349 reasonably close to the nominal bit-rate of the content for Scale = 6350 1. The server has to actively manipulate the data when needed to 6351 meet the bitrate constraints. Implementation of scale changes 6352 depends on the server and media type. For video, a server may, for 6353 example, deliver only key frames or selected key frames. For audio, 6354 for example, it may time-scale the audio while preserving pitch or, 6355 less desirably, deliver fragments of audio, or completely mute the 6356 audio. 6358 The server and content may restrict the range of scale values that it 6359 supports. The supported values are indicated by the Media-Properties 6360 header (Section 16.28). The client SHOULD only indicate values 6361 indicated to be supported. However, as the values may change as the 6362 content progresses a requested value may no longer be valid when the 6363 request arrives. Thus an non-supported value in a request does not 6364 generate an error, only forces the server to choose the closest 6365 value. The response MUST always contain the actual scale value 6366 chosen by the server. 6368 If the server does not implement the possibility to scale, it will 6369 not return a Scale header. A server supporting Scale operations for 6370 PLAY MUST indicate this with the use of the "play.scale" feature-tag. 6372 When indicating a negative scale for a reverse playback, the Range 6373 header MUST indicate a decreasing range as described in 6374 Section 16.38. 6376 Example of playing in reverse at 3.5 times normal rate: 6377 Scale: -3.5 6378 Range: npt=15-10 6380 16.45. Seek-Style 6382 When a client sends a PLAY request with a Range header to perform a 6383 random access to the media, the client does not know if the server 6384 will pick the first media samples or the first random access point 6385 prior to the request range. Depending on use case, the client may 6386 have a strong preference. To express this preference and provide the 6387 client with information on how the server actually acted on that 6388 preference the Seek-Style header is defined. 6390 Seek-Style is a general header that MAY be included in any PLAY 6391 request to indicate the client's preference for any media stream that 6392 has random access properties. The server MUST always include the 6393 header in any PLAY response for media with random access properties 6394 to indicate what policy was applied. A Server that receives a 6395 unknown Seek-Style policy MUST ignore it and select the server 6396 default policy. 6398 This specification defines the following seek policies that may be 6399 requested: 6401 RAP: Random Access Point (RAP) is the behavior of requesting the 6402 server to locate the closest previous random access point that 6403 exist in the media aggregate and deliver from that. By requesting 6404 a RAP media quality will be the best possible as all media will be 6405 delivered from a point where full media state can be established 6406 in the media decoder. 6408 First-Prior: The first-prior policy will start delivery with the 6409 media unit that has a playout time first prior to the requested 6410 time. For discrete media that would only include media units that 6411 would still be rendered at the request time. For continuous media 6412 that is media that will be render during the requested start time 6413 of the range. 6415 Next: The next media units after the provided start time of the 6416 range. For continuous framed media that would mean the first next 6417 frame after the provided time. For discrete media the first unit 6418 that is to be rendered after the provided time. The main usage is 6419 for this case is when the client knows it has all media up to a 6420 certain point and would like to continue delivery so that a 6421 complete non-interrupted media playback can be achieved. Example 6422 of such scenarios include switching from a broadcast/multicast 6423 delivery to a unicast based delivery. This policy MUST only be 6424 used on the client's explicit request. 6426 Please note that these expressed preferences exist for optimizing the 6427 startup time or the media quality. The "Next" policy breaks the 6428 normal definition of the Range header to enable a client to request 6429 media with minimal overlap, although some may still occur for 6430 aggregated sessions. RAP and First-Prior both fulfill the 6431 requirement of providing media from the requested range and forward. 6432 However, unless RAP is used, the media quality for many media codecs 6433 using predictive methods can be severely degraded unless additional 6434 data is available as, for example, already buffered, or through other 6435 side channels. 6437 16.46. Speed 6439 The Speed request-header field requests the server to deliver 6440 specific amounts of nominal media time per unit of delivery time, 6441 contingent on the server's ability and desire to serve the media 6442 stream at the given speed. The client requests the delivery speed to 6443 be within a given range with an upper and lower bound. The server 6444 SHALL delivery at the highest possible speed within the range, but 6445 not faster than the upper-bound, for which the underlying network 6446 path can support the resulting transport data rates. As long as any 6447 speed value within the given range can be provided the server SHALL 6448 NOT modify the media quality. Only if the server is unable to 6449 delivery media at the speed value provided by the lower bound shall 6450 it reduce the media quality. 6452 Implementation of the Speed functionality by the server is OPTIONAL. 6453 The server can indicate its support through a feature-tag, 6454 play.scale. The lack of a Speed header in the response is an 6455 indication of lack of support of this functionality. 6457 The speed parameter values are expressed as a positive decimal value, 6458 e.g., a value of 2.0 indicates that data is to be delivered twice as 6459 fast as normal. A speed value of zero is invalid. The range is 6460 specified in the form "lower bound - upper bound". The lower bound 6461 value may be smaller or equal to the upper bound. All speeds may not 6462 be possible to support. Therefore the server MAY modify the 6463 requested values to the closest supported. The actual supported 6464 speed MUST be included in the response. Note however that the use 6465 cases may vary and that Speed value ranges such as 0.7 - 0.8, 6466 0.3-2.0, 1.0-2.5, 2.5-2.5 all has their usage. 6468 Example: 6469 Speed: 1.0 - 2.5 6470 Use of this header changes the bandwidth used for data delivery. It 6471 is meant for use in specific circumstances where delivery of the 6472 presentation at a higher or lower rate is desired. The main use 6473 cases are buffer operations or local scale operations. Implementors 6474 should keep in mind that bandwidth for the session may be negotiated 6475 beforehand (by means other than RTSP), and therefore re-negotiation 6476 may be necessary. To perform Speed operations the server needs to 6477 ensure that the network path can support the resulting bit-rate. 6478 Thus the media transport needs to support feedback so that the server 6479 can react and adapt to the available bitrate. 6481 16.47. Server 6483 The Server response-header field contains information about the 6484 software used by the origin server to handle the request. The field 6485 can contain multiple product tokens and comments identifying the 6486 server and any significant subproducts. The product tokens are 6487 listed in order of their significance for identifying the 6488 application. 6490 Example: 6491 Server: PhonyServer/1.0 6493 If the response is being forwarded through a proxy, the proxy 6494 application MUST NOT modify the Server response-header. Instead, it 6495 SHOULD include a Via field (Section 16.56). 6497 16.48. Session 6499 The Session request-header and response-header field identifies an 6500 RTSP session. An RTSP session is created by the server as a result 6501 of a successful SETUP request and in the response the session 6502 identifier is given to the client. The RTSP session exist until 6503 destroyed by a TEARDOWN, REDIRECT or timed out by the server. 6505 The session identifier is chosen by the server (see Section 4.3) and 6506 MUST be returned in the SETUP response. Once a client receives a 6507 session identifier, it MUST be included in any request related to 6508 that session. This means that the Session header MUST be included in 6509 a request using the following methods: PLAY, PAUSE, and TEARDOWN, and 6510 MAY be included in SETUP, OPTIONS, SET_PARAMETER, GET_PARAMETER, and 6511 REDIRECT, and MUST NOT be included in DESCRIBE. In an RTSP response 6512 the session header MUST be included in methods, SETUP, PLAY, and 6513 PAUSE, and MAY be included in methods, TEARDOWN, and REDIRECT, and if 6514 included in the request of the following methods it MUST also be 6515 included in the response, OPTIONS, GET_PARAMETER, and SET_PARAMETER, 6516 and MUST NOT be included in DESCRIBE. 6518 Note that a session identifier identifies an RTSP session across 6519 transport sessions or connections. RTSP requests for a given session 6520 can use different URIs (Presentation and media URIs). Note, that 6521 there are restrictions depending on the session which URIs that are 6522 acceptable for a given method. However, multiple "user" sessions for 6523 the same URI from the same client will require use of different 6524 session identifiers. 6526 The session identifier is needed to distinguish several delivery 6527 requests for the same URI coming from the same client. 6529 The response 454 (Session Not Found) MUST be returned if the session 6530 identifier is invalid. 6532 The header MAY include the session timeout period. If not explicitly 6533 provided this value is set to 60 seconds. As this affects how often 6534 session keep-alives are needed values smaller than 30 seconds are not 6535 recommended. However larger that default values can be useful in 6536 applications of RTSP that have inactive but established sessions for 6537 longer time periods. 6539 60 seconds was chosen as session timeout value due to: Resulting 6540 in not to frequent keep-alive messages and having low sensitivity 6541 to variations in request response timing. If one reduces the 6542 timeout value to below 30 seconds the corresponding request 6543 response timeout becomes a significant part of the session 6544 timeout. 60 seconds also allows for reasonably rapid recovery of 6545 committed server resources in case of client failure. 6547 16.49. Supported 6549 The Supported header enumerates all the extensions supported by the 6550 client or server using feature tags. The header carries the 6551 extensions supported by the message sending entity. The Supported 6552 header MAY be included in any request. When present in a request, 6553 the receiver MUST respond with its corresponding Supported header. 6554 Note, also in 4xx and 5xx responses is the supported header included. 6556 The Supported header contains a list of feature-tags, described in 6557 Section 4.7, that are understood by the client or server. 6559 Example: 6561 C->S: OPTIONS rtsp://example.com/ RTSP/2.0 6562 Supported: foo, bar, blech 6563 User-Agent: PhonyClient/1.2 6565 S->C: RTSP/2.0 200 OK 6566 Supported: bar, blech, baz 6568 16.50. Terminate-Reason 6570 The Terminate-Reason request header allows the server when sending a 6571 REDIRECT or TERMINATE request to provide a reason for the session 6572 termination and any additional information. This specification 6573 identifies three reasons for Redirections and may be extended in the 6574 future: 6576 Server-Admin: The server needs to be shutdown for some 6577 administrative reason. 6579 Session-Timeout: A client's session is kept alive for extended 6580 periods of time and the server has determined that it needs to 6581 reclaim the resources associated with this session. 6583 Internal-Error An internal error that is impossible to recover from 6584 has occurred forcing the server to terminate the session. 6586 The Server may provide additional parameters containing information 6587 around the redirect. This specification defines the following ones. 6589 time: Provides a wallclock time when the server will stop provide 6590 any service. 6592 user-msg: An UTF-8 text string with a message from the server to the 6593 user. This message SHOULD be displayed to the user. 6595 16.51. Timestamp 6597 The Timestamp general-header describes when the agent sent the 6598 request. The value of the timestamp is of significance only to the 6599 agent and may use any timescale. The responding agent MUST echo the 6600 exact same value and MAY, if it has accurate information about this, 6601 add a floating point number indicating the number of seconds that has 6602 elapsed since it has received the request. The timestamp is used by 6603 the agent to compute the round-trip time to the responding agent so 6604 that it can adjust the timeout value for retransmissions. It also 6605 resolves retransmission ambiguities for unreliable transport of RTSP. 6607 16.52. Transport 6609 The Transport request and response header indicates which transport 6610 protocol is to be used and configures its parameters such as 6611 destination address, compression, multicast time-to-live and 6612 destination port for a single stream. It sets those values not 6613 already determined by a presentation description. 6615 A Transport request header MAY contain a list of transport options 6616 acceptable to the client, in the form of multiple transport 6617 specification entries. Transport specifications are comma separated, 6618 listed in decreasing order of preference. Parameters may be added to 6619 each transport specification, separated by a semicolon. The server 6620 MUST return a Transport response-header in the response to indicate 6621 the values actually chosen if any. If not transport specification is 6622 supported no transport header is returned and the request MUST be 6623 responded using the status code 461 (Unsupported Transport) 6624 (Section 15.4.26). In case more than one transport specification was 6625 present in the request, the server MUST return the single (transport- 6626 spec) which was actually chosen if any. The number of transport-spec 6627 entries is expected to be limited as the client will get guidance on 6628 what configurations that are possible from the presentation 6629 description. 6631 The Transport header MAY also be used in subsequent SETUP requests to 6632 change transport parameters. A server MAY refuse to change 6633 parameters of an existing stream. 6635 A transport specification may only contain one of any given parameter 6636 within it. Parameters MAY be given in any order. Additionally, it 6637 may only contain either of the unicast or the multicast transport 6638 type parameter. All parameters need to be understood in a transport 6639 specification, if not, the transport specification MUST be ignored. 6640 RTSP proxies of any type that uses or modifies the transport 6641 specification, e.g. access proxy or security proxy, MUST remove 6642 specifications with unknown parameters before forwarding the RTSP 6643 message. If that result in no remaining transport specification the 6644 proxy shall send a 461 (Unsupported Transport) (Section 15.4.26) 6645 response without any Transport header. 6647 The Transport header is restricted to describing a single media 6648 stream. (RTSP can also control multiple streams as a single 6649 entity.) Making it part of RTSP rather than relying on a 6650 multitude of session description formats greatly simplifies 6651 designs of firewalls. 6653 The general syntax for the transport specifier is a list of slash 6654 separated tokens: 6655 Value1/Value2/Value3... 6656 Which for RTP transports take the form: 6657 RTP/profile/lower-transport. 6659 The default value for the "lower-transport" parameters is specific to 6660 the profile. For RTP/AVP, the default is UDP. 6662 There are two different methods for how to specify where the media 6663 should be delivered for unicast transport: 6665 dest_addr: The presence of this parameter and its values indicates 6666 the destination address or addresses (host address and port 6667 pairs for IP flows) necessary for the media transport. 6669 No dest_addr: The lack of the dest_addr parameter indicates that the 6670 server MUST send media to same address for which the RTSP 6671 messages originates. Does not work for transports requiring 6672 explicitly given destination ports. 6674 The choice of method for indicating where the media is to be 6675 delivered depends on the use case. In some case the only allowed 6676 method will be to use no explicit address indication and have the 6677 server deliver media to the source of the RTSP messages. 6679 For Multicast there is several methods for specifying addresses but 6680 they are different in how they work compared with unicast: 6682 dest_addr with client picked address: The address and relevant 6683 parameters like TTL (scope) for the actual multicast group to 6684 deliver the media to. There are security implications 6685 (Section 21) with this method that needs to be addressed if 6686 using this method because a RTSP server can be used as a DoS 6687 attacker on a existing multicast group. 6689 dest_addr using Session Description Information: The information 6690 included in the transport header can all be coming from the 6691 session description, e.g. the SDP c= and m= line. This 6692 mitigates some of the security issues of the previous methods 6693 as it is the session provider that picks the multicast group 6694 and scope. The client MUST include the information if it is 6695 available in the session description. 6697 No dest_addr: The behavior when no explicit multicast group is 6698 present in a request is not defined. 6700 An RTSP proxy will need to take care. If the media is not desired to 6701 be routed through the proxy, the proxy will need to introduce the 6702 destination indication. 6704 Below are the configuration parameters associated with transport: 6706 General parameters: 6708 unicast / multicast: This parameter is a mutually exclusive 6709 indication of whether unicast or multicast delivery will be 6710 attempted. One of the two values MUST be specified. Clients 6711 that are capable of handling both unicast and multicast 6712 transmission needs to indicate such capability by including two 6713 full transport-specs with separate parameters for each. 6715 layers: The number of multicast layers to be used for this media 6716 stream. The layers are sent to consecutive addresses starting 6717 at the dest_addr address. If the parameter is not included, it 6718 defaults to a single layer. 6720 dest_addr: A general destination address parameter that can contain 6721 one or more address specifications. Each combination of 6722 Protocol/Profile/Lower Transport needs to have the format and 6723 interpretation of its address specification defined. For RTP/ 6724 AVP/UDP and RTP/AVP/TCP, the address specification is a tuple 6725 containing a host address and port. Note, only a single 6726 destination entity per transport spec is intended. The usage 6727 of multiple destination to distribute a single media to 6728 multiple entities is unspecified. 6730 The client originating the RTSP request MAY specify the 6731 destination address of the stream recipient with the host 6732 address part of the tuple. When the destination address is 6733 specified, the recipient may be a different party than the 6734 originator of the request. To avoid becoming the unwitting 6735 perpetrator of a remote-controlled denial-of-service attack, a 6736 server MUST perform security checks (see Section 21.1) and 6737 SHOULD log such attempts before allowing the client to direct a 6738 media stream to a recipient address not chosen by the server. 6739 Implementations cannot rely on TCP as reliable means of client 6740 identification. If the server does not allow the host address 6741 part of the tuple to be set, it MUST return 463 (Destination 6742 Prohibited). 6744 The host address part of the tuple MAY be empty, for example 6745 ":58044", in cases when only destination port is desired to be 6746 specified. Responses to request including the Transport header 6747 with a dest_addr parameter SHOULD include the full destination 6748 address that is actually used by the server. The server MUST 6749 NOT remove address information present already in the request 6750 when responding unless the protocol requires it. 6752 src_addr: A general source address parameter that can contain one or 6753 more address specifications. Each combination of Protocol/ 6754 Profile/Lower Transport needs to have the format and 6755 interpretation of its address specification defined. For RTP/ 6756 AVP/UDP and RTP/AVP/TCP, the address specification is a tuple 6757 containing a host address and port. 6759 This parameter MUST be specified by the server if it transmits 6760 media packets from another address than the one RTSP messages 6761 are sent to. This will allow the client to verify source 6762 address and give it a destination address for its RTCP feedback 6763 packets if RTP is used. The address or addresses indicated in 6764 the src_addr parameter SHOULD be used both for sending and 6765 receiving of the media streams data packets. The main reasons 6766 are threefold: First, indicating the port and source address(s) 6767 lets the receiver know where from the packets is expected to 6768 originate. Secondly, traversal of NATs are greatly simplified 6769 when traffic is flowing symmetrically over a NAT binding. 6770 Thirdly, certain NAT traversal mechanisms, needs to know to 6771 which address and port to send so called "binding packets" from 6772 the receiver to the sender, thus creating a address binding in 6773 the NAT that the sender to receiver packet flow can use. 6775 This information may also be available through SDP. 6776 However, since this is more a feature of transport than 6777 media initialization, the authoritative source for this 6778 information should be in the SETUP response. 6780 mode: The mode parameter indicates the methods to be supported for 6781 this session. Valid values are PLAY and RECORD. If not 6782 provided, the default is PLAY. The RECORD value was defined in 6783 RFC 2326 and is in this specification unspecified 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 function 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 defined below MAY only be used if the media transport 6835 protocol of the lower-level transport is connection-oriented (such as 6836 TCP). However, these parameters MUST NOT be used when interleaving 6837 data over the RTSP control connection. 6839 setup: Clients use the setup parameter on the Transport line in a 6840 SETUP request, to indicate the roles it wishes to play in a TCP 6841 connection. This parameter is adapted from [RFC4145]. We 6842 discuss the use of this parameter in RTP/AVP/TCP non- 6843 interleaved transport in Appendix C.2.2; the discussion below 6844 is limited to syntactic issues. Clients may specify the 6845 following values for the setup parameter: ["active":] The 6846 client will initiate an outgoing connection. ["passive":] The 6847 client will accept an incoming connection. ["actpass":] The 6848 client is willing to accept an incoming connection or to 6849 initiate an outgoing connection. 6851 If a client does not specify a setup value, the "active" value 6852 is assumed. 6854 In response to a client SETUP request where the setup parameter 6855 is set to "active", a server's 2xx reply MUST assign the setup 6856 parameter to "passive" on the Transport header line. 6858 In response to a client SETUP request where the setup parameter 6859 is set to "passive", a server's 2xx reply MUST assign the setup 6860 parameter to "active" on the Transport header line. 6862 In response to a client SETUP request where the setup parameter 6863 is set to "actpass", a server's 2xx reply MUST assign the setup 6864 parameter to "active" or "passive" on the Transport header 6865 line. 6867 Note that the "holdconn" value for setup is not defined for 6868 RTSP use, and MUST NOT appear on a Transport line. 6870 connection: Clients use the setup parameter on the Transport line in 6871 a SETUP request, to indicate the SETUP request prefers the 6872 reuse of an existing connection between client and server (in 6873 which case the client sets the "connection" parameter to 6874 "existing"), or that the client requires the creation of a new 6875 connection between client and server (in which cast the client 6876 sets the "connection" parameter to "new"). Typically, clients 6877 use the "new" value for the first SETUP request for a URL, and 6878 "existing" for subsequent SETUP requests for a URL. 6880 If a client SETUP request assigns the "new" value to 6881 "connection", the server response MUST also assign the "new" 6882 value to "connection" on the Transport line. 6884 If a client SETUP request assigns the "existing" value to 6885 "connection", the server response MUST assign a value of 6886 "existing" or "new" to "connection" on the Transport line, at 6887 its discretion. 6889 The default value of "connection" is "existing", for all SETUP 6890 requests (initial and subsequent). 6892 RTCP-mux: Use to negotiate the usage of RTP and RTCP multiplexing 6893 [I-D.ietf-avt-rtp-and-rtcp-mux] on a single underlying 6894 transport stream. The presence of this parameter in a SETUP 6895 request indicates the clients support and desire to use RTP and 6896 RTCP multiplexing. The client MAY still include two transport 6897 streams in the Transport header specification to handle cases 6898 if RTP and RTCP multiplexing is not supported by the server. 6899 If the server supports the usage of RTP and RTCP multiplexing 6900 it SHALL include this parameter in the response and strip down 6901 the transport address negotiation to a single src_addr and 6902 dest_addr. If the server does not support RTP and RTCP 6903 multiplexing is removes this parameter from the transport 6904 specification in response and treat the specification as if the 6905 parameter was not included. 6907 The combination of transport protocol, profile and lower transport 6908 needs to be defined. A number of combinations are defined in the 6909 Appendix C. 6911 Below is a usage example, showing a client advertising the capability 6912 to handle multicast or unicast, preferring multicast. Since this is 6913 a unicast-only stream, the server responds with the proper transport 6914 parameters for unicast. 6916 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/2.0 6917 CSeq: 302 6918 Transport: RTP/AVP;multicast;mode="PLAY", 6919 RTP/AVP;unicast;dest_addr="192.0.2.5:3456"/ 6920 "192.0.2.5:3457";mode="PLAY" 6921 Accept-Ranges: NPT, SMPTE, UTC 6922 User-Agent: PhonyClient/1.2 6924 S->C: RTSP/2.0 200 OK 6925 CSeq: 302 6926 Date: Thu, 23 Jan 1997 15:35:06 GMT 6927 Session: 47112344 6928 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:3456"/ 6929 "192.0.2.5:3457";src_addr="192.0.2.224:6256"/ 6930 "192.0.2.224:6257";mode="PLAY" 6931 Accept-Ranges: NPT 6932 Media-Properties: Random-Access=0.6, Dynamic, 6933 Time-Limited=20081128T165900 6935 16.53. Unsupported 6937 The Unsupported response-header lists the features not supported by 6938 the server. In the case where the feature was specified via the 6939 Proxy-Require field (Section 16.35), if there is a proxy on the path 6940 between the client and the server, the proxy MUST send a response 6941 message with a status code of 551 (Option Not Supported). The 6942 request MUST NOT be forwarded. 6944 See Section 16.42 for a usage example. 6946 16.54. User-Agent 6948 The User-Agent request-header field contains information about the 6949 user agent originating the request. This is for statistical 6950 purposes, the tracing of protocol violations, and automated 6951 recognition of user agents for the sake of tailoring responses to 6952 avoid particular user agent limitations. User agents SHOULD include 6953 this field with requests. The field can contain multiple product 6954 tokens and comments identifying the agent and any subproducts which 6955 form a significant part of the user agent. By convention, the 6956 product tokens are listed in order of their significance for 6957 identifying the application. 6959 Example: 6960 User-Agent: PhonyClient/1.2 6962 16.55. Vary 6964 The Vary field value indicates the set of request-header fields that 6965 fully determines, while the response is fresh, whether a cache is 6966 permitted to use the response to reply to a subsequent request 6967 without revalidation. For uncacheable or stale responses, the Vary 6968 field value advises the user agent about the criteria that were used 6969 to select the representation. A Vary field value of "*" implies that 6970 a cache cannot determine from the request headers of a subsequent 6971 request whether this response is the appropriate representation. 6973 An RTSP server SHOULD include a Vary header field with any cacheable 6974 response that is subject to server-driven negotiation. Doing so 6975 allows a cache to properly interpret future requests on that resource 6976 and informs the user agent about the presence of negotiation on that 6977 resource. A server MAY include a Vary header field with a non- 6978 cacheable response that is subject to server-driven negotiation, 6979 since this might provide the user agent with useful information about 6980 the dimensions over which the response varies at the time of the 6981 response. 6983 A Vary field value consisting of a list of field-names signals that 6984 the representation selected for the response is based on a selection 6985 algorithm which considers ONLY the listed request-header field values 6986 in selecting the most appropriate representation. A cache MAY assume 6987 that the same selection will be made for future requests with the 6988 same values for the listed field names, for the duration of time for 6989 which the response is fresh. 6991 The field-names given are not limited to the set of standard request- 6992 header fields defined by this specification. Field names are case- 6993 insensitive. 6995 A Vary field value of "*" signals that unspecified parameters not 6996 limited to the request-headers (e.g., the network address of the 6997 client), play a role in the selection of the response representation. 6998 The "*" value MUST NOT be generated by a proxy server; it may only be 6999 generated by an origin server. 7001 16.56. Via 7003 The Via general-header field MUST be used by proxies to indicate the 7004 intermediate protocols and recipients between the user agent and the 7005 server on requests, and between the origin server and the client on 7006 responses. The field is intended to be used for tracking message 7007 forwards, avoiding request loops, and identifying the protocol 7008 capabilities of all senders along the request/response chain. 7010 Multiple Via field values represents each proxy that has forwarded 7011 the message. Each recipient MUST append its information such that 7012 the end result is ordered according to the sequence of forwarding 7013 applications. 7015 Proxies (e.g., Access Proxy or Translator Proxy) SHOULD NOT, by 7016 default, forward the names and ports of hosts within the private/ 7017 protected region. This information SHOULD only be propagated if 7018 explicitly enabled. If not enabled, the via-received of any host 7019 behind the firewall/NAT SHOULD be replaced by an appropriate 7020 pseudonym for that host. 7022 For organizations that have strong privacy requirements for hiding 7023 internal structures, a proxy MAY combine an ordered subsequence of 7024 Via header field entries with identical sent-protocol values into a 7025 single such entry. Applications MUST NOT combine entries which have 7026 different received-protocol values. 7028 16.57. WWW-Authenticate 7030 The WWW-Authenticate response-header field MUST be included in 401 7031 (Unauthorized) response messages. The field value consists of at 7032 least one challenge that indicates the authentication scheme(s) and 7033 parameters applicable to the Request-URI. 7035 The HTTP access authentication process is described in [RFC2617]. 7036 User agents are advised to take special care in parsing the WWW- 7037 Authenticate field value as it might contain more than one challenge, 7038 or if more than one WWW-Authenticate header field is provided, the 7039 contents of a challenge itself can contain a comma-separated list of 7040 authentication parameters. 7042 17. Proxies 7044 RTSP Proxies are RTSP agents that sit in between a client and a 7045 server. A proxy can take on both the role as a client and as server 7046 depending on what it tries to accomplish. Proxies are also 7047 introduced for several different reasons and the below are often 7048 combined. 7050 Caching Proxy: This type of proxy is used to reduce the workload on 7051 servers and connections. By caching the description and media 7052 streams, i.e., the presentation, the proxy can serve a client 7053 with content, but without requesting it from the server once it 7054 has been cached and has not become stale. See the caching 7055 Section 18. This type of proxy is also expected to understand 7056 RTSP end-point functionality, i.e., functionality identified in 7057 the Require header in addition to what Proxy-Require demands. 7059 Translator Proxy: This type of proxy is used to ensure that an RTSP 7060 client get access to servers and content on an external network 7061 or using content encodings not supported by the client. The 7062 proxy performs the necessary translation of addresses, 7063 protocols or encodings. This type of proxy is expected to also 7064 understand RTSP end-point functionality, i.e. functionality 7065 identified in the Require header in addition to what Proxy- 7066 Require demands. 7068 Access Proxy: This type of proxy is used to ensure that a RTSP 7069 client get access to servers on an external network. Thus this 7070 proxy is placed on the border between two domains, e.g. a 7071 private address space and the public Internet. The proxy 7072 performs the necessary translation, usually addresses. This 7073 type of proxies are required to redirect the media to 7074 themselves or a controlled gateway that perform the translation 7075 before the media can reach the client. 7077 Security Proxy: This type of proxy is used to help facilitate 7078 security functions around RTSP. For example when having a 7079 firewalled network, the security proxy request that the 7080 necessary pinholes in the firewall is opened when a client in 7081 the protected network want to access media streams on the 7082 external side. This proxy can also limit the clients access to 7083 certain type of content. This proxy can perform its function 7084 without redirecting the media between the server and client. 7085 However, in deployments with private address spaces this proxy 7086 is likely to be combined with the access proxy. Anyway, the 7087 functionality of this proxy is usually closely tied into 7088 understand all aspects of how the media transport. 7090 Auditing Proxy: RTSP proxies can also provide network owners with a 7091 logging and audit point for RTSP sessions, e.g. for 7092 corporations that tracks their employees usage of the network. 7093 This type of proxy can perform its function without inserting 7094 itself or any other node in the media transport. This proxy 7095 type can also accept unknown methods as it doesn't interfere 7096 with the clients requests. 7098 All type of proxies can be used also when using secured communication 7099 with TLS as RTSP 2.0 allows the client to approve certificate chains 7100 used for connection establishment from a proxy, see Section 19.3.2. 7101 However that trust model may not be suitable for all type of 7102 deployment, and instead secured sessions do by-pass of the proxies. 7104 Access proxies SHOULD NOT be used in equipment like NATs and 7105 firewalls that aren't expected to be regularly maintained, like home 7106 or small office equipment. In these cases it is better to use the 7107 NAT traversal procedures defined for RTSP 2.0 7108 [I-D.ietf-mmusic-rtsp-nat]. The reason for these recommendations is 7109 that any extensions of RTSP resulting in new media transport 7110 protocols or profiles, new parameters etc may fail in a proxy that 7111 isn't maintained. Thus resulting in blocking further development of 7112 RTSP and its usage. 7114 17.1. Proxies and Protocol Extensions 7116 The existence of proxies must always be considered when developing 7117 new RTSP extensions. Most type of proxies will need to implement any 7118 new method to operate correct in the presence of that extension. New 7119 headers will be possible to introduce without being blocked by 7120 proxies not yet updated. However, it is important to consider if 7121 this header and its function is required to be understood by the 7122 proxy or can be forwarded. If the header needs to be understood a 7123 feature-tag representing the functionality needs to be included in 7124 the Proxy-Require header. Below are guidelines for analysis if the 7125 header needs to be understood. The transport header and its 7126 parameters also shows that headers that are extensible and requires 7127 correct interpretation in the proxy also requires handling rules. 7129 When defining a new RTSP header it needs to be considered if RTSP 7130 proxies are required to understand them to achieve correct 7131 functionality. Determining this is not easy as the functionality for 7132 proxies are widely varied as can be understood from the above list of 7133 functionality. When evaluating this one can dived the functionality 7134 into three main categories: 7136 Media modifying: The caching and translator proxies are modifying 7137 the actual media and therefore needs to understand also request 7138 directed to the server that affects how the media is rendered. 7139 Thus this type of proxies needs to also understand the server side 7140 functionality. 7142 Transport modifying: The access and the security proxy both need to 7143 understand the how the transport is performed, either for opening 7144 pinholes or to translate the outer headers, e.g. IP and UDP. 7146 Non-modifying: The audit proxy is special in that it do not modify 7147 the messages in other ways than to insert the Via header. That 7148 makes it possible for this type to forward RTSP message that 7149 contains different type of unknown methods, headers or header 7150 parameters. 7152 Based on the above classification one should evaluate if ones 7153 functionality requires the Transport modifying type of proxies to 7154 understand it or not. 7156 18. Caching 7158 In HTTP, response-request pairs are cached. RTSP differs 7159 significantly in that respect. Responses are not cacheable, with the 7160 exception of the presentation description returned by DESCRIBE. 7161 (Since the responses for anything but DESCRIBE and GET_PARAMETER do 7162 not return any data, caching is not really an issue for these 7163 requests.) However, it is desirable for the continuous media data, 7164 typically delivered out-of-band with respect to RTSP, to be cached, 7165 as well as the session description. 7167 On receiving a SETUP or PLAY request, a proxy ascertains whether it 7168 has an up-to-date copy of the continuous media content and its 7169 description. It can determine whether the copy is up-to-date by 7170 issuing a SETUP or DESCRIBE request, respectively, and comparing the 7171 Last-Modified header with that of the cached copy. If the copy is 7172 not up-to-date, it modifies the SETUP transport parameters as 7173 appropriate and forwards the request to the origin server. 7174 Subsequent control commands such as PLAY or PAUSE then pass the proxy 7175 unmodified. The proxy delivers the continuous media data to the 7176 client, while possibly making a local copy for later reuse. The 7177 exact behavior allowed to the cache is given by the cache-response 7178 directives described in Section 16.10. A cache MUST answer any 7179 DESCRIBE requests if it is currently serving the stream to the 7180 requester, as it is possible that low-level details of the stream 7181 description may have changed on the origin-server. 7183 Note that an RTSP cache, unlike the HTTP cache, is of the "cut- 7184 through" variety. Rather than retrieving the whole resource from the 7185 origin server, the cache simply copies the streaming data as it 7186 passes by on its way to the client. Thus, it does not introduce 7187 additional latency. 7189 To the client, an RTSP proxy cache appears like a regular media 7190 server, to the media origin server like a client. Just as an HTTP 7191 cache has to store the content type, content language, and so on for 7192 the objects it caches, a media cache has to store the presentation 7193 description. Typically, a cache eliminates all transport-references 7194 (that is, e.g. multicast information) from the presentation 7195 description, since these are independent of the data delivery from 7196 the cache to the client. Information on the encodings remains the 7197 same. If the cache is able to translate the cached media data, it 7198 would create a new presentation description with all the encoding 7199 possibilities it can offer. 7201 18.1. Validation Model (HTTP) 7203 When a cache has a stale entry that it would like to use as a 7204 response to a client's request, it first has to check with the origin 7205 server (or possibly an intermediate cache with a fresh response) to 7206 see if its cached entry is still usable. We call this "validating" 7207 the cache entry. Since we do not want to have to pay the overhead of 7208 retransmitting the full response if the cached entry is good, and we 7209 do not want to pay the overhead of an extra round trip if the cached 7210 entry is invalid, the RTSP protocol supports the use of conditional 7211 methods. 7213 The key protocol features for supporting conditional methods are 7214 those concerned with "cache validators." When an origin server 7215 generates a full response, it attaches some sort of validator to it, 7216 which is kept with the cache entry. When a client (user agent or 7217 proxy cache) makes a conditional request for a resource for which it 7218 has a cache entry, it includes the associated validator in the 7219 request. 7221 The server then checks that validator against the current validator 7222 for the entity, and, if they match (see Section 18.1.3), it responds 7223 with a special status code (usually, 304 (Not Modified)) and no 7224 message body. Otherwise, it returns a full response (including 7225 message body). Thus, we avoid transmitting the full response if the 7226 validator matches, and we avoid an extra round trip if it does not 7227 match. 7229 In RTSP, a conditional request looks exactly the same as a normal 7230 request for the same resource, except that it carries a special 7231 header (which includes the validator) that implicitly turns the 7232 method (usually DESCRIBE) into a conditional. 7234 The protocol includes both positive and negative senses of cache- 7235 validating conditions. That is, it is possible to request either 7236 that a method be performed if and only if a validator matches or if 7237 and only if no validators match. 7239 Note: a response that lacks a validator may still be cached, and 7240 served from cache until it expires, unless this is explicitly 7241 prohibited by a cache-control directive (see Section 16.10). 7242 However, a cache cannot do a conditional retrieval if it does not 7243 have a validator for the entity, which means it will not be 7244 refreshable after it expires. 7246 18.1.1. Last-Modified Dates 7248 The Last-Modified header (Section 16.26) value is often used as a 7249 cache validator. In simple terms, a cache entry is considered to be 7250 valid if the entity has not been modified since the Last-Modified 7251 value. 7253 18.1.2. Message Body Tag Cache Validators 7255 The MTag response-header field value, an message body tag, provides 7256 for an "opaque" cache validator. This might allow more reliable 7257 validation in situations where it is inconvenient to store 7258 modification dates, where the one-second resolution of RTSP-date 7259 values is not sufficient, or where the origin server wishes to avoid 7260 certain paradoxes that might arise from the use of modification 7261 dates. 7263 Message body tags are described in Section 5.3 7265 18.1.3. Weak and Strong Validators 7267 Since both origin servers and caches will compare two validators to 7268 decide if they represent the same or different entities, one normally 7269 would expect that if the message body (i.e., the presentation 7270 description) or any associated message body headers changes in any 7271 way, then the associated validator would change as well. If this is 7272 true, then we call this validator a "strong validator." We call 7273 message body (i.e., the presentation description) or any associated 7274 message body headers an entity for a better understanding. 7276 However, there might be cases when a server prefers to change the 7277 validator only on semantically significant changes, and not when 7278 insignificant aspects of the entity change. A validator that does 7279 not always change when the resource changes is a "weak validator." 7281 Message body tags are normally "strong validators," but the protocol 7282 provides a mechanism to tag an message body tag as "weak." One can 7283 think of a strong validator as one that changes whenever the bits of 7284 an entity changes, while a weak value changes whenever the meaning of 7285 an entity changes. Alternatively, one can think of a strong 7286 validator as part of an identifier for a specific entity, while a 7287 weak validator is part of an identifier for a set of semantically 7288 equivalent entities. 7290 Note: One example of a strong validator is an integer that is 7291 incremented in stable storage every time an entity is changed. 7293 An entity's modification time, if represented with one-second 7294 resolution, could be a weak validator, since it is possible that 7295 the resource might be modified twice during a single second. 7297 Support for weak validators is optional. However, weak validators 7298 allow for more efficient caching of equivalent objects; for 7299 example, a hit counter on a site is probably good enough if it is 7300 updated every few days or weeks, and any value during that period 7301 is likely "good enough" to be equivalent. 7303 A "use" of a validator is either when a client generates a request 7304 and includes the validator in a validating header field, or when a 7305 server compares two validators. 7307 Strong validators are usable in any context. Weak validators are 7308 only usable in contexts that do not depend on exact equality of an 7309 entity. For example, either kind is usable for a conditional 7310 DESCRIBE of a full entity. However, only a strong validator is 7311 usable for a sub-range retrieval, since otherwise the client might 7312 end up with an internally inconsistent entity. 7314 Clients MAY issue DESCRIBE requests with either weak validators or 7315 strong validators. Clients MUST NOT use weak validators in other 7316 forms of request. 7318 The only function that the RTSP protocol defines on validators is 7319 comparison. There are two validator comparison functions, depending 7320 on whether the comparison context allows the use of weak validators 7321 or not: 7323 o The strong comparison function: in order to be considered equal, 7324 both validators MUST be identical in every way, and both MUST NOT 7325 be weak. 7327 o The weak comparison function: in order to be considered equal, 7328 both validators MUST be identical in every way, but either or both 7329 of them MAY be tagged as "weak" without affecting the result. 7331 An message body tag is strong unless it is explicitly tagged as weak. 7333 A Last-Modified time, when used as a validator in a request, is 7334 implicitly weak unless it is possible to deduce that it is strong, 7335 using the following rules: 7337 o The validator is being compared by an origin server to the actual 7338 current validator for the entity and, 7340 o That origin server reliably knows that the associated entity did 7341 not change twice during the second covered by the presented 7342 validator. 7344 OR 7346 o The validator is about to be used by a client in an If-Modified- 7347 Since, because the client has a cache entry for the associated 7348 entity, and 7350 o That cache entry includes a Date value, which gives the time when 7351 the origin server sent the original response, and 7353 o The presented Last-Modified time is at least 60 seconds before the 7354 Date value. 7356 OR 7358 o The validator is being compared by an intermediate cache to the 7359 validator stored in its cache entry for the entity, and 7361 o That cache entry includes a Date value, which gives the time when 7362 the origin server sent the original response, and 7364 o The presented Last-Modified time is at least 60 seconds before the 7365 Date value. 7367 This method relies on the fact that if two different responses were 7368 sent by the origin server during the same second, but both had the 7369 same Last-Modified time, then at least one of those responses would 7370 have a Date value equal to its Last-Modified time. The arbitrary 60- 7371 second limit guards against the possibility that the Date and Last- 7372 Modified values are generated from different clocks, or at somewhat 7373 different times during the preparation of the response. An 7374 implementation MAY use a value larger than 60 seconds, if it is 7375 believed that 60 seconds is too short. 7377 If a client wishes to perform a sub-range retrieval on a value for 7378 which it has only a Last-Modified time and no opaque validator, it 7379 MAY do this only if the Last-Modified time is strong in the sense 7380 described here. 7382 18.1.4. Rules for When to Use Entity Tags and Last-Modified Dates 7384 We adopt a set of rules and recommendations for origin servers, 7385 clients, and caches regarding when various validator types ought to 7386 be used, and for what purposes. 7388 RTSP origin servers: 7390 o SHOULD send an message body tag validator unless it is not 7391 feasible to generate one. 7393 o MAY send a weak message body tag instead of a strong message body 7394 tag, if performance considerations support the use of weak message 7395 body tags, or if it is unfeasible to send a strong message body 7396 tag. 7398 o SHOULD send a Last-Modified value if it is feasible to send one, 7399 unless the risk of a breakdown in semantic transparency that could 7400 result from using this date in an If-Modified-Since header would 7401 lead to serious problems. 7403 In other words, the preferred behavior for an RTSP origin server is 7404 to send both a strong message body tag and a Last-Modified value. 7406 In order to be legal, a strong message body tag MUST change whenever 7407 the associated entity value changes in any way. A weak message body 7408 tag SHOULD change whenever the associated entity changes in a 7409 semantically significant way. 7411 Note: in order to provide semantically transparent caching, an 7412 origin server must avoid reusing a specific strong message body 7413 tag value for two different entities, or reusing a specific weak 7414 message body tag value for two semantically different entities. 7415 Cache entries might persist for arbitrarily long periods, 7416 regardless of expiration times, so it might be inappropriate to 7417 expect that a cache will never again attempt to validate an entry 7418 using a validator that it obtained at some point in the past. 7420 RTSP clients: 7422 o If an message body tag has been provided by the origin server, 7423 MUST use that message body tag in any cache-conditional request 7424 (using If- Match or If-None-Match). 7426 o If only a Last-Modified value has been provided by the origin 7427 server, SHOULD use that value in non-subrange cache-conditional 7428 requests (using If-Modified-Since). 7430 o If both an message body tag and a Last-Modified value have been 7431 provided by the origin server, SHOULD use both validators in 7432 cache-conditional requests. 7434 An RTSP origin server, upon receiving a conditional request that 7435 includes both a Last-Modified date (e.g., in an If-Modified-Since 7436 header) and one or more message body tags (e.g., in an If-Match, If- 7437 None-Match, or If-Range header field) as cache validators, MUST NOT 7438 return a response status of 304 (Not Modified) unless doing so is 7439 consistent with all of the conditional header fields in the request. 7441 Note: The general principle behind these rules is that RTSP 7442 servers and clients should transmit as much non-redundant 7443 information as is available in their responses and requests. RTSP 7444 systems receiving this information will make the most conservative 7445 assumptions about the validators they receive. 7447 18.1.5. Non-validating Conditionals 7449 The principle behind message body tags is that only the service 7450 author knows the semantics of a resource well enough to select an 7451 appropriate cache validation mechanism, and the specification of any 7452 validator comparison function more complex than byte-equality would 7453 open up a can of worms. Thus, comparisons of any other headers are 7454 never used for purposes of validating a cache entry. 7456 18.2. Invalidation After Updates or Deletions (HTTP) 7458 The effect of certain methods performed on a resource at the origin 7459 server might cause one or more existing cache entries to become non- 7460 transparently invalid. That is, although they might continue to be 7461 "fresh," they do not accurately reflect what the origin server would 7462 return for a new request on that resource. 7464 There is no way for the RTSP protocol to guarantee that all such 7465 cache entries are marked invalid. For example, the request that 7466 caused the change at the origin server might not have gone through 7467 the proxy where a cache entry is stored. However, several rules help 7468 reduce the likelihood of erroneous behavior. 7470 In this section, the phrase "invalidate an entity" means that the 7471 cache will either remove all instances of that entity from its 7472 storage, or will mark these as "invalid" and in need of a mandatory 7473 revalidation before they can be returned in response to a subsequent 7474 request. 7476 Some HTTP methods MUST cause a cache to invalidate an entity. This 7477 is either the entity referred to by the Request-URI, or by the 7478 Location or Content-Location headers (if present). These methods 7479 are: 7481 o DESCRIBE 7483 o SETUP 7485 In order to prevent denial of service attacks, an invalidation based 7486 on the URI in a Location or Content-Location header MUST only be 7487 performed if the host part is the same as in the Request-URI. 7489 A cache that passes through requests for methods it does not 7490 understand SHOULD invalidate any entities referred to by the Request- 7491 URI. 7493 19. Security Framework 7495 The RTSP security framework consists of two high level components: 7496 the pure authentication mechanisms based on HTTP authentication, and 7497 the transport protection based on TLS, which is independent of RTSP. 7498 Because of the similarity in syntax and usage between RTSP servers 7499 and HTTP servers, the security for HTTP is re-used to a large extent. 7501 19.1. RTSP and HTTP Authentication 7503 RTSP and HTTP share common authentication schemes, and thus follow 7504 the same usage guidelines as specified in[RFC2617] and also in [H15]. 7505 Servers SHOULD implement both basic and digest [RFC2617] 7506 authentication. Client MUST implement both basic and digest 7507 authentication [RFC2617] so that Server who requires the client to 7508 authenticate can trust that the capability is present. 7510 It should be stressed that using the HTTP authentication alone does 7511 not provide full control message security. Therefore, in 7512 environments requiring tighter security for the control messages, TLS 7513 SHOULD be used, see Section 19.2. 7515 19.2. RTSP over TLS 7517 RTSP MUST follow the same guidelines with regards to TLS [RFC5246] 7518 usage as specified for HTTP, see [RFC2818]. RTSP over TLS is 7519 separated from unsecured RTSP both on URI level and port level. 7520 Instead of using the "rtsp" scheme identifier in the URI, the "rtsps" 7521 scheme identifier MUST be used to signal RTSP over TLS. If no port 7522 is given in a URI with the "rtsps" scheme, port 322 MUST be used for 7523 TLS over TCP/IP. 7525 When a client tries to setup an insecure channel to the server (using 7526 the "rtsp" URI), and the policy for the resource requires a secure 7527 channel, the server MUST redirect the client to the secure service by 7528 sending a 301 redirect response code together with the correct 7529 Location URI (using the "rtsps" scheme). A user or client MAY 7530 upgrade a non secured URI to a secured by changing the scheme from 7531 "rtsp" to "rtsps". A server implementing support for "rtsps" MUST 7532 allow this. 7534 It should be noted that TLS allows for mutual authentication (when 7535 using both server and client certificates). Still, one of the more 7536 common way TLS is used is to only provide server side authentication 7537 (often to avoid client certificates). TLS is then used in addition 7538 to HTTP authentication, providing transport security and server 7539 authentication, while HTTP Authentication is used to authenticate the 7540 client. 7542 RTSP includes the possibility to keep a TCP session up between the 7543 client and server, throughout the RTSP session lifetime. It may be 7544 convenient to keep the TCP session, not only to save the extra setup 7545 time for TCP, but also the extra setup time for TLS (even if TLS uses 7546 the resume function, there will be almost two extra round trips). 7547 Still, when TLS is used, such behavior introduces extra active state 7548 in the server, not only for TCP and RTSP, but also for TLS. This may 7549 increase the vulnerability to DoS attacks. 7551 In addition to these recommendations, Section 19.3 gives further 7552 recommendations of TLS usage with proxies. 7554 19.3. Security and Proxies 7556 The nature of a proxy is often to act as a "man-in-the-middle", while 7557 security is often about preventing the existence of a "man-in-the- 7558 middle". This section provides clients with the possibility to use 7559 proxies even when applying secure transports (TLS) between the RTSP 7560 agents. The TLS proxy mechanism allows for server and proxy 7561 identification using certificates. However, the client can not be 7562 identified based on certificates. The client needs to select between 7563 using the procedure specified below or using a TLS connection 7564 directly (by-passing any proxies) to the server. The choice may be 7565 dependent on policies. 7567 There are basically two categories of proxies, the transparent 7568 proxies (of which the client is not aware) and the non-transparent 7569 proxies (of which the client is aware). An infrastructure based on 7570 proxies requires that the trust model is such that both client and 7571 servers can trust the proxies to handle the RTSP messages correctly. 7572 To be able to trust a proxy, the client and server also needs to be 7573 aware of the proxy. Hence, transparent proxies cannot generally be 7574 seen as trusted and will not work well with security (unless they 7575 work only at transport layer). In the rest of this section any 7576 reference to proxy will be to a non-transparent proxy, which inspects 7577 or manipulate the RTSP messages. 7579 HTTP Authentication is built on the assumption of proxies and can 7580 provide user-proxy authentication and proxy-proxy/server 7581 authentication in addition to the client-server authentication. 7583 When TLS is applied and a proxy is used, the client will connect to 7584 the proxy's address when connecting to any RTSP server. This implies 7585 that for TLS, the client will authenticate the proxy server and not 7586 the end server. Note that when the client checks the server 7587 certificate in TLS, it MUST check the proxy's identity (URI or 7588 possibly other known identity) against the proxy's identity as 7589 presented in the proxy's Certificate message. 7591 The problem is that for a proxy accepted by the client, the proxy 7592 needs to be provided information on which grounds it should accept 7593 the next-hop certificate. Both the proxy and the user may have rules 7594 for this, and the user have the possibility to select the desired 7595 behavior. To handle this case, the Accept-Credentials header (See 7596 Section 16.2) is used, where the client can force the proxy/proxies 7597 to relay back the chain of certificates used to authenticate any 7598 intermediate proxies as well as the server. Given the assumption 7599 that the proxies are viewed as trusted, it gives the user a 7600 possibility to enforce policies to each trusted proxy of whether it 7601 should accept the next entity in the chain. 7603 A proxy MUST use TLS for the next hop if the RTSP request includes a 7604 "rtsps" URI. TLS MAY be applied on intermediate links (e.g. between 7605 client and proxy, or between proxy and proxy), even if the resource 7606 and the end server does not require to use it. The proxy MUST when 7607 initiating the next hop TLS connection use the incoming TLS 7608 connections cipher suite list, only modified by removing any cipher 7609 suits that the proxy does not support. In case a proxy fails to 7610 establish a TLS connection due to cipher suite mismatch between proxy 7611 and next hop proxy or server, this is indicated using error code 472 7612 (Failure to establish secure connection). 7614 19.3.1. Accept-Credentials 7616 The Accept-Credentials header can be used by the client to distribute 7617 simple authorization policies to intermediate proxies. The client 7618 includes the Accept-Credentials header to dictate how the proxy 7619 treats the server/next proxy certificate. There are currently three 7620 methods defined: 7622 Any, which means that the proxy (or proxies) MUST accept whatever 7623 certificate presented. This is of course not a recommended 7624 option to use, but may be useful in certain circumstances (such 7625 as testing). 7627 Proxy, which means that the proxy (or proxies) MUST use its own 7628 policies to validate the certificate and decide whether to 7629 accept it or not. This is convenient in cases where the user 7630 has a strong trust relation with the proxy. Reason why a 7631 strong trust relation may exist are; personal/company proxy, 7632 proxy has a out-of-band policy configuration mechanism. 7634 User, which means that the proxy (or proxies) MUST send credential 7635 information about the next hop to the client for authorization. 7636 The client can then decide whether the proxy should accept the 7637 certificate or not. See Section 19.3.2 for further details. 7639 If the Accept-Credentials header is not included in the RTSP request 7640 from the client, then the "Proxy" method MUST be used as default. If 7641 another method than the "Proxy" is to be used, then the Accept- 7642 Credentials header MUST be included in all of the RTSP request from 7643 the client. This is because it cannot be assumed that the proxy 7644 always keeps the TLS state or the users previous preference between 7645 different RTSP messages (in particular if the time interval between 7646 the messages is long). 7648 With the "Any" and "Proxy" methods the proxy will apply the policy as 7649 defined for respectively method. If the policy does not accept the 7650 credentials of the next hop, the entity MUST respond with a message 7651 using status code 471 (Connection Credentials not accepted). 7653 An RTSP request in the direction server to client MUST NOT include 7654 the Accept-Credential header. As for the non-secured communication, 7655 the possibility for these requests depends on the presence of a 7656 client established connection. However if the server to client 7657 request is in relation to a session established over a TLS secured 7658 channel, it MUST be sent in a TLS secured connection. That secured 7659 connection MUST also be the one used by the last client to server 7660 request. If no such transport connection exist at the time when the 7661 server desires to send the request, it silently fails. 7663 Further policies MAY be defined and registered, but should be done so 7664 with caution. 7666 19.3.2. User approved TLS procedure 7668 For the "User" method each proxy MUST perform the following procedure 7669 for each RTSP request: 7671 o Setup the TLS session to the next hop if not already present (i.e. 7672 run the TLS handshake, but do not send the RTSP request). 7674 o Extract the peer certificate chain for the TLS session. 7676 o Check if a matching identity and hash of the peer certificate is 7677 present in the Accept-Credentials header. If present, send the 7678 message to the next hop, and conclude these procedures. If not, 7679 go to the next step. 7681 o The proxy responds to the RTSP request with a 470 or 407 response 7682 code. The 407 response code MAY be used when the proxy requires 7683 both user and connection authorization from user or client. In 7684 this message the proxy MUST include a Connection-Credentials 7685 header, see Section 16.12 with the next hop's identity and 7686 certificate. 7688 The client MUST upon receiving a 470 or 407 response with Connection- 7689 Credentials header take the decision on whether to accept the 7690 certificate or not (if it cannot do so, the user SHOULD be 7691 consulted). If the certificate is accepted, the client has to again 7692 send the RTSP request. In that request the client has to include the 7693 Accept-Credentials header including the hash over the DER encoded 7694 certificate for all trusted proxies in the chain. 7696 Example: 7698 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7699 CSeq: 2 7700 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7701 "192.0.2.5:4589" 7702 Accept-Ranges: NPT, SMPTE, UTC 7703 Accept-Credentials: User 7704 P->C: RTSP/2.0 470 Connection Authorization Required 7705 CSeq: 2 7706 Connection-Credentials: "rtsps://test.example.org"; 7707 MIIDNTCCAp... 7709 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7710 CSeq: 2 7711 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7712 "192.0.2.5:4589" 7713 Accept-Credentials: User "rtsps://test.example.org";sha-256; 7714 dPYD7txpoGTbAqZZQJ+vaeOkyH4= 7715 Accept-Ranges: NPT, SMPTE, UTC 7716 P->S: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7717 CSeq: 2 7718 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7719 "192.0.2.5:4589" 7720 Via: RTSP/2.0 proxy.example.org 7721 Accept-Credentials: User "rtsps://test.example.org";sha-256; 7722 dPYD7txpoGTbAqZZQJ+vaeOkyH4= 7723 Accept-Ranges: NPT, SMPTE, UTC 7725 One implication of this process is that the connection for secured 7726 RTSP messages may take significantly more round-trip times for the 7727 first message. An complete extra message exchange between the proxy 7728 connecting to the next hop and the client results because of the 7729 process for approval for each hop. However after the first message 7730 exchange the remaining message should not be delayed, if each message 7731 contains the chain of proxies that the requester accepts. The 7732 procedure of including the credentials in each request rather than 7733 building state in each proxy, avoids the need for revocation 7734 procedures. 7736 20. Syntax 7738 The RTSP syntax is described in an Augmented Backus-Naur Form (ABNF) 7739 as defined in RFC 5234 [RFC5234]. It uses the basic definitions 7740 present in RFC 5234. 7742 Please note that ABNF strings, e.g. "Accept", are case insensitive 7743 as specified in section 2.3 of RFC 5234. 7745 20.1. Base Syntax 7747 RTSP header values can be folded onto multiple lines if the 7748 continuation line begins with a space or horizontal tab. All linear 7749 white space, including folding, has the same semantics as SP. A 7750 recipient MAY replace any linear white space with a single SP before 7751 interpreting the field value or forwarding the message downstream. 7752 This is intended to behave exactly as HTTP/1.1 as described in RFC 7753 2616 [RFC2616]. The SWS construct is used when linear white space is 7754 optional, generally between tokens and separators. 7756 To separate the header name from the rest of value, a colon is used, 7757 which, by the above rule, allows whitespace before, but no line 7758 break, and whitespace after, including a line break. The HCOLON 7759 defines this construct. 7761 OCTET = %x00-FF ; any 8-bit sequence of data 7762 CHAR = %x01-7F ; any US-ASCII character (octets 1 - 127) 7763 UPALPHA = %x41-5A ; any US-ASCII uppercase letter "A".."Z" 7764 LOALPHA = %x61-7A ;any US-ASCII lowercase letter "a".."z" 7765 ALPHA = UPALPHA / LOALPHA 7766 DIGIT = %x30-39 ; any US-ASCII digit "0".."9" 7767 CTL = %x00-1F / %x7F ; any US-ASCII control character 7768 ; (octets 0 - 31) and DEL (127) 7769 CR = %x0D ; US-ASCII CR, carriage return (13 7770 LF = %x0A ; US-ASCII LF, linefeed (10) 7771 SP = %x20 ; US-ASCII SP, space (32) 7772 HT = %x09 ; US-ASCII HT, horizontal-tab (9) 7773 DQ = %x22 ; US-ASCII double-quote mark (34) 7774 BACKSLASH = %x5C ; US-ASCII backslash (92) 7775 CRLF = CR LF 7776 LWS = [CRLF] 1*( SP / HT ) 7777 SWS = [LWS] ; sep whitespace 7778 HCOLON = *( SP / HT ) ":" SWS 7779 TEXT = %x20-7E / %x80-FF ; any OCTET except CTLs 7780 tspecials = "(" / ")" / "<" / ">" / "@" 7781 / "," / ";" / ":" / BACKSLASH / DQ 7782 / "/" / "[" / "]" / "?" / "=" 7783 / "{" / "}" / SP / HT 7784 token = 1*(%x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39 7785 / %x41-5A / %x5E-7A / %x7C / %x7E) 7786 ; 1* 7787 quoted-string = ( DQ *qdtext DQ ) 7788 qdtext = %x20-21 / %x23-7E / %x80-FF ; any TEXT except <"> 7789 quoted-pair = BACKSLASH CHAR 7790 ctext = %x20-27 / %x2A-7E 7791 / %x80-FF ; any OCTET except CTLs, "(" and ")" 7792 generic-param = token [ EQUAL gen-value ] 7793 gen-value = token / host / quoted-string 7795 safe = "$" / "-" / "_" / "." / "+" 7796 extra = "!" / "*" / "'" / "(" / ")" / "," 7797 rtsp-extra = "!" / "*" / "'" / "(" / ")" 7799 HEX = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" 7800 / "a" / "b" / "c" / "d" / "e" / "f" 7801 LHEX = DIGIT / %x61-66 ;lowercase a-f 7802 reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" 7804 unreserved = ALPHA / DIGIT / safe / extra 7805 rtsp-unreserved = ALPHA / DIGIT / safe / rtsp-extra 7807 base64 = *base64-unit [base64-pad] 7808 base64-unit = 4base64-char 7809 base64-pad = (2base64-char "==") / (3base64-char "=") 7810 base64-char = ALPHA / DIGIT / "+" / "/" 7811 SLASH = SWS "/" SWS ; slash 7812 EQUAL = SWS "=" SWS ; equal 7813 LPAREN = SWS "(" SWS ; left parenthesis 7814 RPAREN = SWS ")" SWS ; right parenthesis 7815 COMMA = SWS "," SWS ; comma 7816 SEMI = SWS ";" SWS ; semicolon 7817 COLON = SWS ":" SWS ; colon 7818 MINUS = SWS "-" SWS ; minus/dash 7819 LDQUOT = SWS DQ ; open double quotation mark 7820 RDQUOT = DQ SWS ; close double quotation mark 7821 RAQUOT = ">" SWS ; right angle quote 7822 LAQUOT = SWS "<" ; left angle quote 7824 TEXT-UTF8char = %x21-7E / UTF8-NONASCII 7825 UTF8-NONASCII = %xC0-DF 1UTF8-CONT 7826 / %xE0-EF 2UTF8-CONT 7827 / %xF0-F7 3UTF8-CONT 7828 / %xF8-FB 4UTF8-CONT 7829 / %xFC-FD 5UTF8-CONT 7830 UTF8-CONT = %x80-BF 7832 FLOAT = ["-"] 1*39DIGIT ["." 1*46DIGIT] 7833 POS-FLOAT = 1*39DIGIT ["." 1*46DIGIT] 7835 20.2. RTSP Protocol Definition 7837 20.2.1. Generic Protocol elements 7838 RTSP-IRI = schemes ":" IRI-rest 7839 IRI-rest = ihier-part [ "?" iquery ] [ "#" ifragment ] 7840 ihier-part = "//" iauthority ipath-abempty 7841 RTSP-IRI-ref = RTSP-IRI / irelative-ref 7842 irelative-ref = irelative-part [ "?" iquery ] [ "#" ifragment ] 7843 irelative-part = "//" iauthority ipath-abempty 7844 / ipath-absolute 7845 / ipath-noscheme 7846 / ipath-empty 7848 iauthority = < As defined in RFC 3987> 7849 ipath = ipath-abempty ; begins with "/" or is empty 7850 / ipath-absolute ; begins with "/" but not "//" 7851 / ipath-noscheme ; begins with a non-colon segment 7852 / ipath-rootless ; begins with a segment 7853 / ipath-empty ; zero characters 7855 ipath-abempty = *( "/" isegment ) 7856 ipath-absolute = "/" [ isegment-nz *( "/" isegment ) ] 7857 ipath-noscheme = isegment-nz-nc *( "/" isegment ) 7858 ipath-rootless = isegment-nz *( "/" isegment ) 7859 ipath-empty = 0 7861 isegment = *ipchar [";" *ipchar] 7862 isegment-nz = 1*ipchar [";" *ipchar] 7863 / ";" *ipchar 7864 isegment-nz-nc = (1*ipchar-nc [";" *ipchar-nc]) 7865 / ";" *ipchar-nc 7866 ; non-zero-length segment without any colon ":" 7868 ipchar = iunreserved / pct-encoded / sub-delims / ":" / "@" 7869 ipchar-nc = iunreserved / pct-encoded / sub-delims / "@" 7871 iquery = < As defined in RFC 3987> 7872 ifragment = < As defined in RFC 3987> 7873 iunreserved = < As defined in RFC 3987> 7874 pct-encoded = < As defined in RFC 3987> 7875 RTSP-URI = schemes ":" URI-rest 7876 RTSP-REQ-URI = schemes ":" URI-req-rest 7877 RTSP-URI-Ref = RTSP-URI / RTSP-Relative 7878 RTSP-REQ-Ref = RTSP-REQ-URI / RTSP-REQ-Rel 7879 schemes = "rtsp" / "rtsps" / scheme 7880 scheme = < As defined in RFC 3986> 7881 URI-rest = hier-part [ "?" query ] [ "#" fragment ] 7882 URI-req-rest = hier-part [ "?" query ] 7883 ; Note fragment part not allowed in requests 7884 hier-part = "//" authority path-abempty 7886 RTSP-Relative = relative-part [ "?" query ] [ "#" fragment ] 7887 RTSP-REQ-Rel = relative-part [ "?" query ] 7888 relative-part = "//" authority path-abempty 7889 / path-absolute 7890 / path-noscheme 7891 / path-empty 7893 authority = < As defined in RFC 3986> 7894 query = < As defined in RFC 3986> 7895 fragment = < As defined in RFC 3986> 7897 path = path-abempty ; begins with "/" or is empty 7898 / path-absolute ; begins with "/" but not "//" 7899 / path-noscheme ; begins with a non-colon segment 7900 / path-rootless ; begins with a segment 7901 / path-empty ; zero characters 7903 path-abempty = *( "/" segment ) 7904 path-absolute = "/" [ segment-nz *( "/" segment ) ] 7905 path-noscheme = segment-nz-nc *( "/" segment ) 7906 path-rootless = segment-nz *( "/" segment ) 7907 path-empty = 0 7909 segment = *pchar [";" *pchar] 7910 segment-nz = ( 1*pchar [";" *pchar]) / (";" *pchar) 7911 segment-nz-nc = ( 1*pchar-nc [";" *pchar-nc]) / (";" *pchar-nc) 7912 ; non-zero-length segment without any colon ":" 7914 pchar = unreserved / pct-encoded / sub-delims / ":" / "@" 7915 pchar-nc = unreserved / pct-encoded / sub-delims / "@" 7917 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" 7918 / "*" / "+" / "," / "=" 7920 smpte-range = smpte-type ["=" smpte-range-spec] 7921 ; See section 3.4 7922 smpte-range-spec = ( smpte-time "-" [ smpte-time ] ) 7923 / ( "-" smpte-time ) 7924 smpte-type = "smpte" / "smpte-30-drop" 7925 / "smpte-25" / smpte-type-extension 7926 ; other timecodes may be added 7927 smpte-type-extension = "smpte" token 7928 smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT 7929 [ ":" 1*2DIGIT [ "." 1*2DIGIT ] ] 7931 npt-range = "npt" ["=" npt-range-spec] 7932 npt-range-spec = ( npt-time "-" [ npt-time ] ) / ( "-" npt-time ) 7933 npt-time = "now" / npt-sec / npt-hhmmss 7934 npt-sec = 1*DIGIT [ "." *DIGIT ] 7935 npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ] 7936 npt-hh = 1*DIGIT ; any positive number 7937 npt-mm = 1*2DIGIT ; 0-59 7938 npt-ss = 1*2DIGIT ; 0-59 7940 utc-range = "clock" ["=" utc-range-spec] 7941 utc-range-spec = ( utc-time "-" [ utc-time ] ) / ( "-" utc-time ) 7942 utc-time = utc-date "T" utc-clock "Z" 7943 utc-date = 8DIGIT 7944 utc-clock = 6DIGIT [ "." fraction ] 7945 fraction = 1*DIGIT 7947 feature-tag = token 7949 session-id = 1*256( ALPHA / DIGIT / safe ) 7951 extension-header = header-name HCOLON header-value 7952 header-name = token 7953 header-value = *(TEXT-UTF8char / UTF8-CONT / LWS) 7955 20.2.2. Message Syntax 7956 RTSP-message = Request / Response ; RTSP/2.0 messages 7958 Request = Request-Line 7959 *((general-header 7960 / request-header 7961 / message-header) CRLF) 7962 CRLF 7963 [ message-body ] 7965 Response = Status-Line 7966 *((general-header 7967 / response-header 7968 / message-header) CRLF) 7969 CRLF 7970 [ message-body ] 7972 Request-Line = Method SP Request-URI SP RTSP-Version CRLF 7974 Status-Line = RTSP-Version SP Status-Code SP Reason-Phrase CRLF 7975 Method = "DESCRIBE" 7976 / "GET_PARAMETER" 7977 / "OPTIONS" 7978 / "PAUSE" 7979 / "PLAY" 7980 / "PLAY_NOTIFY" 7981 / "REDIRECT" 7982 / "SETUP" 7983 / "SET_PARAMETER" 7984 / "TEARDOWN" 7985 / extension-method 7987 extension-method = token 7989 Request-URI = "*" / RTSP-REQ-URI 7990 RTSP-Version = "RTSP/" 1*DIGIT "." 1*DIGIT 7992 message-body = 1*OCTET 7994 Status-Code = "100" ; Continue 7995 / "200" ; OK 7996 / "301" ; Moved Permanently 7997 / "302" ; Found 7998 / "303" ; See Other 7999 / "304" ; Not Modified 8000 / "305" ; Use Proxy 8001 / "400" ; Bad Request 8002 / "401" ; Unauthorized 8003 / "402" ; Payment Required 8004 / "403" ; Forbidden 8005 / "404" ; Not Found 8006 / "405" ; Method Not Allowed 8007 / "406" ; Not Acceptable 8008 / "407" ; Proxy Authentication Required 8009 / "408" ; Request Time-out 8010 / "410" ; Gone 8011 / "411" ; Length Required 8012 / "412" ; Precondition Failed 8013 / "413" ; Request Message Body Too Large 8014 / "414" ; Request-URI Too Large 8015 / "415" ; Unsupported Media Type 8016 / "451" ; Parameter Not Understood 8017 / "452" ; reserved 8018 / "453" ; Not Enough Bandwidth 8019 / "454" ; Session Not Found 8020 / "455" ; Method Not Valid in This State 8021 / "456" ; Header Field Not Valid for Resource 8022 / "457" ; Invalid Range 8023 / "458" ; Parameter Is Read-Only 8024 / "459" ; Aggregate operation not allowed 8025 / "460" ; Only aggregate operation allowed 8026 / "461" ; Unsupported Transport 8027 / "462" ; Destination Unreachable 8028 / "463" ; Destination Prohibited 8029 / "464" ; Data Transport Not Ready Yet 8030 / "470" ; Connection Authorization Required 8031 / "471" ; Connection Credentials not accepted 8032 / "472" ; Failure to establish secure connection 8033 / "500" ; Internal Server Error 8034 / "501" ; Not Implemented 8035 / "502" ; Bad Gateway 8036 / "503" ; Service Unavailable 8037 / "504" ; Gateway Time-out 8038 / "505" ; RTSP Version not supported 8039 / "551" ; Option not supported 8040 / extension-code 8042 extension-code = 3DIGIT 8044 Reason-Phrase = *TEXT 8045 general-header = Cache-Control 8046 / Connection 8047 / CSeq 8048 / Date 8049 / Media-Properties 8050 / Media-Range 8051 / Pipelined-Requests 8052 / Proxy-Supported 8053 / Seek-Style 8054 / Supported 8055 / Timestamp 8056 / Via 8057 / extension-header 8059 request-header = Accept 8060 / Accept-Credentials 8061 / Accept-Encoding 8062 / Accept-Language 8063 / Authorization 8064 / Bandwidth 8065 / Blocksize 8066 / From 8067 / If-Match 8068 / If-Modified-Since 8069 / If-None-Match 8070 / Notify-Reason 8071 / Proxy-Require 8072 / Range 8073 / Referer 8074 / Request-Status 8075 / Require 8076 / Scale 8077 / Session 8078 / Speed 8079 / Supported 8080 / Terminate-Reason 8081 / Transport 8082 / User-Agent 8083 / extension-header 8085 response-header = Accept-Credentials 8086 / Accept-Ranges 8087 / Connection-Credentials 8088 / MTag 8089 / Location 8090 / Proxy-Authenticate 8091 / Public 8092 / Range 8093 / Retry-After 8094 / RTP-Info 8095 / Scale 8096 / Session 8097 / Server 8098 / Speed 8099 / Transport 8100 / Unsupported 8101 / Vary 8102 / WWW-Authenticate 8103 / extension-header 8105 message-header = Allow 8106 / Content-Base 8107 / Content-Encoding 8108 / Content-Language 8109 / Content-Length 8110 / Content-Location 8111 / Content-Type 8112 / Expires 8113 / Last-Modified 8114 / extension-header 8116 20.2.3. Header Syntax 8118 All header syntaxes not defined in this section are defined in 8119 section 14 of the HTTP 1.1 specification [RFC2616]. 8121 Accept = "Accept" HCOLON 8122 [ accept-range *(COMMA accept-range) ] 8123 accept-range = media-type-range *(SEMI accept-param) 8124 media-type-range = ( "*/*" 8125 / ( m-type SLASH "*" ) 8126 / ( m-type SLASH m-subtype ) 8127 ) *( SEMI m-parameter ) 8128 accept-param = ("q" EQUAL qvalue) / generic-param 8129 qvalue = ( "0" [ "." *3DIGIT ] ) 8130 / ( "1" [ "." *3("0") ] ) 8131 Accept-Credentials = "Accept-Credentials" HCOLON cred-decision 8132 cred-decision = ("User" [LWS cred-info]) 8133 / "Proxy" 8134 / "Any" 8135 / (token [LWS 1*TEXT]) ; For future extensions 8136 cred-info = cred-info-data *(COMMA cred-info-data) 8138 cred-info-data = DQ RTSP-REQ-URI DQ SEMI hash-alg SEMI base64 8139 hash-alg = "sha-256" / extension-alg 8140 extension-alg = token 8141 Accept-Encoding = "Accept-Encoding" HCOLON 8142 [ encoding *(COMMA encoding) ] 8143 encoding = codings *(SEMI accept-param) 8144 codings = content-coding / "*" 8145 content-coding = token 8146 Accept-Language = "Accept-Language" HCOLON 8147 [ language *(COMMA language) ] 8148 language = language-range *(SEMI accept-param) 8149 language-range = (1*8ALPHA *( "-" 1*8ALPHA)) / "*" 8150 Accept-Ranges = "Accept-Ranges" HCOLON acceptable-ranges 8151 acceptable-ranges = (range-unit *(COMMA range-unit)) 8152 / "none" 8153 range-unit = "NPT" / "SMPTE" / "UTC" / extension-format 8154 extension-format = token 8155 Allow = "Allow" HCOLON [Method *(COMMA Method)] 8156 Authorization = "Authorization" HCOLON credentials 8157 credentials = ("Digest" LWS digest-response) 8158 / other-response 8159 digest-response = dig-resp *(COMMA dig-resp) 8160 dig-resp = username / realm / nonce / digest-uri 8161 / dresponse / algorithm / cnonce 8162 / opaque / message-qop 8163 / nonce-count / auth-param 8164 username = "username" EQUAL username-value 8165 username-value = quoted-string 8166 digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT 8167 digest-uri-value = Request-URI 8168 ; by HTTP/1.1 8169 message-qop = "qop" EQUAL qop-value 8170 cnonce = "cnonce" EQUAL cnonce-value 8171 cnonce-value = nonce-value 8172 nonce-count = "nc" EQUAL nc-value 8173 nc-value = 8LHEX 8174 dresponse = "response" EQUAL request-digest 8175 request-digest = LDQUOT 32LHEX RDQUOT 8176 auth-param = auth-param-name EQUAL 8177 ( token / quoted-string ) 8178 auth-param-name = token 8179 other-response = auth-scheme LWS auth-param 8180 *(COMMA auth-param) 8182 auth-scheme = token 8184 Bandwidth = "Bandwidth" HCOLON 1*DIGIT 8186 Blocksize = "Blocksize" HCOLON 1*DIGIT 8188 Cache-Control = "Cache-Control" HCOLON cache-directive 8189 *(COMMA cache-directive) 8190 cache-directive = cache-rqst-directive 8191 / cache-rspns-directive 8193 cache-rqst-directive = "no-cache" 8194 / "max-stale" [EQUAL delta-seconds] 8195 / "min-fresh" EQUAL delta-seconds 8196 / "only-if-cached" 8197 / cache-extension 8199 cache-rspns-directive = "public" 8200 / "private" 8201 / "no-cache" 8202 / "no-transform" 8203 / "must-revalidate" 8204 / "proxy-revalidate" 8205 / "max-age" EQUAL delta-seconds 8206 / cache-extension 8208 cache-extension = token [EQUAL (token / quoted-string)] 8209 delta-seconds = 1*DIGIT 8211 Connection-Credentials = "Connection-Credentials" HCOLON cred-chain 8212 cred-chain = DQ RTSP-REQ-URI DQ SEMI base64 8214 Connection = "Connection" HCOLON connection-token 8215 *(COMMA connection-token) 8216 connection-token = token 8218 Content-Base = "Content-Base" HCOLON RTSP-URI-Ref 8219 Content-Encoding = "Content-Encoding" HCOLON 8220 content-coding *(COMMA content-coding) 8221 Content-Language = "Content-Language" HCOLON 8222 language-tag *(COMMA language-tag) 8223 language-tag = primary-tag *( "-" subtag ) 8224 primary-tag = 1*8ALPHA 8225 subtag = 1*8ALPHA 8226 Content-Length = "Content-Length" HCOLON 1*DIGIT 8227 Content-Location = "Content-Location" HCOLON RTSP-REQ-Ref 8228 Content-Type = ( "Content-Type" / "c" ) HCOLON media-type 8229 media-type = m-type SLASH m-subtype *(SEMI m-parameter) 8230 m-type = discrete-type / composite-type 8231 discrete-type = "text" / "image" / "audio" / "video" 8232 / "application" / extension-token 8233 composite-type = "message" / "multipart" / extension-token 8234 extension-token = ietf-token / x-token 8235 ietf-token = token 8236 x-token = "x-" token 8237 m-subtype = extension-token / iana-token 8238 iana-token = token 8239 m-parameter = m-attribute EQUAL m-value 8240 m-attribute = token 8241 m-value = token / quoted-string 8243 CSeq = "CSeq" HCOLON cseq-nr 8244 cseq-nr = 1*9DIGIT 8245 Date = "Date" HCOLON RTSP-date 8246 RTSP-date = rfc1123-date ; HTTP-date 8247 rfc1123-date = wkday "," SP date1 SP time SP "GMT" 8248 date1 = 2DIGIT SP month SP 4DIGIT 8249 ; day month year (e.g., 02 Jun 1982) 8250 time = 2DIGIT ":" 2DIGIT ":" 2DIGIT 8251 ; 00:00:00 - 23:59:59 8252 wkday = "Mon" / "Tue" / "Wed" 8253 / "Thu" / "Fri" / "Sat" / "Sun" 8254 month = "Jan" / "Feb" / "Mar" / "Apr" 8255 / "May" / "Jun" / "Jul" / "Aug" 8256 / "Sep" / "Oct" / "Nov" / "Dec" 8258 Expires = "Expires" HCOLON RTSP-date 8259 From = "From" HCOLON from-spec 8260 from-spec = ( name-addr / addr-spec ) *( SEMI from-param ) 8261 name-addr = [ display-name ] LAQUOT addr-spec RAQUOT 8262 addr-spec = RTSP-REQ-URI / absolute-URI 8263 absolute-URI = < As defined in RFC 3986> 8264 display-name = *(token LWS) / quoted-string 8265 from-param = tag-param / generic-param 8266 tag-param = "tag" EQUAL token 8267 If-Match = "If-Match" HCOLON ("*" / message-tag-list) 8268 message-tag-list = message-tag *(COMMA message-tag) 8269 message-tag = [ weak ] opaque-tag 8270 weak = "W/" 8271 opaque-tag = quoted-string 8272 If-Modified-Since = "If-Modified-Since" HCOLON RTSP-date 8273 If-None-Match = "If-None-Match" HCOLON ("*" / message-tag-list) 8274 Last-Modified = "Last-Modified" HCOLON RTSP-date 8275 Location = "Location" HCOLON RTSP-REQ-URI 8276 Media-Properties = "Media-Properties" HCOLON [media-prop-list] 8277 media-prop-list = media-prop-value *(COMMA media-prop-value) 8278 media-prop-value = ("Random-Access" [EQUAL POS-FLOAT]) 8279 / "Begining-Only" 8280 / "No-Seeking" 8281 / "Immutable" 8282 / "Dynamic" 8283 / "Time-Progressing" 8284 / "Unlimited" 8285 / ("Time-Limited" EQUAL utc-range-spec) 8286 / ("Time-Duration" EQUAL POS-FLOAT) 8287 / ("Scales" EQUAL scale-value-list) 8288 / media-prop-ext 8289 media-prop-ext = token [EQUAL (1*rtsp-unreserved / quoted-string)] 8290 scale-value-list = DQ scale-entry *(COMMA scale-entry) DQ 8291 scale-entry = scale-value / (scale-value COLON scale-value) 8292 scale-value = ["-"] 1*8DIGIT ["." 1*8DIGIT] 8293 Media-Range = "Media-Range" HCOLON [ranges-list] 8294 ranges-list = ranges-spec *(COMMA ranges-spec) 8295 MTag = "MTag" HCOLON message-tag 8296 Notify-Reason = "Notify-Reason" HCOLON Notify-Reas-val 8297 Notify-Reas-val = "end-of-stream" 8298 / "media-properties-update" 8299 / "scale-change" 8300 / Notify-Reason-extension 8301 Notify-Reason-extension = token 8302 Pipelined-Requests = "Pipelined-Requests" HCOLON startup-id 8303 startup-id = 1*8DIGIT 8305 Proxy-Authenticate = "Proxy-Authenticate" HCOLON challenge-list 8306 challenge-list = challenge *(COMMA challenge) 8307 challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) 8308 / other-challenge 8309 other-challenge = auth-scheme LWS auth-param 8310 *(COMMA auth-param) 8311 digest-cln = realm / domain / nonce 8312 / opaque / stale / algorithm 8313 / qop-options / auth-param 8314 realm = "realm" EQUAL realm-value 8315 realm-value = quoted-string 8316 domain = "domain" EQUAL LDQUOT RTSP-REQ-Ref 8317 *(1*SP RTSP-REQ-Ref ) RDQUOT 8318 nonce = "nonce" EQUAL nonce-value 8319 nonce-value = quoted-string 8320 opaque = "opaque" EQUAL quoted-string 8321 stale = "stale" EQUAL ( "true" / "false" ) 8322 algorithm = "algorithm" EQUAL ("MD5" / "MD5-sess" / token) 8323 qop-options = "qop" EQUAL LDQUOT qop-value 8324 *("," qop-value) RDQUOT 8325 qop-value = "auth" / "auth-int" / token 8326 Proxy-Require = "Proxy-Require" HCOLON feature-tag 8327 *(COMMA feature-tag) 8329 Proxy-Supported = "Proxy-Supported" HCOLON feature-tag 8330 *(COMMA feature-tag) 8332 Public = "Public" HCOLON Method *(COMMA Method) 8334 Range = "Range" HCOLON ranges-spec 8336 ranges-spec = npt-range / utc-range / smpte-range 8337 / range-ext 8338 range-ext = extension-format ["=" range-value] 8339 range-value = 1*(rtsp-unreserved / quoted-string / ":" ) 8341 Referer = "Referer" HCOLON RTSP-REQ-Ref 8342 Request-Status = "Request-Status" HCOLON req-status-info 8343 req-status-info = cseq-info LWS status-info LWS reason-info 8344 cseq-info = "cseq" EQUAL cseq-nr 8345 status-info = "status" EQUAL Status-Code 8346 reason-info = "reason" EQUAL DQ Reason-Phrase DQ 8347 Require = "Require" HCOLON feature-tag-list 8348 feature-tag-list = feature-tag *(COMMA feature-tag) 8349 RTP-Info = "RTP-Info" HCOLON [rtsp-info-spec 8350 *(COMMA rtsp-info-spec)] 8351 rtsp-info-spec = stream-url 1*ssrc-parameter 8352 stream-url = "url" EQUAL DQ RTSP-REQ-Ref DQ 8353 ssrc-parameter = LWS "ssrc" EQUAL ssrc HCOLON 8354 ri-parameter *(SEMI ri-parameter) 8355 ri-parameter = ("seq" EQUAL 1*DIGIT) 8356 / ("rtptime" EQUAL 1*DIGIT) 8357 / generic-param 8359 Retry-After = "Retry-After" HCOLON delta-seconds 8360 [ comment ] *( SEMI retry-param ) 8361 retry-param = ("duration" EQUAL delta-seconds) 8362 / generic-param 8364 Scale = "Scale" HCOLON ["-"] 1*DIGIT [ "." *DIGIT ] 8365 Seek-Style = "Seek-Style" HCOLON Seek-S-values 8366 Seek-S-values = "RAP" 8367 / "First-Prior" 8368 / "Next" 8369 / Seek-S-value-ext 8370 Seek-S-value-ext = token 8371 Speed = "Speed" HCOLON POS-FLOAT MINUS POS-FLOAT 8372 Server = "Server" HCOLON ( product / comment ) 8373 *(LWS (product / comment)) 8374 product = token [SLASH product-version] 8375 product-version = token 8376 comment = LPAREN *( ctext / quoted-pair) RPAREN 8378 Session = "Session" HCOLON session-id 8379 [ SEMI "timeout" EQUAL delta-seconds ] 8381 Supported = "Supported" HCOLON [feature-tag-list] 8382 Terminate-Reason = "Terminate-Reason" HCOLON TR-Info 8383 TR-Info = TR-Reason *(SEMI TR-Parameter) 8384 TR-Reason = "Session-Timeout" 8385 / "Server-Admin" 8386 / "Internal-Error" 8387 / token 8388 TR-Parameter = TR-time / TR-user-msg / generic-param 8389 TR-time = "time" EQUAL utc-time 8390 TR-user-msg = "user-msg" EQUAL quoted-string 8392 Timestamp = "Timestamp" HCOLON timestamp-value LWS [delay] 8393 timestamp-value = *DIGIT [ "." *DIGIT ] 8394 delay = *DIGIT [ "." *DIGIT ] 8396 Transport = "Transport" HCOLON transport-spec 8397 *(COMMA transport-spec) 8398 transport-spec = transport-id *trns-parameter 8399 transport-id = trans-id-rtp / other-trans 8400 trans-id-rtp = "RTP/" profile ["/" lower-transport] 8401 ; no LWS is allowed inside transport-id 8402 other-trans = token *("/" token) 8404 profile = "AVP" / "SAVP" / "AVPF" / token 8405 lower-transport = "TCP" / "UDP" / token 8406 trns-parameter = (SEMI ( "unicast" / "multicast" )) 8407 / (SEMI "interleaved" EQUAL channel [ "-" channel ]) 8408 / (SEMI "ttl" EQUAL ttl) 8409 / (SEMI "layers" EQUAL 1*DIGIT) 8410 / (SEMI "ssrc" EQUAL ssrc *(SLASH ssrc)) 8411 / (SEMI "mode" EQUAL mode-spec) 8412 / (SEMI "dest_addr" EQUAL addr-list) 8413 / (SEMI "src_addr" EQUAL addr-list) 8414 / (SEMI trn-param-ext) 8415 / (SEMI "setup" EQUAL contrans-setup) 8416 / (SEMI "connection" EQUAL contrans-con) 8417 / (SEMI "RTCP-mux") 8418 contrans-setup = "active" / "passive" / "actpass" 8419 contrans-con = "new" / "existing" 8420 trn-param-ext = par-name [EQUAL trn-par-value] 8421 par-name = token 8422 trn-par-value = *(rtsp-unreserved / quoted-string) 8423 ttl = 1*3DIGIT ; 0 to 255 8424 ssrc = 8HEX 8425 channel = 1*3DIGIT 8426 mode-spec = ( DQ mode *(COMMA mode) DQ ) 8427 mode = "PLAY" / token 8428 addr-list = quoted-addr *(SLASH quoted-addr) 8429 quoted-addr = DQ (host-port / extension-addr) DQ 8430 host-port = host [":" port] 8431 / ":" port 8432 extension-addr = 1*qdtext 8433 host = < As defined in RFC 3986> 8434 port = < As defined in RFC 3986> 8435 Unsupported = "Unsupported" HCOLON feature-tag-list 8437 User-Agent = "User-Agent" HCOLON ( product / comment ) 8438 0*(LWS (product / comment)) 8440 Vary = "Vary" HCOLON ( "*" / field-name-list) 8441 field-name-list = field-name *(COMMA field-name) 8442 field-name = token 8443 Via = "Via" HCOLON via-parm *(COMMA via-parm) 8444 via-parm = sent-protocol LWS sent-by *( SEMI via-params ) 8445 via-params = via-ttl / via-maddr 8446 / via-received / via-branch 8447 / via-extension 8448 via-ttl = "ttl" EQUAL ttl 8449 via-maddr = "maddr" EQUAL host 8450 via-received = "received" EQUAL (IPv4address / IPv6address) 8451 IPv4address = < As defined in RFC 3986> 8452 IPv6address = < As defined in RFC 3986> 8453 via-branch = "branch" EQUAL token 8454 via-extension = generic-param 8455 sent-protocol = protocol-name SLASH protocol-version 8456 SLASH transport-prot 8457 protocol-name = "RTSP" / token 8458 protocol-version = token 8459 transport-prot = "UDP" / "TCP" / "TLS" / other-transport 8460 other-transport = token 8461 sent-by = host [ COLON port ] 8463 WWW-Authenticate = "WWW-Authenticate" HCOLON challenge-list 8465 20.3. SDP extension Syntax 8467 This section defines in ABNF the SDP extensions defined for RTSP. 8468 See Appendix D for the definition of the extensions in text. 8470 control-attribute = "a=control:" *SP RTSP-REQ-REF 8472 a-range-def = "a=range:" ranges-spec CRLF 8474 a-mtag-def = "a=mtag:" message-tag CRLF 8476 21. Security Considerations 8478 Because of the similarity in syntax and usage between RTSP servers 8479 and HTTP servers, the security considerations outlined in [H15] apply 8480 also. 8482 Specifically, please note the following: 8484 Abuse of Server Log Information: RTSP and HTTP servers will 8485 presumably have similar logging mechanisms, and thus should be 8486 equally guarded in protecting the contents of those logs, thus 8487 protecting the privacy of the users of the servers. See 8488 [H15.1.1] for HTTP server recommendations regarding server 8489 logs. 8491 Transfer of Sensitive Information: There is no reason to believe 8492 that information transferred or controlled via RTSP may be any 8493 less sensitive than that normally transmitted via HTTP. 8494 Therefore, all of the precautions regarding the protection of 8495 data privacy and user privacy apply to implementors of RTSP 8496 clients, servers, and proxies. See [H15.1.2] for further 8497 details. 8499 Attacks Based On File and Path Names: Though RTSP URIs are opaque 8500 handles that do not necessarily have file system semantics, it 8501 is anticipated that many implementations will translate 8502 portions of the Request-URIs directly to file system calls. In 8503 such cases, file systems SHOULD follow the precautions outlined 8504 in [H15.5], such as checking for ".." in path components. 8506 Personal Information: RTSP clients are often privy to the same 8507 information that HTTP clients are (user name, location, etc.) 8508 and thus should be equally sensitive. See [H15.1] for further 8509 recommendations. 8511 Privacy Issues Connected to Accept Headers: Since may of the same 8512 "Accept" headers exist in RTSP as in HTTP, the same caveats 8513 outlined in [H15.1.4] with regards to their use should be 8514 followed. 8516 DNS Spoofing: Presumably, given the longer connection times 8517 typically associated to RTSP sessions relative to HTTP 8518 sessions, RTSP client DNS optimizations should be less 8519 prevalent. Nonetheless, the recommendations provided in 8520 [H15.3] are still relevant to any implementation which attempts 8521 to rely on a DNS-to-IP mapping to hold beyond a single use of 8522 the mapping. 8524 Location Headers and Spoofing: If a single server supports multiple 8525 organizations that do not trust each another, then it needs to 8526 check the values of Location and Content-Location header fields 8527 in responses that are generated under control of said 8528 organizations to make sure that they do not attempt to 8529 invalidate resources over which they have no authority. 8530 ([H15.4]) 8532 In addition to the recommendations in the current HTTP specification 8533 (RFC 2616 [RFC2616], as of this writing) and also of the previous 8534 RFC2068 [RFC2068], future HTTP specifications may provide additional 8535 guidance on security issues. 8537 The following are added considerations for RTSP implementations. 8539 Concentrated denial-of-service attack: The protocol offers the 8540 opportunity for a remote-controlled denial-of-service attack. 8541 See Section 21.1. 8543 Session hijacking: Since there is no or little relation between a 8544 transport layer connection and an RTSP session, it is possible 8545 for a malicious client to issue requests with random session 8546 identifiers which would affect unsuspecting clients. The 8547 server SHOULD use a large, random and non-sequential session 8548 identifier to minimize the possibility of this kind of attack. 8549 However, unless the RTSP signalling always are confidentiality 8550 protected, e.g. using TLS, an on-path attacker will be able to 8551 hijack a session. For real session security, client 8552 authentication needs to be performed. 8554 Authentication: Servers SHOULD implement both basic and digest 8555 [RFC2617] authentication. In environments requiring tighter 8556 security for the control messages, the transport layer 8557 mechanism TLS [RFC5246] SHOULD be used. 8559 Stream issues: RTSP only provides for stream control. Stream 8560 delivery issues are not covered in this section, nor in the 8561 rest of this draft. RTSP implementations will most likely rely 8562 on other protocols such as RTP, IP multicast, RSVP and IGMP, 8563 and should address security considerations brought up in those 8564 and other applicable specifications. 8566 Persistently suspicious behavior: RTSP servers SHOULD return error 8567 code 403 (Forbidden) upon receiving a single instance of 8568 behavior which is deemed a security risk. RTSP servers SHOULD 8569 also be aware of attempts to probe the server for weaknesses 8570 and entry points and MAY arbitrarily disconnect and ignore 8571 further requests clients which are deemed to be in violation of 8572 local security policy. 8574 Scope of Multicast: If RTSP is used to control the transmission of 8575 media onto a multicast network it is need to consider the scope 8576 that delivery has. RTSP supports the TTL Transport header 8577 parameter to indicate this scope. However such scope control 8578 is risk as it may be set to large and distribute media beyond 8579 the intended scope. 8581 TLS through proxies: If one uses the possibility to connect TLS in 8582 multiple legs (Section 19.3 one really needs to be aware of the 8583 trust model. That procedure requires full faith and trust in 8584 all proxies that one allows to connect through. They are man 8585 in the middle and has access to all that goes on over the TLS 8586 connection. Thus it is important to consider if that trust 8587 model is acceptable in the actual application. 8589 Resource Exhaustion As RTSP is a stateful protocol and establish 8590 resource usages on the server there is a clear possibility to 8591 attack the server by trying to overbook these resources to 8592 perform an denial of service attack. This attack can be both 8593 against ongoing sessions and to prevent others from 8594 establishing sessions. RTSP agents will need to have mechanism 8595 to prevent single peers from consuming extensive amounts of 8596 resources. 8598 21.1. Remote denial of Service Attack 8600 The attacker may initiate traffic flows to one or more IP addresses 8601 by specifying them as the destination in SETUP requests. While the 8602 attacker's IP address may be known in this case, this is not always 8603 useful in prevention of more attacks or ascertaining the attackers 8604 identity. Thus, an RTSP server MUST only allow client-specified 8605 destinations for RTSP-initiated traffic flows if the server has 8606 ensured that the specified destination address accepts receiving 8607 media through different security mechanisms. Security mechanisms 8608 that are acceptable in an increased generality are: 8610 o Verification of the client's identity, either against a database 8611 of known users using RTSP authentication mechanisms (preferably 8612 digest authentication or stronger) 8614 o A list of addresses that accept to be media destinations, 8615 especially considering user identity 8617 o Media path based verification 8619 The server SHOULD NOT allow the destination field to be set unless a 8620 mechanism exists in the system to authorize the request originator to 8621 direct streams to the recipient. It is preferred that this 8622 authorization be performed by the media recipient (destination) 8623 itself and the credentials passed along to the server. However, in 8624 certain cases, such as when recipient address is a multicast group, 8625 or when the recipient is unable to communicate with the server in an 8626 out-of-band manner, this may not be possible. In these cases the 8627 server may chose another method such as a server-resident 8628 authorization list to ensure that the request originator has the 8629 proper credentials to request stream delivery to the recipient. 8631 One solution that performs the necessary verification of acceptance 8632 of media suitable for unicast based delivery is the ICE based NAT 8633 traversal method described in [I-D.ietf-mmusic-rtsp-nat]. By using 8634 random passwords and username the probability of unintended 8635 indication as a valid media destination is very low. If the server 8636 include in its STUN requests a cookie (consisting of random material) 8637 that is the destination echo back the solution is also safe against 8638 having a off-path attacker being able to spoof the STUN checks. 8639 Leaving this solution vulnerable only to on-path attackers that can 8640 see the STUN requests go to the target of attack. 8642 For delivery to multicast addresses there is need for another 8643 solution which is not specified here. 8645 22. IANA Considerations 8647 This section sets up a number of registries for RTSP 2.0 that should 8648 be maintained by IANA. For each registry there is a description on 8649 what it is required to contain, what specification is needed when 8650 adding a entry with IANA, and finally the entries that this document 8651 needs to register. See also the Section 2.7 "Extending RTSP". There 8652 is also an IANA registration of two SDP attributes. 8654 The sections describing how to register an item uses some of the 8655 requirements level described in RFC 5226 [RFC5226], namely "First 8656 Come, First Served", "Expert Review, "Specification Required", and 8657 "Standards Action". 8659 A registration request to IANA MUST contain the following 8660 information: 8662 o A name of the item to register according to the rules specified by 8663 the intended registry. 8665 o Indication of who has change control over the feature (for 8666 example, IETF, ISO, ITU-T, other international standardization 8667 bodies, a consortium, a particular company or group of companies, 8668 or an individual); 8670 o A reference to a further description, if available, for example 8671 (in decreasing order of preference) an RFC, a published standard, 8672 a published paper, a patent filing, a technical report, documented 8673 source code or a computer manual; 8675 o For proprietary features, contact information (postal and email 8676 address); 8678 22.1. Feature-tags 8680 22.1.1. Description 8682 When a client and server try to determine what part and functionality 8683 of the RTSP specification and any future extensions that its counter 8684 part implements there is need for a namespace. This registry 8685 contains named entries representing certain functionality. 8687 The usage of feature-tags is explained in Section 11 and 8688 Section 13.1. 8690 22.1.2. Registering New Feature-tags with IANA 8692 The registering of feature-tags is done on a first come, first served 8693 basis. 8695 The name of the feature MUST follow these rules: The name may be of 8696 any length, but SHOULD be no more than twenty characters long. The 8697 name MUST NOT contain any spaces, or control characters. The 8698 registration MUST indicate if the feature-tag applies to clients, 8699 servers, or proxies only or any combinations of these. Any 8700 proprietary feature MUST have as the first part of the name a vendor 8701 tag, which identifies the organization. 8703 22.1.3. Registered entries 8705 The following feature-tags are in this specification defined and 8706 hereby registered. The change control belongs to the IETF. 8708 play.basic: The minimal implementation for playback operations 8709 according to this specification. Applies for both clients, 8710 servers and proxies. 8712 play.scale: Support of scale operations for media playback. Applies 8713 only for servers. 8715 play.speed: Support of the speed functionality for playback. 8716 Applies only for servers. 8718 22.2. RTSP Methods 8720 22.2.1. Description 8722 What a method is, is described in section Section 13. Extending the 8723 protocol with new methods allow for totally new functionality. 8725 22.2.2. Registering New Methods with IANA 8727 A new method MUST be registered through an IETF Standards Action. 8728 The reason is that new methods may radically change the protocols 8729 behavior and purpose. 8731 A specification for a new RTSP method MUST consist of the following 8732 items: 8734 o A method name which follows the ABNF rules for methods. 8736 o A clear specification on what action and response a request with 8737 the method will result in. Which directions the method is used, 8738 C->S or S->C or both. How the use of headers, if any, modifies 8739 the behavior and effect of the method. 8741 o A list or table specifying which of the registered headers that 8742 are allowed to use with the method in request or/and response. 8744 o Describe how the method relates to network proxies. 8746 22.2.3. Registered Entries 8748 This specification, RFCXXXX, registers 10 methods: DESCRIBE, 8749 GET_PARAMETER, OPTIONS, PAUSE, PLAY, PLAY_NOTIFY REDIRECT, SETUP, 8750 SET_PARAMETER, and TEARDOWN. 8752 22.3. RTSP Status Codes 8754 22.3.1. Description 8756 A status code is the three digit numbers used to convey information 8757 in RTSP response messages, seeSection 8. The number space is limited 8758 and care should be taken not to fill the space. 8760 22.3.2. Registering New Status Codes with IANA 8762 A new status code can only be registered by an IETF Standards Action. 8763 A specification for a new status code MUST specify the following: 8765 o The requested number. 8767 o A description what the status code means and the expected behavior 8768 of the sender and receiver of the code. 8770 22.3.3. Registered Entries 8772 RFCXXXX, registers the numbered status code defined in the ABNF entry 8773 "Status-Code" except "extension-code" in Section 20.2.2. 8775 22.4. RTSP Headers 8777 22.4.1. Description 8779 By specifying new headers a method(s) can be enhanced in many 8780 different ways. An unknown header will be ignored by the receiving 8781 entity. If the new header is vital for a certain functionality, a 8782 feature-tag for the functionality can be created and demanded to be 8783 used by the counter-part with the inclusion of a Require header 8784 carrying the feature-tag. 8786 22.4.2. Registering New Headers with IANA 8788 Registrations in the registry can be done following the Expert Review 8789 policy. A specification SHOULD be provided, preferable an IETF RFC 8790 or other Standards Developing Organization specification. The 8791 minimal information in a registration request is the header name and 8792 the contact information. 8794 The specification SHOULD contain the following information: 8796 o The name of the header. 8798 o An ABNF specification of the header syntax. 8800 o A list or table specifying when the header may be used, 8801 encompassing all methods, their request or response, the direction 8802 (C->S or S->C). 8804 o How the header is to be handled by proxies. 8806 o A description of the purpose of the header. 8808 22.4.3. Registered entries 8810 All headers specified in Section 16 in RFCXXXX are to be registered. 8812 Furthermore the following RTSP headers defined in other 8813 specifications are registered: 8815 o x-wap-profile defined in [3gpp-26234]. 8817 o x-wap-profile-diff defined in [3gpp-26234]. 8819 o x-wap-profile-warning defined in [3gpp-26234]. 8821 o x-predecbufsize defined in [3gpp-26234]. 8823 o x-initpredecbufperiod defined in [3gpp-26234]. 8825 o x-initpostdecbufperiod defined in [3gpp-26234]. 8827 o 3gpp-videopostdecbufsize defined in [3gpp-26234]. 8829 o 3GPP-Link-Char defined in [3gpp-26234]. 8831 o 3GPP-Adaptation defined in [3gpp-26234]. 8833 o 3GPP-QoE-Metrics defined in [3gpp-26234]. 8835 o 3GPP-QoE-Feedback defined in [3gpp-26234]. 8837 The use of "x-" is NOT RECOMMENDED but the above headers in the 8838 register list was defined prior to the clarification. 8840 22.5. Accept-Credentials 8842 The security framework's TLS connection mechanism has two registrable 8843 entities. 8845 22.5.1. Accept-Credentials policies 8847 In Section 19.3.1 three policies for how to handle certificates are 8848 specified. Further policies may be defined and MUST be registered 8849 with IANA using the following rules: 8851 o Registering requires an IETF Standards Action 8853 o A registration is required to name a contact person. 8855 o Name of the policy. 8857 o A describing text that explains how the policy works for handling 8858 the certificates. 8860 This specification registers the following values: 8862 Any 8864 Proxy 8866 User 8868 22.5.2. Accept-Credentials hash algorithms 8870 The Accept-Credentials header (See Section 16.2) allows for the usage 8871 of other algorithms for hashing the DER records of accepted entities. 8872 The registration of any future algorithm is expected to be extremely 8873 rare and could also cause interoperability problems. Therefore the 8874 bar for registering new algorithms is intentionally placed high. 8876 Any registration of a new hash algorithm MUST fulfill the following 8877 requirement: 8879 o Follow the IETF Standards Action policy. 8881 o A definition of the algorithm and its identifier meeting the 8882 "token" ABNF requirement. 8884 22.6. Cache-Control Cache Directive Extensions 8886 There exist a number of cache directives which can be sent in the 8887 Cache-Control header. A registry for these cache directives MUST be 8888 defined with the following rules: 8890 o Registering requires an IETF Standards Action. 8892 o A registration is required to contain a contact person. 8894 o Name of the directive and a definition of the value, if any. 8896 o Specification if it is an request or response directive. 8898 o A describing text that explains how the cache directive is used 8899 for RTSP controlled media streams. 8901 This specification registers the following values: 8903 no-cache: 8905 public: 8907 private: 8909 no-transform: 8911 only-if-cached: 8913 max-stale: 8915 min-fresh: 8917 must-revalidate: 8919 proxy-revalidate: 8921 max-age: 8923 22.7. Media Properties 8924 22.7.1. Description 8926 The media streams being controlled by RTSP can have many different 8927 properties. The media properties required to cover the use cases 8928 that was in mind when writing the specification are defined. 8929 However, it can be expected that further innovation will result in 8930 new use cases or media streams with properties not covered by the 8931 ones specified here. Thus new media properties can be specified. As 8932 new media properties may need a substantial amount of new definitions 8933 to correctly specify behavior for this property the bar is intended 8934 to be high. 8936 22.7.2. Registration Rules 8938 Registering new media property MUST fulfill the following 8939 requirements 8941 o Follow the Specification Required policy and get the approval of 8942 the designated Expert. 8944 o Have an ABNF definition of the media property value name that 8945 meets "media-prop-ext" definition 8947 o A Contact Person for the Registration 8949 o Description of all changes to the behavior of the RTSP protocol as 8950 result of these changes. 8952 22.7.3. Registered Values 8954 This specification registers the 9 values listed in Section 16.28. 8956 22.8. Notify-Reason header 8958 22.8.1. Description 8960 Notify-Reason values used to indicate why a notification was sent. 8961 They may also imply that certain headers are required for the client 8962 to act properly upon the information the notification carries. New 8963 notification behaviors need to be described to result in 8964 interoperable usage, thus a specification of each new value is 8965 required. 8967 22.8.2. Registration Rules 8969 Registrations for new Notify-Reason value MUST fulfill the following 8970 requirements 8971 o Follow the Specification Required policy and get the approval of 8972 the designated Expert. 8974 o Have a ABNF definition of the Notify reason value name that meets 8975 "Notify-Reason-extension" definition 8977 o A Contact Person for the Registration 8979 o Description of which headers shall be included in the request and 8980 response, when it should be sent, and any effect it has on the 8981 server client state. 8983 22.8.3. Registered Values 8985 This specification registers 3 values defined in the Notify-Reas-val 8986 ABNFSection 20.2.3: 8988 o end-of-stream 8990 o media-properties-update 8992 o scale-change 8994 22.9. Range header formats 8996 The Range header allows for different range formats. New ones may be 8997 registered, but moderation should be applied as it makes 8998 interoperability more difficult. A registration MUST fulfill the 8999 following requirements: 9001 o Follow the Specification Required policy. 9003 o An ABNF definition of the range format that fulfills the "range- 9004 ext" definition. 9006 o A Contact person for the registration. 9008 o Rules for how one handles the range when using a negative Scale. 9010 22.10. Terminate-Reason Header 9012 The Terminate-Reason header (Section 16.50) has two registries for 9013 extensions. 9015 22.10.1. Redirect Reasons 9017 Registrations are done under the policy of Expert Review. The 9018 registered value needs to follow syntax, i.e. be a token. The 9019 specification needs to provide definition of what the procedures that 9020 is to be followed when a client receives this redirect reason. This 9021 specification registers two values: 9023 o Session-Timeout 9025 o Server-Admin 9027 22.10.2. Terminate-Reason Header Parameters 9029 Registrations are done under the policy of Specification Required. 9030 The registrations must define a syntax for the parameter that also 9031 follows the allowed by the RTSP 2.0 specification. A contact person 9032 is also required. This specification registers: 9034 o time 9036 o user-msg 9038 22.11. RTP-Info header parameters 9040 22.11.1. Description 9042 The RTP-Info header (Section 16.43) carries one or more parameter 9043 value pairs with information about a particular point in the RTP 9044 stream. RTP extensions or new usages may need new types of 9045 information. As RTP information that could be needed is likely to be 9046 generic enough and to maximize the interoperability registration 9047 requires specification required. 9049 22.11.2. Registration Rules 9051 Registrations for new Notify-Reason value MUST fulfill the following 9052 requirements 9054 o Follow the Specification Required policy and get the approval of 9055 the designated Expert. 9057 o Have a ABNF definition that meets the "generic-param" definition 9059 o A Contact Person for the Registration 9061 22.11.3. Registered Values 9063 This specification registers 2 parameter value pairs: 9065 o seq 9067 o rtptime 9069 22.12. Seek-Style Policies 9071 22.12.1. Description 9073 New seek policies may be registered, however a large number of these 9074 will complicate implementation substantially. The impact of unknown 9075 policies is that the server will not honor the unknown and use the 9076 server default policy instead. 9078 22.12.2. Registration Rules 9080 Registrations of new Seek-Style polices MUST fulfill the following 9081 requirements 9083 o Follow the Specification Required policy. 9085 o Have a ABNF definition of the Seek-Style policy name that meets 9086 "Seek-S-value-ext" definition 9088 o A Contact Person for the Registration 9090 o Description of which headers shall be included in the request and 9091 response, when it should be sent, and any affect it has on the 9092 server client state. 9094 22.12.3. Registered Values 9096 This specification registers 3 values: 9098 o RAP 9100 o First-Prior 9102 o Next 9104 22.13. Transport Header Registries 9106 The transport header contains a number of parameters which have 9107 possibilities for future extensions. Therefore registries for these 9108 needs to be defined. 9110 22.13.1. Transport Protocol Specification 9112 A registry for the parameter transport-protocol specification MUST be 9113 defined with the following rules: 9115 o Registering uses the policy of Specification Required. 9117 o A contact person or organization with address and email. 9119 o A value definition that are following the ABNF syntax definition. 9121 o A describing text that explains how the registered value are used 9122 in RTSP. 9124 This specification registers the following values: 9126 RTP/AVP: Use of the RTP[RFC3550] protocol for media transport in 9127 combination with the "RTP profile for audio and video 9128 conferences with minimal control"[RFC3551] over UDP. The usage 9129 is explained in RFC XXXX, appendix Appendix C.1. 9131 RTP/AVP/UDP: the same as RTP/AVP. 9133 RTP/AVPF: Use of the RTP[RFC3550] protocol for media transport in 9134 combination with the "Extended RTP Profile for RTCP-based 9135 Feedback (RTP/AVPF)" [RFC4585] over UDP. The usage is 9136 explained in RFC XXXX, appendix Appendix C.1. 9138 RTP/AVPF/UDP: the same as RTP/AVPF. 9140 RTP/SAVP: Use of the RTP[RFC3550] protocol for media transport in 9141 combination with the "The Secure Real-time Transport Protocol 9142 (SRTP)" [RFC3711] over UDP. The usage is explained in RFC 9143 XXXX, appendix Appendix C.1. 9145 RTP/SAVP/UDP: the same as RTP/SAVP. 9147 RTP/SAVPF: Use of the RTP[RFC3550] protocol for media transport in 9148 combination with the "[RFC5124] over UDP. The usage is 9149 explained in RFC XXXX, appendix Appendix C.1. 9151 RTP/SAVPF/UDP: the same as RTP/SAVPF. 9153 RTP/AVP/TCP: Use of the RTP[RFC3550] protocol for media transport in 9154 combination with the "RTP profile for audio and video 9155 conferences with minimal control"[RFC3551] over TCP. The usage 9156 is explained in RFC XXXX, appendix Appendix C.2.2. 9158 RTP/AVPF/TCP: Use of the RTP[RFC3550] protocol for media transport 9159 in combination with the "Extended RTP Profile for RTCP-based 9160 Feedback (RTP/AVPF)"[RFC4585] over TCP. The usage is explained 9161 in RFC XXXX, appendix Appendix C.2.2. 9163 RTP/SAVP/TCP: Use of the RTP[RFC3550] protocol for media transport 9164 in combination with the "The Secure Real-time Transport 9165 Protocol (SRTP)" [RFC3711] over TCP. The usage is explained in 9166 RFC XXXX, appendix Appendix C.2.2. 9168 RTP/SAVPF/TCP: Use of the RTP[RFC3550] protocol for media transport 9169 in combination with the "[RFC5124] over TCP. The usage is 9170 explained in RFC XXXX, appendix Appendix C.2.2. 9172 22.13.2. Transport modes 9174 A registry for the transport parameter mode MUST be defined with the 9175 following rules: 9177 o Registering requires an IETF Standards Action. 9179 o A contact person or organization with address and email. 9181 o A value definition that are following the ABNF token definition. 9183 o A describing text that explains how the registered value are used 9184 in RTSP. 9186 This specification registers 1 value: 9188 PLAY: See RFC XXXX. 9190 22.13.3. Transport Parameters 9192 A registry for parameters that may be included in the Transport 9193 header MUST be defined with the following rules: 9195 o Registering uses the Specification Required policy. 9197 o A value definition that are following the ABNF token definition. 9199 o A describing text that explains how the registered value are used 9200 in RTSP. 9202 This specification registers all the transport parameters defined in 9203 Section 16.52. 9205 22.14. URI Schemes 9207 This specification defines two URI schemes ("rtsp" and "rtsps") and 9208 reserves a third one ("rtspu"). Registrations are following RFC 9209 4395[RFC4395]. 9211 22.14.1. The rtsp URI Scheme 9213 URI scheme name: rtsp 9215 Status: Permanent 9217 URI scheme syntax: See Section 20.2.1 of RFC XXXX. 9219 URI scheme semantics: The rtsp scheme is used to indicate resources 9220 accessible through the usage of the Real-time Streaming 9221 Protocol (RTSP). RTSP allows different operations on the 9222 resource identified by the URI, but the primary purpose is the 9223 streaming delivery of the resource to a client. However the 9224 operations that are currently defined are: Describing the 9225 resource for the purpose of configuring the receiving entity 9226 (DESCRIBE), configuring the delivery method and its addressing 9227 (SETUP), controlling the delivery (PLAY and PAUSE), reading or 9228 setting of resource related parameters (SET_PARAMETER and 9229 GET_PARAMETER, and termination of the session context created 9230 (TEARDOWN). 9232 Encoding considerations: IRIs in this scheme are defined and needs 9233 to be encoded as RTSP URIs when used within the RTSP protocol. 9234 That encoding is done according to RFC 3987. 9236 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9237 2326), RTSP 2.0 (RFC XXXX) 9239 Interoperability considerations: The change in URI syntax performed 9240 between RTSP 1.0 and 2.0 can create interoperability issues. 9242 Security considerations: All the security threats identified in 9243 Section 7 of RFC 3986 applies also to this scheme. They need 9244 to be reviewed and considered in any implementation utilizing 9245 this scheme. 9247 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9249 Author/Change controller: IETF 9250 References: RFC 2326, RFC 3986, RFC 3987, RFC XXXX 9252 22.14.2. The rtsps URI Scheme 9254 URI scheme name: rtsps 9256 Status: Permanent 9258 URI scheme syntax: See Section 20.2.1 of RFC XXXX. 9260 URI scheme semantics: The rtsps scheme is used to indicate resources 9261 accessible through the usage of the Real-time Streaming 9262 Protocol (RTSP) over TLS. RTSP allows different operations on 9263 the resource identified by the URI, but the primary purpose is 9264 the streaming delivery of the resource to a client. However 9265 the operations that are currently defined are: Describing the 9266 resource for the purpose of configuring the receiving entity 9267 (DESCRIBE), configuring the delivery method and its addressing 9268 (SETUP), controlling the delivery (PLAY and PAUSE), reading or 9269 setting of resource related parameters (SET_PARAMETER and 9270 GET_PARAMETER, and termination of the session context created 9271 (TEARDOWN). 9273 Encoding considerations: IRIs in this scheme are defined and needs 9274 to be encoded as RTSP URIs when used within the RTSP protocol. 9275 That encoding is done according to RFC 3987. 9277 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9278 2326), RTSP 2.0 (RFC XXXX) 9280 Interoperability considerations: The change in URI syntax performed 9281 between RTSP 1.0 and 2.0 can create interoperability issues. 9283 Security considerations: All the security threats identified in 9284 Section 7 of RFC 3986 applies also to this scheme. They need 9285 to be reviewed and considered in any implementation utilizing 9286 this scheme. 9288 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9290 Author/Change controller: IETF 9292 References: RFC 2326, RFC 3986, RFC 3987, RFC XXXX 9294 22.14.3. The rtspu URI Scheme 9296 URI scheme name: rtspu 9298 Status: Permanent 9300 URI scheme syntax: See Section 3.2 of RFC 2326. 9302 URI scheme semantics: The rtspu scheme is used to indicate resources 9303 accessible through the usage of the Real-time Streaming 9304 Protocol (RTSP) over unreliable datagram transport. RTSP 9305 allows different operations on the resource identified by the 9306 URI, but the primary purpose is the streaming delivery of the 9307 resource to a client. However the operations that are 9308 currently defined are: Describing the resource for the purpose 9309 of configuring the receiving entity (DESCRIBE), configuring the 9310 delivery method and its addressing (SETUP), controlling the 9311 delivery (PLAY and PAUSE), reading or setting of resource 9312 related parameters (SET_PARAMETER and GET_PARAMETER, and 9313 termination of the session context created (TEARDOWN). 9315 Encoding considerations: IRIs in this scheme are defined and needs 9316 to be encoded as RTSP URIs when used within the RTSP protocol. 9317 That encoding is done according to RFC 3987. 9319 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9320 2326) 9322 Interoperability considerations: The definition of the transport 9323 mechanism of RTSP over UDP has interoperability issues. That 9324 makes the usage of this scheme problematic. 9326 Security considerations: All the security threats identified in 9327 Section 7 of RFC 3986 applies also to this scheme. They needs 9328 to be reviewed and considered in any implementation utilizing 9329 this scheme. 9331 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9333 Author/Change controller: IETF 9335 References: RFC 2326, RFC 3986, RFC 3987 9337 22.15. SDP attributes 9339 This specification defines three SDP [RFC4566] attributes that it is 9340 requested that IANA register. 9342 SDP Attribute ("att-field"): 9344 Attribute name: range 9345 Long form: Media Range Attribute 9346 Type of name: att-field 9347 Type of attribute: Media and session level 9348 Subject to charset: No 9349 Purpose: RFC XXXX 9350 Reference: RFC XXXX 9351 Values: See ABNF definition. 9353 Attribute name: control 9354 Long form: RTSP control URI 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: Absolute or Relative URIs. 9362 Attribute name: mtag 9363 Long form: Message Tag 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: See ABNF definition 9371 22.16. Media Type Registration for text/parameters 9373 Type name: text 9375 Subtype name: parameters 9377 Required parameters: 9379 Optional parameters: 9381 Encoding considerations: 9383 Security considerations: This format may carry any type of 9384 parameters. Some can clear have security requirements, like 9385 privacy, confidentiality or integrity requirements. The format 9386 has no built in security protection. For the usage it was defined 9387 the transport can be protected between server and client using 9388 TLS. However, care must be take to consider if also the proxies 9389 are trusted with the parameters in case hop-by-hop security is 9390 used. If stored as file in file system the necessary precautions 9391 needs to be taken in relation to the parameters requirements 9392 including object security such as S/MIME [RFC3851]. 9394 Interoperability considerations: This media type was mentioned as a 9395 fictional example in RFC 2326 but was not formally specified. 9396 This have resulted in usage of this media type which may not match 9397 its formal definition. 9399 Published specification: RFC XXXX, Appendix F. 9401 Applications that use this media type: Applications that use RTSP 9402 and have additional parameters they like to read and set using the 9403 RTSP GET_PARAMETER and SET_PARAMETER methods. 9405 Additional information: 9407 Magic number(s): 9409 File extension(s): 9411 Macintosh file type code(s): 9413 Person & email address to contact for further information: Magnus 9414 Westerlund (magnus.westerlund@ericsson.com) 9416 Intended usage: Common 9418 Restrictions on usage: None 9420 Author: Magnus Westerlund (magnus.westerlund@ericsson.com) 9422 Change controller: IETF 9424 Addition Notes: 9426 23. References 9428 23.1. Normative References 9430 [3gpp-26234] 9431 Third Generation Partnership Project (3GPP), "Transparent 9432 end-to-end Packet-switched Streaming Service (PSS); 9433 Protocols and codecs; Technical Specification 26.234", 9434 December 2002. 9436 [FIPS-pub-180-2] 9437 National Institute of Standards and Technology (NIST), 9438 "Federal Information Processing Standards Publications 9439 (FIPS PUBS) 180-2: Secure Hash Standard", August 2002. 9441 [I-D.ietf-avt-rtp-and-rtcp-mux] 9442 Perkins, C. and M. Westerlund, "Multiplexing RTP Data and 9443 Control Packets on a Single Port", 9444 draft-ietf-avt-rtp-and-rtcp-mux-07 (work in progress), 9445 August 2007. 9447 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 9448 August 1980. 9450 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 9451 RFC 793, September 1981. 9453 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 9454 Requirement Levels", BCP 14, RFC 2119, March 1997. 9456 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 9457 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 9458 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 9460 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 9461 Leach, P., Luotonen, A., and L. Stewart, "HTTP 9462 Authentication: Basic and Digest Access Authentication", 9463 RFC 2617, June 1999. 9465 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 9467 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 9468 Jacobson, "RTP: A Transport Protocol for Real-Time 9469 Applications", STD 64, RFC 3550, July 2003. 9471 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 9472 Video Conferences with Minimal Control", STD 65, RFC 3551, 9473 July 2003. 9475 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 9476 10646", STD 63, RFC 3629, November 2003. 9478 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 9479 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 9480 RFC 3711, March 2004. 9482 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 9483 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 9484 August 2004. 9486 [RFC3851] Ramsdell, B., "Secure/Multipurpose Internet Mail 9487 Extensions (S/MIME) Version 3.1 Message Specification", 9488 RFC 3851, July 2004. 9490 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 9491 Resource Identifier (URI): Generic Syntax", STD 66, 9492 RFC 3986, January 2005. 9494 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 9495 Identifiers (IRIs)", RFC 3987, January 2005. 9497 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 9498 Requirements for Security", BCP 106, RFC 4086, June 2005. 9500 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 9501 Architecture", RFC 4291, February 2006. 9503 [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and 9504 Registration Procedures for New URI Schemes", BCP 35, 9505 RFC 4395, February 2006. 9507 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 9508 Description Protocol", RFC 4566, July 2006. 9510 [RFC4567] Arkko, J., Lindholm, F., Naslund, M., Norrman, K., and E. 9511 Carrara, "Key Management Extensions for Session 9512 Description Protocol (SDP) and Real Time Streaming 9513 Protocol (RTSP)", RFC 4567, July 2006. 9515 [RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP) 9516 and RTP Control Protocol (RTCP) Packets over Connection- 9517 Oriented Transport", RFC 4571, July 2006. 9519 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 9520 "Extended RTP Profile for Real-time Transport Control 9521 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, 9522 July 2006. 9524 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 9525 Languages", BCP 47, RFC 4646, September 2006. 9527 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 9528 Encodings", RFC 4648, October 2006. 9530 [RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for 9531 Real-time Transport Control Protocol (RTCP)-Based Feedback 9532 (RTP/SAVPF)", RFC 5124, February 2008. 9534 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 9535 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 9536 May 2008. 9538 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 9539 Specifications: ABNF", STD 68, RFC 5234, January 2008. 9541 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 9542 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 9544 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 9545 Housley, R., and W. Polk, "Internet X.509 Public Key 9546 Infrastructure Certificate and Certificate Revocation List 9547 (CRL) Profile", RFC 5280, May 2008. 9549 [RFC5378] Bradner, S. and J. Contreras, "Rights Contributors Provide 9550 to the IETF Trust", BCP 78, RFC 5378, November 2008. 9552 23.2. Informative References 9554 [I-D.ietf-mmusic-rtsp-nat] 9555 Goldberg, J., Westerlund, M., and T. Zeng, "An Network 9556 Address Translator (NAT) Traversal mechanism for media 9557 controlled by Real-Time Streaming Protocol (RTSP)", 9558 draft-ietf-mmusic-rtsp-nat-07 (work in progress), 9559 July 2008. 9561 [IETF-Trust-License-Policy] 9562 IETF, "IETF TRUST Legal Provisions Relating to IETF 9563 Documents", 2009. 9565 [ISO.13818-6.1995] 9566 International Organization for Standardization, 9567 "Information technology - Generic coding of moving 9568 pictures and associated audio information - part 6: 9569 Extension for digital storage media and control", 9570 ISO Draft Standard 13818-6, November 1995. 9572 [ISO.8601.2000] 9573 International Organization for Standardization, "Data 9574 elements and interchange formats - Information interchange 9575 - Representation of dates and times", ISO/IEC Standard 9576 8601, December 2000. 9578 [RFC0822] Crocker, D., "Standard for the format of ARPA Internet 9579 text messages", STD 11, RFC 822, August 1982. 9581 [RFC1123] Braden, R., "Requirements for Internet Hosts - Application 9582 and Support", STD 3, RFC 1123, October 1989. 9584 [RFC1305] Mills, D., "Network Time Protocol (Version 3) 9585 Specification, Implementation", RFC 1305, March 1992. 9587 [RFC1644] Braden, B., "T/TCP -- TCP Extensions for Transactions 9588 Functional Specification", RFC 1644, July 1994. 9590 [RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. 9591 Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", 9592 RFC 2068, January 1997. 9594 [RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time 9595 Streaming Protocol (RTSP)", RFC 2326, April 1998. 9597 [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address 9598 Translator (NAT) Terminology and Considerations", 9599 RFC 2663, August 1999. 9601 [RFC2974] Handley, M., Perkins, C., and E. Whelan, "Session 9602 Announcement Protocol", RFC 2974, October 2000. 9604 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 9605 A., Peterson, J., Sparks, R., Handley, M., and E. 9606 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 9607 June 2002. 9609 [RFC3388] Camarillo, G., Eriksson, G., Holler, J., and H. 9610 Schulzrinne, "Grouping of Media Lines in the Session 9611 Description Protocol (SDP)", RFC 3388, December 2002. 9613 [RFC4145] Yon, D. and G. Camarillo, "TCP-Based Media Transport in 9614 the Session Description Protocol (SDP)", RFC 4145, 9615 September 2005. 9617 [Stevens98] 9618 Stevens, W., "Unix Networking Programming - Volume 1, 9619 second edition", 1998. 9621 Appendix A. Examples 9623 This section contains several different examples trying to illustrate 9624 possible ways of using RTSP. The examples can also help with the 9625 understanding of how functions of RTSP work. However remember that 9626 this is examples and the normative and syntax description in the 9627 other sections takes precedence. Please also note that many of the 9628 example contain syntax illegal line breaks to accommodate the 9629 formatting restriction that the RFC series impose. 9631 A.1. Media on Demand (Unicast) 9633 The is an example of media on demand streaming of a media stored in a 9634 container file. For purposes of this example, a container file is a 9635 storage entity in which multiple continuous media types pertaining to 9636 the same end-user presentation are present. In effect, the container 9637 file represents an RTSP presentation, with each of its components 9638 being RTSP controlled media streams. Container files are a widely 9639 used means to store such presentations. While the components are 9640 transported as independent streams, it is desirable to maintain a 9641 common context for those streams at the server end. 9643 This enables the server to keep a single storage handle open 9644 easily. It also allows treating all the streams equally in case 9645 of any priorization of streams by the server. 9647 It is also possible that the presentation author may wish to prevent 9648 selective retrieval of the streams by the client in order to preserve 9649 the artistic effect of the combined media presentation. Similarly, 9650 in such a tightly bound presentation, it is desirable to be able to 9651 control all the streams via a single control message using an 9652 aggregate URI. 9654 The following is an example of using a single RTSP session to control 9655 multiple streams. It also illustrates the use of aggregate URIs. In 9656 a container file it is also desirable to not write any URI parts 9657 which is not kept, when the container is distributed, like the host 9658 and most of the path element. Therefore this example also uses the 9659 "*" and relative URI in the delivered SDP. 9661 Client C requests a presentation from media server M. The movie is 9662 stored in a container file. The client has obtained an RTSP URI to 9663 the container file. 9665 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 9666 CSeq: 1 9667 User-Agent: PhonyClient/1.2 9669 M->C: RTSP/2.0 200 OK 9670 CSeq: 1 9671 Server: PhonyServer/1.0 9672 Date: Thu, 23 Jan 1997 15:35:06 GMT 9673 Content-Type: application/sdp 9674 Content-Length: 271 9675 Content-Base: rtsp://example.com/twister.3gp/ 9676 Expires: 24 Jan 1997 15:35:06 GMT 9678 v=0 9679 o=- 2890844256 2890842807 IN IP4 192.0.2.5 9680 s=RTSP Session 9681 i=An Example of RTSP Session Usage 9682 e=adm@example.com 9683 c=IN IP4 0.0.0.0 9684 a=control: * 9685 a=range: npt=0-0:10:34.10 9686 t=0 0 9687 m=audio 0 RTP/AVP 0 9688 a=control: trackID=1 9689 m=video 0 RTP/AVP 26 9690 a=control: trackID=4 9692 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 9693 CSeq: 2 9694 User-Agent: PhonyClient/1.2 9695 Require: play.basic 9696 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 9697 Accept-Ranges: NPT, SMPTE, UTC 9699 M->C: RTSP/2.0 200 OK 9700 CSeq: 2 9701 Server: PhonyServer/1.0 9702 Transport: RTP/AVP;unicast; ssrc=93CB001E; 9703 dest_addr="192.0.2.53:8000"/"192.0.2.53:8001"; 9704 src_addr="192.0.2.5:9000"/"192.0.2.5:9001" 9705 Session: 12345678 9706 Expires: 24 Jan 1997 15:35:12 GMT 9707 Date: 23 Jan 1997 15:35:12 GMT 9708 Accept-Ranges: NPT 9709 Media-Properties: Random-Access=0.02, Unmutable, Unlimited 9711 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/2.0 9712 CSeq: 3 9713 User-Agent: PhonyClient/1.2 9714 Require: play.basic 9715 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 9716 Session: 12345678 9717 Accept-Ranges: NPT, SMPTE, UTC 9719 M->C: RTSP/2.0 200 OK 9720 CSeq: 3 9721 Server: PhonyServer/1.0 9722 Transport: RTP/AVP;unicast; ssrc=A813FC13; 9723 dest_addr="192.0.2.53:8002"/"192.0.2.53:8003"; 9724 src_addr="192.0.2.5:9002"/"192.0.2.5:9003"; 9726 Session: 12345678 9727 Expires: 24 Jan 1997 15:35:13 GMT 9728 Date: 23 Jan 1997 15:35:13 GMT 9729 Accept-Range: NPT 9730 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 9732 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9733 CSeq: 4 9734 User-Agent: PhonyClient/1.2 9735 Range: npt=30- 9736 Seek-Style: RAP 9737 Session: 12345678 9739 M->C: RTSP/2.0 200 OK 9740 CSeq: 4 9741 Server: PhonyServer/1.0 9742 Date: 23 Jan 1997 15:35:14 GMT 9743 Session: 12345678 9744 Range: npt=30-623.10 9745 Seek-Style: RAP 9746 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9747 ssrc=0D12F123:seq=12345;rtptime=3450012, 9748 url="rtsp://example.com/twister.3gp/trackID=1" 9749 ssrc=4F312DD8:seq=54321;rtptime=2876889 9751 C->M: PAUSE rtsp://example.com/twister.3gp/ RTSP/2.0 9752 CSeq: 5 9753 User-Agent: PhonyClient/1.2 9754 Session: 12345678 9756 M->C: RTSP/2.0 200 OK 9757 CSeq: 5 9758 Server: PhonyServer/1.0 9759 Date: 23 Jan 1997 15:36:01 GMT 9760 Session: 12345678 9761 Range: npt=34.57-623.10 9763 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9764 CSeq: 6 9765 User-Agent: PhonyClient/1.2 9766 Range: npt=34.57-623.10 9767 Seek-Style: Next 9768 Session: 12345678 9770 M->C: RTSP/2.0 200 OK 9771 CSeq: 6 9772 Server: PhonyServer/1.0 9773 Date: 23 Jan 1997 15:36:01 GMT 9774 Session: 12345678 9775 Range: npt=34.57-623.10 9776 Seek-Style: Next 9777 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9778 ssrc=0D12F123:seq=12555;rtptime=6330012, 9779 url="rtsp://example.com/twister.3gp/trackID=1" 9780 ssrc=4F312DD8:seq=55021;rtptime=3132889 9782 A.2. Media on Demand using Pipelining 9784 This example is basically the example above (Appendix A.1), but now 9785 utilizing pipelining to speed up the setup. It requires only two 9786 round trip times until the media starts flowing. First of all, the 9787 session description is retrieved to determine what media resources 9788 need to be setup. In the second step, one sends the necessary SETUP 9789 requests and the PLAY request to initiate media delivery. 9791 Client C requests a presentation from media server M. The movie is 9792 stored in a container file. The client has obtained an RTSP URI to 9793 the container file. 9795 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 9796 CSeq: 1 9797 User-Agent: PhonyClient/1.2 9799 M->C: RTSP/2.0 200 OK 9800 CSeq: 1 9801 Server: PhonyServer/1.0 9802 Date: Thu, 23 Jan 1997 15:35:06 GMT 9803 Content-Type: application/sdp 9804 Content-Length: 271 9805 Content-Base: rtsp://example.com/twister.3gp/ 9806 Expires: 24 Jan 1997 15:35:06 GMT 9808 v=0 9809 o=- 2890844256 2890842807 IN IP4 192.0.2.5 9810 s=RTSP Session 9811 i=An Example of RTSP Session Usage 9812 e=adm@example.com 9813 c=IN IP4 0.0.0.0 9814 a=control: * 9815 a=range: npt=0-0:10:34.10 9816 t=0 0 9817 m=audio 0 RTP/AVP 0 9818 a=control: trackID=1 9819 m=video 0 RTP/AVP 26 9820 a=control: trackID=4 9822 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 9823 CSeq: 2 9824 User-Agent: PhonyClient/1.2 9825 Require: play.basic 9826 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 9827 Accept-Ranges: NPT, SMPTE, UTC 9828 Pipelined-Requests: 7654 9830 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/2.0 9831 CSeq: 3 9832 User-Agent: PhonyClient/1.2 9833 Require: play.basic 9834 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 9835 Accept-Ranges: NPT, SMPTE, UTC 9836 Pipelined-Requests: 7654 9838 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9839 CSeq: 4 9840 User-Agent: PhonyClient/1.2 9841 Range: npt=0- 9842 Seek-Style: RAP 9843 Session: 12345678 9844 Pipelined-Requests: 7654 9846 M->C: RTSP/2.0 200 OK 9847 CSeq: 2 9848 Server: PhonyServer/1.0 9849 Transport: RTP/AVP;unicast; 9850 dest_addr="192.0.2.53:8000"/"192.0.2.53:8001"; 9851 src_addr="192.0.2.5:9000"/"192.0.2.5:9001"; 9852 ssrc=93CB001E 9853 Session: 12345678 9854 Expires: 24 Jan 1997 15:35:12 GMT 9855 Date: 23 Jan 1997 15:35:12 GMT 9856 Accept-Ranges: NPT 9857 Pipelined-Requests: 7654 9858 Media-Properties: Random-Access=0.2, Unmutable, Unlimited 9860 M->C: RTSP/2.0 200 OK 9861 CSeq: 3 9862 Server: PhonyServer/1.0 9863 Transport: RTP/AVP;unicast; 9864 dest_addr="192.0.2.53:8002"/"192.0.2.53:8003; 9865 src_addr="192.0.2.5:9002"/"192.0.2.5:9003"; 9866 ssrc=A813FC13 9867 Session: 12345678 9868 Expires: 24 Jan 1997 15:35:13 GMT 9869 Date: 23 Jan 1997 15:35:13 GMT 9870 Accept-Range: NPT 9871 Pipelined-Requests: 7654 9872 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 9874 M->C: RTSP/2.0 200 OK 9875 CSeq: 4 9876 Server: PhonyServer/1.0 9877 Date: 23 Jan 1997 15:35:14 GMT 9878 Session: 12345678 9879 Range: npt=0-623.10 9880 Seek-Style: RAP 9881 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9882 ssrc=0D12F123:seq=12345;rtptime=3450012, 9884 url="rtsp://example.com/twister.3gp/trackID=1" 9885 ssrc=4F312DD8:seq=54321;rtptime=2876889 9886 Pipelined-Requests: 7654 9888 A.3. Media on Demand (Unicast) 9890 An alternative example of media on demand with a bit more tweaks is 9891 the following. Client C requests a movie distributed from two 9892 different media servers A (audio.example.com) and V ( 9893 video.example.com). The media description is stored on a web server 9894 W. The media description contains descriptions of the presentation 9895 and all its streams, including the codecs that are available, dynamic 9896 RTP payload types, the protocol stack, and content information such 9897 as language or copyright restrictions. It may also give an 9898 indication about the timeline of the movie. 9900 In this example, the client is only interested in the last part of 9901 the movie. 9903 C->W: GET /twister.sdp HTTP/1.1 9904 Host: www.example.com 9905 Accept: application/sdp 9907 W->C: HTTP/1.0 200 OK 9908 Date: Thu, 23 Jan 1997 15:35:06 GMT 9909 Content-Type: application/sdp 9910 Content-Length: 278 9911 Expires: 23 Jan 1998 15:35:06 GMT 9913 v=0 9914 o=- 2890844526 2890842807 IN IP4 192.0.2.5 9915 s=RTSP Session 9916 e=adm@example.com 9917 c=IN IP4 0.0.0.0 9918 a=range:npt=0-1:49:34 9919 t=0 0 9920 m=audio 0 RTP/AVP 0 9921 a=control:rtsp://audio.example.com/twister/audio.en 9922 m=video 0 RTP/AVP 31 9923 a=control:rtsp://video.example.com/twister/video 9925 C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/2.0 9926 CSeq: 1 9927 User-Agent: PhonyClient/1.2 9928 Transport: RTP/AVP/UDP;unicast;dest_addr=":3056"/":3057", 9929 RTP/AVP/TCP;unicast;interleaved=0-1 9930 Accept-Ranges: NPT, SMPTE, UTC 9932 A->C: RTSP/2.0 200 OK 9933 CSeq: 1 9934 Session: 12345678 9935 Transport: RTP/AVP/UDP;unicast; 9936 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057"; 9937 src_addr="192.0.2.5:5000"/"192.0.2.5:5001" 9938 Date: 23 Jan 1997 15:35:12 GMT 9939 Server: PhonyServer/1.0 9940 Expires: 24 Jan 1997 15:35:12 GMT 9941 Cache-Control: public 9942 Accept-Ranges: NPT, SMPTE 9943 Media-Properties: Random-Access=0.02, Unmutable, Unlimited 9945 C->V: SETUP rtsp://video.example.com/twister/video RTSP/2.0 9946 CSeq: 1 9947 User-Agent: PhonyClient/1.2 9948 Transport: RTP/AVP/UDP;unicast; 9949 dest_addr="192.0.2.53:3058"/"192.0.2.53:3059", 9950 RTP/AVP/TCP;unicast;interleaved=0-1 9951 Accept-Ranges: NPT, SMPTE, UTC 9953 V->C: RTSP/2.0 200 OK 9954 CSeq: 1 9955 Session: 23456789 9956 Transport: RTP/AVP/UDP;unicast; 9957 dest_addr="192.0.2.53:3058"/"192.0.2.53:3059"; 9958 src_addr="192.0.2.5:5002"/"192.0.2.5:5003" 9959 Date: 23 Jan 1997 15:35:12 GMT 9960 Server: PhonyServer/1.0 9961 Cache-Control: public 9962 Expires: 24 Jan 1997 15:35:12 GMT 9963 Accept-Ranges: NPT, SMPTE 9964 Media-Properties: Random-Access=1.2, Unmutable, Unlimited 9966 C->V: PLAY rtsp://video.example.com/twister/video RTSP/2.0 9967 CSeq: 2 9968 User-Agent: PhonyClient/1.2 9969 Session: 23456789 9970 Range: smpte=0:10:00- 9972 V->C: RTSP/2.0 200 OK 9973 CSeq: 2 9974 Session: 23456789 9975 Range: smpte=0:10:00-1:49:23 9976 Seek-Style: First-Prior 9977 RTP-Info: url="rtsp://video.example.com/twister/video" 9978 ssrc=A17E189D:seq=12312232;rtptime=78712811 9979 Server: PhonyServer/2.0 9980 Date: 23 Jan 1997 15:35:13 GMT 9982 C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/2.0 9983 CSeq: 2 9984 User-Agent: PhonyClient/1.2 9985 Session: 12345678 9986 Range: smpte=0:10:00- 9988 A->C: RTSP/2.0 200 OK 9989 CSeq: 2 9990 Session: 12345678 9991 Range: smpte=0:10:00-1:49:23 9992 Seek-Style: First-Prior 9993 RTP-Info: url="rtsp://audio.example.com/twister/audio.en" 9994 ssrc=3D124F01:seq=876655;rtptime=1032181 9995 Server: PhonyServer/1.0 9996 Date: 23 Jan 1997 15:35:13 GMT 9998 C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/2.0 9999 CSeq: 3 10000 User-Agent: PhonyClient/1.2 10001 Session: 12345678 10003 A->C: RTSP/2.0 200 OK 10004 CSeq: 3 10005 Server: PhonyServer/1.0 10006 Date: 23 Jan 1997 15:36:52 GMT 10008 C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/2.0 10009 CSeq: 3 10010 User-Agent: PhonyClient/1.2 10011 Session: 23456789 10013 V->C: RTSP/2.0 200 OK 10014 CSeq: 3 10015 Server: PhonyServer/2.0 10016 Date: 23 Jan 1997 15:36:52 GMT 10018 Even though the audio and video track are on two different servers 10019 that may start at slightly different times and may drift with respect 10020 to each other over time, the client can perform initial 10021 synchronization of the two media using RTP-Info and Range received in 10022 the PLAY responses. If the two servers are time synchronized the 10023 RTCP packets can also be used to maintain synchronization. 10025 A.4. Single Stream Container Files 10027 Some RTSP servers may treat all files as though they are "container 10028 files", yet other servers may not support such a concept. Because of 10029 this, clients needs to use the rules set forth in the session 10030 description for Request-URIs, rather than assuming that a consistent 10031 URI may always be used throughout. Below are an example of how a 10032 multi-stream server might expect a single-stream file to be served: 10034 C->S: DESCRIBE rtsp://foo.com/test.wav RTSP/2.0 10035 Accept: application/x-rtsp-mh, application/sdp 10036 CSeq: 1 10037 User-Agent: PhonyClient/1.2 10039 S->C: RTSP/2.0 200 OK 10040 CSeq: 1 10041 Content-base: rtsp://foo.com/test.wav/ 10042 Content-type: application/sdp 10043 Content-length: 163 10044 Server: PhonyServer/1.0 10045 Date: Thu, 23 Jan 1997 15:35:06 GMT 10046 Expires: 23 Jan 1997 17:00:00 GMT 10048 v=0 10049 o=- 872653257 872653257 IN IP4 192.0.2.5 10050 s=mu-law wave file 10051 i=audio test 10052 c=IN IP4 0.0.0.0 10053 t=0 0 10054 a=control: * 10055 m=audio 0 RTP/AVP 0 10056 a=control:streamid=0 10058 C->S: SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/2.0 10059 Transport: RTP/AVP/UDP;unicast; 10060 dest_addr=":6970"/":6971";mode="PLAY" 10061 CSeq: 2 10062 User-Agent: PhonyClient/1.2 10063 Accept-Ranges: NPT, SMPTE, UTC 10065 S->C: RTSP/2.0 200 OK 10066 Transport: RTP/AVP/UDP;unicast; 10067 dest_addr="192.0.2.53:6970"/"192.0.2.53:6971"; 10068 src_addr="192.0.2.5:6970"/"192.0.2.5:6971"; 10069 mode="PLAY";ssrc=EAB98712 10070 CSeq: 2 10071 Session: 2034820394 10072 Expires: 23 Jan 1997 16:00:00 GMT 10073 Server: PhonyServer/1.0 10074 Date: 23 Jan 1997 15:35:07 GMT 10075 Accept-Ranges: NPT 10076 Media-Properties: Begining-Only, Unmutable, Unlimited 10078 C->S: PLAY rtsp://foo.com/test.wav/ RTSP/2.0 10079 CSeq: 3 10080 User-Agent: PhonyClient/1.2 10081 Session: 2034820394 10083 S->C: RTSP/2.0 200 OK 10084 CSeq: 3 10085 Server: PhonyServer/1.0 10086 Date: 23 Jan 1997 15:35:08 GMT 10087 Session: 2034820394 10088 Range: npt=0-600 10089 Seek-Style: RAP 10090 RTP-Info: url="rtsp://foo.com/test.wav/streamid=0" 10091 ssrc=0D12F123:seq=981888;rtptime=3781123 10093 Note the different URI in the SETUP command, and then the switch back 10094 to the aggregate URI in the PLAY command. This makes complete sense 10095 when there are multiple streams with aggregate control, but is less 10096 than intuitive in the special case where the number of streams is 10097 one. However the server has declared that the aggregated control URI 10098 in the SDP and therefore this is legal. 10100 In this case, it is also required that servers accept implementations 10101 that use the non-aggregated interpretation and use the individual 10102 media URI, like this: 10104 C->S: PLAY rtsp://example.com/test.wav/streamid=0 RTSP/2.0 10105 CSeq: 3 10106 User-Agent: PhonyClient/1.2 10107 Session: 2034820394 10109 A.5. Live Media Presentation Using Multicast 10111 The media server M chooses the multicast address and port. Here, it 10112 is assumed that the web server only contains a pointer to the full 10113 description, while the media server M maintains the full description. 10115 C->W: GET /sessions.html HTTP/1.1 10116 Host: www.example.com 10118 W->C: HTTP/1.1 200 OK 10119 Content-Type: text/html 10121 10122 ... 10123 10125 ... 10126 10128 C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/2.0 10129 CSeq: 1 10130 Supported: play.basic, play.scale 10131 User-Agent: PhonyClient/1.2 10133 M->C: RTSP/2.0 200 OK 10134 CSeq: 1 10135 Content-Type: application/sdp 10136 Content-Length: 183 10137 Server: PhonyServer/1.0 10138 Date: Thu, 23 Jan 1997 15:35:06 GMT 10139 Supported: play.basic 10141 v=0 10142 o=- 2890844526 2890842807 IN IP4 192.0.2.5 10143 s=RTSP Session 10144 t=0 0 10145 m=audio 3456 RTP/AVP 0 10146 c=IN IP4 224.2.0.1/16 10147 a=control: rtsp://live.example.com/concert/audio 10148 a=range:npt=0- 10150 C->M: SETUP rtsp://live.example.com/concert/audio RTSP/2.0 10151 CSeq: 2 10152 Transport: RTP/AVP;multicast 10153 Accept-Ranges: NPT, SMPTE, UTC 10154 User-Agent: PhonyClient/1.2 10156 M->C: RTSP/2.0 200 OK 10157 CSeq: 2 10158 Server: PhonyServer/1.0 10159 Date: Thu, 23 Jan 1997 15:35:06 GMT 10160 Transport: RTP/AVP;multicast; 10161 dest_addr="224.2.0.1:3456"/"224.2.0.1:3457";ttl=16 10162 Session: 0456804596 10163 Accept-Ranges: NPT, UTC 10164 Media-Properties: No-Seeking, Time-Progressing, Time-Duration=0 10166 C->M: PLAY rtsp://live.example.com/concert/audio RTSP/2.0 10167 CSeq: 3 10168 Session: 0456804596 10169 User-Agent: PhonyClient/1.2 10171 M->C: RTSP/2.0 200 OK 10172 CSeq: 3 10173 Server: PhonyServer/1.0 10174 Date: 23 Jan 1997 15:35:07 GMT 10175 Session: 0456804596 10176 Seek-Style: Next 10177 Range:npt=1256- 10178 RTP-Info: url="rtsp://live.example.com/concert/audio" 10179 ssrc=0D12F123:seq=1473; rtptime=80000 10181 A.6. Capability Negotiation 10183 This examples illustrate how the client and server determines their 10184 capability to support a special feature, in this case "play.scale". 10185 The server, through the clients request and the included Supported 10186 header, learns the client supports RTSP 2.0, and also supports the 10187 playback time scaling feature of RTSP. The server's response 10188 contains the following feature related information to the client; it 10189 supports the basic playback (play.basic), the extended functionality 10190 of time scaling of content (play.scale), and one "example.com" 10191 proprietary feature (com.example.flight). The client also learns the 10192 methods supported (Public header) by the server for the indicated 10193 resource. 10195 C->S: OPTIONS rtsp://media.example.com/movie/twister.3gp RTSP/2.0 10196 CSeq: 1 10197 Supported: play.basic, play.scale 10198 User-Agent: PhonyClient/1.2 10200 S->C: RTSP/2.0 200 OK 10201 CSeq: 1 10202 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 10203 Server: PhonyServer/2.0 10204 Supported: play.basic, play.scale, com.example.flight 10206 When the client sends its SETUP request it tells the server that it 10207 requires support of the play.scale feature for this session by 10208 including the Require header. 10210 C->S: SETUP rtsp://media.example.com/twister.3gp/trackID=1 RTSP/2.0 10211 CSeq: 3 10212 User-Agent: PhonyClient/1.2 10213 Transport: RTP/AVP/UDP;unicast; 10214 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057", 10215 RTP/AVP/TCP;unicast;interleaved=0-1 10216 Require: play.scale 10217 Accept-Ranges: NPT, SMPTE, UTC 10218 User-Agent: PhonyClient/1.2 10220 S->C: RTSP/2.0 200 OK 10221 CSeq: 3 10222 Session: 12345678 10223 Transport: RTP/AVP/UDP;unicast; 10224 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057"; 10225 src_addr="192.0.2.5:5000"/"192.0.2.5:5001" 10226 Server: PhonyServer/2.0 10227 Accept-Ranges: NPT, SMPTE 10228 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 10230 Appendix B. RTSP Protocol State Machine 10232 The RTSP session state machine describes the behavior of the protocol 10233 from RTSP session initialization through RTSP session termination. 10235 The State machine is defined on a per session basis which is uniquely 10236 identified by the RTSP session identifier. The session may contain 10237 one or more media streams depending on state. If a single media 10238 stream is part of the session it is in non-aggregated control. If 10239 two or more is part of the session it is in aggregated control. 10241 The below state machine is a normative description of the protocols 10242 behavior. However, in case of ambiguity with the earlier parts of 10243 this specification, the description in the earlier parts MUST take 10244 precedence. 10246 B.1. States 10248 The state machine contains three states, described below. For each 10249 state there exist a table which shows which requests and events that 10250 are allowed and if they will result in a state change. 10252 Init: Initial state no session exist. 10254 Ready: Session is ready to start playing. 10256 Play: Session is playing, i.e. sending media stream data in the 10257 direction S->C. 10259 B.2. State variables 10261 This representation of the state machine needs more than its state to 10262 work. A small number of variables are also needed and is explained 10263 below. 10265 NRM: The number of media streams part of this session. 10267 RP: Resume point, the point in the presentation time line at which 10268 a request to continue will resume from. A time format for the 10269 variable is not mandated. 10271 B.3. Abbreviations 10273 To make the state tables more compact a number of abbreviations are 10274 used, which are explained below. 10276 IFI: IF Implemented. 10278 md: Media 10280 PP: Pause Point, the point in the presentation time line at which 10281 the presentation was paused. 10283 Prs: Presentation, the complete multimedia presentation. 10285 RedP: Redirect Point, the point in the presentation time line at 10286 which a REDIRECT was specified to occur. 10288 SES: Session. 10290 B.4. State Tables 10292 This section contains a table for each state. The table contains all 10293 the requests and events that this state is allowed to act on. The 10294 events which is method names are, unless noted, requests with the 10295 given method in the direction client to server (C->S). In some cases 10296 there exist one or more requisite. The response column tells what 10297 type of response actions should be performed. Possible actions that 10298 is requested for an event includes: response codes, e.g. 200, headers 10299 that MUST be included in the response, setting of state variables, or 10300 setting of other session related parameters. The new state column 10301 tells which state the state machine changes to. 10303 The response to valid request meeting the requisites is normally a 10304 2xx (SUCCESS) unless other noted in the response column. The 10305 exceptions need to be given a response according to the response 10306 column. If the request does not meet the requisite, is erroneous or 10307 some other type of error occur, the appropriate response code MUST be 10308 sent. If the response code is a 4xx the session state is unchanged. 10309 A response code of 3rr will result in that the session is ended and 10310 its state is changed to Init. A response code of 304 results in no 10311 state change. However there exist restrictions to when a 3rr 10312 response may be used. A 5xx response MUST NOT result in any change 10313 of the session state, except if the error is not possible to recover 10314 from. A unrecoverable error MUST result the ending of the session. 10315 As it in the general case can't be determined if it was a 10316 unrecoverable error or not the client will be required to test. In 10317 the case that the next request after a 5xx is responded with 454 10318 (Session Not Found) the client knows that the session has ended. 10320 The server will timeout the session after the period of time 10321 specified in the SETUP response, if no activity from the client is 10322 detected. Therefore there exist a timeout event for all states 10323 except Init. 10325 In the case that NRM = 1 the presentation URI is equal to the media 10326 URI or a specified presentation URI. For NRM > 1 the presentation 10327 URI MUST be other than any of the medias that are part of the 10328 session. This applies to all states. 10330 +---------------+-----------------+---------------------------------+ 10331 | Event | Prerequisite | Response | 10332 +---------------+-----------------+---------------------------------+ 10333 | DESCRIBE | Needs REDIRECT | 3rr, Redirect | 10334 | | | | 10335 | DESCRIBE | | 200, Session description | 10336 | | | | 10337 | OPTIONS | Session ID | 200, Reset session timeout | 10338 | | | timer | 10339 | | | | 10340 | OPTIONS | | 200 | 10341 | | | | 10342 | SET_PARAMETER | Valid parameter | 200, change value of parameter | 10343 | | | | 10344 | GET_PARAMETER | Valid parameter | 200, return value of parameter | 10345 +---------------+-----------------+---------------------------------+ 10347 Table 13: None state-machine changing events 10349 The methods in Table 13 do not have any effect on the state machine 10350 or the state variables. However some methods do change other session 10351 related parameters, for example SET_PARAMETER which will set the 10352 parameter(s) specified in its body. Also all of these methods that 10353 allows Session header will also update the keep-alive timer for the 10354 session. 10356 +------------------+----------------+-----------+-------------------+ 10357 | Action | Requisite | New State | Response | 10358 +------------------+----------------+-----------+-------------------+ 10359 | SETUP | | Ready | NRM=1, RP=0.0 | 10360 | | | | | 10361 | SETUP | Needs Redirect | Init | 3rr Redirect | 10362 | | | | | 10363 | S -> C: REDIRECT | No Session hdr | Init | Terminate all SES | 10364 +------------------+----------------+-----------+-------------------+ 10366 Table 14: State: Init 10368 The initial state of the state machine, see Table 14 can only be left 10369 by processing a correct SETUP request. As seen in the table the two 10370 state variables are also set by a correct request. This table also 10371 shows that a correct SETUP can in some cases be redirected to another 10372 URI and/or server by a 3rr response. 10374 +--------------+-----------------+-----------+----------------------+ 10375 | Action | Requisite | New State | Response | 10376 +--------------+-----------------+-----------+----------------------+ 10377 | SETUP | New URI | Ready | NRM +=1 | 10378 | | | | | 10379 | SETUP | URI Setup prior | Ready | Change transport | 10380 | | | | param | 10381 | | | | | 10382 | TEARDOWN | Prs URI, | Init | No session hdr, NRM | 10383 | | | | = 0 | 10384 | | | | | 10385 | TEARDOWN | md URI,NRM=1 | Init | No Session hdr, NRM | 10386 | | | | = 0 | 10387 | | | | | 10388 | TEARDOWN | md URI,NRM>1 | Ready | Session hdr, NRM -= | 10389 | | | | 1 | 10390 | | | | | 10391 | PLAY | Prs URI, No | Play | Play from RP | 10392 | | range | | | 10393 | | | | | 10394 | PLAY | Prs URI, Range | Play | According to range | 10395 | | | | | 10396 | PAUSE | Prs URI | Ready | Return PP | 10397 | | | | | 10398 | SC:REDIRECT | Range hdr | Ready | Set RedP | 10399 | | | | | 10400 | SC:REDIRECT | no range hdr | Init | Session is removed | 10401 | | | | | 10402 | Timeout | | Init | | 10403 | | | | | 10404 | RedP reached | | Init | TEARDOWN of session | 10405 +--------------+-----------------+-----------+----------------------+ 10407 Table 15: State: Ready 10409 In the Ready state, see Table 15, some of the actions are depending 10410 on the number of media streams (NRM) in the session, i.e. aggregated 10411 or non-aggregated control. A setup request in the ready state can 10412 either add one more media stream to the session or, if the media 10413 stream (same URI) already is part of the session, change the 10414 transport parameters. TEARDOWN is depending on both the Request-URI 10415 and the number of media stream within the session. If the Request- 10416 URI is the presentations URI the whole session is torn down. If a 10417 media URI is used in the TEARDOWN request and more than one media 10418 exist in the session, the session will remain and a session header 10419 MUST be returned in the response. If only a single media stream 10420 remains in the session when performing a TEARDOWN with a media URI 10421 the session is removed. The number of media streams remaining after 10422 tearing down a media stream determines the new state. 10424 +--------------+-----------------+-----------+----------------------+ 10425 | Action | Requisite | New State | Response | 10426 +--------------+-----------------+-----------+----------------------+ 10427 | PAUSE | PrsURI | Ready | Set RP to present | 10428 | | | | point | 10429 | | | | | 10430 | PP reached | | Ready | RP = PP | 10431 | | | | | 10432 | End of media | All media | Play | Set RP = End of | 10433 | | | | media | 10434 | | | | | 10435 | End of range | | Play | Set RP = End of | 10436 | | | | range | 10437 | | | | | 10438 | PLAY | Prs URI, No | Play | Play from present | 10439 | | range | | point | 10440 | | | | | 10441 | PLAY | Prs URI, Range | Play | According to range | 10442 | | | | | 10443 | PLAY_NOTIFY | | Play | 200 | 10444 | | | | | 10445 | SETUP | New URI | Play | 455 | 10446 | | | | | 10447 | SETUP | Setuped URI | Play | 455 | 10448 | | | | | 10449 | SETUP | Setuped URI, | Play | Change transport | 10450 | | IFI | | param. | 10451 | | | | | 10452 | TEARDOWN | Prs URI | Init | No session hdr | 10453 | | | | | 10454 | TEARDOWN | md URI,NRM=1 | Init | No Session hdr, | 10455 | | | | NRM=0 | 10456 | | | | | 10457 | TEARDOWN | md URI | Play | 455 | 10458 | | | | | 10459 | SC:REDIRECT | Range hdr | Play | Set RedP | 10460 | | | | | 10461 | SC:REDIRECT | no range hdr | Init | Session is removed | 10462 | | | | | 10463 | RedP reached | | Init | TEARDOWN of session | 10464 | | | | | 10465 | Timeout | | Init | Stop Media playout | 10466 +--------------+-----------------+-----------+----------------------+ 10468 Table 16: State: Play 10470 The Play state table, see Table 16, is the largest. The table 10471 contains an number of requests that has presentation URI as a 10472 prerequisite on the Request-URI, this is due to the exclusion of non- 10473 aggregated stream control in sessions with more than one media 10474 stream. 10476 To avoid inconsistencies between the client and server, automatic 10477 state transitions are avoided. This can be seen at for example "End 10478 of media" event when all media has finished playing, the session 10479 still remain in Play state. An explicit PAUSE request MUST be sent 10480 to change the state to Ready. It may appear that there exist an 10481 automatic transitions in "RedP reached" and "PP reached", however 10482 they are requested and acknowledge before they take place. The time 10483 at which the transition will happen is known by looking at the range 10484 header. If the client sends request close in time to these 10485 transitions it needs to be prepared for getting error message as the 10486 state may or may not have changed. 10488 Appendix C. Media Transport Alternatives 10490 This section defines how certain combinations of protocols, profiles 10491 and lower transports are used. This includes the usage of the 10492 Transport header's source and destination address parameters 10493 "src_addr" and "dest_addr". 10495 C.1. RTP 10497 This section defines the interaction of RTSP with respect to the RTP 10498 protocol [RFC3550]. It also defines any necessary media transport 10499 signalling with regards to RTP. 10501 The available RTP profiles and lower layer transports are described 10502 below along with rules on signalling the available combinations. 10504 C.1.1. AVP 10506 The usage of the "RTP Profile for Audio and Video Conferences with 10507 Minimal Control" [RFC3551] when using RTP for media transport over 10508 different lower layer transport protocols is defined below in regards 10509 to RTSP. 10511 One such case is defined within this document, the use of embedded 10512 (interleaved) binary data as defined in Section 14. The usage of 10513 this method is indicated by include the "interleaved" parameter. 10515 When using embedded binary data the "src_addr" and "dest_addr" MUST 10516 NOT be used. This addressing and multiplexing is used as defined 10517 with use of channel numbers and the interleaved parameter. 10519 C.1.2. AVP/UDP 10521 This part describes sending of RTP [RFC3550] over lower transport 10522 layer UDP [RFC0768] according to the profile "RTP Profile for Audio 10523 and Video Conferences with Minimal Control" defined in RFC 3551 10524 [RFC3551]. This profile requires one or two uni- or bi-directional 10525 UDP flows per media stream. The first UDP flow is for RTP and the 10526 second is for RTCP. Embedding of RTP data with the RTSP messages, in 10527 accordance with Section 14, SHOULD NOT be performed when RTSP 10528 messages are transported over unreliable transport protocols, like 10529 UDP [RFC0768]. 10531 The RTP/UDP and RTCP/UDP flows can be established using the Transport 10532 header's "src_addr", and "dest_addr" parameters. 10534 In RTSP PLAY mode, the transmission of RTP packets from client to 10535 server is unspecified. The behavior in regards to such RTP packets 10536 MAY be defined in future. 10538 The "src_addr" and "dest_addr" parameters are used in the following 10539 way for media playback, i.e. Mode=PLAY: 10541 o The "src_addr" and "dest_addr" parameters MUST contain either 1 or 10542 2 address specifications. 10544 o Each address specification for RTP/AVP/UDP or RTP/AVP/TCP MUST 10545 contain either: 10547 * both an address and a port number, or 10549 * a port number without an address. 10551 o The first address and port pair given in either of the parameters 10552 applies to the RTP stream. The second address and port pair if 10553 present applies to the RTCP stream. 10555 o The RTP/UDP packets from the server to the client MUST be sent to 10556 the address and port given by first address and port pair of the 10557 "dest_addr" parameter. 10559 o The RTCP/UDP packets from the server to the client MUST be sent to 10560 the address and port given by the second address and port pair of 10561 the "dest_addr" parameter. If no second pair is specified RTCP 10562 MUST NOT be sent. 10564 o The RTCP/UDP packets from the client to the server MUST be sent to 10565 the address and port given by the second address and port pair of 10566 the "src_addr" parameter. If no second pair is given RTCP MUST 10567 NOT be sent. 10569 o The RTP/UDP packets from the client to the server MUST be sent to 10570 the address and port given by the first address and port pair of 10571 the "src_addr" parameter. 10573 o RTP and RTCP Packets SHOULD be sent from the corresponding 10574 receiver port, i.e. RTCP packets from server should be sent from 10575 the "src_addr" parameters second address port pair. 10577 C.1.3. AVPF/UDP 10579 The RTP profile "Extended RTP Profile for RTCP-based Feedback (RTP/ 10580 AVPF)"[RFC4585] MAY be used as RTP profiles in session using RTP. 10581 All that is defined for AVP MUST also apply for AVPF. 10583 The usage of AVPF is indicated by the media initialization protocol 10584 used. In the case of SDP it is indicated by media lines (m=) 10585 containing the profile RTP/AVPF. That SDP MAY also contain further 10586 AVPF related SDP attributes configuring the AVPF session regarding 10587 reporting interval and feedback messages that shall be used that MUST 10588 be followed. 10590 C.1.4. SAVP/UDP 10592 The RTP profile "The Secure Real-time Transport Protocol (SRTP)" 10593 [RFC3711] is an RTP profile (SAVP) that MAY be used in RTSP sessions 10594 using RTP. All that is defined for AVP MUST also apply for SAVP. 10596 The usage of SRTP requires that a security association is 10597 established. The RECOMMENDED mechanism for establishing that 10598 security association is to use MIKEY with RTSP as defined in RFC 4567 10599 [RFC4567]. 10601 C.1.5. SAVPF/UDP 10603 The RTP profile "Extended Secure RTP Profile for RTCP-based Feedback 10604 (RTP/SAVPF)" [RFC5124] is an RTP profile (SAVPF) that MAY be used in 10605 RTSP sessions using RTP. All that is defined for AVP MUST also apply 10606 for SAVPF. 10608 The usage of SRTP requires that a security association is 10609 established. The RECOMMENDED mechanism for establishing that 10610 security association is to use MIKEY[RFC3830] with RTSP as defined in 10611 RFC 4567 [RFC4567]. 10613 C.1.6. RTCP usage with RTSP 10615 RTCP has several usages when RTP is used for media transport as 10616 explained below. Due to that RTCP MUST be supported if an RTSP agent 10617 handles RTP. 10619 C.1.6.1. Media synchronization 10621 RTCP provides media synchronization and clock drift compensation. 10622 The initial media synchronization is available from RTP-Info header. 10623 However to be able to handle any clock drift between the media 10624 streams, RTCP is needed. 10626 C.1.6.2. RTSP Session keep-alive 10628 RTCP traffic from the RTSP client to the RTSP server MUST function as 10629 keep-alive. Which requires an RTSP server supporting RTP to use the 10630 received RTCP packets as indications that the client desires the 10631 related RTSP session to be kept alive. 10633 C.1.6.3. Bit-rate adaption 10635 RTCP Receiver reports and any additional feedback from the client 10636 MUST be used adapt the bit-rate used over the transport for all cases 10637 when RTP is sent over UDP. An RTP sender without reserved resources 10638 MUST NOT use more than its fair share of the available resources. 10639 This can be determined by comparing on short to medium term (some 10640 seconds) the used bit-rate and adapt it so that the RTP sender sends 10641 at a bit-rate comparable to what a TCP sender would achieve on 10642 average over the same path. 10644 C.1.6.4. RTP and RTCP Multiplexing 10646 RTSP can be used to negotiate the usage of RTP and RTCP multiplexing 10647 as described in [I-D.ietf-avt-rtp-and-rtcp-mux]. This allows servers 10648 and client to reduce the amount of resources required for the session 10649 by only requiring one underlying transport stream per media stream 10650 instead of two when using RTP and RTCP. This lessens the server port 10651 consumption and also the necessary state and keep-alive work when 10652 operating across Network and Address Translators [RFC2663]. 10654 Content must be prepared with some consideration for RTP and RTCP 10655 multiplexing, mainly ensuring that the RTP payload types used does 10656 not collide with the ones used for RTCP packet types this option 10657 likely needs explicit support from the content unless the RTP payload 10658 types can be remapped by the server and that is correctly reflected 10659 in the session description. Beyond that support of this feature 10660 should come at little cost and much gain. 10662 It is recommended that if the content and server supports RTP and 10663 RTCP multiplexing that this is indicated in the session description, 10664 for example using the SDP attribute "a=rtcp-mux". If the SDP message 10665 contains the a=rtcp-mux attribute for a media stream, the server MUST 10666 support RTP and RTCP multiplexing. If indicated or otherwise desired 10667 by the client it can include the Transport parameter "RTCP-mux" in 10668 any transport specification where it desires to use RTCP-mux. The 10669 server will indicate if it supports RTCP-mux. Server and Client 10670 SHOULD support RTP and RTCP multiplexing. 10672 C.2. RTP over TCP 10674 Transport of RTP over TCP can be done in two ways, over independent 10675 TCP connections using RFC 4571 [RFC4571] or interleaved in the RTSP 10676 control connection. In both cases the protocol MUST be "rtp" and the 10677 lower layer MUST be TCP. The profile may be any of the above 10678 specified ones; AVP, AVPF, SAVP or SAVPF. 10680 C.2.1. Interleaved RTP over TCP 10682 The use of embedded (interleaved) binary data transported on the RTSP 10683 connection is possible as specified in Section 14. When using this 10684 declared combination of interleaved binary data the RTSP messages 10685 MUST be transported over TCP. TLS may or may not be used. 10687 One should however consider that this will result that all media 10688 streams go through any proxy. Using independent TCP connections can 10689 avoid that issue. 10691 C.2.2. RTP over independent TCP 10693 In this Appendix, we describe the sending of RTP [RFC3550] over lower 10694 transport layer TCP [RFC0793] according to "Framing Real-time 10695 Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over 10696 Connection-Oriented Transport" [RFC4571]. This Appendix adapts the 10697 guidelines for using RTP over TCP within SIP/SDP [RFC4145] to work 10698 with RTSP. 10700 A client codes the support of RTP over independent TCP by specifying 10701 an RTP/AVP/TCP transport option without an interleaved parameter in 10702 the Transport line of a SETUP request. This transport option MUST 10703 include the "unicast" parameter. 10705 If the client wishes to use RTP with RTCP, two ports (or two address/ 10706 port pairs) are specified by the dest_addr parameter. If the client 10707 wishes to use RTP without RTCP, one port (or one address/port pair) 10708 is specified by the dest_addr parameter. Ordering rules of dest_addr 10709 ports follow the rules for RTP/AVP/UDP. 10711 If the client wishes to play the active role in initiating the TCP 10712 connection, it MAY set the "setup" parameter (See Section 16.52) on 10713 the Transport line to be "active", or it MAY omit the setup 10714 parameter, as active is the default. If the client signals the 10715 active role, the ports for all dest_addr values MUST be set to 9 (the 10716 discard port). 10718 If the client wishes to play the passive role in TCP connection 10719 initiation, it MUST set the "setup" parameter on the Transport line 10720 to be "passive". If the client is able to assume the active or the 10721 passive role, it MUST set the "setup" parameter on the Transport line 10722 to be "actpass". In either case, the dest_addr port value for RTP 10723 MUST be set to the TCP port number on which the client is expecting 10724 to receive the RTP stream connection, and the dest_addr port value 10725 for RTCP MUST be set to the TCP port number on which the client is 10726 expecting to receive the RTCP stream connection. 10728 If upon receipt of a non-interleaved RTP/AVP/TCP SETUP request, a 10729 server decides to accept this requested option, the 2xx reply MUST 10730 contain a Transport option that specifies RTP/AVP/TCP (without using 10731 the interleaved parameter, and with using the unicast parameter). 10732 The dest_addr parameter value MUST be echoed from the parameter value 10733 in the client request unless the destination address (only port) was 10734 not provided in which can the server MAY include the source address 10735 of the RTSP TCP connection with the port number unchanged. 10737 In addition, the server reply MUST set the setup parameter on the 10738 Transport line, to indicate the role the server will play in the 10739 connection setup. Permissible values are "active" (if a client set 10740 "setup" to "passive" or "actpass") and "passive" (if a client set 10741 "setup" to "active" or "actpass"). 10743 If a server sets "setup" to "passive", the "src_addr" in the reply 10744 MUST indicate the ports the server is willing to receive an RTP 10745 connection and (if the client requested an RTCP connection by 10746 specifying two dest_addr ports or address/port pairs) and RTCP 10747 connection. If a server sets "setup" to "active", the ports 10748 specified in "src_addr" MUST be set to 9. The server MAY use the 10749 "ssrc" parameter, following the guidance in Section 16.52. Port 10750 ordering for src_addr follows the rules for RTP/AVP/UDP. 10752 For cases when servers have a public IP-address it is RECOMMENDED 10753 that the server take the passive role and the client the active role. 10754 This help in cases when the client is behind a NAT. 10756 After sending (receiving) a 2xx reply for a SETUP method for a non- 10757 interleaved RTP/AVP/TCP media stream, the active party SHOULD 10758 initiate the TCP connection as soon as possible. The client MUST NOT 10759 send a PLAY request prior to the establishment of all the TCP 10760 connections negotiated using SETUP for the session. In case the 10761 server receives a PLAY request in a session that has not yet 10762 established all the TCP connections, it MUST respond using the 464 10763 "Data Transport Not Ready Yet" (Section 15.4.29) error code. 10765 Once the PLAY request for a media resource transported over non- 10766 interleaved RTP/AVP/TCP occurs, media begins to flow from server to 10767 client over the RTP TCP connection, and RTCP packets flow 10768 bidirectionally over the RTCP TCP connection. As in the RTP/UDP 10769 case, client to server traffic on the TCP port is unspecified by this 10770 memo. The packets that travel on these connections MUST be framed 10771 using the protocol defined in [RFC4571], not by the framing defined 10772 for interleaving RTP over the RTSP control connection defined in 10773 Section 14. 10775 A successful PAUSE request for a media being transported over RTP/ 10776 AVP/TCP pauses the flow of packets over the connections, without 10777 closing the connections. A successful TEARDOWN request signals that 10778 the TCP connections for RTP and RTCP are to be closed as soon as 10779 possible. 10781 Subsequent SETUP requests on an already-SETUP RTP/AVP/TCP URI may be 10782 ambiguous in the following way: does the client wish to open up new 10783 TCP RTP and RTCP connections for the URI, or does the client wish to 10784 continue using the existing TCP RTP and RTCP connections? The client 10785 SHOULD use the "connection" parameter (defined in Section 16.52) on 10786 the Transport line to make its intention clear in the regard (by 10787 setting "connection" to "new" if new connections are needed, and by 10788 setting "connection" to "existing" if the existing connections are to 10789 be used). After a 2xx reply for a SETUP request for a new 10790 connection, parties should close the pre-existing connections, after 10791 waiting a suitable period for any stray RTP or RTCP packets to 10792 arrive. 10794 Below, we rewrite part of the example media on demand example shown 10795 in Appendix A.1 to use RTP/AVP/TCP non-interleaved: 10797 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 10798 CSeq: 1 10799 User-Agent: PhonyClient/1.2 10801 M->C: RTSP/2.0 200 OK 10802 CSeq: 1 10803 Server: PhonyServer/1.0 10804 Date: Thu, 23 Jan 1997 15:35:06 GMT 10805 Content-Type: application/sdp 10806 Content-Length: 227 10807 Content-Base: rtsp://example.com/twister.3gp/ 10808 Expires: 24 Jan 1997 15:35:06 GMT 10810 v=0 10811 o=- 2890844256 2890842807 IN IP4 192.0.2.5 10812 s=RTSP Session 10813 i=An Example of RTSP Session Usage 10814 e=adm@example.com 10815 c=IN IP4 0.0.0.0 10816 a=control: * 10817 a=range: npt=0-0:10:34.10 10818 t=0 0 10819 m=audio 0 RTP/AVP 0 10820 a=control: trackID=1 10822 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 10823 CSeq: 2 10824 User-Agent: PhonyClient/1.2 10825 Require: play.basic 10826 Transport: RTP/AVP/TCP;unicast;dest_addr=":9"/":9"; 10827 setup=active;connection=new 10828 Accept-Ranges: NPT, SMPTE, UTC 10830 M->C: RTSP/2.0 200 OK 10831 CSeq: 2 10832 Server: PhonyServer/1.0 10833 Transport: RTP/AVP/TCP;unicast; 10834 dest_addr=":9"/":9"; 10835 src_addr="192.0.2.5:9000"/"192.0.2.5:9001"; 10836 setup=passive;connection=new;ssrc=93CB001E 10837 Session: 12345678 10838 Expires: 24 Jan 1997 15:35:12 GMT 10839 Date: 23 Jan 1997 15:35:12 GMT 10840 Accept-Ranges: NPT 10841 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 10843 C->M: TCP Connection Establishment 10845 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 10846 CSeq: 4 10847 User-Agent: PhonyClient/1.2 10848 Range: npt=30- 10849 Session: 12345678 10851 M->C: RTSP/2.0 200 OK 10852 CSeq: 4 10853 Server: PhonyServer/1.0 10854 Date: 23 Jan 1997 15:35:14 GMT 10855 Session: 12345678 10856 Range: npt=30-623.10 10857 Seek-Style: First-Prior 10858 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=1" 10859 ssrc=4F312DD8:seq=54321;rtptime=2876889 10861 C.3. Handling Media Clock Time Jumps in the RTP Media Layer 10863 RTSP allows media clients to control selected, non-contiguous 10864 sections of media presentations, rendering those streams with an RTP 10865 media layer [RFC3550]. Two cases occur, the first is when a new PLAY 10866 request replaces an old ongoing request and the new request results 10867 in a jump in the media. This should produce in the RTP layer a 10868 continuous media stream. A client may also directly following a 10869 completed PLAY request perform a new PLAY request. This will result 10870 in some gap in the media layer. The below text will look into both 10871 cases. 10873 A PLAY request that replaces a ongoing request allows the media layer 10874 rendering the RTP stream without being affected by jumps in media 10875 clock time. The RTP timestamps for the new media range is set so 10876 that they become continuous with the previous media range in the 10877 previous request. The RTP sequence number for the first packet in 10878 the new range will be the next following the last packet in the 10879 previous range, i.e. monotonically increasing. The goal is to allow 10880 the media rendering layer to work without interruption or 10881 reconfiguration across the jumps in media clock. This should be 10882 possible in all cases of replaced PLAY requests for media that has 10883 random-access properties. In this case care is needed to align 10884 frames or similar media dependent structures. 10886 In cases where jumps in media clock time are a result of RTSP 10887 signalling operations arriving after a completed PLAY operation, the 10888 request timing will result in that media becomes non-continuous. The 10889 server becomes unable to send the media so that it arrive timely and 10890 still carry timestamps to make the media stream continuous. In these 10891 cases the server will produce RTP streams where there are gaps in the 10892 RTP timeline for the media. In such cases, if the media has frame 10893 structure, aligning the timestamp for the next frame with the 10894 previous structure reduces the burden to render this media. The gap 10895 should represent the time the server hasn't been serving media, e.g. 10896 the time between the end of the media stream or a PAUSE request and 10897 the new PLAY request. In these cases the RTP sequence number would 10898 normally be monotonically increasing across the gap. 10900 For RTSP sessions with media that lacks random access properties, 10901 like live streams, any media clock jump is commonly result of 10902 correspondingly long pause of delivery. The RTP timestamp will have 10903 increased in direct proportion to the duration of the paused 10904 delivery. Note also that in this case the RTP sequence number should 10905 be the next packet number. If not, the RTCP packet loss reporting 10906 will indicate as loss all packets not received between the point of 10907 pausing and later resuming. This may trigger congestion avoidance 10908 mechanisms. An allowed exception from the above recommendation on 10909 monotonically increasing RTP sequence number is live media streams, 10910 likely being relayed. In this case, when the client resumes 10911 delivery, it will get the media that is currently being delivered to 10912 the server itself. For this type of basic delivery of live streams 10913 to multiple users over unicast, individual rewriting of RTP sequence 10914 numbers becomes quite a burden. For solutions that anyway caches 10915 media, timeshifts, etc, the rewriting should be a minor issue. 10917 The goal when handling jumps in media clock time is that the provided 10918 stream is continuous without gaps in RTP timestamp or sequence 10919 number. However, when delivery has been halted for some reason the 10920 RTP timestamp when resuming MUST represent the duration the delivery 10921 was halted. RTP sequence number MUST generally be the next number, 10922 i.e. monotonically increasing modulo 65536. For media resources with 10923 the properties Time-Progressing and Time-Duration=0.0 the server MAY 10924 create RTP media streams with RTP sequence number jumps in them due 10925 to client first halting delivery and later resuming it (PAUSE and 10926 then later PLAY). However, servers utilizing this exception must 10927 take into consideration the resulting RTCP receiver reports that 10928 likely contains loss report for all the packets part of the 10929 discontinuity. A client can not rely on that a server will align 10930 when resuming playing even if it is RECOMMENDED. The RTP-Info header 10931 will provide information on how the server acts in each case. 10933 We cannot assume that the RTSP client can communicate with the RTP 10934 media agent, as the two may be independent processes. If the RTP 10935 timestamp shows the same gap as the NPT, the media agent will 10936 assume that there is a pause in the presentation. If the jump in 10937 NPT is large enough, the RTP timestamp may roll over and the media 10938 agent may believe later packets to be duplicates of packets just 10939 played out. Having the RTP timestamp jump will also affect the 10940 RTCP measurements based on this. 10942 As an example, assume a RTP timestamp frequency of 8000 Hz, a 10943 packetization interval of 100 ms and an initial sequence number and 10944 timestamp of zero. 10946 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 10947 CSeq: 4 10948 Session: abcdefgh 10949 Range: npt=10-15 10950 User-Agent: PhonyClient/1.2 10952 S->C: RTSP/2.0 200 OK 10953 CSeq: 4 10954 Session: abcdefgh 10955 Range: npt=10-15 10956 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 10957 ssrc=0D12F123:seq=0;rtptime=0 10959 The ensuing RTP data stream is depicted below: 10961 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 10962 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 10963 . . . 10964 S -> C: RTP packet - seq = 49, rtptime = 39200, NPT time = 14.9s 10966 Upon the completion of the requested playback the server sends a 10967 PLAY_NOFIFY 10968 S->C: PLAY_NOTIFY rtsp://example.com/fizzle RTSP/2.0 10969 CSeq: 45 10970 Notify-Reason: end-of-stream 10971 Request-Status: cseq=4 status=200 reason="OK" 10972 Range: npt=-15 10973 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 10974 ssrc=0D12F123:seq=49;rtptime=39200 10975 Session: abcdefgh 10977 C->S: RTSP/2.0 200 OK 10978 CSeq: 854 10979 User-Agent: PhonyClient/1.2 10981 Upon the completion of the play range, the client follows up with a 10982 request to PLAY from a new NPT. 10984 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 10985 CSeq: 5 10986 Session: abcdefg 10987 Range: npt=18-20 10988 User-Agent: PhonyClient/1.2 10990 S->C: RTSP/2.0 200 OK 10991 CSeq: 5 10992 Session: abcdefg 10993 Range: npt=18-20 10994 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 10995 ssrc=0D12F123:seq=50;rtptime=40100 10997 The ensuing RTP data stream is depicted below: 10999 S->C: RTP packet - seq = 50, rtptime = 40100, NPT time = 18s 11000 S->C: RTP packet - seq = 51, rtptime = 40900, NPT time = 18.1s 11001 . . . 11002 S->C: RTP packet - seq = 69, rtptime = 55300, NPT time = 19.9s 11004 In this example, first, NPT 10 through 15 is played, then the client 11005 request the server to skip ahead and play NPT 18 through 20. The 11006 first segment is presented as RTP packets with sequence numbers 0 11007 through 49 and timestamp 0 through 39,200. The second segment 11008 consists of RTP packets with sequence number 50 through 69, with 11009 timestamps 40,100 through 55,200. While there is a gap in the NPT, 11010 there is no gap in the sequence number space of the RTP data stream. 11012 The RTP timestamp gap is present in the above example due to the time 11013 it takes to perform the second play request, in this case 12.5 ms 11014 (100/8000). 11016 C.4. Handling RTP Timestamps after PAUSE 11018 During a PAUSE / PLAY interaction in an RTSP session, the duration of 11019 time for which the RTP transmission was halted MUST be reflected in 11020 the RTP timestamp of each RTP stream. The duration can be calculated 11021 for each RTP stream as the time elapsed from when the last RTP packet 11022 was sent before the PAUSE request was received and when the first RTP 11023 packet was sent after the subsequent PLAY request was received. The 11024 duration includes all latency incurred and processing time required 11025 to complete the request. 11027 The RTP RFC [RFC3550] states that: The RTP timestamp for each unit 11028 [packet] would be related to the wallclock time at which the unit 11029 becomes current on the virtual presentation timeline. 11031 In order to satisfy the requirements of [RFC3550], the RTP 11032 timestamp space needs to increase continuously with real time. 11033 While this is not optimal for stored media, it is required for RTP 11034 and RTCP to function as intended. Using a continuous RTP 11035 timestamp space allows the same timestamp model for both stored 11036 and live media and allows better opportunity to integrate both 11037 types of media under a single control. 11039 As an example, assume a clock frequency of 8000 Hz, a packetization 11040 interval of 100 ms and an initial sequence number and timestamp of 11041 zero. 11043 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 11044 CSeq: 4 11045 Session: abcdefg 11046 Range: npt=10-15 11047 User-Agent: PhonyClient/1.2 11049 S->C: RTSP/2.0 200 OK 11050 CSeq: 4 11051 Session: abcdefg 11052 Range: npt=10-15 11053 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11054 ssrc=0D12F123:seq=0;rtptime=0 11056 The ensuing RTP data stream is depicted below: 11058 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 11059 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 11060 S -> C: RTP packet - seq = 2, rtptime = 1600, NPT time = 10.2s 11061 S -> C: RTP packet - seq = 3, rtptime = 2400, NPT time = 10.3s 11063 The client then sends a PAUSE request: 11065 C->S: PAUSE rtsp://example.com/fizzle RTSP/2.0 11066 CSeq: 5 11067 Session: abcdefg 11068 User-Agent: PhonyClient/1.2 11070 S->C: RTSP/2.0 200 OK 11071 CSeq: 5 11072 Session: abcdefg 11073 Range: npt=10.4-15 11075 20 seconds elapse and then the client sends a PLAY request. In 11076 addition the server requires 15 ms to process the request: 11078 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 11079 CSeq: 6 11080 Session: abcdefg 11081 User-Agent: PhonyClient/1.2 11083 S->C: RTSP/2.0 200 OK 11084 CSeq: 6 11085 Session: abcdefg 11086 Range: npt=10.4-15 11087 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11088 ssrc=0D12F123:seq=4;rtptime=164400 11090 The ensuing RTP data stream is depicted below: 11092 S -> C: RTP packet - seq = 4, rtptime = 164400, NPT time = 10.4s 11093 S -> C: RTP packet - seq = 5, rtptime = 165200, NPT time = 10.5s 11094 S -> C: RTP packet - seq = 6, rtptime = 166000, NPT time = 10.6s 11096 First, NPT 10 through 10.3 is played, then a PAUSE is received by the 11097 server. After 20 seconds a PLAY is received by the server which take 11098 15ms to process. The duration of time for which the session was 11099 paused is reflected in the RTP timestamp of the RTP packets sent 11100 after this PLAY request. 11102 A client can use the RTSP range header and RTP-Info header to map NPT 11103 time of a presentation with the RTP timestamp. 11105 Note: In RFC 2326 [RFC2326], this matter was not clearly defined and 11106 was misunderstood commonly. However for RTSP 2.0 it is expected that 11107 this will be handled correctly and no exception handling will be 11108 required. 11110 Note Further: To ensure correct media decoding and usually jitter- 11111 buffer handling reseting some of the state when issuing a PLAY 11112 request is needed. 11114 C.5. RTSP / RTP Integration 11116 For certain datatypes, tight integration between the RTSP layer and 11117 the RTP layer will be necessary. This by no means precludes the 11118 above restrictions. Combined RTSP/RTP media clients should use the 11119 RTP-Info field to determine whether incoming RTP packets were sent 11120 before or after a seek or before or after a PAUSE. 11122 C.6. Scaling with RTP 11124 For scaling (see Section 16.44), RTP timestamps should correspond to 11125 the playback timing. For example, when playing video recorded at 30 11126 frames/second at a scale of two and speed (Section 16.46) of one, the 11127 server would drop every second frame to maintain and deliver video 11128 packets with the normal timestamp spacing of 3,000 per frame, but NPT 11129 would increase by 1/15 second for each video frame. 11131 Note: The above scaling puts requirements on the media codec or a 11132 media stream to support it. For example motion JPEG or other non- 11133 predictive video coding can easier handle the above example. 11135 C.7. Maintaining NPT synchronization with RTP timestamps 11137 The client can maintain a correct display of NPT (Normal Play Time) 11138 by noting the RTP timestamp value of the first packet arriving after 11139 repositioning. The sequence parameter of the RTP-Info 11140 (Section 16.43) header provides the first sequence number of the next 11141 segment. 11143 C.8. Continuous Audio 11145 For continuous audio, the server SHOULD set the RTP marker bit at the 11146 beginning of serving a new PLAY request or at jumps in timeline. 11147 This allows the client to perform playout delay adaptation. 11149 C.9. Multiple Sources in an RTP Session 11151 Note that more than one SSRC MAY be sent in the media stream. If it 11152 happens all sources are expected to be rendered simultaneously. 11154 C.10. Usage of SSRCs and the RTCP BYE Message During an RTSP Session 11156 The RTCP BYE message indicates the end of use of a given SSRC. If 11157 all sources leave an RTP session, it can, in most cases, be assumed 11158 to have ended. Therefore, a client or server MUST NOT send a RTCP 11159 BYE message until it has finished using a SSRC. A server SHOULD keep 11160 using a SSRC until the RTP session is terminated. Prolonging the use 11161 of a SSRC allows the established synchronization context associated 11162 with that SSRC to be used to synchronize subsequent PLAY requests 11163 even if the PLAY response is late. 11165 An SSRC collision with the SSRC that transmits media does also have 11166 consequences, as it will force the media sender to change its SSRC in 11167 accordance with the RTP specification[RFC3550]. This will result in 11168 a loss of synchronization context, and require any receiver to wait 11169 for RTCP sender reports for all media requiring synchronization 11170 before being able to play out synchronized. Due to these reasons a 11171 client joining a session should take care to not select the same SSRC 11172 as the server. Any SSRC signalled in the Transport header SHOULD be 11173 avoided. A client detecting a collision prior to sending any RTP or 11174 RTCP messages can also select a new SSRC. 11176 C.11. Future Additions 11178 It is the intention that any future protocol or profile regarding 11179 both for media delivery and lower transport should be easy to add to 11180 RTSP. This section provides the necessary steps that needs to be 11181 meet. 11183 The following things needs to be considered when adding a new 11184 protocol or profile for use with RTSP: 11186 o The protocol or profile needs to define a name tag representing 11187 it. This tag is required to be a ABNF "token" to be possible to 11188 use in the Transport header specification. 11190 o The useful combinations of protocol, profiles and lower layer 11191 transport for this extension needs to be defined. For each 11192 combination declare the necessary parameters to use in the 11193 Transport header. 11195 o For new media protocols the interaction with RTSP needs to be 11196 addressed. One important factor will be the media 11197 synchronization. May need new headers similar to RTP info to 11198 carry information. 11200 o Discuss congestion control for media, especially if transport 11201 without built in congestion control is used. 11203 See the IANA section (Section 22) for information how to register new 11204 attributes. 11206 Appendix D. Use of SDP for RTSP Session Descriptions 11208 The Session Description Protocol (SDP, [RFC4566]) may be used to 11209 describe streams or presentations in RTSP. This description is 11210 typically returned in reply to a DESCRIBE request on an URI from a 11211 server to a client, or received via HTTP from a server to a client. 11213 This appendix describes how an SDP file determines the operation of 11214 an RTSP session. SDP as is provides no mechanism by which a client 11215 can distinguish, without human guidance, between several media 11216 streams to be rendered simultaneously and a set of alternatives 11217 (e.g., two audio streams spoken in different languages). However the 11218 SDP extension "Grouping of Media Lines in the Session Description 11219 Protocol (SDP)" [RFC3388] may provide such functionality depending on 11220 need. Also future grouping semantics may in the future be developed. 11222 D.1. Definitions 11224 The terms "session-level", "media-level" and other key/attribute 11225 names and values used in this appendix are to be used as defined in 11226 SDP (RFC 4566 [RFC4566]): 11228 D.1.1. Control URI 11230 The "a=control:" attribute is used to convey the control URI. This 11231 attribute is used both for the session and media descriptions. If 11232 used for individual media, it indicates the URI to be used for 11233 controlling that particular media stream. If found at the session 11234 level, the attribute indicates the URI for aggregate control 11235 (presentation URI). The session level URI MUST be different from any 11236 media level URI. The presence of a session level control attribute 11237 MUST be interpreted as support for aggregated control. The control 11238 attribute MUST be present on media level unless the presentation only 11239 contains a single media stream, in which case the attribute MAY only 11240 be present on the session level. 11242 ABNF for the attribute is defined in Section 20.3. 11244 Example: 11245 a=control:rtsp://example.com/foo 11247 This attribute MAY contain either relative or absolute URIs, 11248 following the rules and conventions set out in RFC 3986 [RFC3986]. 11249 Implementations MUST look for a base URI in the following order: 11251 1. the RTSP Content-Base field; 11252 2. the RTSP Content-Location field; 11254 3. the RTSP Request-URI. 11256 If this attribute contains only an asterisk (*), then the URI MUST be 11257 treated as if it were an empty embedded URI, and thus inherit the 11258 entire base URI. 11260 Note, RFC 2326 was very unclear on the processing of relative URI 11261 and several RTSP 1.0 implementations at the point of publishing 11262 this document did not perform RFC 3986 processing to determine the 11263 resulting URI, instead simple concatenation is common. To avoid 11264 this issue completely it is recommended to use absolute URI in the 11265 SDP. 11267 The URI handling for SDPs from container files need special 11268 consideration. For example lets assume that a container file has the 11269 URI: "rtsp://example.com/container.mp4". Lets further assume this 11270 URI is the base URI, and that there is a absolute media level URI: 11271 "rtsp://example.com/container.mp4/trackID=2". A relative media level 11272 URI that resolves in accordance with RFC 3986 [RFC3986] to the above 11273 given media URI is: "container.mp4/trackID=2". It is usually not 11274 desirable to need to include in or modify the SDP stored within the 11275 container file with the server local name of the container file. To 11276 avoid this, one can modify the base URI used to include a trailing 11277 slash, e.g. "rtsp://example.com/container.mp4/". In this case the 11278 relative URI for the media will only need to be: "trackID=2". 11279 However this will also mean that using "*" in the SDP will result in 11280 control URI including the trailing slash, i.e. 11281 "rtsp://example.com/container.mp4/". 11283 Note: The usage of TrackID in the above is not an standardized 11284 form, but one example out of several similar strings such as 11285 TrackID, Track_ID, StreamID that is used by different server 11286 vendors to indicate a particular piece of media inside a container 11287 file. 11289 D.1.2. Media Streams 11291 The "m=" field is used to enumerate the streams. It is expected that 11292 all the specified streams will be rendered with appropriate 11293 synchronization. If the session is over multicast, the port number 11294 indicated SHOULD be used for reception. The client MAY try to 11295 override the destination port, through the Transport header. The 11296 servers MAY allow this, the response will indicate if allowed or not. 11297 If the session is unicast, the port numbers are the ones RECOMMENDED 11298 by the server to the client, about which receiver ports to use; the 11299 client MUST still include its receiver ports in its SETUP request. 11301 The client MAY ignore this recommendation. If the server has no 11302 preference, it SHOULD set the port number value to zero. 11304 The "m=" lines contain information about which transport protocol, 11305 profile, and possibly lower-layer is to be used for the media stream. 11306 The combination of transport, profile and lower layer, like RTP/AVP/ 11307 UDP needs to be defined for how to be used with RTSP. The currently 11308 defined combinations are defined in Appendix C, further combinations 11309 MAY be specified. 11311 Usage of grouping of media lines [RFC3388] to determine which media 11312 lines should or should not be included in a RTSP session is 11313 unspecified. 11315 Example: 11316 m=audio 0 RTP/AVP 31 11318 D.1.3. Payload Type(s) 11320 The payload type(s) are specified in the "m=" line. In case the 11321 payload type is a static payload type from RFC 3551 [RFC3551], no 11322 other information may be required. In case it is a dynamic payload 11323 type, the media attribute "rtpmap" is used to specify what the media 11324 is. The "encoding name" within the "rtpmap" attribute may be one of 11325 those specified in RFC 3551 (Sections 5 and 6), or an MIME type 11326 registered with IANA, or an experimental encoding as specified in SDP 11327 (RFC 4566 [RFC4566]). Codec-specific parameters are not specified in 11328 this field, but rather in the "fmtp" attribute described below. 11330 D.1.4. Format-Specific Parameters 11332 Format-specific parameters are conveyed using the "fmtp" media 11333 attribute. The syntax of the "fmtp" attribute is specific to the 11334 encoding(s) that the attribute refers to. Note that some of the 11335 format specific parameters may be specified outside of the fmtp 11336 parameters, like for example the "ptime" attribute for most audio 11337 encodings. 11339 D.1.5. Directionality of media stream 11341 The SDP attributes "a=sendrecv", "a=recvonly" and "a=sendonly" 11342 provides instructions on which direction the media streams flow 11343 within a session. When using RTSP the SDP can be delivered to a 11344 client using either RTSP DESCRIBE or a number of RTSP external 11345 methods, like HTTP, FTP, and email. Based on this the SDP applies to 11346 how the RTSP client will see the complete session. Thus for media 11347 streams delivered from the RTSP server to the client would be given 11348 the "a=recvonly" attribute. 11350 The direction attributes are not commonly used in SDPs for RTSP, but 11351 may occur. "a=recvonly" in a SDP provided to the RTSP client MUST 11352 indicate that media delivery will only occur in the direction from 11353 the RTSP server to the client. In SDP provided to the RTSP client 11354 that lacks any of the directionality attributes (a=recvonly, 11355 a=sendonly, a=sendrecv) MUST behave as if the "a=recvonly" attribute 11356 was received. Note that this overrules the normal default rule 11357 defined in SDP[RFC4566]. The usage of "a=sendonly" or "a=sendrecv" 11358 is not defined, nor is the interpretation of SDP by other entities 11359 than the RTSP client. 11361 D.1.6. Range of Presentation 11363 The "a=range" attribute defines the total time range of the stored 11364 session or an individual media. Non-seekable live sessions can be 11365 indicated, while the length of live sessions can be deduced from the 11366 "t" and "r" SDP parameters. 11368 The attribute is both a session and a media level attribute. For 11369 presentations that contains media streams of the same durations, the 11370 range attribute SHOULD only be used at session-level. In case of 11371 different length the range attribute MUST be given at media level for 11372 all media, and SHOULD NOT be given at session level. If the 11373 attribute is present at both media level and session level the media 11374 level values MUST be used. 11376 Note: Usually one will specify the same length for all media, even if 11377 there isn't media available for the full duration on all media. 11378 However that requires that the server accepts PLAY requests within 11379 that range. 11381 Servers MUST take care to provide RTSP Range (see Section 16.38) 11382 values that are consistent with what is presented in the SDP for the 11383 content. There is no reason for non dynamic content, like media 11384 clips provided on demand to have inconsistent values. Inconsistent 11385 values between the SDP and the actual values for the content handled 11386 by the server is likely to generate some failure, like 457 "Invalid 11387 Range", in case the client uses PLAY requests with a Range header. 11388 In case the content is dynamic in length and it is infeasible to 11389 provide a correct value in the SDP the server is recommended to 11390 describe this as non-seekable content (see below). The server MAY 11391 override that property in the response to a PLAY request using the 11392 correct values in the Range header. 11394 The unit is specified first, followed by the value range. The units 11395 and their values are as defined in Section 4.4, Section 4.5 and 11396 Section 4.6 and MAY be extended with further formats. Any open ended 11397 range (start-), i.e. without stop range, is of unspecified duration 11398 and MUST be considered as non-seekable content unless this property 11399 is overridden. Multiple instances carrying different clock formats 11400 MAY be included at either session or media level. 11402 ABNF for the attribute is defined in Section 20.3. 11404 Examples: 11405 a=range:npt=0-34.4368 11406 a=range:clock=19971113T211503Z-19971113T220300Z 11407 Non seekable stream of unknown duration: 11408 a=range:npt=0- 11410 D.1.7. Time of Availability 11412 The "t=" field MUST contain suitable values for the start and stop 11413 times for both aggregate and non-aggregate stream control. The 11414 server SHOULD indicate a stop time value for which it guarantees the 11415 description to be valid, and a start time that is equal to or before 11416 the time at which the DESCRIBE request was received. It MAY also 11417 indicate start and stop times of 0, meaning that the session is 11418 always available. 11420 For sessions that are of live type, i.e. specific start time, unknown 11421 stop time, likely unseekable, the "t=" and "r=" field SHOULD be used 11422 to indicate the start time of the event. The stop time SHOULD be 11423 given so that the live event will have ended at that time, while 11424 still not be unnecessary long into the future. 11426 D.1.8. Connection Information 11428 In SDP, the "c=" field contains the destination address for the media 11429 stream. For on-demand unicast streams and some multicast streams, 11430 the destination address MAY be specified by the client via the SETUP 11431 request, thus overriding any specified address. To identify streams 11432 without a fixed destination address, where the client is required to 11433 specify a destination address, the "c=" field SHOULD be set to a null 11434 value. For addresses of type "IP4", this value MUST be "0.0.0.0", 11435 and for type "IP6", this value MUST be "0:0:0:0:0:0:0:0" (can also be 11436 written as "::"), i.e. the unspecified address according to RFC 4291 11437 [RFC4291]. 11439 D.1.9. Message Body Tag 11441 The optional "a=mtag" attribute identifies a version of the session 11442 description. It is opaque to the client. SETUP requests may include 11443 this identifier in the If-Match field (see Section 16.23) to only 11444 allow session establishment if this attribute value still corresponds 11445 to that of the current description. The attribute value is opaque 11446 and may contain any character allowed within SDP attribute values. 11448 ABNF for the attribute is defined in Section 20.3. 11450 Example: 11451 a=mtag:"158bb3e7c7fd62ce67f12b533f06b83a" 11453 One could argue that the "o=" field provides identical 11454 functionality. However, it does so in a manner that would put 11455 constraints on servers that need to support multiple session 11456 description types other than SDP for the same piece of media 11457 content. 11459 D.2. Aggregate Control Not Available 11461 If a presentation does not support aggregate control no session level 11462 "a=control:" attribute is specified. For a SDP with multiple media 11463 sections specified, each section will have its own control URI 11464 specified via the "a=control:" attribute. 11466 Example: 11467 v=0 11468 o=- 2890844256 2890842807 IN IP4 192.0.2.56 11469 s=I came from a web page 11470 e=adm@example.com 11471 c=IN IP4 0.0.0.0 11472 t=0 0 11473 m=video 8002 RTP/AVP 31 11474 a=control:rtsp://audio.com/movie.aud 11475 m=audio 8004 RTP/AVP 3 11476 a=control:rtsp://video.com/movie.vid 11478 Note that the position of the control URI in the description implies 11479 that the client establishes separate RTSP control sessions to the 11480 servers audio.com and video.com. 11482 It is recommended that an SDP file contains the complete media 11483 initialization information even if it is delivered to the media 11484 client through non-RTSP means. This is necessary as there is no 11485 mechanism to indicate that the client should request more detailed 11486 media stream information via DESCRIBE. 11488 D.3. Aggregate Control Available 11490 In this scenario, the server has multiple streams that can be 11491 controlled as a whole. In this case, there are both a media-level 11492 "a=control:" attributes, which are used to specify the stream URIs, 11493 and a session-level "a=control:" attribute which is used as the 11494 Request-URI for aggregate control. If the media-level URI is 11495 relative, it is resolved to absolute URIs according to Appendix D.1.1 11496 above. 11498 Example: 11499 C->M: DESCRIBE rtsp://example.com/movie RTSP/2.0 11500 CSeq: 1 11501 User-Agent: PhonyClient/1.2 11503 M->C: RTSP/2.0 200 OK 11504 CSeq: 1 11505 Date: Thu, 23 Jan 1997 15:35:06 GMT 11506 Content-Type: application/sdp 11507 Content-Base: rtsp://example.com/movie/ 11508 Content-Length: 227 11510 v=0 11511 o=- 2890844256 2890842807 IN IP4 192.0.2.211 11512 s=I contain 11513 i= 11514 e=adm@example.com 11515 c=IN IP4 0.0.0.0 11516 a=control:* 11517 t=0 0 11518 m=video 8002 RTP/AVP 31 11519 a=control:trackID=1 11520 m=audio 8004 RTP/AVP 3 11521 a=control:trackID=2 11523 In this example, the client is required to establish a single RTSP 11524 session to the server, and uses the URIs 11525 rtsp://example.com/movie/trackID=1 and 11526 rtsp://example.com/movie/trackID=2 to set up the video and audio 11527 streams, respectively. The URI rtsp://example.com/movie/, which is 11528 resolved from the "*", controls the whole presentation (movie). 11530 A client is not required to issues SETUP requests for all streams 11531 within an aggregate object. Servers should allow the client to ask 11532 for only a subset of the streams. 11534 D.4. RTSP external SDP delivery 11536 There are some considerations that needs to be made when the session 11537 description is delivered to client outside of RTSP, for example in 11538 HTTP or email. 11540 First of all the SDP needs to contain absolute URIs, relative will in 11541 most cases not work as the delivery will not correctly forward the 11542 base URI. And as SDP might be temporarily stored on file system 11543 before being loaded into an RTSP capable client, thus if possible to 11544 transport the base URI it still would need to be merged into the 11545 file. 11547 The writing of the SDP session availability information, i.e. "t=" 11548 and "r=", needs to be carefully considered. When the SDP is fetched 11549 by the DESCRIBE method, the probability that it is valid is very 11550 high. However the same are much less certain for SDPs distributed 11551 using other methods. Therefore the publisher of the SDP should take 11552 care to follow the recommendations about availability in the SDP 11553 specification [RFC4566]. 11555 Appendix E. RTSP Use Cases 11557 This Appendix describes the most important and considered use cases 11558 for RTSP. They are listed in descending order of importance in 11559 regards to ensuring that all necessary functionality is present. 11560 This specification only fully supports usage of the two first. Also 11561 in these first two cases, there are special cases or exceptions that 11562 are not supported without extensions, e.g. the redirection of media 11563 to another address than the controlling entity. 11565 E.1. On-demand Playback of Stored Content 11567 An RTSP capable server stores content suitable for being streamed to 11568 a client. A client desiring playback of any of the stored content 11569 uses RTSP to set up the media transport required to deliver the 11570 desired content. RTSP is then used to initiate, halt and manipulate 11571 the actual transmission (playout) of the content. RTSP is also 11572 required to provide necessary description and synchronization 11573 information for the content. 11575 The above high level description can be broken down into a number of 11576 functions that RTSP needs to be capable of. 11578 Presentation Description: Provide initialization information about 11579 the presentation (content); for example, which media codecs are 11580 needed for the content. Other information that is important 11581 includes the number of media stream the presentation contains, 11582 the transport protocols used for the media streams, and 11583 identifiers for these media streams. This information is 11584 required before setup of the content is possible and to 11585 determine if the client is even capable of using the content. 11587 This information need not be sent using RTSP; other external 11588 protocols can be used to transmit the transport presentation 11589 descriptions. Two good examples are the use of HTTP [RFC2616] 11590 or email to fetch or receive presentation descriptions like SDP 11591 [RFC4566] 11593 Setup: Set up some or all of the media streams in a presentation. 11594 The setup itself consist of selecting the protocol for media 11595 transport and the necessary parameters for the protocol, like 11596 addresses and ports. 11598 Control of Transmission: After the necessary media streams have been 11599 established the client can request the server to start 11600 transmitting the content. The client must be allowed to start 11601 or stop the transmission of the content at arbitrary times. 11602 The client must also be able to start the transmission at any 11603 point in the timeline of the presentation. 11605 Synchronization: For media transport protocols like RTP [RFC3550] it 11606 might be beneficial to carry synchronization information within 11607 RTSP. This may be due to either the lack of inter-media 11608 synchronization within the protocol itself, or the potential 11609 delay before the synchronization is established (which is the 11610 case for RTP when using RTCP). 11612 Termination: Terminate the established contexts. 11614 For this use case there are a number of assumptions about how it 11615 works. These are: 11617 On-Demand content: The content is stored at the server and can be 11618 accessed at any time during a time period when it is intended 11619 to be available. 11621 Independent sessions: A server is capable of serving a number of 11622 clients simultaneously, including from the same piece of 11623 content at different points in that presentations time-line. 11625 Unicast Transport: Content for each individual client is transmitted 11626 to them using unicast traffic. 11628 It is also possible to redirect the media traffic to a different 11629 destination than that of the entity controlling the traffic. 11630 However, allowing this without appropriate mechanisms for checking 11631 that the destination approves of this allows for distributed denial 11632 of service attacks (DDoS). 11634 E.2. Unicast Distribution of Live Content 11636 This use case is similar to the above on-demand content case (see 11637 Appendix E.1) the difference is the nature of the content itself. 11638 Live content is continuously distributed as it becomes available from 11639 a source; i.e., the main difference from on-demand is that one starts 11640 distributing content before the end of it has become available to the 11641 server. 11643 In many cases the consumer of live content is only interested in 11644 consuming what is actually happens "now"; i.e., very similar to 11645 broadcast TV. However in this case it is assumed that there exist no 11646 broadcast or multicast channel to the users, and instead the server 11647 functions as a distribution node, sending the same content to 11648 multiple receivers, using unicast traffic between server and client. 11649 This unicast traffic and the transport parameters are individually 11650 negotiated for each receiving client. 11652 Another aspect of live content is that it often has a very limited 11653 time of availability, as it is only is available for the duration of 11654 the event the content covers. An example of such a live content 11655 could be a music concert which lasts 2 hour and starts at a 11656 predetermined time. Thus there is need to announce when and for how 11657 long the live content is available. 11659 In some cases, the server providing live content may be saving some 11660 or all of the content to allow clients to pause the stream and resume 11661 it from the paused point, or to "rewind" and play continuously from a 11662 point earlier than the live point. Hence, this use case does not 11663 necessarily exclude playing from other than the live point of the 11664 stream, playing with scales other than 1.0, etc. 11666 E.3. On-demand Playback using Multicast 11668 It is possible to use RTSP to request that media be delivered to a 11669 multicast group. The entity setting up the session (the controller) 11670 will then control when and what media is delivered to the group. 11671 This use case has some potential for denial of service attacks by 11672 flooding a multicast group. Therefore, a mechanism is needed to 11673 indicate that the group actually accepts the traffic from the RTSP 11674 server. 11676 An open issue in this use case is how one ensures that all receivers 11677 listening to the multicast or broadcast receives the session 11678 presentation configuring the receivers. This memo has to rely on a 11679 external solution to solve this issue. 11681 E.4. Inviting an RTSP server into a conference 11683 If one has an established conference or group session, it is possible 11684 to have an RTSP server distribute media to the whole group. 11685 Transmission to the group is simplest when controlled by a single 11686 participant or leader of the conference. Shared control might be 11687 possible, but would require further investigation and possibly 11688 extensions. 11690 This use case assumes that there exists either multicast or a 11691 conference focus that redistribute media to all participants. 11693 This use case is intended to be able to handle the following 11694 scenario: A conference leader or participant (hereafter called the 11695 controller) has some pre-stored content on an RTSP server that he 11696 wants to share with the group. The controller sets up an RTSP 11697 session at the streaming server for this content and retrieves the 11698 session description for the content. The destination for the media 11699 content is set to the shared multicast group or conference focus. 11701 When desired by the controller, he/she can start and stop the 11702 transmission of the media to the conference group. 11704 There are several issues with this use case that are not solved by 11705 this core specification for RTSP: 11707 Denial of service: To avoid an RTSP server from being an unknowing 11708 participant in a denial of service attack the server needs to 11709 be able to verify the destination's acceptance of the media. 11710 Such a mechanism to verify the approval of received media does 11711 not yet exist; instead, only policies can be used, which can be 11712 made to work in controlled environments. 11714 Distributing the presentation description to all participants in the 11715 group: To enable a media receiver to correctly decode the content 11716 the media configuration information needs to be distributed 11717 reliably to all participants. This will most likely require 11718 support from an external protocol. 11720 Passing control of the session: If it is desired to pass control of 11721 the RTSP session between the participants, some support will be 11722 required by an external protocol to exchange state information 11723 and possibly floor control of who is controlling the RTSP 11724 session. 11726 If there interest in this use case, further work is required on the 11727 necessary extensions. 11729 E.5. Live Content using Multicast 11731 This use case in its simplest form does not require any use of RTSP 11732 at all; this is what multicast conferences being announced with SAP 11733 [RFC2974] and SDP are intended to handle. However in use cases where 11734 more advanced features like access control to the multicast session 11735 are desired, RTSP could be used for session establishment. 11737 A client desiring to join a live multicasted media session with 11738 cryptographic (encryption) access control could use RTSP in the 11739 following way. The source of the session announces the session and 11740 gives all interested an RTSP URI. The client connects to the server 11741 and requests the presentation description, allowing configuration for 11742 reception of the media. In this step it is possible for the client 11743 to use secured transport and any desired level of authentication; for 11744 example, for billing or access control. An RTSP link also allows for 11745 load balancing between multiple servers. 11747 If these were the only goals, they could be achieved by simply using 11748 HTTP. However, for cases where the sender likes to keep track of 11749 each individual receiver of a session, and possibly use the session 11750 as a side channel for distributing key-updates or other information 11751 on a per-receiver basis, and the full set of receivers is not know 11752 prior to the session start, the state establishment that RTSP 11753 provides can be beneficial. In this case a client would establish an 11754 RTSP session for this multicast group with the RTSP server. The RTSP 11755 server will not transmit any media, but instead will point to the 11756 multicast group. The client and server will be able to keep the 11757 session alive for as long as the receiver participates in the session 11758 thus enabling, for example, the server to push updates to the client. 11760 This use case will most likely not be able to be implemented without 11761 some extensions to the server-to-client push mechanism. Here the 11762 PLAY_NOTIFY method (see Section 13.5) with a suitable extension could 11763 provide clear benefits. 11765 Appendix F. Text format for Parameters 11767 A resource of type "text/parameters" consists of either 1) a list of 11768 parameters (for a query) or 2) a list of parameters and associated 11769 values (for an response or setting of the parameter). Each entry of 11770 the list is a single line of text. Parameters are separated from 11771 values by a colon. The parameter name MUST only use US-ASCII visible 11772 characters while the values are UTF-8 text strings. The media type 11773 registration template is in Section 22.16. 11775 There exist a potential interoperability issue for this format. It 11776 was named in RFC 2326 but never defined, even if used in examples 11777 that hint at the syntax. This format matches the purpose and its 11778 syntax supports the examples provided. However, it goes further by 11779 allowing UTF-8 in the value part, thus usage of UTF-8 strings may not 11780 be supported. However, as individual parameters are not defined, the 11781 using application anyway needs to have out-of-band agreement or using 11782 feature-tag to determine if the end-point supports the parameters. 11784 The ABNF [RFC5234] grammar for "text/parameters" content is: 11786 file = *((parameter / parameter-value) CRLF) 11787 parameter = 1*visible-except-colon 11788 parameter-value = parameter *WSP ":" value 11789 visible-except-colon = %x21-39 / %x3B-7E ; VCHAR - ":" 11790 value = *(TEXT-UTF8char / WSP) 11791 TEXT-UTF8char = %x21-7E / UTF8-NONASCII 11792 UTF8-NONASCII = %xC0-DF 1UTF8-CONT 11793 / %xE0-EF 2UTF8-CONT 11794 / %xF0-F7 3UTF8-CONT 11795 / %xF8-FB 4UTF8-CONT 11796 / %xFC-FD 5UTF8-CONT 11797 UTF8-CONT = %x80-BF 11798 WSP = ; Space or HTAB 11799 VCHAR = 11800 CRLF = 11802 Appendix G. Requirements for Unreliable Transport of RTSP 11804 This section provides anyone intending to define how to transport of 11805 RTSP messages over a unreliable transport protocol with some 11806 information learned by the attempt in RFC 2326 [RFC2326]. RFC 2326 11807 define both an URI scheme and some basic functionality for transport 11808 of RTSP messages over UDP, however it was not sufficient for reliable 11809 usage and successful interoperability. 11811 The RTSP scheme defined for unreliable transport of RTSP messages was 11812 "rtspu". It has been reserved by this specification as at least one 11813 commercial implementation exist, thus avoiding any collisions in the 11814 name space. 11816 The following considerations should exist for operation of RTSP over 11817 an unreliable transport protocol: 11819 o Request shall be acknowledged by the receiver. If there is no 11820 acknowledgement, the sender may resend the same message after a 11821 timeout of one round-trip time (RTT). Any retransmissions due to 11822 lack of acknowledgement must carry the same sequence number as the 11823 original request. 11825 o The round-trip time can be estimated as in TCP (RFC 1123) 11826 [RFC1123], with an initial round-trip value of 500 ms. An 11827 implementation may cache the last RTT measurement as the initial 11828 value for future connections. 11830 o If RTSP is used over a small-RTT LAN, standard procedures for 11831 optimizing initial TCP round trip estimates, such as those used in 11832 T/TCP (RFC 1644) [RFC1644], can be beneficial. 11834 o The Timestamp header (Section 16.51) is used to avoid the 11835 retransmission ambiguity problem [Stevens98]. 11837 o The registered default port for RTSP over UDP for the server is 11838 554. 11840 o RTSP messages can be carried over any lower-layer transport 11841 protocol that is 8-bit clean. 11843 o RTSP messages are vulnerable to bit errors and should not be 11844 subjected to them. 11846 o Source authentication, or at least validation that RTSP messages 11847 comes from the same entity becomes extremely important, as session 11848 hijacking may be substantially easier for RTSP message transport 11849 using an unreliable protocol like UDP than for TCP. 11851 There exist two RTSP headers thats primarily are intended for being 11852 used by the unreliable handling of RTSP messages and which will be 11853 maintained: 11855 o [CSeq] See Section 16.19 11857 o [Timestamp] See Section 16.51 11859 Appendix H. Backwards Compatibility Considerations 11861 This section contains notes on issues about backwards compatibility 11862 with clients or servers being implemented according to RFC 2326 11863 [RFC2326]. Note that there exist no requirement to implement RTSP 11864 1.0, in fact we recommend against it as it is difficult to do in an 11865 interoperable way. 11867 A server implementing RTSP/2.0 MUST include a RTSP-Version of 11868 RTSP/2.0 in all responses to requests containing RTSP-Version 11869 RTSP/2.0. If a server receives a RTSP/1.0 request, it MAY respond 11870 with a RTSP/1.0 response if it chooses to support RFC 2326. If the 11871 server chooses not to support RFC 2326, it MUST respond with a 505 11872 (RTSP Version not supported) status code. A server MUST NOT respond 11873 to a RTSP-Version RTSP/1.0 request with a RTSP-Version RTSP/2.0 11874 response. 11876 Clients implementing RTSP/2.0 MAY use an OPTIONS request with a RTSP- 11877 Version of 2.0 to determine whether a server supports RTSP/2.0. If 11878 the server responds with either a RTSP-Version of 1.0 or a status 11879 code of 505 (RTSP Version not supported), the client will have to use 11880 RTSP/1.0 requests if it chooses to support RFC 2326. 11882 H.1. Play Request in Play mode 11884 The behavior in the server when a Play is received in Play mode has 11885 changed (Section 13.4). In RFC 2326, the new PLAY request would be 11886 queued until the current Play completed. Any new PLAY request now 11887 take effect immediately replacing the previous request. 11889 H.2. Using Persistent Connections 11891 Some server implementations of RFC 2326 maintain a one-to-one 11892 relationship between a connection and an RTSP session. Such 11893 implementations require clients to use a persistent connection to 11894 communicate with the server and when a client closes its connection, 11895 the server may remove the RTSP session. This is worth noting if a 11896 RTSP 2.0 client also supporting 1.0 connects to a 1.0 server. 11898 Appendix I. Open Issues 11900 Open issues are filed and tracked in the bug and feature trackers at 11901 http://rtspspec.sourceforge.net. Open issues are discussed on MMUSIC 11902 list. 11904 Appendix J. Changes 11906 Compared to RTSP 1.0 (RFC 2326), the below changes has been made when 11907 defining RTSP 2.0. Note that this list does not reflect minor 11908 changes in wording or correction of typographical errors. 11910 o The section on minimal implementation was deleted without 11911 substitution. 11913 o The Transport header has been changed in the following way: 11915 * The ABNF has been changed to define that extensions are 11916 possible, and that unknown extension parameters are to be 11917 ignored. 11919 * To prevent backwards compatibility issues, any extension or new 11920 parameter requires the usage of a feature-tag combined with the 11921 Require header. 11923 * Syntax unclarities with the Mode parameter has been resolved. 11925 * Syntax error with ";" for multicast and unicast has been 11926 resolved. 11928 * Two new addressing parameters has been defined, src_addr and 11929 dest_addr. These replaces the parameters "port", 11930 "client_port", "server_port", "destination", "source". 11932 * Support for IPv6 explicit addresses in all address fields has 11933 been included. 11935 * To handle URI definitions that contain ";" or "," a quoted URI 11936 format has been introduced and is required. 11938 * Defined IANA registries for the transport headers parameters, 11939 transport-protocol, profile, lower-transport, and mode. 11941 * The transport headers interleaved parameter's text was made 11942 more strict and use formal requirements levels. It was also 11943 clarified that the interleaved channels are symmetric and that 11944 it is the server that sets the channel numbers. 11946 * It has been clarified that the client can't request of the 11947 server to use a certain RTP SSRC, using a request with the 11948 transport parameter SSRC. 11950 * Syntax definition for SSRC has been clarified to require 8HEX. 11951 It has also been extend to allow multiple values for clients 11952 supporting this version. 11954 * Clarified the text on the transport headers "dest_addr" 11955 parameters regarding what security precautions the server is 11956 required to perform. 11958 o The Range formats has been changed in the following way: 11960 * The NPT format has been given a initial NPT identifier that 11961 must now be used. 11963 * All formats now support initial open ended formats of type 11964 "npt=-10". 11966 o RTSP message handling has been changed in the following way: 11968 * RTSP messages now uses URIs rather then URLs. 11970 * It has been clarified that a 4xx message due to missing CSeq 11971 header shall be returned without a CSeq header. 11973 * The 300 (Multiple Choices) response code has been removed. 11975 * Rules for how to handle timing out RTSP messages has been 11976 added. 11978 * Extended Pipelining rules allowing for quick session startup. 11980 o The HTTP references has been updated to RFC 2616 and RFC 2617. 11981 This has resulted in that the Public, and the Content-Base header 11982 needed to be defined in the RTSP specification. Known effects on 11983 RTSP due to HTTP clarifications: 11985 * Content-Encoding header can include encoding of type 11986 "identity". 11988 o The state machine section has completely been rewritten. It 11989 includes now more details and are also more clear about the model 11990 used. 11992 o A IANA section has been included with contains a number of 11993 registries and their rules. This will allow us to use IANA to 11994 keep track of RTSP extensions. 11996 o Than transport of RTSP messages has seen the following changes: 11998 * The use of UDP for RTSP message transport has been deprecated 11999 due to missing interest and to broken specification. 12001 * The rules for how TCP connections is to be handled has been 12002 clarified. Now it is made clear that servers should not close 12003 the TCP connection unless they have been unused for significant 12004 time. 12006 * Strong recommendations why server and clients should use 12007 persistent connections has also been added. 12009 * There is now a requirement on the servers to handle non- 12010 persistent connections as this provides fault tolerance. 12012 * Added wording on the usage of Connection:Close for RTSP. 12014 * specified usage of TLS for RTSP messages, including a scheme to 12015 approve a proxies TLS connection to the next hop. 12017 o The following header related changes have been made: 12019 * Accept-Ranges response header is added. This header clarifies 12020 which range formats that can be used for a resource. 12022 * Fixed the missing definitions for the Cache-Control header. 12023 Also added to the syntax definition the missing delta-seconds 12024 for max-stale and min-fresh parameters. 12026 * Put requirement on CSeq header that the value is increased by 12027 one for each new RTSP request. A Recommendation to start at 1 12028 has also been added. 12030 * Added requirement that the Date header must be used for all 12031 messages with message body and the Server should always include 12032 it. 12034 * Removed possibility of using Range header with Scale header to 12035 indicate when it is to be activated, since it can't work as 12036 defined. Also added rule that lack of Scale header in response 12037 indicates lack of support for the header. Feature-tags for 12038 scaled playback has been defined. 12040 * The Speed header must now be responded to indicate support and 12041 the actual speed going to be used. A feature-tag is defined. 12042 Notes on congestion control was also added. 12044 * The Supported header was borrowed from SIP [RFC3261] to help 12045 with the feature negotiation in RTSP. 12047 * Clarified that the Timestamp header can be used to resolve 12048 retransmission ambiguities. 12050 * The Session header text has been expanded with a explanation on 12051 keep alive and which methods to use. SET_PARAMETER is now 12052 recommended to use if only keep-alive within RTSP is desired. 12054 * It has been clarified how the Range header formats is used to 12055 indicate pause points in the PAUSE response. 12057 * Clarified that RTP-Info URIs that are relative, uses the 12058 Request-URI as base URI. Also clarified that used URI must be 12059 that one that was used in the SETUP request. They are now also 12060 required to be quoted. The header also expresses the SSRC for 12061 the provided RTP timestamp and sequence number values. 12063 * Added text that requires the Range to always be present in PLAY 12064 responses. Clarified what should be sent in case of live 12065 streams. 12067 * The headers table has been updated using a structured borrowed 12068 from SIP. Those tables carries much more information and 12069 should provide a good overview of the available headers. 12071 * It has been is clarified that any message with a message body 12072 is required to have a Content-Length header. This was the case 12073 in RFC 2326 but could be misinterpreted. 12075 * To resolve functionality around MTag. The MTag and If-None- 12076 Match header has been added from HTTP with necessary 12077 clarification in regards to RTSP operation. 12079 * Imported the Public header from HTTP RFC 2068 [RFC2068] since 12080 it has been removed from HTTP due to lack of use. Public is 12081 used quite frequently in RTSP. 12083 * Clarified rules for populating the Public header so that it is 12084 an intersection of the capabilities of all the RTSP agents in a 12085 chain. 12087 * Added the Media-Range header for listing the current 12088 availability of the media range. 12090 * Added the Notify-Reason header for giving the reason when 12091 sending PLAY_NOTIFY requests. 12093 o The Protocol Syntax has been changed in the following way: 12095 * All ABNF definitions are updated according to the rules defined 12096 in RFC 5234 [RFC5234] and has been gathered in a separate 12097 Section 20. 12099 * The ABNF for the User-Agent and Server headers has been 12100 corrected so now only the description is in the HTTP 12101 specification. 12103 * Some definitions in the introduction regarding the RTSP session 12104 has been changed. 12106 * The protocol has been made fully IPv6 capable. Certain of the 12107 functionality, like using explicit IPv6 addresses in fields 12108 requires that the protocol support this updated specification. 12110 * Added a fragment part to the RTSP URI. This seem to be 12111 indicated by the note below the definition however it was not 12112 part of the ABNF. 12114 * The CHAR rule has been changed to exclude NULL. 12116 o The Status codes has been changed in the following way: 12118 * The use of status code 303 "See Other" has been deprecated as 12119 it does not make sense to use in RTSP. 12121 * When sending response 451 and 458 the response body should 12122 contain the offending parameters. 12124 * Clarification on when a 3rr redirect status code can be 12125 received has been added. This includes receiving 3rr as a 12126 result of request within a established session. This provides 12127 clarification to a previous unspecified behavior. 12129 * Removed the 201 (Created) and 250 (Low On Storage Space) status 12130 codes as they are only relevant to recording, which is 12131 deprecated. 12133 o The following functionality has been deprecated from the protocol: 12135 * The use of Queued Play. 12137 * The use of PLAY method for keep-alive in play state. 12139 * The RECORD and ANNOUNCE methods and all related functionality. 12140 Some of the syntax has been removed. 12142 * The possibility to use timed execution of methods with the time 12143 parameter in the Range header. 12145 * The description on how rtspu works is not part of the core 12146 specification and will require external description. Only that 12147 it exist is defined here and some requirements for the 12148 transport is provided. 12150 o The following changes has been made in relation to methods: 12152 * The OPTIONS method has been clarified with regards to the use 12153 of the Public and Allow headers. 12155 * The RECORD and ANNOUNCE methods are removed as they are lacking 12156 implementation and not considered necessary in the core 12157 specification. Any work on these methods should be done as a 12158 extension document to RTSP. 12160 * Added text clarifying the usage of SET_PARAMETER for keep-alive 12161 and usage without any body. 12163 * PLAY method is now allowed to be pipelined with the pipelining 12164 of one or more SETUP requests following the initial that 12165 generates the session for aggregated control. 12167 * REDIRECT has been expanded and diversified for different 12168 situations. 12170 o Wrote a new section about how to setup different media transport 12171 alternatives and their profiles, and lower layer protocols. This 12172 resulted that the appendix on RTP interaction was moved there 12173 instead in the part describing RTP. The section also includes 12174 guidelines what to think of when writing usage guidelines for new 12175 protocols and profiles. 12177 o Setup and usage of independent TCP connections for transport of 12178 RTP has been specified. 12180 o Added a new section describing the available mechanisms to 12181 determine if functionality is supported, called "Capability 12182 Handling". Renamed option-tags to feature-tags. 12184 o Added a contributors section with people who have contributed 12185 actual text to the specification. 12187 o Added a section Use Cases that describes the major use cases for 12188 RTSP. 12190 o Clarified the usage of a=range and how to indicate live content 12191 that are not seekable with this header. 12193 o Text specifying the special behavior of PLAY for live content. 12195 o Added a new method PLAY_NOTIFY. This method is used by the RTSP 12196 server to asynchronously notify clients about session changes. 12198 Appendix K. Acknowledgements 12200 This memorandum defines RTSP version 2.0 which is a revision of the 12201 Proposed Standard RTSP version 1.0 which is defined in [RFC2326]. 12202 The authors of this RFC are Henning Schulzrinne, Anup Rao, and Robert 12203 Lanphier. 12205 Both RTSP version 1.0 and RTSP version 2.0 borrow format and 12206 descriptions from HTTP/1.1. 12208 This document has benefited greatly from the comments of all those 12209 participating in the MMUSIC-WG. In addition to those already 12210 mentioned, the following individuals have contributed to this 12211 specification: 12213 Rahul Agarwal, Jeff Ayars, Milko Boic, Torsten Braun, Brent Browning, 12214 Bruce Butterfield, Steve Casner, Francisco Cortes, Kelly Djahandari, 12215 Martin Dunsmuir, Eric Fleischman, Jay Geagan, Andy Grignon, V. 12216 Guruprasad, Peter Haight, Mark Handley, Brad Hefta-Gaub, Volker Hilt, 12217 John K. Ho, Go Hori, Philipp Hoschka, Anne Jones, Anders Klemets, 12218 Ruth Lang, Stephanie Leif, Jonathan Lennox, Eduardo F. Llach, Thomas 12219 Marshall, Rob McCool, David Oran, Joerg Ott, Maria Papadopouli, Sujal 12220 Patel, Ema Patki, Alagu Periyannan, Colin Perkins, Igor Plotnikov, 12221 Jonathan Sergent, Pinaki Shah, David Singer, Lior Sion, Jeff Smith, 12222 Alexander Sokolsky, Dale Stammen, John Francis Stracke, Maureen 12223 Chesire, David Walker, Geetha Srikantan, Stephan Wenger, Pekka Pessi, 12224 Jae-Hwan Kim, Holger Schmidt, Stephen Farrell, Xavier Marjou, Joe 12225 Pallas, Martti Mela, and Patrick Hoffman. 12227 K.1. Contributors 12229 The following people have made written contributions that were 12230 included in the specification: 12232 o Tom Marshall contributed text on the usage of 3rr status codes. 12234 o Thomas Zheng contributed text on the usage of the Range in PLAY 12235 responses and proposed an earlier version of the PLAY_NOTIFY 12236 method. 12238 o Sean Sheedy contributed text on the timeout behavior of RTSP 12239 messages and connections, the 463 status code, and proposed an 12240 earlier version of the PLAY_NOTIFY method. 12242 o Greg Sherwood proposed an earlier version of the PLAY_NOTIFY 12243 method. 12245 o Fredrik Lindholm contributed text about the RTSP security 12246 framework. 12248 o John Lazzaro contributed the text for RTP over Independent TCP. 12250 o Aravind Narasimhan contributed by rewriting Media Transport 12251 Alternatives (Appendix C) and editorial improvements on a number 12252 of places in the specification. 12254 Appendix L. RFC Editor Consideration 12256 Please replace RFC XXXX with the RFC number this specification 12257 receives. 12259 Authors' Addresses 12261 Henning Schulzrinne 12262 Columbia University 12263 1214 Amsterdam Avenue 12264 New York, NY 10027 12265 USA 12267 Email: schulzrinne@cs.columbia.edu 12269 Anup Rao 12270 Cisco 12271 USA 12273 Email: anrao@cisco.com 12275 Rob Lanphier 12276 Seattle, WA 12277 USA 12279 Email: robla@robla.net 12281 Magnus Westerlund 12282 Ericsson AB 12283 Faeroegatan 6 12284 STOCKHOLM, SE-164 80 12285 SWEDEN 12287 Email: magnus.westerlund@ericsson.com 12289 Martin Stiemerling 12290 NEC Laboratories Europe, NEC Europe Ltd. 12291 Kurfuersten-Anlage 36 12292 Heidelberg 69115 12293 Germany 12295 Phone: +49 (0) 6221 4342 113 12296 Email: stiemerling@nw.neclab.eu