idnits 2.17.1 draft-ietf-mmusic-rfc2326bis-20.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 9571 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 (March 9, 2009) is 5527 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) -- Looks like a reference, but probably isn't: '9' on line 1510 == Missing Reference: 'H10' is mentioned on line 4019, but not defined == Missing Reference: 'H15' is mentioned on line 8491, but not defined == Missing Reference: 'CSeq' is mentioned on line 11851, but not defined == Missing Reference: 'Timestamp' is mentioned on line 11853, 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 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: September 10, 2009 8 M. Westerlund 9 Ericsson AB 10 M. Stiemerling (Ed.) 11 NEC 12 March 9, 2009 14 Real Time Streaming Protocol 2.0 (RTSP) 15 draft-ietf-mmusic-rfc2326bis-20 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 September 10, 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. Playback 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 . . . . . . . . . . . . . . . . . . . . . . . . 130 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 157 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 287 20.1. Base Syntax . . . . . . . . . . . . . . . . . . . . . . 175 288 20.2. RTSP Protocol Definition . . . . . . . . . . . . . . . . 177 289 20.2.1. Generic Protocol elements . . . . . . . . . . . . . 177 290 20.2.2. Message Syntax . . . . . . . . . . . . . . . . . . . 180 291 20.2.3. Header Syntax . . . . . . . . . . . . . . . . . . . 184 292 20.3. SDP extension Syntax . . . . . . . . . . . . . . . . . . 193 293 21. Security Considerations . . . . . . . . . . . . . . . . . . . 194 294 21.1. Remote denial of Service Attack . . . . . . . . . . . . 196 295 22. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 198 296 22.1. Feature-tags . . . . . . . . . . . . . . . . . . . . . . 198 297 22.1.1. Description . . . . . . . . . . . . . . . . . . . . 198 298 22.1.2. Registering New Feature-tags with IANA . . . . . . . 199 299 22.1.3. Registered entries . . . . . . . . . . . . . . . . . 199 301 22.2. RTSP Methods . . . . . . . . . . . . . . . . . . . . . . 199 302 22.2.1. Description . . . . . . . . . . . . . . . . . . . . 199 303 22.2.2. Registering New Methods with IANA . . . . . . . . . 199 304 22.2.3. Registered Entries . . . . . . . . . . . . . . . . . 200 305 22.3. RTSP Status Codes . . . . . . . . . . . . . . . . . . . 200 306 22.3.1. Description . . . . . . . . . . . . . . . . . . . . 200 307 22.3.2. Registering New Status Codes with IANA . . . . . . . 200 308 22.3.3. Registered Entries . . . . . . . . . . . . . . . . . 200 309 22.4. RTSP Headers . . . . . . . . . . . . . . . . . . . . . . 200 310 22.4.1. Description . . . . . . . . . . . . . . . . . . . . 200 311 22.4.2. Registering New Headers with IANA . . . . . . . . . 201 312 22.4.3. Registered entries . . . . . . . . . . . . . . . . . 201 313 22.5. Accept-Credentials . . . . . . . . . . . . . . . . . . . 202 314 22.5.1. Accept-Credentials policies . . . . . . . . . . . . 202 315 22.5.2. Accept-Credentials hash algorithms . . . . . . . . . 202 316 22.6. Cache-Control Cache Directive Extensions . . . . . . . 203 317 22.7. Media Properties . . . . . . . . . . . . . . . . . . . . 203 318 22.7.1. Description . . . . . . . . . . . . . . . . . . . . 204 319 22.7.2. Registration Rules . . . . . . . . . . . . . . . . . 204 320 22.7.3. Registered Values . . . . . . . . . . . . . . . . . 204 321 22.8. Notify-Reason header . . . . . . . . . . . . . . . . . . 204 322 22.8.1. Description . . . . . . . . . . . . . . . . . . . . 204 323 22.8.2. Registration Rules . . . . . . . . . . . . . . . . . 204 324 22.8.3. Registered Values . . . . . . . . . . . . . . . . . 205 325 22.9. Range header formats . . . . . . . . . . . . . . . . . . 205 326 22.10. Terminate-Reason Header . . . . . . . . . . . . . . . . 205 327 22.10.1. Redirect Reasons . . . . . . . . . . . . . . . . . . 205 328 22.10.2. Terminate-Reason Header Parameters . . . . . . . . . 206 329 22.11. RTP-Info header parameters . . . . . . . . . . . . . . . 206 330 22.11.1. Description . . . . . . . . . . . . . . . . . . . . 206 331 22.11.2. Registration Rules . . . . . . . . . . . . . . . . . 206 332 22.11.3. Registered Values . . . . . . . . . . . . . . . . . 206 333 22.12. Seek-Style Policies . . . . . . . . . . . . . . . . . . 207 334 22.12.1. Description . . . . . . . . . . . . . . . . . . . . 207 335 22.12.2. Registration Rules . . . . . . . . . . . . . . . . . 207 336 22.12.3. Registered Values . . . . . . . . . . . . . . . . . 207 337 22.13. Transport Header Registries . . . . . . . . . . . . . . 207 338 22.13.1. Transport Protocol Specification . . . . . . . . . . 208 339 22.13.2. Transport modes . . . . . . . . . . . . . . . . . . 209 340 22.13.3. Transport Parameters . . . . . . . . . . . . . . . . 209 341 22.14. URI Schemes . . . . . . . . . . . . . . . . . . . . . . 210 342 22.14.1. The rtsp URI Scheme . . . . . . . . . . . . . . . . 210 343 22.14.2. The rtsps URI Scheme . . . . . . . . . . . . . . . . 211 344 22.14.3. The rtspu URI Scheme . . . . . . . . . . . . . . . . 212 345 22.15. SDP attributes . . . . . . . . . . . . . . . . . . . . . 212 346 22.16. Media Type Registration for text/parameters . . . . . . 213 347 23. References . . . . . . . . . . . . . . . . . . . . . . . . . 215 348 23.1. Normative References . . . . . . . . . . . . . . . . . . 215 349 23.2. Informative References . . . . . . . . . . . . . . . . . 217 350 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 219 351 A.1. Media on Demand (Unicast) . . . . . . . . . . . . . . . 219 352 A.2. Media on Demand using Pipelining . . . . . . . . . . . . 222 353 A.3. Media on Demand (Unicast) . . . . . . . . . . . . . . . 225 354 A.4. Single Stream Container Files . . . . . . . . . . . . . 229 355 A.5. Live Media Presentation Using Multicast . . . . . . . . 231 356 A.6. Capability Negotiation . . . . . . . . . . . . . . . . . 232 357 Appendix B. RTSP Protocol State Machine . . . . . . . . . . . . 234 358 B.1. States . . . . . . . . . . . . . . . . . . . . . . . . . 234 359 B.2. State variables . . . . . . . . . . . . . . . . . . . . 234 360 B.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . 234 361 B.4. State Tables . . . . . . . . . . . . . . . . . . . . . . 235 362 Appendix C. Media Transport Alternatives . . . . . . . . . . . . 240 363 C.1. RTP . . . . . . . . . . . . . . . . . . . . . . . . . . 240 364 C.1.1. AVP . . . . . . . . . . . . . . . . . . . . . . . . 240 365 C.1.2. AVP/UDP . . . . . . . . . . . . . . . . . . . . . . 240 366 C.1.3. AVPF/UDP . . . . . . . . . . . . . . . . . . . . . . 241 367 C.1.4. SAVP/UDP . . . . . . . . . . . . . . . . . . . . . . 242 368 C.1.5. SAVPF/UDP . . . . . . . . . . . . . . . . . . . . . 242 369 C.1.6. RTCP usage with RTSP . . . . . . . . . . . . . . . . 242 370 C.2. RTP over TCP . . . . . . . . . . . . . . . . . . . . . . 243 371 C.2.1. Interleaved RTP over TCP . . . . . . . . . . . . . . 244 372 C.2.2. RTP over independent TCP . . . . . . . . . . . . . . 244 373 C.3. Handling Media Clock Time Jumps in the RTP Media Layer . 248 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 . . 254 378 C.8. Continuous Audio . . . . . . . . . . . . . . . . . . . . 254 379 C.9. Multiple Sources in an RTP Session . . . . . . . . . . . 254 380 C.10. Usage of SSRCs and the RTCP BYE Message During an 381 RTSP Session . . . . . . . . . . . . . . . . . . . . . . 254 382 C.11. Future Additions . . . . . . . . . . . . . . . . . . . . 255 383 Appendix D. Use of SDP for RTSP Session Descriptions . . . . . . 256 384 D.1. Definitions . . . . . . . . . . . . . . . . . . . . . . 256 385 D.1.1. Control URI . . . . . . . . . . . . . . . . . . . . 256 386 D.1.2. Media Streams . . . . . . . . . . . . . . . . . . . 257 387 D.1.3. Payload Type(s) . . . . . . . . . . . . . . . . . . 258 388 D.1.4. Format-Specific Parameters . . . . . . . . . . . . . 258 389 D.1.5. Directionality of media stream . . . . . . . . . . . 258 390 D.1.6. Range of Presentation . . . . . . . . . . . . . . . 259 391 D.1.7. Time of Availability . . . . . . . . . . . . . . . . 260 392 D.1.8. Connection Information . . . . . . . . . . . . . . . 260 393 D.1.9. Message Body Tag . . . . . . . . . . . . . . . . . . 260 394 D.2. Aggregate Control Not Available . . . . . . . . . . . . 261 395 D.3. Aggregate Control Available . . . . . . . . . . . . . . 261 396 D.4. RTSP external SDP delivery . . . . . . . . . . . . . . . 262 398 Appendix E. RTSP Use Cases . . . . . . . . . . . . . . . . . . . 264 399 E.1. On-demand Playback of Stored Content . . . . . . . . . . 264 400 E.2. Unicast Distribution of Live Content . . . . . . . . . . 265 401 E.3. On-demand Playback using Multicast . . . . . . . . . . . 266 402 E.4. Inviting an RTSP server into a conference . . . . . . . 266 403 E.5. Live Content using Multicast . . . . . . . . . . . . . . 267 404 Appendix F. Text format for Parameters . . . . . . . . . . . . . 269 405 Appendix G. Requirements for Unreliable Transport of RTSP . . . 270 406 Appendix H. Backwards Compatibility Considerations . . . . . . . 272 407 H.1. Play Request in Play mode . . . . . . . . . . . . . . . 272 408 H.2. Using Persistent Connections . . . . . . . . . . . . . . 272 409 Appendix I. Open Issues . . . . . . . . . . . . . . . . . . . . 273 410 Appendix J. Changes . . . . . . . . . . . . . . . . . . . . . . 274 411 Appendix K. Acknowledgements . . . . . . . . . . . . . . . . . . 281 412 K.1. Contributors . . . . . . . . . . . . . . . . . . . . . . 281 413 Appendix L. RFC Editor Consideration . . . . . . . . . . . . . . 283 414 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 284 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 establish the media delivery protocol to 431 be used for 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 TV remote control. The requested 434 media can consist of multiple audio and video streams that are 435 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 didn't 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 is 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. This to enable 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 3 fundamental parts of interest, Session 497 Establishment, Playback Control and its extensibility model, that is 498 described below. It is also is based on some assumptions on existing 499 functionality that also will be touched upon to provide a complete 500 solution for client controlled real-time media delivery. 502 RTSP uses text based messages that may contain a binary message body. 503 The RTSP messages starts with a method line that identify the method, 504 the protocol and version and the resource to act on. Following the 505 method line follows a number of RTSP headers. This part is ended by 506 two consecutive control line feed (CRLF) character pairs. The 507 message body if present follows the two CRLF and the bodies length 508 are described by a message header. RTSP messages are sent over a 509 reliable transport protocol between client and server. RTSP 2.0 510 requires clients and servers to implement TCP and TLS over TCP as 511 mandatory transport for RTSP messages. 513 2.1. Content Description 515 RTSP exist to provide access to multi-media content, however it tries 516 to be agnostic to the media type or the actual media delivery 517 protocol that is used. To enable a client to implement a complete 518 system, an RTSP external mechanism for describing the content and the 519 delivery protocol(s) is used. RTSP assumes that this either 520 delivered completely out of bands or can be delivered as single data 521 object upon the clients request using the DESCRIBE method 522 (Section 13.2). 524 Parameters that commonly have to be included in the Content 525 Description are the following: 527 o Number of media streams 529 o The resource identifier for each media stream/resource that is to 530 be controlled by RTSP 532 o The protocol that each media stream is to be delivered over 534 o Transport protocol parameters that are not negotiated or varies 535 with each client 537 o Media encoding information enabling client to correctly decode it 538 upon reception 540 o An aggregate control resource identifier 542 RTSP uses its own URI schemes ("rtsp" and "rtsps") to reference media 543 resources and aggregates under common control. 545 This specification describes in Appendix D how one uses SDP [RFC4566] 546 for Content Description 548 2.2. Session Establishment 550 The RTSP client can request the establishment of an RTSP session 551 after having used the content description to determine which media 552 streams are available, and also which media delivery protocol is used 553 and their particular resource identifiers. The RTSP session is a 554 common context between the client and the server that consist of one 555 or more media resource that is to be under common playback control. 557 The client creates an RTSP session by sending an request using the 558 SETUP method (Section 13.3) to the server. In the SETUP request the 559 client also includes all the transport parameter necessary to enable 560 the media delivery protocol to function in the "Transport" header 561 (Section 16.52). This includes parameters are pre-established by the 562 content description but necessary for any middlebox to correctly 563 handle the media delivery protocol. The Transport header in a 564 request may contain multiple alternatives for media delivery to 565 enable the server to select what is preferred some an prioritized 566 list. However, RTSP builds on that the client can select a small 567 number of alternatives based on the content description. 569 The server will determine if the media resource is available upon 570 receiving a SETUP request and if any of the transport parameter 571 specifications are acceptable. If that is successful, an RTSP 572 session context is created and the relevant parameters and state is 573 stored. An identifier is created for the RTSP session and included 574 in the response in the Session header (Section 16.48). The SETUP 575 response message includes a Transport header that specifies which of 576 the alternatives that are selected and any parameters which the 577 server is required to fill in. 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. The 591 client uses client selected identifier in the Pipelined-Requests 592 header to instruct the server to bind multiple requests together as 593 if they included the session identifier. 595 The SETUP response also provides additional information about the 596 established sessions in couple of different headers. The Media- 597 Properties header include a number of properties that apply for the 598 aggregate that is valuable when doing playback control and 599 configuring user interface. The Accept-Ranges header inform the 600 client about which range formats that the server supports with these 601 media resources. The Media-Range header inform the client about the 602 time range of the media currently available. 604 2.3. Playback Control 606 Having established an RTSP session one can start controlling the 607 media playback. The basic operations are very simple starting media 608 delivery using the PLAY method (Section 13.4) or halt it by the PAUSE 609 method (Section 13.6). PLAY also allows for positioning where in the 610 media the server should deliver from if the media support such 611 operation. The positioning is done using the Range header 612 (Section 16.38) that support several different time formats, Normal 613 Play Time (Section 4.5), SMPTE Timestamps (Section 4.4) or absolute 614 time (Section 4.6). The Range header does also allow the client to 615 specify a position where playback should end, thus allowing a 616 specific interval to be played back. 618 The support for positioning/searching within a content depends on the 619 contents media properties. Content exist in a number of different 620 types, like on-demand, live, and live content being recorded. Even 621 within these categories there are differences in how the content is 622 generated and distributed that affects how it can be accessed for 623 playback. The properties applicable for the RTSP session are 624 provided by the server in the SETUP response using the Media- 625 Properties header (Section 16.28). These are expressed using one or 626 several attributes that are independent such as, Random Access that 627 express if positioning can happen at all or if only limited to 628 rewinding from start, and if possible what granularity that can be 629 expected. Another aspect possible to express if the content will 630 change during the lifetime of the session. While on-demand content 631 will provided in its completeness from the beginning, a live stream 632 being recorded while one watches it results in the content growing in 633 duration as the session goes on. There also exist content that is 634 dynamically built by another protocol than RTSP and thus also changes 635 in steps during the session but not continuously. When content is 636 recorded there are cases where not the complete content is maintained 637 only the last hour for example. All of these properties results in 638 the need for mechanisms that will be discussed below. 640 When the client access on-demand content that is possible to perform 641 random access in the client can issue the PLAY request for any point 642 in the content between the start and the end. The server will 643 deliver media from the closest random access point prior to the 644 requested point and indicate that in its PLAY response. If the 645 client issues a pause the delivery will be halted and the point at 646 which the server stopped will be reported back in the response. The 647 client can later resume by a PLAY request without a range header. 648 When the server is about to completed the PLAY request by delivering 649 the end of the content or the requested range the server will send a 650 PLAY_NOTIFY request indicating this. 652 When playing live content with no extra functions, such as recording, 653 the client will receive the media from the server after having sent a 654 PLAY request that is what happens now. Seeking in such content is 655 not working as the server does not store it, but only forwards it 656 from the source of the session. Thus delivery continues until the 657 client sends a PAUSE request, tears down the session or the content 658 ends. 660 For live sessions that are being recorded the client will need to 661 keep track of how the recording progress. Upon session establishment 662 the client will learn the current duration of the recording from the 663 Media-Range header. As the recording is ongoing the content grows in 664 direct relation to the passed time. Therefore, each server's 665 response to a PLAY request will contain the current Media-Range 666 header. The server should also send regularly every 5 minutes the 667 current media range in a PLAY_NOTIFY request. If the live 668 transmission ends the Server must send a PLAY_NOTIFY request with the 669 updated Media-Properties indicating that the content stopped being a 670 recorded live session and instead become a on-demand content. The 671 request also contains the final media range. While the live delivery 672 continues the client can request to play what is delivered just now 673 by using the NPT timescale symbol "now", or it can request a specific 674 point in the available content by an explicit range request for that 675 point. If the requested point is outside of the available interval 676 the server will adjust the position to the closest available point, 677 i.e., either at the beginning or the end. 679 A special case of recording is where the recording is not retained 680 longer than a specific time period, thus as the live delivery 681 continues the client can access any media within a moving window that 682 covers for example "now" to "now" minus 1 hour. A client that pause 683 on a specific point within the content may not retrieve the content 684 anymore, if the client waits long enough before resuming the pause 685 point, as the content may no longer be available. In this case the 686 pause point will adjusted to the end of the available media. 688 2.4. Session Parameter Manipulations 690 A session may have additional state or functionality that effects how 691 the server or client treats the session, content, how it functions, 692 or feedback on how well the session works. Such extensions are not 693 defined in this specification, but may be done in various extensions. 694 RTSP has two methods used to retrieve parameter values or to set them 695 on either the client or the server: GET_PARAMETER (Section 13.8) or 696 SET_PARAMETER (Section 13.9). These methods are carrying the 697 parameters in a message body of the appropriate format. One can also 698 use certain type of headers to query state with the GET_PARAMETER 699 method. As an example clients needing to know the current Media- 700 Range for a time-progressing session can use the GET_PARAMETER method 701 and include the media-range. Also synchronization information using 702 the combination of RTP-Info and Range can be requested. 704 RTSP 2.0 does not have a strong mechanism for providing negotiation 705 of which headers or parameters and their formats that can be used. 706 The protocol will indicate headers or parameters that it doesn't 707 support if tried. But determination a priori of what is available 708 needs to be done through out-of-band mechanism, like in the session 709 description, or through the usage of feature tags (Section 4.7). 711 2.5. Media Delivery 713 The delivery of media to the RTSP client is done with a protocol 714 outside of RTSP and this protocol is determined during the session 715 establishment. This document specifies how media is delivered with 716 RTP over UDP, TCP or the RTSP control connection. Additional 717 protocols may be specified in the future based on demand. 719 The usage of RTP as media delivery protocol does requires some 720 additional information to function well. The PLAY responses contains 721 synchronization information to enable reliable and timely deliver of 722 how a client should synchronize different sources in the different 723 RTP sessions. It also provides a mapping between RTP timestamps and 724 the content time scale. When the server is notifying the client 725 about the end of the PLAY request using the PLAY_NOTIFY, the request 726 include information about which the last RTP packets are for each 727 stream. Thus enabling correct handling of the buffer drainage at the 728 end. 730 2.5.1. Media Delivery Manipulations 732 The basic playback functionality of RTSP is to request content for a 733 particular range to be delivered to the client in a pace that enables 734 playback as intended by the creator. However, RTSP can also 735 manipulate how this delivery is done to the client in two ways. 737 Scale: The ratio of media content time delivered per unit playback 738 time. 740 Speed: The ratio of playback time delivered per unit of wallclock 741 time. 743 So both affects the media delivery per time unit. However, they are 744 manipulating two independent time scales and the effects are possible 745 to combine. 747 Scale is used for fast forward or slow motion control as it changes 748 the amount of content timescale that should be played back per time 749 unit. Scale > 1.0, means fast forward, e.g. Scale=2.0 results in 750 that 2 seconds of content is played back every second of playback. 751 Scale = 1.0 is the default value that is used if no Scale is 752 specified, i.e. playback at the contents original rate. Scale values 753 between 0 and 1.0 is providing for slow motion. Scale can be 754 negative to allow for reverse playback in either regular pace (Scale 755 = -1.0) or fast backwards (Scale < -1.0) or slow motion backwards 756 (-1.0 < Scale < 0). Scale = 0 is equal to pause and is not allowed. 758 In most cases the realization of scale means server side manipulation 759 of the media to ensure that the client can actually play it back. 760 These media manipulation and when they are needed are highly media 761 type dependent. Lets exemplify with two common media types audio and 762 video. 764 It is very difficult to modify the playback rate of audio. A maximum 765 of 10-30% is possible by changing the pitch-rate of speech. Music 766 goes out of tune if one tries to manipulate the playback rate by 767 resampling it. This is a well known problem and audio is commonly 768 muted or played back in short segments with skips to keep up with the 769 current playback point. 771 For video is possible to manipulate the number of frames that is 772 displayed per second. But the rendering capabilities are often 773 limited to certain frame rates. The decoding, handling capabilities 774 and bitrate of received encoded content also limits the number of 775 frames that can be delivered. Therefore when providing fast forward 776 one generally picks a subset of the frames from the original content 777 to be displayed. However, the video encoding methods use will 778 commonly limit the possibilities on which frames that can be chosen 779 and still be decoded by the receiver. 781 Due to the media restrictions a particular content will commonly be 782 restricted to a limited set of possible scale ratios. To handle this 783 correctly, RTSP has mechanism to indicate the supported Scale ratios 784 for the content. To support aggregated or dynamic content where this 785 may change during the ongoing session and dependent on the location 786 within the content a mechanism for updating the media properties and 787 the current used scale factor exist. 789 Speed affects how much of the playback timeline that is delivered in 790 a given wallclock period. The default is Speed = 1 which is to 791 deliver at the same rate the media is consumed. Speed > 1 means that 792 the receiver will get content faster than it regularly would consume 793 it. Speed < 1 means that delivery is slower than the regular media 794 rate. Speed values of 0 or lower has no meaning and are not allowed. 795 This mechanism enables two general functionalities. Client side 796 scale operations, i.e. the client receives all the frames and makes 797 the adjustment to the playback locally. The second usage is to 798 control delivery for buffering of media. By specifying a speed over 799 1.0 the client can build up the amount of playback time it has 800 present in its buffers to a level that is sufficient for its needs. 802 A naive implementation of Speed would only affect the transmission 803 schedule of the media and has a clear impact on the needed bandwidth. 804 This would result in the data rate being proportional to the speed 805 factor. Speed = 1.5, i.e. 50% faster than normal delivery, will then 806 result in a 50% increase in the data transport rate. If that can be 807 supported or not depends solely on the underlaying network path. 808 Scale may also have some impact on the required bandwidth due to the 809 manipulation of the content in the new playback schedule. An example 810 is fast forward where only the independently decodable intra frames 811 are included in the media stream. This usage of only intra frames 812 increase the data rate significantly compared to a normal sequence 813 with the same number of frames where most frames will be encoded 814 using prediction. 816 This potential increase of the data rate needs to be handled by the 817 media sender. The client has requested that the media is delivered 818 in a specific way, which should be honored. However, the media 819 sender can not ignore if the network path between the sender and the 820 receiver can't handle the resulting media stream. In that case the 821 media stream needs to be adapted to fit the available resources of 822 the path. This can result in that media quality has be reduced due 823 to the delivery modifications that the client has requested. 825 The need for bitrate adaptation becomes especially problematic in 826 regards to Speed. If the is target is to fill up the buffer then the 827 client may not want to do that at the cost of reduced quality. If 828 you like to do local playout changes then you may actually require 829 that the requested speed is honored. To resolve this issue the usage 830 of speed specifies a range so that both usages can be supported. The 831 server is request to use as high as possible speed value within the 832 range if the bandwidth is insufficient for the upper bound. As long 833 as the server can maintain a speed value within the range it shall 834 not change the media quality, instead modify the speed value in 835 response to available bandwidth. Only if the server becomes unable 836 to maintain the lower bound speed value does it need to modify the 837 media quality to maintain the lower bound speed value. 839 This functionality enables the local scaling implementation to use a 840 tight or even a range where lower bound equals upper bound to 841 identify that it requires the server to deliver the requested amount 842 of media time per delivery time independent of how much it needs to 843 adapt the media quality to fit within the available path bandwidth. 844 For buffer refilling it is suitable to use a range with a reasonable 845 span and with a lower bound at the nominal media rate like 1.0 - 2.5. 846 If one likes to reduce the buffer one specifies an upper bound that 847 is below 1.0 to force the server to deliver slower than nominal media 848 rate. 850 2.6. Session Maintenance and Termination 852 The session context that has been established is kept alive by having 853 the client show liveness. This is done in two main ways: 855 o Media transport protocol keep-alive. RTCP is possible to use when 856 using RTP. 858 o Any RTSP request referencing the session context. 860 Section 10.5 discusses the methods for showing liveness in more 861 depth. If the client fails to show liveness for more than the 862 established session timeout value (normally 60 seconds) the server 863 may terminate the context. Other values may be selected by the 864 server through the inclusion of the timeout parameter in the session 865 header. 867 The session context is normally terminated by the client by sending a 868 TEARDOWN request to the server referencing the aggregated control 869 URI. An individual media resource can be removed from a session 870 context by a TEARDOWN request referencing that particular media 871 resource. And if all media resources are removed from a session 872 context the session context is also terminated. 874 A client may keep the session alive indefinitely if allowed by the 875 server, however it is recommend to release the session context when 876 extended periods of time without media delivery activity has passed. 877 It can re-establish the session context if required later. One issue 878 is that what is extended periods of time is dependent on the server 879 and its usage. Because of that it is recommended that the client 880 terminate the session before 10*times the session timeout value has 881 passed. A server may terminate the session after one session timeout 882 period without any client activity beyond keep-alive. When a server 883 terminates the session context it does that by sending a TEARDOWN 884 request indicating the reason why. 886 A server can also request that the client tear down the session and 887 re-establish it at an alternative server when needed for maintenance 888 by using the REDIRECT method. The Terminate-Reason header is used to 889 indicate when and why. The Location header indicates where it should 890 connect if there are an alternative server available. When the 891 deadline expires the server simply stop providing service. So to 892 achieve a clean closure the client will need to initiate session 893 termination prior to the deadline. In case the server has no other 894 server to redirect and likes to close the session for maintenance it 895 shall use the TEARDOWN method with a Terminate-Reason header. 897 2.7. Extending RTSP 899 RTSP is quite a versatile protocol which supports extensions in many 900 different directions. Even this core specification contains several 901 blocks of functionality that are optional to implement. The use case 902 and need for the protocol deployment is what should determine what 903 gets implemented. Allowing for extension makes it possible for RTSP 904 to reach out to additional usages. However, extensions will affect 905 the interoperability of the protocol and therefore it is important 906 that it can be done in a structured way. 908 The client can learn the servers capability through the usage of the 909 OPTIONS method (Section 13.1) and the Supported header 910 (Section 16.49). It can also try and possibly fail by using new 911 methods or require that particular features are supported using the 912 Require or Proxy-Require header. 914 The RTSP protocol in itself can be extended in three ways, listed 915 here in order of the magnitude of changes supported: 917 o Existing methods can be extended with new parameters, for example, 918 headers, as long as these parameters can be safely ignored by the 919 recipient. If the client needs negative acknowledgement when a 920 method extension is not supported, a tag corresponding to the 921 extension may be added in the field of the Require or Proxy- 922 Require headers (see Section 16.35). 924 o New methods can be added. If the recipient of the message does 925 not understand the request, it must respond with error code 501 926 (Not Implemented) so that the sender can avoid using this method 927 again. A client may also use the OPTIONS method to inquire about 928 methods supported by the server. The server must list the methods 929 it supports using the Public response header. 931 o A new version of the protocol can be defined, allowing almost all 932 aspects (except the position of the protocol version number) to 933 change. A new version of the protocol must be registered through 934 an IETF standard track document. 936 The basic capability discovery mechanism can be used to both discover 937 support for a certain feature and to ensure that a feature is 938 available when performing a request. For detailed explanation of 939 this see Section 11. 941 New media delivery protocols may be added and negotiated at session 942 establishment, in addition to extension to the core protocol. 943 Certain type of protocol manipulations can be done through parameter 944 formats using SET_PARAMETER and GET_PARAMETER. 946 3. Document Conventions 948 3.1. Notational Conventions 950 Since a few of the definitions are identical to HTTP/1.1, this 951 specification only points to the section where they are defined 952 rather than copying it. For brevity, [HX.Y] is to be taken to refer 953 to Section X.Y of the current HTTP/1.1 specification ([RFC2616]). 955 All the mechanisms specified in this document are described in both 956 prose and the Augmented Backus-Naur form (ABNF) described in detail 957 in [RFC5234]. 959 Indented and smaller-type paragraphs are used to provide informative 960 background and motivation. This is intended to give readers who were 961 not involved with the formulation of the specification an 962 understanding of why things are the way they are in RTSP. 964 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 965 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 966 document are to be interpreted as described in [RFC2119]. 968 The word, "unspecified" is used to indicate functionality or features 969 that are not defined in this specification. Such functionality 970 cannot be used in a standardized manner without further definition in 971 an extension specification to RTSP. 973 3.2. Terminology 975 Aggregate control: The concept of controlling multiple streams using 976 a single timeline, generally maintained by the server. A client, 977 for example, uses aggregate control when it issues a single play 978 or pause message to simultaneously control both the audio and 979 video in a movie. A session which is under aggregate control is 980 referred to as an aggregated session. 982 Aggregate control URI: The URI used in an RTSP request to refer to 983 and control an aggregated session. It normally, but not always, 984 corresponds to the presentation URI specified in the session 985 description. See Section 13.3 for more information. 987 Client: The client requests media service from the media server. 989 Connection: A transport layer virtual circuit established between 990 two programs for the purpose of communication. 992 Container file: A file which may contain multiple media streams 993 which often constitutes a presentation when played together. The 994 concept of a container file is not embedded in the protocol. 995 However, RTSP servers may offer aggregate control on the media 996 streams within these files. 998 Continuous media: Data where there is a timing relationship between 999 source and sink; that is, the sink needs to reproduce the timing 1000 relationship that existed at the source. The most common examples 1001 of continuous media are audio and motion video. Continuous media 1002 can be real-time (interactive or conversational), where there is a 1003 "tight" timing relationship between source and sink, or streaming 1004 (playback), where the relationship is less strict. 1006 Feature-tag: A tag representing a certain set of functionality, i.e. 1007 a feature. 1009 IRI: Internationalized Resource Identifier, is the same as an URI, 1010 with the exception that it allows characters from the whole 1011 Universal Character Set (Unicode/ISO 10646), rather than the US- 1012 ASCII only. See [RFC3987] for more information. 1014 Live: Normally used to describe a presentation or session with media 1015 coming from an ongoing event. This generally results in the 1016 session having an unbound or only loosely defined duration, and 1017 sometimes no seek operations are possible. 1019 Media initialization: Datatype/codec specific initialization. This 1020 includes such things as clock rates, color tables, etc. Any 1021 transport-independent information which is required by a client 1022 for playback of a media stream occurs in the media initialization 1023 phase of stream setup. 1025 Media parameter: Parameter specific to a media type that may be 1026 changed before or during stream playback. 1028 Media server: The server providing playback services for one or more 1029 media streams. Different media streams within a presentation may 1030 originate from different media servers. A media server may reside 1031 on the same host or on a different host from which the 1032 presentation is invoked. 1034 (Media) stream: A single media instance, e.g., an audio stream or a 1035 video stream as well as a single whiteboard or shared application 1036 group. When using RTP, a stream consists of all RTP and RTCP 1037 packets created by a source within an RTP session. 1039 Message: The basic unit of RTSP communication, consisting of a 1040 structured sequence of octets matching the syntax defined in 1041 Section 20 and transmitted over a connection or a connectionless 1042 transport. 1044 Message Body: The information transferred as the payload of a 1045 request or response. An message body consists of meta-information 1046 in the form of message-header and content in the form of an 1047 message-body, as described in Section 9. 1049 Non-Aggregated Control: Control of a single media stream. 1051 Presentation: A set of one or more streams presented to the client 1052 as a complete media feed and described by a presentation 1053 description as defined below. Presentations with more than one 1054 media stream are often handled in RTSP under aggregate control. 1056 Presentation description: A presentation description contains 1057 information about one or more media streams within a presentation, 1058 such as the set of encodings, network addresses and information 1059 about the content. Other IETF protocols such as SDP ([RFC4566]) 1060 use the term "session" for a presentation. The presentation 1061 description may take several different formats, including but not 1062 limited to the session description protocol format, SDP. 1064 Response: An RTSP response. If an HTTP response is meant, that is 1065 indicated explicitly. 1067 Request: An RTSP request. If an HTTP request is meant, that is 1068 indicated explicitly. 1070 Request-URI: The URI used in a request to indicate the resource on 1071 which the request is to be performed. 1073 RTSP agent: Refers to either an RTSP client, an RTSP server, or an 1074 RTSP proxy. In this specification, there are many capabilities 1075 that are common to these three entities such as the capability to 1076 send requests or receive responses. This term will be used when 1077 describing functionality that is applicable to all three of these 1078 entities. 1080 RTSP session: A stateful abstraction upon which the main control 1081 methods of RTSP operate. An RTSP session is a server entity; it 1082 is created, maintained and destroyed by the server. It is 1083 established by an RTSP server upon the completion of a successful 1084 SETUP request (when a 200 OK response is sent) and is labelled 1085 with a session identifier at that time. The session exists until 1086 timed out by the server or explicitly removed by a TEARDOWN 1087 request. An RTSP session is a stateful entity; an RTSP server 1088 maintains an explicit session state machine (see Appendix A) where 1089 most state transitions are triggered by client requests. The 1090 existence of a session implies the existence of state about the 1091 session's media streams and their respective transport mechanisms. 1092 A given session can have one or more media streams associated with 1093 it. An RTSP server uses the session to aggregate control over 1094 multiple media streams. 1096 Transport initialization: The negotiation of transport information 1097 (e.g., port numbers, transport protocols) between the client and 1098 the server. 1100 URI: Universal Resource Identifier, see [RFC3986]. The URIs used in 1101 RTSP are generally URLs as they give a location for the resource. 1102 As URLs are a subset of URIs, they will be referred to as URIs to 1103 cover also the cases when an RTSP URI would not be an URL. 1105 URL: Universal Resource Locator, is an URI which identifies the 1106 resource through its primary access mechanism, rather than 1107 identifying the resource by name or by some other attribute(s) of 1108 that resource. 1110 4. Protocol Parameters 1112 4.1. RTSP Version 1114 This specification defines version 2.0 of RTSP. 1116 RTSP uses a "." numbering scheme to indicate versions 1117 of the protocol. The protocol versioning policy is intended to allow 1118 the sender to indicate the format of a message and its capacity for 1119 understanding further RTSP communication, rather than the features 1120 obtained via that communication. No change is made to the version 1121 number for the addition of message components which do not affect 1122 communication behavior or which only add to extensible field values. 1124 The number is incremented when the changes made to the 1125 protocol add features which do not change the general message parsing 1126 algorithm, but which may add to the message semantics and imply 1127 additional capabilities of the sender. The number is 1128 incremented when the format of a message within the protocol is 1129 changed. The version of an RTSP message is indicated by an RTSP- 1130 Version field in the first line of the message. Note that the major 1131 and minor numbers MUST be treated as separate integers and that each 1132 MAY be incremented higher than a single digit. Thus, RTSP/2.4 is a 1133 lower version than RTSP/2.13, which in turn is lower than RTSP/12.3. 1134 Leading zeros MUST be ignored by recipients and MUST NOT be sent. 1136 4.2. RTSP IRI and URI 1138 RTSP 2.0 defines and registers three URI schemes "rtsp", "rtsps" and 1139 "rtspu". The usage of the last, "rtspu", is unspecified in RTSP 2.0, 1140 and is defined here to register and reserve the URI scheme that is 1141 defined in RTSP 1.0. The "rtspu" scheme indicates undefined 1142 transport of the RTSP messages over unreliable transport (UDP). The 1143 syntax of "rtsp" and "rtsps" URIs has been changed from RTSP 1.0. 1145 This specification also defines the format of the RTSP IRI [RFC3987] 1146 that can be used as RTSP resource identifiers and locators, in web 1147 pages, user interfaces, on paper, etc. However, the RTSP request 1148 message format only allows usage of the absolute URI format. The 1149 RTSP IRI format MUST use the rules and transformation for IRIs 1150 defined in [RFC3987]. This way RTSP 2.0 URIs for request can be 1151 produced from an RTSP IRI. 1153 The RTSP IRI and URI are both syntax restricted compared to the 1154 generic syntax defined in [RFC3986] and RFC [RFC3987]: 1156 o An absolute URI requires the authority part; i.e., a host identity 1157 must be provided. 1159 o Parameters in the path element are prefixed with the reserved 1160 separator ";". 1162 The RTSP URI and IRI is case sensitive, with the exception of those 1163 parts that [RFC3986] and [RFC3987] defines as case-insensitive; for 1164 example, the scheme and host part. 1166 The fragment identifier is used as defined in sections 3.5 and 4.3 of 1167 [RFC3986], i.e. the fragment is to be stripped from the IRI by the 1168 requester and not included in the request URI. The user agent needs 1169 to interpret the value of the fragment based on the media type the 1170 request relates to; i.e., the media type indicated in Content-Type 1171 header in the response to DESCRIBE. 1173 The syntax of any URI query string is unspecified and responder 1174 (usually the server) specific. The query is, from the requester's 1175 perspective, an opaque string and needs to be handled as such. 1176 Please note that relative URI with queries are difficult to handle 1177 due to the RFC 3986 relative URI handling rules. Any change of the 1178 path element using a relative URI results in the stripping of the 1179 query. Which means the relative part needs to contain the query. 1181 The URI scheme "rtsp" requires that commands are issued via a 1182 reliable protocol (within the Internet, TCP), while the scheme 1183 "rtsps" identifies a reliable transport using secure transport (TLS 1184 [RFC5246], see (Section 19). 1186 For the scheme "rtsp", if no port number is provided in the authority 1187 part of the URI port number 554 MUST be used. For the scheme 1188 "rtsps", the TCP port 322 is registered and MUST be assumed. 1190 A presentation or a stream is identified by a textual media 1191 identifier, using the character set and escape conventions of URIs 1192 [RFC3986]. URIs may refer to a stream or an aggregate of streams; 1193 i.e., a presentation. Accordingly, requests described in 1194 (Section 13) can apply to either the whole presentation or an 1195 individual stream within the presentation. Note that some request 1196 methods can only be applied to streams, not presentations, and vice 1197 versa. 1199 For example, the RTSP URI: 1201 rtsp://media.example.com:554/twister/audiotrack 1203 may identify the audio stream within the presentation "twister", 1204 which can be controlled via RTSP requests issued over a TCP 1205 connection to port 554 of host media.example.com. 1207 Also, the RTSP URI: 1209 rtsp://media.example.com:554/twister 1211 identifies the presentation "twister", which may be composed of audio 1212 and video streams, but could also be something else like a random 1213 media redirector. 1215 This does not imply a standard way to reference streams in URIs. 1216 The presentation description defines the hierarchical 1217 relationships in the presentation and the URIs for the individual 1218 streams. A presentation description may name a stream "a.mov" and 1219 the whole presentation "b.mov". 1221 The path components of the RTSP URI are opaque to the client and do 1222 not imply any particular file system structure for the server. 1224 This decoupling also allows presentation descriptions to be used 1225 with non-RTSP media control protocols simply by replacing the 1226 scheme in the URI. 1228 4.3. Session Identifiers 1230 Session identifiers are strings of any arbitrary length but with a 1231 minimum length of 8 characters. A session identifier MUST be chosen 1232 cryptographically random (see [RFC4086]) and MUST be at least 8 1233 characters long (can contain a maximum of 48 bits of entropy) to make 1234 guessing it more difficult. It is RECOMMENDED that it contains 128 1235 bits of entropy, i.e. approximately 22 characters from a high quality 1236 generator. (see Section 21.) However, it needs to be noted that the 1237 session identifier does not provide any security against session 1238 hijacking unless it is kept confidential between client, server and 1239 trusted proxies. 1241 4.4. SMPTE Relative Timestamps 1243 A SMPTE relative timestamp expresses time relative to the start of 1244 the clip. Relative timestamps are expressed as SMPTE time codes for 1245 frame-level access accuracy. The time code has the format 1247 hours:minutes:seconds:frames.subframes, 1249 with the origin at the start of the clip. The default SMPTE format 1250 is "SMPTE 30 drop" format, with frame rate is 29.97 frames per 1251 second. Other SMPTE codes MAY be supported (such as "SMPTE 25") 1252 through the use of alternative use of "smpte-type". For SMPTE 30, 1253 the "frames" field in the time value can assume the values 0 through 1254 29. The difference between 30 and 29.97 frames per second is handled 1255 by dropping the first two frame indices (values 00 and 01) of every 1256 minute, except every tenth minute. If the frame and the subframe 1257 values are zero, they may be omitted. Subframes are measured in one- 1258 hundredth of a frame. 1260 Examples: 1262 smpte=10:12:33:20- 1263 smpte=10:07:33- 1264 smpte=10:07:00-10:07:33:05.01 1265 smpte-25=10:07:00-10:07:33:05.01 1267 4.5. Normal Play Time 1269 Normal play time (NPT) indicates the stream absolute position 1270 relative to the beginning of the presentation, not to be confused 1271 with the Network Time Protocol (NTP) [RFC1305]. The timestamp 1272 consists of a decimal fraction. The part left of the decimal may be 1273 expressed in either seconds or hours, minutes, and seconds. The part 1274 right of the decimal point measures fractions of a second. 1276 The beginning of a presentation corresponds to 0.0 seconds. Negative 1277 values are not defined. 1279 The special constant "now" is defined as the current instant of a 1280 live event. It MAY only be used for live events, and MUST NOT be 1281 used for on-demand (i.e., non-live) content. 1283 NPT is defined as in DSM-CC [ISO.13818-6.1995]: "Intuitively, NPT is 1284 the clock the viewer associates with a program. It is often 1285 digitally displayed on a VCR. NPT advances normally when in normal 1286 play mode (scale = 1), advances at a faster rate when in fast scan 1287 forward (high positive scale ratio), decrements when in scan reverse 1288 (high negative scale ratio) and is fixed in pause mode. NPT is 1289 (logically) equivalent to SMPTE time codes." 1291 Examples: 1293 npt=123.45-125 1294 npt=12:05:35.3- 1295 npt=now- 1297 The syntax conforms to ISO 8601 [ISO.8601.2000]. The npt-sec 1298 notation is optimized for automatic generation, the npt-hhmmss 1299 notation for consumption by human readers. The "now" constant 1300 allows clients to request to receive the live feed rather than the 1301 stored or time-delayed version. This is needed since neither 1302 absolute time nor zero time are appropriate for this case. 1304 4.6. Absolute Time 1306 Absolute time is expressed as ISO 8601 [ISO.8601.2000] timestamps, 1307 using UTC (GMT). Fractions of a second may be indicated. 1309 Example for November 8, 1996 at 14h37 and 20 and a quarter seconds 1310 UTC: 1312 19961108T143720.25Z 1314 4.7. Feature-tags 1316 Feature-tags are unique identifiers used to designate features in 1317 RTSP. These tags are used in Require (Section 16.42), Proxy-Require 1318 (Section 16.35), Proxy-Supported (Section 16.36), and Unsupported 1319 (Section 16.53) header fields. 1321 A feature-tag definition MUST indicate which combination of clients, 1322 servers or proxies they applies to. 1324 The creator of a new RTSP feature-tag should either prefix the 1325 feature-tag with a reverse domain name (e.g., 1326 "com.example.mynewfeature" is an apt name for a feature whose 1327 inventor can be reached at "example.com"), or register the new 1328 feature-tag with the Internet Assigned Numbers Authority (IANA) (see 1329 IANA Section 22). 1331 The usage of feature-tags is further described in Section 11 that 1332 deals with capability handling. 1334 4.8. Message Body Tags 1336 Message body tags are opaque strings that are used to compare two 1337 message bodies from the same resource, for example in caches or to 1338 optimize setup after a redirect. Message body tags can be carried in 1339 the MTag header (see Section 16.30) or in SDP (see Appendix D.1.9). 1341 A message body tag MUST be unique across all versions of all message 1342 bodies associated with a particular resource. A given message body 1343 tag value MAY be used for message body obtained by requests on 1344 different URIs. The use of the same message body tag value in 1345 conjunction with message bodies obtained by requests on different 1346 URIs does not imply the equivalence of those message bodies 1348 Message body tags are used in RTSP to make some methods conditional. 1349 The methods are made conditional through the inclusion of headers, 1350 see Section 16.23 and Section 16.25. Note that RTSP message body 1351 tags apply to the complete presentation; i.e., both the session 1352 description and the individual media streams. Thus message body tags 1353 can be used to verify at setup time after a redirect that the same 1354 session description applies to the media at the new location using 1355 the If-Match header. 1357 4.9. Media Properties 1359 When RTSP handles media it is important to consider the different 1360 properties a media instance for playback can have. This 1361 specification considers the below listed media properties in its 1362 protocol operations. They are derived from the differences between a 1363 number of supported usages. 1365 On-demand: Media that has a fixed (given) duration that doesn't 1366 change during the life time of the RTSP session and are known at 1367 the time of the creation of the session. It is expected that the 1368 content of the media will not change, even if the representation, 1369 i.e encoding, quality, etc, may change. Generally one can seek 1370 within the media i.e. randomly access any range of the media 1371 stream to playback. 1373 Dynamic On-demand: This is a variation of the on-demand case where 1374 external methods are used to manipulate the actual content of the 1375 media setup for the RTSP session. The main example is where a 1376 playlist determines the content of the session. 1378 Live: Live media represents a progressing content stream (such as 1379 broadcast TV) where the duration may or may not be known. It is 1380 not seekable, only the content presently being delivered can be 1381 accessed. 1383 Live with Recording: A Live stream that is combined with a server 1384 side capability to store and retain the content of the live 1385 session for random access playback within the part of the already 1386 recorded content. The actual behavior of the media stream is very 1387 much depending on the retention policy for the media stream. 1388 Either the server will be able to capture the complete media 1389 stream, or it will have a limitation in how much will be retained. 1390 The media range will dynamically change as the session progress. 1391 For servers with a limited amount of storage available for 1392 recording, there will be a sliding window that goes forwards while 1393 data is made available and content that is older than the 1394 limitation will be discarded. 1396 Considering the above usages one get the following media properties 1397 and their different instance values. 1399 4.9.1. Random Access 1401 Random Access, i.e. if one can request that the playback point is 1402 moved from one point in the media duration to another. The following 1403 different values are considered: 1405 Random Access: Yes the media are seekable to any out of a large 1406 number of points within the media. Due to media encoding 1407 limitations a particular point may not be reachable, but seeking 1408 to a point close by is enabled. A floating point number of 1409 seconds may be provided to express the worst case distance between 1410 random access points. 1412 Return To Start: Seeking is only possible to beginning of the 1413 content. 1415 No seeking: Seeking is not possible at all. 1417 4.9.2. Retention 1419 Media may have different retention policy in place that affect the 1420 operation on the media. The following different media retention 1421 policies are envisioned and taken into consideration where 1422 applicable. 1424 Unlimited: The media will not be removed as long as the RTSP session 1425 is in existence. 1427 Time Limited: The media will at least not be removed before given 1428 wallclock time. After that time it may or may not be available 1429 any more. 1431 Duration limited: Each individual unit of the media will be retained 1432 for the specified duration. 1434 4.9.3. Content Modifications 1436 There is also the question of how the content may change during time 1437 for a give media resource: 1439 Immutable: The content of the media will not change, even if the 1440 representation, i.e encoding, quality, etc, may change. 1442 Dynamic: Between explicit updates the media content will not change, 1443 but the content may change due to external methods or triggers, 1444 such as playlists. 1446 Time Progressing: As times progress new content will become 1447 available. If the content also is retained it will become longer 1448 and longer as everything between the start point and the point in 1449 currently being made available can be accessed. 1451 4.9.4. Supported Scale Factors 1453 The content is often limiting the possible rates of scale that can be 1454 supported when delivering the media. To enable the client to know 1455 what values or ranges of scale operations that the whole content or 1456 the current position supports a media properties attribute for this 1457 is defined. It contains a list with the values and/or ranges that 1458 are supported. The attribute is named "Scales". It may be updated 1459 at any point in the content due to content consisting of spliced 1460 pieces or content being dynamically updated by out of bands 1461 mechanisms. 1463 4.9.5. Mapping to the Attributes 1465 This section exemplifies how one would map the above listed usages to 1466 the properties and their values. 1468 On-demand: Random Access: Random Access=5s, Content Modifications: 1469 Immutable, Retention: unlimited or time limited. 1471 Dynamic On-demand: Random Access: Random Access=3s, Content 1472 Modifications: Dynamic, Retention: unlimited or time limited. 1474 Live: Random Access: No seeking, Content Modifications: Time 1475 Progressing, Retention: Duration limited=0.0s 1477 Live with Recording: Random Access: Random Access=3s, Content 1478 Modifications: Time Progressing, Retention: Duration limited=2H 1480 5. RTSP Message 1482 RTSP is a text-based protocol and uses the ISO 10646 character set in 1483 UTF-8 encoding (RFC 3629 [RFC3629]). Lines MUST be terminated by 1484 CRLF. 1486 Text-based protocols make it easier to add optional parameters in 1487 a self-describing manner. Since the number of parameters and the 1488 frequency of commands is low, processing efficiency is not a 1489 concern. Text-based protocols, if done carefully, also allow easy 1490 implementation of research prototypes in scripting languages such 1491 as TCL, Visual Basic and Perl. 1493 The ISO 10646 character set avoids tricky character set switching, 1494 but is invisible to the application as long as US-ASCII is being 1495 used. This is also the encoding used for RTCP [RFC3550]. ISO 8859-1 1496 translates directly into Unicode with a high-order octet of zero. 1497 ISO 8859-1 characters with the most-significant bit set are 1498 represented as 1100001x 10xxxxxx. (See RFC 3629 [RFC3629]) 1500 Requests contain methods, the object the method is operating upon and 1501 parameters to further describe the method. Methods are idempotent 1502 unless otherwise noted. Methods are also designed to require little 1503 or no state maintenance at the media server. 1505 5.1. Message Types 1507 RTSP messages consist of requests from client to server or server to 1508 client and responses in the reverse direction. Request Section 7 and 1509 Response Section 8 messages use the generic message format of RFC 822 1510 [9] for transferring entities (the payload of the message). Both 1511 types of message consist of a start-line, zero or more header fields 1512 (also known as "headers"), an empty line (i.e., a line with nothing 1513 preceding the CRLF) indicating the end of the header, and possibly a 1514 message-body. 1516 generic-message = start-line 1517 *(message-header CRLF) 1518 CRLF 1519 [ message-body ] 1520 start-line = Request-Line | Status-Line 1522 In the interest of robustness, servers SHOULD ignore any empty 1523 line(s) received where a Request-Line is expected. In other words, 1524 if the server is reading the protocol stream at the beginning of a 1525 message and receives a CRLF first, it should ignore the CRLF. 1527 5.2. Message Headers 1529 RTSP header fields (see Section 16) include general-header, request- 1530 header, response-header, and entity-header fields. 1532 The order in which header fields with differing field names are 1533 received is not significant. However, it is "good practice" to send 1534 general-header fields first, followed by request-header or response- 1535 header fields, and ending with the entity-header fields. 1537 Multiple message-header fields with the same field-name MAY be 1538 present in a message if and only if the entire field-value for that 1539 header field is defined as a comma-separated list [i.e., #(values)]. 1540 It MUST be possible to combine the multiple header fields into one 1541 "field-name: field-value" pair, without changing the semantics of the 1542 message, by appending each subsequent field-value to the first, each 1543 separated by a comma. The order in which header fields with the same 1544 field-name are received is therefore significant to the 1545 interpretation of the combined field value, and thus a proxy MUST NOT 1546 change the order of these field values when a message is forwarded. 1548 Unknown message headers MUST be ignored by a RTSP server or client. 1549 An RTSP Proxy MUST forward unknown message headers. Message headers 1550 defined outside of this specification that are required to be 1551 interpret by the RTSP agent will need to use feature tags 1552 (Section 4.7) and include it in the appropriate Require 1553 (Section 16.42) or Proxy-Require (Section 16.35) header. 1555 5.3. Message Body 1557 The message-body (if any) of an RTSP message is used to carry further 1558 information for a particular resource associated with the request or 1559 response. An example for a message body is the Session Description 1560 Protocol (SDP). 1562 The presence of a message-body in either a request or a response MUST 1563 be signaled by the inclusion of a Content-Length header (see 1564 Section 16.16). 1566 The presence of a message-body in a request is signaled by the 1567 inclusion of a Content-Length header field in the RTSP message. A 1568 message-body MUST NOT be included in a request or response if the 1569 specification of the particular method (see Method Definitions 1570 (Section 13)) does not allow sending an message body. A server 1571 SHOULD read and forward a message-body on any request; if the request 1572 method does not include defined semantics for a message body, then 1573 the message-body SHOULD be ignored when handling the request.. 1575 5.4. Message Length 1577 When a message body is included with a message, the length of that 1578 body is determined by one of the following (in order of precedence): 1580 1. Any response message which MUST NOT include a message body (such 1581 as the 1xx, 204, and 304 responses) is always terminated by the 1582 first empty line after the header fields, regardless of the 1583 message-header fields present in the message. (Note: An empty 1584 line is a line with nothing preceding the CRLF.) 1586 2. If a Content-Length header(Section 16.16) is present, its value 1587 in bytes represents the length of the message-body. If this 1588 header field is not present, a value of zero is assumed. 1590 Unlike an HTTP message, an RTSP message MUST contain a Content-Length 1591 header whenever it contains a message body. Note that RTSP does not 1592 support the HTTP/1.1 "chunked" transfer coding (see [H3.6.1]). 1594 Given the moderate length of presentation descriptions returned, 1595 the server should always be able to determine its length, even if 1596 it is generated dynamically, making the chunked transfer encoding 1597 unnecessary. 1599 6. General Header Fields 1601 The general headers are listed in Table 1: 1603 +--------------------+--------------------+ 1604 | Header Name | Defined in Section | 1605 +--------------------+--------------------+ 1606 | Cache-Control | Section 16.10 | 1607 | | | 1608 | Connection | Section 16.11 | 1609 | | | 1610 | CSeq | Section 16.19 | 1611 | | | 1612 | Date | Section 16.20 | 1613 | | | 1614 | Media-Properties | Section 16.28 | 1615 | | | 1616 | Media-Range | Section 16.29 | 1617 | | | 1618 | Pipelined-Requests | Section 16.32 | 1619 | | | 1620 | Proxy-Supported | Section 16.36 | 1621 | | | 1622 | Seek-Style | Section 16.45 | 1623 | | | 1624 | Supported | Section 16.49 | 1625 | | | 1626 | Timestamp | Section 16.51 | 1627 | | | 1628 | Via | Section 16.56 | 1629 +--------------------+--------------------+ 1631 Table 1: The general headers used in RTSP 1633 7. Request 1635 A request message uses the format outlined below regardless of the 1636 direction of a request, client to server or server to client: 1638 o Request line, containing the method to be applied to the resource, 1639 the identifier of the resource, and the protocol version in use; 1641 o Zero or more Header lines, that can be of the following types: 1642 general (Section 6), request (Section 7.2), or message 1643 body(Section 9.1); 1645 o One empty line (CRLF) to indicate the end of the header section; 1647 o Optionally a message-body, consisting of one or more lines. The 1648 length of the message body in bytes is indicated by the Content- 1649 Length message header. 1651 7.1. Request Line 1653 The request line provides the key information about the request: what 1654 method, on what resources and using which RTSP version. The methods 1655 that are defined by this specification are listed in Table 2. 1657 +---------------+--------------------+ 1658 | Method | Defined in Section | 1659 +---------------+--------------------+ 1660 | DESCRIBE | Section 13.2 | 1661 | | | 1662 | GET_PARAMETER | Section 13.8 | 1663 | | | 1664 | OPTIONS | Section 13.1 | 1665 | | | 1666 | PAUSE | Section 13.6 | 1667 | | | 1668 | PLAY | Section 13.4 | 1669 | | | 1670 | PLAY_NOTIFY | Section 13.5 | 1671 | | | 1672 | REDIRECT | Section 13.10 | 1673 | | | 1674 | SETUP | Section 13.3 | 1675 | | | 1676 | SET_PARAMETER | Section 13.9 | 1677 | | | 1678 | TEARDOWN | Section 13.7 | 1679 +---------------+--------------------+ 1681 Table 2: The RTSP Methods 1683 The syntax of the RTSP request line is the following: 1685 CRLF 1687 Note: This syntax cannot be freely changed in future versions of 1688 RTSP. This line needs to remain parsable by older RTSP 1689 implementations since it indicates the RTSP version of the message. 1691 In contrast to HTTP/1.1 [RFC2616], RTSP requests identify the 1692 resource through an absolute RTSP URI (scheme, host, and port) (see 1693 Section 4.2) rather than just the absolute path. 1695 HTTP/1.1 requires servers to understand the absolute URI, but 1696 clients are supposed to use the Host request header. This is 1697 purely needed for backward-compatibility with HTTP/1.0 servers, a 1698 consideration that does not apply to RTSP. 1700 An asterisk "*" can be used instead of an absolute URI in the 1701 Request-URI part to indicate that the request does not apply to a 1702 particular resource, but to the server or proxy itself, and is only 1703 allowed when the request method does not necessarily apply to a 1704 resource. 1706 For example: 1708 OPTIONS * RTSP/2.0 1710 An OPTIONS in this form will determine the capabilities of the server 1711 or the proxy that first receives the request. If the capability of 1712 the specific server needs to be determined, without regard to the 1713 capability of an intervening proxy, the server should be addressed 1714 explicitly with an absolute URI that contains the server's address. 1716 For example: 1718 OPTIONS rtsp://example.com RTSP/2.0 1720 7.2. Request Header Fields 1722 The RTSP headers in Table 3 can be included in a request, as request 1723 headers, to modify the specifics of the request. Some of these 1724 headers may also be used in the response to a request, as response 1725 headers, to modify the specifics of a response (Section 8.2). 1727 +--------------------+--------------------+ 1728 | Header | Defined in Section | 1729 +--------------------+--------------------+ 1730 | Accept | Section 16.1 | 1731 | | | 1732 | Accept-Credentials | Section 16.2 | 1733 | | | 1734 | Accept-Encoding | Section 16.3 | 1735 | | | 1736 | Accept-Language | Section 16.4 | 1737 | | | 1738 | Authorization | Section 16.7 | 1739 | | | 1740 | Bandwidth | Section 16.8 | 1741 | | | 1742 | Blocksize | Section 16.9 | 1743 | | | 1744 | From | Section 16.22 | 1745 | | | 1746 | If-Match | Section 16.23 | 1747 | | | 1748 | If-Modified-Since | Section 16.24 | 1749 | | | 1750 | If-None-Match | Section 16.25 | 1751 | | | 1752 | Notify-Reason | Section 16.31 | 1753 | | | 1754 | Proxy-Require | Section 16.35 | 1755 | | | 1756 | Range | Section 16.38 | 1757 | | | 1758 | Terminate-Reason | Section 16.50 | 1759 | | | 1760 | Referer | Section 16.39 | 1761 | | | 1762 | Request-Status | Section 16.41 | 1763 | | | 1764 | Require | Section 16.42 | 1765 | | | 1766 | Scale | Section 16.44 | 1767 | | | 1768 | Session | Section 16.48 | 1769 | | | 1770 | Speed | Section 16.46 | 1771 | | | 1772 | Supported | Section 16.49 | 1773 | | | 1774 | Transport | Section 16.52 | 1775 | | | 1776 | User-Agent | Section 16.54 | 1777 +--------------------+--------------------+ 1779 Table 3: The RTSP request headers 1781 Detailed headers definition are provided in Section 16. 1783 New request headers may be defined. If the receiver of the request 1784 is required to understand the request header, the request MUST 1785 include a corresponding feature tag in a Require or Proxy-Require 1786 header to ensure the processing of the header. 1788 8. Response 1790 After receiving and interpreting a request message, the recipient 1791 responds with an RTSP response message. The final response is 1792 exactly one message, and final responses are any using the response 1793 code classes from the list; 2xx, 3xx, 4xx and 5xx classes. Only for 1794 responses using the response code class 1xx, is it allowed to send 1795 one or more 1xx response messages prior to the final response 1796 message. 1798 The valid response codes and the methods they can be used with are 1799 listed in Table 4. 1801 8.1. Status-Line 1803 The first line of a Response message is the Status-Line, consisting 1804 of the protocol version followed by a numeric status code and the 1805 textual phrase associated with the status code, with each element 1806 separated by SP characters. No CR or LF is allowed except in the 1807 final CRLF sequence. 1809 SP SP CRLF 1811 8.1.1. Status Code and Reason Phrase 1813 The Status-Code element is a 3-digit integer result code of the 1814 attempt to understand and satisfy the request. These codes are fully 1815 defined in Section 15. The Reason-Phrase is intended to give a short 1816 textual description of the Status-Code. The Status-Code is intended 1817 for use by automata and the Reason-Phrase is intended for the human 1818 user. The client is not required to examine or display the Reason- 1819 Phrase. 1821 The first digit of the Status-Code defines the class of response. 1822 The last two digits do not have any categorization role. There are 5 1823 values for the first digit: 1825 1xx: Informational - Request received, continuing process 1827 2xx: Success - The action was successfully received, understood, and 1828 accepted 1830 3rr: Redirection - Further action needs to be taken in order to 1831 complete the request 1833 4xx: Client Error - The request contains bad syntax or cannot be 1834 fulfilled 1836 5xx: Server Error - The server failed to fulfill an apparently valid 1837 request 1839 The individual values of the numeric status codes defined for 1840 RTSP/2.0, and an example set of corresponding Reason-Phrases, are 1841 presented in Table 4. The reason phrases listed here are only 1842 recommended; they may be replaced by local equivalents without 1843 affecting the protocol. Note that RTSP adopts most HTTP/1.1 1844 [RFC2616] status codes and adds RTSP-specific status codes starting 1845 at x50 to avoid conflicts with newly defined HTTP status codes. 1847 RTSP status codes are extensible. RTSP applications are not required 1848 to understand the meaning of all registered status codes, though such 1849 understanding is obviously desirable. However, applications MUST 1850 understand the class of any status code, as indicated by the first 1851 digit, and treat any unrecognized response as being equivalent to the 1852 x00 status code of that class, with the exception that an 1853 unrecognized response MUST NOT be cached. For example, if an 1854 unrecognized status code of 431 is received by the client, it can 1855 safely assume that there was something wrong with its request and 1856 treat the response as if it had received a 400 status code. In such 1857 cases, user agents SHOULD present to the user the message body 1858 returned with the response, since that message body is likely to 1859 include human-readable information which will explain the unusual 1860 status. 1862 +------+----------------------------------------+-----------------+ 1863 | Code | Reason | Method | 1864 +------+----------------------------------------+-----------------+ 1865 | 100 | Continue | all | 1866 | | | | 1867 | | | | 1868 | 200 | OK | all | 1869 | | | | 1870 | | | | 1871 | 301 | Moved Permanently | all | 1872 | | | | 1873 | 302 | Found | all | 1874 | | | | 1875 | 304 | Not Modified | all | 1876 | | | | 1877 | 305 | Use Proxy | all | 1878 | | | | 1879 | | | | 1880 | 400 | Bad Request | all | 1881 | 401 | Unauthorized | all | 1882 | | | | 1883 | 402 | Payment Required | all | 1884 | | | | 1885 | 403 | Forbidden | all | 1886 | | | | 1887 | 404 | Not Found | all | 1888 | | | | 1889 | 405 | Method Not Allowed | all | 1890 | | | | 1891 | 406 | Not Acceptable | all | 1892 | | | | 1893 | 407 | Proxy Authentication Required | all | 1894 | | | | 1895 | 408 | Request Timeout | all | 1896 | | | | 1897 | 410 | Gone | all | 1898 | | | | 1899 | 411 | Length Required | all | 1900 | | | | 1901 | 412 | Precondition Failed | DESCRIBE, SETUP | 1902 | | | | 1903 | 413 | Request Message Body Too Large | all | 1904 | | | | 1905 | 414 | Request-URI Too Long | all | 1906 | | | | 1907 | 415 | Unsupported Media Type | all | 1908 | | | | 1909 | 451 | Parameter Not Understood | SET_PARAMETER | 1910 | | | | 1911 | 452 | reserved | n/a | 1912 | | | | 1913 | 453 | Not Enough Bandwidth | SETUP | 1914 | | | | 1915 | 454 | Session Not Found | all | 1916 | | | | 1917 | 455 | Method Not Valid In This State | all | 1918 | | | | 1919 | 456 | Header Field Not Valid | all | 1920 | | | | 1921 | 457 | Invalid Range | PLAY, PAUSE | 1922 | | | | 1923 | 458 | Parameter Is Read-Only | SET_PARAMETER | 1924 | | | | 1925 | 459 | Aggregate Operation Not Allowed | all | 1926 | | | | 1927 | 460 | Only Aggregate Operation Allowed | all | 1928 | | | | 1929 | 461 | Unsupported Transport | all | 1930 | | | | 1931 | 462 | Destination Unreachable | all | 1932 | | | | 1933 | 463 | Destination Prohibited | SETUP | 1934 | | | | 1935 | 464 | Data Transport Not Ready Yet | PLAY | 1936 | | | | 1937 | 465 | Notification Reason Unknown | PLAY_NOTIFY | 1938 | | | | 1939 | 470 | Connection Authorization Required | all | 1940 | | | | 1941 | 471 | Connection Credentials not accepted | all | 1942 | | | | 1943 | 472 | Failure to establish secure connection | all | 1944 | | | | 1945 | | | | 1946 | 500 | Internal Server Error | all | 1947 | | | | 1948 | 501 | Not Implemented | all | 1949 | | | | 1950 | 502 | Bad Gateway | all | 1951 | | | | 1952 | 503 | Service Unavailable | all | 1953 | | | | 1954 | 504 | Gateway Timeout | all | 1955 | | | | 1956 | 505 | RTSP Version Not Supported | all | 1957 | | | | 1958 | 551 | Option not support | all | 1959 +------+----------------------------------------+-----------------+ 1961 Table 4: Status codes and their usage with RTSP methods 1963 8.2. Response Headers 1965 The response-header allow the request recipient to pass additional 1966 information about the response which cannot be placed in the Status- 1967 Line. This header give information about the server and about 1968 further access to the resource identified by the Request-URI. All 1969 headers currently classified as response headers are listed in 1970 Table 5. 1972 +------------------------+--------------------+ 1973 | Header | Defined in Section | 1974 +------------------------+--------------------+ 1975 | Accept-Credentials | Section 16.2 | 1976 | | | 1977 | Accept-Ranges | Section 16.5 | 1978 | | | 1979 | Connection-Credentials | Section 16.12 | 1980 | | | 1981 | MTag | Section 16.30 | 1982 | | | 1983 | Location | Section 16.27 | 1984 | | | 1985 | Proxy-Authenticate | Section 16.33 | 1986 | | | 1987 | Public | Section 16.37 | 1988 | | | 1989 | Range | Section 16.38 | 1990 | | | 1991 | Retry-After | Section 16.40 | 1992 | | | 1993 | RTP-Info | Section 16.43 | 1994 | | | 1995 | Scale | Section 16.44 | 1996 | | | 1997 | Session | Section 16.48 | 1998 | | | 1999 | Server | Section 16.47 | 2000 | | | 2001 | Speed | Section 16.46 | 2002 | | | 2003 | Transport | Section 16.52 | 2004 | | | 2005 | Unsupported | Section 16.53 | 2006 | | | 2007 | Vary | Section 16.55 | 2008 | | | 2009 | WWW-Authenticate | Section 16.57 | 2010 +------------------------+--------------------+ 2012 Table 5: The RTSP response headers 2014 Response-headers names can be extended reliably only in combination 2015 with a change in the protocol version. However the usage of feature- 2016 tags in the request allows the responding party to learn the 2017 capability of the receiver of the response. New or experimental 2018 header MAY be given the semantics of response-header if all parties 2019 in the communication recognize them to be response-header. 2021 Unrecognized headers in responses are treated as message-headers. 2023 9. Message Body 2025 Request and Response messages MAY transfer a message body if not 2026 otherwise restricted by the request method or response status code. 2027 An message body consists of message-header fields and an message- 2028 body, although some responses will only include the message-headers. 2030 The SET_PARAMETER and GET_PARAMETER request and response, and 2031 DESCRIBE response MAY have an message body. All 4xx and 5xx 2032 responses MAY also have an message body. 2034 In this section, both sender and recipient refer to either the client 2035 or the server, depending on who sends and who receives the message 2036 body. 2038 9.1. Message Body Header Fields 2040 message-header fields define meta-information about the message-body 2041 or, if no body is present, about the resource identified by the 2042 request. The message body header fields are listed in Table 6. 2044 +------------------+--------------------+ 2045 | Header | Defined in Section | 2046 +------------------+--------------------+ 2047 | Allow | Section 16.6 | 2048 | | | 2049 | Content-Base | Section 16.13 | 2050 | | | 2051 | Content-Encoding | Section 16.14 | 2052 | | | 2053 | Content-Language | Section 16.15 | 2054 | | | 2055 | Content-Length | Section 16.16 | 2056 | | | 2057 | Content-Location | Section 16.17 | 2058 | | | 2059 | Content-Type | Section 16.18 | 2060 | | | 2061 | Expires | Section 16.21 | 2062 | | | 2063 | Last-Modified | Section 16.26 | 2064 +------------------+--------------------+ 2066 Table 6: The RTSP message body headers 2068 The extension-header mechanism allows additional message-header 2069 fields to be defined without changing the protocol, but these fields 2070 cannot be assumed to be recognizable by the recipient. Unrecognized 2071 header fields SHOULD be ignored by the recipient and forwarded by 2072 proxies. 2074 9.2. Message Body 2076 RTSP message with an message body MUST include the Content-Type and 2077 Content-Length headers if a message body is included. 2079 When an message body is included with a message, the data type of 2080 that body is determined via the header fields Content-Type and 2081 Content- Encoding. 2083 Content-Type specifies the media type of the underlying data. 2084 Content-Encoding may be used to indicate any additional content 2085 codings applied to the data, usually for the purpose of data 2086 compression, that are a property of the requested resource. There is 2087 no default encoding. 2089 The Content-Length of a message is the length of the message-body. 2091 10. Connections 2093 RTSP requests can be transmitted using the two different connection 2094 scenarios listed below: 2096 o persistent - a transport connection is used for several request/ 2097 response transactions; 2099 o transient - a transport connection is used for a single request/ 2100 response transaction. 2102 RFC 2326 attempted to specify an optional mechanism for transmitting 2103 RTSP messages in connectionless mode over a transport protocol such 2104 as UDP. However, it was not specified in sufficient detail to allow 2105 for interoperable implementations. In an attempt to reduce 2106 complexity and scope, and due to lack of interest, RTSP 2.0 does not 2107 attempt to define a mechanism for supporting RTSP over UDP or other 2108 connectionless transport protocols. A side-effect of this is that 2109 RTSP requests MUST NOT be sent to multicast groups since no 2110 connection can be established with a specific receiver in multicast 2111 environments. 2113 Certain RTSP headers, such as the CSeq header (Section 16.19), which 2114 may appear to be relevant only to connectionless transport scenarios 2115 are still retained and must be implemented according to the 2116 specification. In the case of CSeq, it is quite useful for matching 2117 responses to requests if the requests are pipelined (see Section 12). 2118 It is also useful in proxies for keeping track of the different 2119 requests when aggregating several client requests on a single TCP 2120 connection. 2122 10.1. Reliability and Acknowledgements 2124 When RTSP messages are transmitted using reliable transport 2125 protocols, they MUST NOT be retransmitted at the RTSP protocol level. 2126 Instead, the implementation must rely on the underlying transport to 2127 provide reliability. The RTSP implementation may use any indication 2128 of reception acknowledgement of the message from the underlying 2129 transport protocols to optimize the RTSP behavior. 2131 If both the underlying reliable transport such as TCP and the RTSP 2132 application retransmit requests, each packet loss or message loss 2133 may result in two retransmissions. The receiver typically cannot 2134 take advantage of the application-layer retransmission since the 2135 transport stack will not deliver the application-layer 2136 retransmission before the first attempt has reached the receiver. 2137 If the packet loss is caused by congestion, multiple 2138 retransmissions at different layers will exacerbate the 2139 congestion. 2141 Lack of acknowledgement of an RTSP request should be handled within 2142 the constraints of the connection timeout considerations described 2143 below (Section 10.4). 2145 10.2. Using Connections 2147 A TCP transport can be used for both persistent connections (for 2148 several message exchanges) and transient connections (for a single 2149 message exchange). Implementations of this specification MUST 2150 support RTSP over TCP. The scheme of the RTSP URI (Section 4.2) 2151 indicates the default port that the server will listen on. 2153 A server MUST handle both persistent and transient connections. 2155 Transient connections facilitate mechanisms for fault tolerance. 2156 They also allow for application layer mobility. A server and 2157 client pair that support transient connections can survive the 2158 loss of a TCP connection; e.g., due to a NAT timeout. When the 2159 client has discovered that the TCP connection has been lost, it 2160 can set up a new one when there is need to communicate again. 2162 A persistent connection is RECOMMENDED be used for all transactions 2163 between the server and client, including messages for multiple RTSP 2164 sessions. However a persistent connection MAY be closed after a few 2165 message exchanges. For example, a client may use a persistent 2166 connection for the initial SETUP and PLAY message exchanges in a 2167 session and then close the connection. Later, when the client wishes 2168 to send a new request, such as a PAUSE for the session, a new 2169 connection would be opened. This connection may either be transient 2170 or persistent. 2172 An RTSP agent SHOULD NOT have more than one connection to the server 2173 at any given point. If a client or proxy handles multiple RTSP 2174 sessions on the same server, it SHOULD use only one connection for 2175 managing those sessions. 2177 This saves connection resources on the server. It also reduces 2178 complexity by and enabling the server to maintain less state about 2179 its sessions and connections. 2181 RTSP allows a server to send requests to a client. However, this can 2182 be supported only if a client establishes a persistent connection 2183 with the server. In cases where a persistent connection does not 2184 exist between a server and its client, due to the lack of a 2185 signalling channel the server may be forced to silently discard RTSP 2186 messages, and may even drop an RTSP session without notifying the 2187 client. An example of such a case is when the server desires to send 2188 a REDIRECT request for an RTSP session to the client but is not able 2189 to do so because it cannot reach the client. A server that attempt 2190 to send a request to a client that has no connection currently to the 2191 server SHOULD discard the request directly, it MAY queue it for later 2192 delivery. However, if the server queue the request it should when 2193 adding additional requests to the queue ensure to remove older 2194 requests that are now redundant. 2196 Without a persistent connection between the client and the server, 2197 the media server has no reliable way of reaching the client. 2198 Because the likely failure of server to client established 2199 connections the server will not even attempt establishing any 2200 connection. 2202 The client and server sending requests can be asynchronous events. 2203 To avoid deadlock situations both client and server MUST be able to 2204 send and receive requests simultaneously. As an RTSP response may be 2205 queue up for transmission, reception or processing behind the peer 2206 RTSP agent's own requests, all RTSP agents are required to have a 2207 certain capability of handling outstanding messages. The issue is 2208 that outstanding requests may timeout despite them being processed by 2209 the peer due to the response is caught in the queue behind a number 2210 of request that the RTSP agent is processing but that take some time 2211 to complete. To avoid this problem an RTSP agent is recommended to 2212 buffer incoming messages locally so that any response messages can be 2213 processed immediately upon reception. If responses are separated 2214 from requests and directly forwarded for processing can not only the 2215 result be used immediately, the state associated with that 2216 outstanding request can also be released. However, buffering a 2217 number of requests on the receiving RTSP agent consumes resources and 2218 enables a resource exhaustion attack on the agent. Therefore this 2219 buffer should be limited so that an unreasonable number of requests 2220 or total message size is not allowed to consume the receiving agents 2221 resources. In most APIs having the receiving agent stop reading from 2222 the TCP socket will result in TCP's window being clamped. Thus 2223 forcing the buffering on the sending agent when the load is larger 2224 than expected. However, as both RTSP message sizes and frequency may 2225 be changed in the future by protocol extension an agent should be 2226 careful against taking harsher measurements against a potential 2227 attack. When under attack an RTSP agent can close TCP connections 2228 and release state associated with that TCP connection. 2230 To provide some guidance on what is reasonable the following 2231 guidelines are given. An RTSP agent should not have more than 10 2232 outstanding requests per RTSP session. An RTSP agent should not have 2233 more than 10 outstanding requests that aren't related to an RTSP 2234 session or that are requesting to create an RTSP session. 2236 In light of the above, it is RECOMMENDED that clients use persistent 2237 connections whenever possible. A client that supports persistent 2238 connections MAY "pipeline" its requests (see Section 12). 2240 10.3. Closing Connections 2242 The client MAY close a connection at any point when no outstanding 2243 request/response transactions exist for any RTSP session being 2244 managed through the connection. The server, however, SHOULD NOT 2245 close a connection until all RTSP sessions being managed through the 2246 connection have been timed out (Section 16.48). A server SHOULD NOT 2247 close a connection immediately after responding to a session-level 2248 TEARDOWN request for the last RTSP session being controlled through 2249 the connection. Instead, it should wait for a reasonable amount of 2250 time for the client to receive the TEARDOWN response, take 2251 appropriate action, and initiate the connection closing. The server 2252 SHOULD wait at least 10 seconds after sending the TEARDOWN response 2253 before closing the connection. 2255 This is to ensure that the client has time to issue a SETUP for a 2256 new session on the existing connection after having torn the last 2257 one down. 10 seconds should give the client ample opportunity get 2258 its message to the server. 2260 A server SHOULD NOT close the connection directly as a result of 2261 responding to a request with an error code. 2263 Certain error responses such as "460 Only Aggregate Operation 2264 Allowed" (Section 15.4.25) are used for negotiating capabilities 2265 of a server with respect to content or other factors. In such 2266 cases, it is inefficient for the server to close a connection on 2267 an error response. Also, such behavior would prevent 2268 implementation of advanced/special types of requests or result in 2269 extra overhead for the client when testing for new features. On 2270 the flip side, keeping connections open after sending an error 2271 response poses a Denial of Service security risk (Section 21). 2273 If a server closes a connection while the client is attempting to 2274 send a new request, the client will have to close its current 2275 connection, establish a new connection and send its request over the 2276 new connection. 2278 An RTSP message should not be terminated by closing the connection. 2279 Such a message MAY be considered to be incomplete by the receiver and 2280 discarded. An RTSP message is properly terminated as defined in 2281 Section 5. 2283 10.4. Timing Out Connections and RTSP Messages 2285 Receivers of a request (responder) SHOULD respond to requests in a 2286 timely manner even when a reliable transport such as TCP is used. 2287 Similarly, the sender of a request (requester) SHOULD wait for a 2288 sufficient time for a response before concluding that the responder 2289 will not be acting upon its request. 2291 A responder SHOULD respond to all requests within 5 seconds. If the 2292 responder recognizes that processing of a request will take longer 2293 than 5 seconds, it SHOULD send a 100 (Continue) response as soon as 2294 possible. It SHOULD continue sending a 100 response every 5 seconds 2295 thereafter until it is ready to send the final response to the 2296 requester. After sending a 100 response, the receiver MUST send a 2297 final response indicating the success or failure of the request. 2299 A requester SHOULD wait at least 10 seconds for a response before 2300 concluding that the responder will not be responding to its request. 2301 After receiving a 100 response, the requester SHOULD continue waiting 2302 for further responses. If more than 10 seconds elapses without 2303 receiving any response, the requester MAY assume that the responder 2304 is unresponsive and abort the connection. 2306 A requester SHOULD wait longer than 10 seconds for a response if it 2307 is experiencing significant transport delays on its connection to the 2308 responder. The requester is capable of determining the RTT of the 2309 request/response cycle using the Timestamp header (Section 16.51) in 2310 any RTSP request. 2312 10 seconds was chosen for the following reasons. It gives TCP 2313 time to perform a couple of retransmissions, even if operating on 2314 default values. It is short enough that users may not abandon the 2315 process themselves. However, it should be noted that 10 seconds 2316 can be aggressive on certain type of networks. The 5 seconds 2317 value for 1xx messages is half the timeout giving a reasonable 2318 change of successful delivery before timeout happens on the 2319 requestor side. 2321 10.5. Showing Liveness 2323 The mechanisms for showing liveness of the client is, any RTSP 2324 request with a Session header, if RTP & RTCP is used an RTCP message, 2325 or through any other used media protocol capable of indicating 2326 liveness of the RTSP client. It is RECOMMENDED that a client does 2327 not wait to the last second of the timeout before trying to send a 2328 liveness message. The RTSP message may be lost or when using 2329 reliable protocols, such as TCP, the message may take some time to 2330 arrive safely at the receiver. To show liveness between RTSP request 2331 issued to accomplish other things, the following mechanisms can be 2332 used, in descending order of preference: 2334 RTCP: If RTP is used for media transport RTCP SHOULD be used. If 2335 RTCP is used to report transport statistics, it MUST also work 2336 as keep alive. The server can determine the client by used 2337 network address and port together with the fact that the client 2338 is reporting on the servers SSRC(s). A downside of using RTCP 2339 is that it only gives statistical guarantees to reach the 2340 server. However that probability is so low that it can be 2341 ignored in most cases. For example, a session with 60 seconds 2342 timeout and enough bitrate assigned to RTCP messages to send a 2343 message from client to server on average every 5 seconds. That 2344 client have for a network with 5 % packet loss, the probability 2345 to fail showing liveness sign in that session within the 2346 timeout interval of 2.4*E-16. In sessions with shorter timeout 2347 times, or much higher packet loss, or small RTCP bandwidths 2348 SHOULD also use any of the mechanisms below. 2350 SET_PARAMETER: When using SET_PARAMETER for keep alive, no body 2351 SHOULD be included. This method is the RECOMMENDED RTSP method 2352 to use in request only intended to perform keep-alive. 2354 OPTIONS: This method is also usable, but it causes the server to 2355 perform more unnecessary processing and result in bigger 2356 responses than necessary for the task. The reason is that the 2357 server needs to determine the capabilities associated with the 2358 media resource to correctly populate the Public and Allow 2359 headers. 2361 The timeout parameter MAY be included in a SETUP response, and MUST 2362 NOT be included in requests. The server uses it to indicate to the 2363 client how long the server is prepared to wait between RTSP commands 2364 or other signs of life before closing the session due to lack of 2365 activity (see below and Appendix B). The timeout is measured in 2366 seconds, with a default of 60 seconds. The length of the session 2367 timeout MUST NOT be changed in a established session. 2369 10.6. Use of IPv6 2371 Explicit IPv6 support was not present in RTSP 1.0 (RFC 2326). RTSP 2372 2.0 has been updated for explicit IPv6 support. Implementations of 2373 RTSP 2.0 MUST understand literal IPv6 addresses in URIs and headers. 2375 11. Capability Handling 2377 This section describes the available capability handling mechanism 2378 which allows RTSP to be extended. Extensions to this version of the 2379 protocol are basically done in two ways. First, new headers can be 2380 added. Secondly, new methods can be added. The capability handling 2381 mechanism is designed to handle both cases. 2383 When a method is added, the involved parties can use the OPTIONS 2384 method to discover whether it is supported. This is done by issuing 2385 a OPTIONS request to the other party. Depending on the URI it will 2386 either apply in regards to a certain media resource, the whole server 2387 in general, or simply the next hop. The OPTIONS response MUST 2388 contain a Public header which declares all methods supported for the 2389 indicated resource. 2391 It is not necessary to use OPTIONS to discover support of a method, 2392 the client could simply try the method. If the receiver of the 2393 request does not support the method it will respond with an error 2394 code indicating the method is either not implemented (501) or does 2395 not apply for the resource (405). The choice between the two 2396 discovery methods depends on the requirements of the service. 2398 Feature-Tags are defined to handle functionality additions that are 2399 not new methods. Each feature-tag represents a certain block of 2400 functionality. The amount of functionality that a feature-tag 2401 represents can vary significantly. A feature-tag can for example 2402 represent the functionality a single RTSP header provides. Another 2403 feature-tag can represent much more functionality, such as the 2404 "play.basic" feature-tag which represents the minimal playback 2405 implementation. 2407 Feature-tags are used to determine whether the client, server or 2408 proxy supports the functionality that is necessary to achieve the 2409 desired service. To determine support of a feature-tag, several 2410 different headers can be used, each explained below: 2412 Supported: This header is used to determine the complete set of 2413 functionality that both client and server have. The intended 2414 usage is to determine before one needs to use a functionality 2415 that it is supported. It can be used in any method, however 2416 OPTIONS is the most suitable one as it at the same time 2417 determines all methods that are implemented. When sending a 2418 request the requester declares all its capabilities by 2419 including all supported feature-tags. This results in that the 2420 receiver learns the requesters feature support. The receiver 2421 then includes its set of features in the response. 2423 Proxy-Supported: This header is used similar to the Supported 2424 header, but instead of giving the supported functionality of 2425 the client or server it provides both the requester and the 2426 responder a view of what functionality the proxy chain between 2427 the two supports. Proxies are required to add this header 2428 whenever the Supported header is present, but proxies may 2429 independently of the requester add it. 2431 Require: The header can be included in any request where the end- 2432 point, i.e. the client or server, is required to understand the 2433 feature to correctly perform the request. This can, for 2434 example, be a SETUP request where the server is required to 2435 understand a certain parameter to be able to set up the media 2436 delivery correctly. Ignoring this parameter would not have the 2437 desired effect and is not acceptable. Therefore the end-point 2438 receiving a request containing a Require MUST negatively 2439 acknowledge any feature that it does not understand and not 2440 perform the request. The response in cases where features are 2441 not supported are 551 (Option Not Supported). Also the 2442 features that are not supported are given in the Unsupported 2443 header in the response. 2445 Proxy-Require: This header has the same purpose and workings as 2446 Require except that it only applies to proxies and not the end- 2447 point. Features that needs to be supported by both proxies and 2448 end-point needs to be included in both the Require and Proxy- 2449 Require header. 2451 Unsupported: This header is used in a 551 error response, to 2452 indicate which features were not supported. Such a response is 2453 only the result of the usage of the Require and/or Proxy- 2454 Require header where one or more feature where not supported. 2455 This information allows the requester to make the best of 2456 situations as it knows which features are not supported. 2458 12. Pipelining Support 2460 Pipelining is a general method to improve performance of request 2461 response protocols by allowing the requesting entity to have more 2462 than one request outstanding and send them over the same persistent 2463 connection. For RTSP where the relative order of requests will 2464 matter it is important to maintain the order of the requests. 2465 Because of this the responding entity MUST process the incoming 2466 requests in their sending order. The sending order can be determined 2467 by the CSeq header and its sequence number. For TCP the delivery 2468 order will be the same as the sending order. The processing of the 2469 request MUST also have been finished before processing the next 2470 request from the same entity. The responses MUST be sent in the 2471 order the requests was processed. 2473 RTSP 2.0 has extended support for pipelining compared to RTSP 1.0. 2474 The major improvement is to allow all requests to setup and initiate 2475 media playback to be pipelined after each other. This is 2476 accomplished by the utilization of the Pipelined-Requests header (see 2477 Section 16.32). This header allows a client to request that two or 2478 more requests are processed in the same RTSP session context which 2479 the first request creates. In other words a client can request that 2480 two or more media streams are set-up and then played without needing 2481 to wait for a single response. This speeds up the initial startup 2482 time for an RTSP session with at least one RTT. 2484 If a pipelined request builds on the successful completion of one or 2485 more prior requests the requester must verify that all requests were 2486 executed as expected. A common example will be two SETUP requests 2487 and a PLAY request. In case one of the SETUP fails unexpectedly, the 2488 PLAY request can still be successfully executed. However, not as 2489 expected by the requesting client as only a single media instead of 2490 two will be played. In this case the client can send a PAUSE 2491 request, correct the failing SETUP request and then request it to be 2492 played. 2494 13. Method Definitions 2496 The method indicates what is to be performed on the resource 2497 identified by the Request-URI. The method name is case-sensitive. 2498 New methods may be defined in the future. Method names MUST NOT 2499 start with a $ character (decimal 24) and MUST be a token as defined 2500 by the ABNF [RFC5234] in the syntax chapter Section 20. The methods 2501 are summarized in Table 7. 2503 +---------------+-----------+--------+--------------+---------------+ 2504 | method | direction | object | Server req. | Client req. | 2505 +---------------+-----------+--------+--------------+---------------+ 2506 | DESCRIBE | C -> S | P,S | recommended | recommended | 2507 | | | | | | 2508 | GET_PARAMETER | C -> S | P,S | optional | optional | 2509 | | | | | | 2510 | | S -> C | | | | 2511 | | | | | | 2512 | OPTIONS | C -> S | P,S | R=Req, | Sd=Req, R=Opt | 2513 | | | | Sd=Opt | | 2514 | | | | | | 2515 | | S -> C | | | | 2516 | | | | | | 2517 | PAUSE | C -> S | P,S | required | required | 2518 | | | | | | 2519 | PLAY | C -> S | P,S | required | required | 2520 | | | | | | 2521 | PLAY_NOTIFY | S -> C | P,S | required | required | 2522 | | | | | | 2523 | REDIRECT | S -> C | P,S | optional | required | 2524 | | | | | | 2525 | SETUP | C -> S | S | required | required | 2526 | | | | | | 2527 | SET_PARAMETER | C -> S | P,S | required | optional | 2528 | | | | | | 2529 | | S -> C | | | | 2530 | | | | | | 2531 | TEARDOWN | C -> S | P,S | required | required | 2532 | | | | | | 2533 | | S -> C | | required | required | 2534 +---------------+-----------+--------+--------------+---------------+ 2536 Table 7: Overview of RTSP methods, their direction, and what objects 2537 (P: presentation, S: stream) they operate on. Legend: R=Respond, 2538 Sd=Send, Opt: Optional, Req: Required 2540 Note on Table 7: GET_PARAMETER is recommended, but not required. 2541 For example, a fully functional server can be built to deliver 2542 media without any parameters. SET_PARAMETER is required however 2543 due to its usage for keep-alive. PAUSE is now required due to 2544 that it is the only way of getting out of the state machines play 2545 state without terminating the whole session. 2547 If an RTSP agent does not support a particular method, it MUST return 2548 501 (Not Implemented) and the requesting RTSP agent, in turn, SHOULD 2549 NOT try this method again for the given agent / resource combination. 2550 An RTSP proxy who's main function is to log or audit and not modify 2551 transport or media handling in any way MAY forward RTSP messages with 2552 unknown methods. Note, the proxy still needs to perform the minimal 2553 required processing, like adding the Via header. 2555 13.1. OPTIONS 2557 The semantics of the RTSP OPTIONS method is similar to that of the 2558 HTTP OPTIONS method described in [H9.2]. In RTSP however, OPTIONS is 2559 bi-directional, in that a client can request it to a server and vice 2560 versa. A client MUST implement the capability to send an OPTIONS 2561 request and a server or a proxy MUST implement the capability to 2562 respond to an OPTIONS request. The client, server or proxy MAY also 2563 implement the converse of their required capability. 2565 An OPTIONS request may be issued at any time. Such a request does 2566 not modify the session state. However, it may prolong the session 2567 lifespan (see below). The URI in an OPTIONS request determines the 2568 scope of the request and the corresponding response. If the Request- 2569 URI refers to a specific media resource on a given host, the scope is 2570 limited to the set of methods supported for that media resource by 2571 the indicated RTSP agent. A Request-URI with only the host address 2572 limits the scope to the specified RTSP agent's general capabilities 2573 without regard to any specific media. If the Request-URI is an 2574 asterisk ("*"), the scope is limited to the general capabilities of 2575 the next hop (i.e. the RTSP agent in direct communication with the 2576 request sender). 2578 Regardless of scope of the request, the Public header MUST always be 2579 included in the OPTIONS response listing the methods that are 2580 supported by the responding RTSP agent. In addition, if the scope of 2581 the request is limited to a media resource, the Allow header MUST be 2582 included in the response to enumerate the set of methods that are 2583 allowed for that resource unless the set of methods completely 2584 matches the set in the Public header. If the given resource is not 2585 available, the RTSP agent SHOULD return an appropriate response code 2586 such as 3rr or 4xx. The Supported header MAY be included in the 2587 request to query the set of features that are supported by the 2588 responding RTSP agent. 2590 The OPTIONS method can be used to keep an RTSP session alive. 2591 However, it is not the preferred means of session keep-alive 2592 signalling, see Section 16.48. An OPTIONS request intended for 2593 keeping alive an RTSP session MUST include the Session header with 2594 the associated session ID. Such a request SHOULD also use the media 2595 or the aggregated control URI as the Request-URI. 2597 Example: 2599 C->S: OPTIONS * RTSP/2.0 2600 CSeq: 1 2601 User-Agent: PhonyClient/1.2 2602 Require: 2603 Proxy-Require: gzipped-messages 2604 Supported: play.basic 2606 S->C: RTSP/2.0 200 OK 2607 CSeq: 1 2608 Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE 2609 Supported: play.basic, implicit-play, gzipped-messages 2610 Server: PhonyServer/1.1 2612 Note that some of the feature-tags in Require and Proxy-Require are 2613 fictional features. 2615 13.2. DESCRIBE 2617 The DESCRIBE method is used to retrieve the description of a 2618 presentation or media object from a server. The Request-URI of the 2619 DESCRIBE request identifies the media resource of interest. The 2620 client MAY include the Accept header in the request to list the 2621 description formats that it understands. The server MUST respond 2622 with a description of the requested resource and return the 2623 description in the message body of the response. The DESCRIBE reply- 2624 response pair constitutes the media initialization phase of RTSP. 2626 Example: 2628 C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/2.0 2629 CSeq: 312 2630 User-Agent: PhonyClient 1.2 2631 Accept: application/sdp, application/example 2633 S->C: RTSP/2.0 200 OK 2634 CSeq: 312 2635 Date: Thu, 23 Jan 1997 15:35:06 GMT 2636 Server: PhonyServer 1.1 2637 Content-Base: rtsp://server.example.com/fizzle/foo/ 2638 Content-Type: application/sdp 2639 Content-Length: 358 2641 v=0 2642 o=mhandley 2890844526 2890842807 IN IP4 192.0.2.46 2643 s=SDP Seminar 2644 i=A Seminar on the session description protocol 2645 u=http://www.example.com/lectures/sdp.ps 2646 e=seminar@example.com (Seminar Management) 2647 c=IN IP4 0.0.0.0 2648 a=recvonly 2649 a=control:* 2650 t=2873397496 2873404696 2651 m=audio 3456 RTP/AVP 0 2652 a=control:audio 2653 m=video 2232 RTP/AVP 31 2654 a=control:video 2656 The DESCRIBE response SHOULD contain all media initialization 2657 information for the resource(s) that it describes. Servers SHOULD 2658 NOT use the DESCRIBE response as a means of media indirection by 2659 having the description point at another server, instead usage of 3rr 2660 responses are recommended. 2662 By forcing a DESCRIBE response to contain all media initialization 2663 for the set of streams that it describes, and discouraging the use 2664 of DESCRIBE for media indirection, any looping problems can be 2665 avoided that might have resulted from other approaches. 2667 Media initialization is a requirement for any RTSP-based system, but 2668 the RTSP specification does not dictate that this is required to be 2669 done via the DESCRIBE method. There are three ways that an RTSP 2670 client may receive initialization information: 2672 o via an RTSP DESCRIBE request 2674 o via some other protocol (HTTP, email attachment, etc.) 2675 o via some form of a user interface 2677 If a client obtains a valid description from an alternate source, the 2678 client MAY use this description for initialization purposes without 2679 issuing a DESCRIBE request for the same media. 2681 It is RECOMMENDED that minimal servers support the DESCRIBE method, 2682 and highly recommended that minimal clients support the ability to 2683 act as "helper applications" that accept a media initialization file 2684 from a user interface, and/or other means that are appropriate to the 2685 operating environment of the clients. 2687 13.3. SETUP 2689 The SETUP request for an URI specifies the transport mechanism to be 2690 used for the streamed media. The SETUP method may be used in two 2691 different cases; Create an RTSP session and change the transport 2692 parameters of already set up media stream. SETUP can be used in all 2693 three states; INIT, and READY, for both purposes and in PLAY to 2694 change the transport parameters. There is also a third possible 2695 usage for the SETUP method which is not specified in this memo: 2696 adding a media to a session. Using SETUP to add media to an existing 2697 session, when the session is in PLAY state, is unspecified. 2699 The Transport header, see Section 16.52, specifies the media 2700 transport parameters acceptable to the client for data transmission; 2701 the response will contain the transport parameters selected by the 2702 server. This allows the client to enumerate in descending order of 2703 preference the transport mechanisms and parameters acceptable to it, 2704 while the server can select the most appropriate. It is expected 2705 that the session description format used will enable the client to 2706 select a limited number possible configurations that are offered to 2707 the server to choose from. All transport related parameters shall be 2708 included in the Transport header, the use of other headers for this 2709 purpose is discouraged due to middleboxes, such as firewalls or NATs. 2711 For the benefit of any intervening firewalls, a client MUST indicate 2712 the known transport parameters, even if it has no influence over 2713 these parameters, for example, where the server advertises a fixed 2714 multicast address as destination. 2716 Since SETUP includes all transport initialization information, 2717 firewalls and other intermediate network devices (which need this 2718 information) are spared the more arduous task of parsing the 2719 DESCRIBE response, which has been reserved for media 2720 initialization. 2722 The client MUST include the Accept-Ranges header in the request 2723 indicating all supported unit formats in the Range header. This 2724 allows the server to know which format it may use in future session 2725 related responses, such as PLAY response without any range in the 2726 request. If the client does not support a time format necessary for 2727 the presentation the server MUST respond using 456 (Header Field Not 2728 Valid for Resource) and include the Accept-Ranges header with the 2729 range unit formats supported for the resource. 2731 In a SETUP response the server MUST include the Accept-Ranges header 2732 (see Section 16.5) to indicate which time formats that are acceptable 2733 to use for this media resource. 2735 The SETUP response 200 OK MUST include the Media-Properties header 2736 (see Section 16.28 ). The combination of the parameters of the 2737 Media-Properties header indicate the nature of the content present in 2738 the session (see also Section 4.9). For example, a live stream with 2739 time shifting is indicated by 2741 o Random Access set to Random-Access, 2743 o Content Modifications set to Time Progressing, 2745 o Retention set to Time-Duration (with specific recording window 2746 time value). 2748 The SETUP response 200 OK MUST include the Media-Range header (see 2749 Section 16.29) if the media is Time-Progressing. 2751 A basic example for SETUP: 2753 C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/2.0 2754 CSeq: 302 2755 Transport: RTP/AVP;unicast;dest_addr=":4588"/":4589", 2756 RTP/AVP/TCP;unicast;interleaved=0-1 2757 Accept-Ranges: NPT, UTC 2758 User-Agent: PhonyClient/1.2 2760 S->C: RTSP/2.0 200 OK 2761 CSeq: 302 2762 Date: Thu, 23 Jan 1997 15:35:06 GMT 2763 Server: PhonyServer 1.1 2764 Session: 47112344;timeout=60 2765 Transport: RTP/AVP;unicast;dest_addr="192.0.2.53:4588"/ 2766 "192.0.2.53:4589"; src_addr="192.0.2.241:6256"/ 2767 "192.0.2.241:6257"; ssrc=2A3F93ED 2768 Accept-Ranges: NPT 2769 Media-Properties: Random-Access=3.2, Time-Progressing, 2770 Time-Duration=3600.0 2772 Media-Range: npt=0-2893.23 2774 In the above example the client wants to create an RTSP session 2775 containing the media resource "rtsp://example.com/foo/bar/baz.rm". 2776 The transport parameters acceptable to the client is either RTP/AVP/ 2777 UDP (UDP per default) to be received on client port 4588 and 4589 or 2778 RTP/AVP interleaved on the RTSP control channel. The server selects 2779 the RTP/AVP/UDP transport and adds the ports it will send and 2780 received RTP and RTCP from, and the RTP SSRC that will be used by the 2781 server. 2783 The server MUST generate a session identifier in response to a 2784 successful SETUP request, unless a SETUP request to a server includes 2785 a session identifier, in which case the server MUST bundle this setup 2786 request into the existing session (aggregated session) or return 2787 error 459 (Aggregate Operation Not Allowed) (see Section 15.4.24). 2788 An Aggregate control URI MUST be used to control an aggregated 2789 session. This URI MUST be different from the stream control URIs of 2790 the individual media streams included in the aggregate. The 2791 Aggregate control URI is to be specified by the session description 2792 if the server supports aggregated control and aggregated control is 2793 desired for the session. However even if aggregated control is 2794 offered the client MAY chose to not set up the session in aggregated 2795 control. If an Aggregate control URI is not specified in the session 2796 description, it is normally an indication that non-aggregated control 2797 should be used. The SETUP of media streams in an aggregate which has 2798 not been given an aggregated control URI is unspecified. 2800 While the session ID sometimes carries enough information for 2801 aggregate control of a session, the Aggregate control URI is still 2802 important for some methods such as SET_PARAMETER where the control 2803 URI enables the resource in question to be easily identified. The 2804 Aggregate control URI is also useful for proxies, enabling them to 2805 route the request to the appropriate server, and for logging, 2806 where it is useful to note the actual resource that a request was 2807 operating on. 2809 A session will exist until it is either removed by a TEARDOWN request 2810 or is timed-out by the server. The server MAY remove a session that 2811 has not demonstrated liveness signs from the client(s) within a 2812 certain timeout period. The default timeout value is 60 seconds; the 2813 server MAY set this to a different value and indicate so in the 2814 timeout field of the Session header in the SETUP response. For 2815 further discussion see Section 16.48. Signs of liveness for an RTSP 2816 session are: 2818 o Any RTSP request from a client(s) which includes a Session header 2819 with that session's ID. 2821 o If RTP is used as a transport for the underlying media streams, an 2822 RTCP sender or receiver report from the client(s) for any of the 2823 media streams in that RTSP session. RTCP Sender Reports may for 2824 example be received in sessions where the server is invited into a 2825 conference session and is as valid for keep-alive. 2827 If a SETUP request on a session fails for any reason, the session 2828 state, as well as transport and other parameters for associated 2829 streams MUST remain unchanged from their values as if the SETUP 2830 request had never been received by the server. 2832 13.3.1. Changing Transport Parameters 2834 A client MAY issue a SETUP request for a stream that is already set 2835 up or playing in the session to change transport parameters, which a 2836 server MAY allow. If it does not allow changing of parameters, it 2837 MUST respond with error 455 (Method Not Valid In This State). 2838 Reasons to support changing transport parameters, is to allow for 2839 application layer mobility and flexibility to utilize the best 2840 available transport as it becomes available. If a client receives a 2841 455 when trying to change transport parameters while the server is in 2842 play state, it MAY try to put the server in ready state using PAUSE, 2843 before issuing the SETUP request again. If also that fails the 2844 changing of transport parameters will require that the client 2845 performs a TEARDOWN of the affected media and then setting it up 2846 again. In aggregated session avoiding tearing down all the media at 2847 the same time will avoid the creation of a new session. 2849 All transport parameters MAY be changed. However the primary usage 2850 expected is to either change transport protocol completely, like 2851 switching from Interleaved TCP mode to UDP or vise versa or change 2852 delivery address. 2854 In a SETUP response for a request to change the transport parameters 2855 while in Play state, the server MUST include the Range to indicate 2856 from what point the new transport parameters are used. Further, if 2857 RTP is used for delivery, the server MUST also include the RTP-Info 2858 header to indicate from what timestamp and RTP sequence number the 2859 change has taken place. If both RTP-Info and Range is included in 2860 the response the "rtp_time" parameter and start point in the Range 2861 header MUST be for the corresponding time, i.e. be used in the same 2862 way as for PLAY to ensure the correct synchronization information is 2863 available. 2865 If the transport parameters change while in PLAY state results in a 2866 change of synchronization related information, for example changing 2867 RTP SSRC, the server MUST provide in the SETUP response the necessary 2868 synchronization information. However the server is RECOMMENDED to 2869 avoid changing the synchronization information if possible. 2871 13.4. PLAY 2873 This section describes the usage of the PLAY method in general, for 2874 aggregated sessions, and in different usage scenarios. 2876 13.4.1. General Usage 2878 The PLAY method tells the server to start sending data via the 2879 mechanism specified in SETUP and which part of the media should be 2880 played out. PLAY requests are valid when the session is in READY or 2881 PLAY states. A PLAY request MUST include a Session header to 2882 indicate which session the request applies to. 2884 Upon receipt of the PLAY request, the server MUST position the normal 2885 play time to the beginning of the range specified in the received 2886 Range header and delivers stream data until the end of the range if 2887 given, or until a new PLAY request is received, else to the end of 2888 the media is reached. If not Range header is present in the PLAY 2889 request the server shall play from current pause point until the end 2890 of media. The pause point defaults at start to the beginning of the 2891 media. For media that is time-progressing and has no retention, the 2892 pause point will always be set equal to NPT "now", i.e. current 2893 playback point. The pause point may also be set to a particular 2894 point in the media by the PAUSE method, see Section 13.6. The pause 2895 point for media that is currently playing is equal to the current 2896 media position. For time-progressing media with time-limited 2897 retention, if the pause point represents a position that is older 2898 than what is retained by the server, the pause point will be moved to 2899 the oldest retained. 2901 What range values is valid depends on the type of content. For 2902 content that isn't time progressing the range value is valid if the 2903 given range is part of any media within the aggregate. In other 2904 words the valid media range for the aggregate is the super-set of all 2905 of the media components in the aggregate. If a given range value 2906 points outside of the media, the response MUST be the 457 (Invalid 2907 Range) error code and include the Media-Range header (Section 16.29) 2908 with the valid range for the media. For time progressing content 2909 where the client request a start point prior to what is retained, the 2910 start point is adjusted to the oldest retained content. For a start 2911 point that is beyond the media front edge, i.e. beyond the current 2912 value for "now", the server shall adjust the start value to the 2913 current front edge. The Range headers end point value may point 2914 beyond the current media edge. In that case the server shall deliver 2915 media from the requested (and possibly adjusted) start point until 2916 the provided end-point, or the end of the media is reached prior to 2917 the specified stop point. Please note that if one simply want to 2918 play from a particular start point until the end of media using an 2919 Range header with an implicit stop point is recommended. 2921 For media with random access properties a client may express its 2922 preference on which policy for start point selection the server shall 2923 use. This is done by including the Seek-Style header (Section 16.45) 2924 in the PLAY request. 2926 A client desiring to play the media from the beginning MUST send a 2927 PLAY request with a Range header pointing at the beginning, e.g. 2928 npt=0-. If a PLAY request is received without a Range header when 2929 media delivery has stopped at the end, the server SHOULD respond with 2930 a 457 "Invalid Range" error response. In that response the current 2931 pause point in a Range header MUST be included. 2933 All range specifiers in this specification allow for ranges with 2934 implicit start point (e.g. "npt=-30"). When used in a PLAY request, 2935 the server treats this as a request to start/resume playback from the 2936 current pause point, ending at the end time specified in the Range 2937 header. If the pause point is located later than the given end 2938 value, a 457 (Invalid Range) response MUST be given. 2940 The below example will play seconds 10 through 25. It also request 2941 the server to deliver media from the first Random Access Point prior 2942 to the indicated start point. 2944 C->S: PLAY rtsp://audio.example.com/audio RTSP/2.0 2945 CSeq: 835 2946 Session: 12345678 2947 Range: npt=10-25 2948 Seek-Style: RAP 2949 User-Agent: PhonyClient/1.2 2951 Server MUST include a "Range" header in any PLAY response, even if no 2952 Range header was present in the request. The response MUST use the 2953 same format as the request's range header contained. If no Range 2954 header was in the request, the format used in any previous PLAY 2955 request within the session SHOULD be used. If no format has been 2956 indicated in a previous request the server MAY use any time format 2957 supported by the media and indicated in the Accept-Ranges header in 2958 the SETUP response. It is RECOMMENDED that NPT is used if supported 2959 by the media. 2961 For any error response to a PLAY request, the server's response 2962 depends on the current session state. If the session is in ready 2963 state, the current pause-point is returned using Range header with 2964 the pause point as the explicit start-point and an implicit end- 2965 point. For time-progressing content where the pause-point moves with 2966 real-time due to limited retention, the current pause point is 2967 returned. For sessions in playing state, the current playout point 2968 and the remaining parts of the range request is returned. For any 2969 media with retention longer than 0 seconds the currently valid Media- 2970 Range header shall also be included in the response. 2972 A PLAY response MAY include a header(s) carrying synchronization 2973 information. As the information necessary is dependent on the media 2974 transport format, further rules specifying the header and its usage 2975 is needed. For RTP the RTP-Info header is specified, see 2976 Section 16.43, and used in the following example. 2978 Here is a simple example for a single audio stream where the client 2979 requests the media starting from 3.52 seconds and to the end. The 2980 server sends a 200 OK response with the actual play time which is 10 2981 m prior (3.51) and the RTP-Info header that contains the necessary 2982 parameters for the RTP stack. 2983 C->S: PLAY rtsp://example.com/audio RTSP/2.0 2984 CSeq: 836 2985 Session: 12345678 2986 Range: npt=3.52- 2987 User-Agent: PhonyClient/1.2 2989 S->C: RTSP/2.0 200 OK 2990 CSeq: 836 2991 Date: Thu, 23 Jan 1997 15:35:06 GMT 2992 Server: PhonyServer 1.0 2993 Range: npt=3.51-324.39 2994 Seek-Style: First-Prior 2995 RTP-Info:url="rtsp://example.com/audio" 2996 ssrc=0D12F123:seq=14783;rtptime=2345962545 2998 S->C: RTP Packet TS=2345962545 => NPT=3.51 2999 Duration=0.16 seconds 3001 The server reply with the actual start point that will be delivered. 3002 This may differ from the requested range if alignment of the 3003 requested range to valid frame boundaries is required for the media 3004 source. Note that some media streams in an aggregate may need to be 3005 delivered from even earlier points. Also, some media format have a 3006 very long duration per individual data unit, therefore it might be 3007 necessary for the client to parse the data unit, and select where to 3008 start. The server shall also indicate which policy it uses for 3009 selecting the actual start point by including a Seek-Style header. 3011 In the following example the client receives the first media packet 3012 that stretches all the way up and past the requested playtime. Thus, 3013 it is the client's decision if to render to the user the time between 3014 3.52 and 7.05, or to skip it. In most cases it is probably most 3015 suitable to not render that time period. 3016 C->S: PLAY rtsp://example.com/audio RTSP/2.0 3017 CSeq: 836 3018 Session: 12345678 3019 Range: npt=7.05- User-Agent: PhonyClient/1.2 3021 S->C: RTSP/2.0 200 OK 3022 CSeq: 836 3023 Date: Thu, 23 Jan 1997 15:35:06 GMT 3024 Server: PhonyServer 1.0 3025 Range: npt=3.52- 3026 Seek-Style: First-Prior 3027 RTP-Info:url="rtsp://example.com/audio" 3028 ssrc=0D12F123:seq=14783;rtptime=2345962545 3030 S->C: RTP Packet TS=2345962545 => NPT=3.52 3031 Duration=4.15 seconds 3033 After playing the desired range, the presentation does NOT transition 3034 to the READY state, media delivery simply stops. A PAUSE request 3035 MUST be issued before the stream enters the READY state. A PLAY 3036 request while the stream is still in the PLAYING state is legal, and 3037 can be issued without an intervening PAUSE request. Such a request 3038 MUST replace the current PLAY action with the new one requested, i.e. 3039 being handle the same as the request was received in ready state. In 3040 the case the range in Range header has a implicit start time 3041 (-endtime), the server MUST continue to play from where it currently 3042 was until the specified end point. This is useful to change end at 3043 another point than in the previous request. 3045 The following example plays the whole presentation starting at SMPTE 3046 time code 0:10:20 until the end of the clip. Note: The RTP-Info 3047 headers has been broken into several lines to fit the page. 3049 C->S: PLAY rtsp://audio.example.com/twister.en RTSP/2.0 3050 CSeq: 833 3051 Session: 12345678 3052 Range: smpte=0:10:20- 3053 User-Agent: PhonyClient/1.2 3055 S->C: RTSP/2.0 200 OK 3056 CSeq: 833 3057 Date: Thu, 23 Jan 1997 15:35:06 GMT 3058 Server: PhonyServer 1.0 3059 Range: smpte=0:10:22-0:15:45 3060 Seek-Style: Next 3061 RTP-Info:url="rtsp://example.com/twister.en" 3062 ssrc=0D12F123:seq=14783;rtptime=2345962545 3064 For playing back a recording of a live presentation, it may be 3065 desirable to use clock units: 3066 C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/2.0 3067 CSeq: 835 3068 Session: 12345678 3069 Range: clock=19961108T142300Z-19961108T143520Z 3070 User-Agent: PhonyClient/1.2 3072 S->C: RTSP/2.0 200 OK 3073 CSeq: 835 3074 Date: Thu, 23 Jan 1997 15:35:06 GMT 3075 Server: PhonyServer 1.0 3076 Range: clock=19961108T142300Z-19961108T143520Z 3077 Seek-Style: Next 3078 RTP-Info:url="rtsp://example.com/meeting.en" 3079 ssrc=0D12F123:seq=53745;rtptime=484589019 3081 13.4.2. Aggregated Sessions 3083 PLAY requests can operate on sessions controlling a single media and 3084 on aggregated sessions controlling multiple media. 3086 In an aggregated session the PLAY request MUST contain an aggregated 3087 control URI. A server MUST response with error 460 (Only Aggregate 3088 Operation Allowed) if the client PLAY Request-URI is for one of the 3089 media. The media in an aggregate MUST be played in sync. If a 3090 client wants individual control of the media it needs to use separate 3091 RTSP sessions for each media. 3093 For aggregated sessions where the initial SETUP request (creating a 3094 session) is followed by one or more additional SETUP request, a PLAY 3095 request MAY be pipelined after those additional SETUP requests 3096 without awaiting their responses. This procedure can reduce the 3097 delay from start of session establishment until media play-out has 3098 started with one round trip time. However, a client needs to be 3099 aware that using this procedure will result in the playout of the 3100 server state established at the time of processing the PLAY, i.e., 3101 after the processing of all the requests prior to the PLAY request in 3102 the pipeline. This may not be the intended one due to failure of any 3103 of the prior requests. However a client easily determine this based 3104 on the responses from those requests. In case of failure the client 3105 can halt the media playout using PAUSE and try to establish the 3106 intended state again before issuing another PLAY request. 3108 13.4.3. Updating current PLAY Requests 3110 Clients can issue PLAY request while the stream is in PLAYING state 3111 and thus updating their request. 3113 The important difference compared to a PLAY request in ready state is 3114 the handling of the current play point and how the range header in 3115 request is constructed. The session is actively playing media and 3116 the play point will be moving making the exact time a request will 3117 take action is hard to predict. Depending on how the PLAY header 3118 appears two different cases exist: total replacement or continuation. 3119 A total replacement is signalled by having the first range 3120 specification have an explicit start value, e.g. npt=45- or 3121 npt=45-60, in which case the server stops playout at the current 3122 playout point and then starts delivering media according to the Range 3123 header. This is equivalent to having the client first send a PAUSE 3124 and then a new play request that isn't based on the pause point. In 3125 the case of continuation the first range specifier has an implicit 3126 start point and a explicit stop value (Z), e.g. npt=-60, which 3127 indicate that it MUST convert the range specifier being played prior 3128 to this PLAY request (X to Y) into (X to Z) and continue as this was 3129 the request originally played. 3131 An example of this behavior. The server has received requests to 3132 play ranges 10 to 15. If the new PLAY request arrives at the server 3133 4 seconds after the previous one, it will take effect while the 3134 server still plays the first range (10-15). Thus changing the 3135 behavior of this range to continue to play to 25 seconds, i.e. the 3136 equivalent single request would be PLAY with range: npt=10-25. 3138 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3139 CSeq: 834 3140 Session: 12345678 3141 Range: npt=10-15 3142 User-Agent: PhonyClient/1.2 3144 S->C: RTSP/2.0 200 OK 3145 CSeq: 834 3146 Date: Thu, 23 Jan 1997 15:35:06 GMT 3147 Server: PhonyServer 1.0 3148 Range: npt=10-15 3149 Seek-Style: Next 3150 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3151 ssrc=0D12F123:seq=5712;rtptime=934207921, 3152 url="rtsp://example.com/fizzle/videotrack" 3153 ssrc=789DAF12:seq=57654;rtptime=2792482193 3154 Session: 12345678 3156 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3157 CSeq: 835 3158 Session: 12345678 3159 Range: npt=-25 3160 User-Agent: PhonyClient/1.2 3162 S->C: RTSP/2.0 200 OK 3163 CSeq: 835 3164 Date: Thu, 23 Jan 1997 15:35:09 GMT 3165 Server: PhonyServer 1.0 3166 Range: npt=14-25 3167 Seek-Style: Next 3168 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3169 ssrc=0D12F123:seq=5712;rtptime=934239921, 3170 url="rtsp://example.com/fizzle/videotrack" 3171 ssrc=789DAF12:seq=57654;rtptime=2792842193 3172 Session: 12345678 3174 13.4.4. Playing On-Demand Media 3176 On-demand media is indicated by the content of the Media-Properties 3177 header in the SETUP response by (see also Section 16.28): 3179 o Random-Access property is set to Random Access; 3181 o Content Modifications set to Immutable; 3183 o Retention set Unlimited or Time-Limited. 3185 Playing on-demand media follows the general usage as described in 3186 Section 13.4.1. 3188 13.4.5. Playing Dynamic On-Demand Media 3190 Dynamic on-demand media is indicated by the content of the Media- 3191 Properties header in the SETUP response by (see also Section 16.28): 3193 o Random-Access set to Random Access; 3195 o Content Modifications set to dynamic; 3197 o Retention set Unlimited or Time-Limited. 3199 Playing on-demand media follows the general usage as described in 3200 Section 13.4.1 as long as the media has not been changed. 3202 There are ways for the client to get informed about changed of media 3203 resources in play state, if the resource was changed. The client 3204 will receive a PLAY_NOTIFY request with Notify-Reason header set to 3205 media-properties-update (see Section 13.5.2. The client can use the 3206 value of the Media-Range to decide further actions, if the Media- 3207 Range header is present in the PLAY_NOTIFY request. The second way 3208 is that the client issues a GET_PARAMETER request without a body but 3209 including a Media-Range header. The 200 OK response MUST include the 3210 current Media-Range header (see Section 16.29). 3212 13.4.6. Playing Live Media 3214 Live media is indicated by the content of the Media-Properties header 3215 in the SETUP response by (see also Section 16.28): 3217 o Random-Access set to no-seeking; 3219 o Content Modifications set to Time-Progressing; 3221 o Retention with Time-Duration set to 0.0. 3223 For live media, the SETUP response 200 OK MUST include the Media- 3224 Range header (see Section 16.29). 3226 A client MAY send PLAY requests without the Range header, if the 3227 request include the Range header it MUST use a symbolic value 3228 representing "now". For NPT that range specification is "npt=now-". 3229 The server MUST include the Range header in the response and it MUST 3230 indicate an explicit time value and not a symbolic value. In other 3231 words npt=now- is not a valid to use in the response. Instead the 3232 time since session start is recommended expressed as an open 3233 interval, e.g. "npt=96.23-". An absolute time value (clock) for the 3234 corresponding time MAY be given, i.e. "clock=20030213T143205Z-". The 3235 UTC clock format can only be used if client has shown support for it 3236 using the Accept-Ranges header. 3238 13.4.7. Playing Live with Recording 3240 Certain media server may offer recording services of live sessions to 3241 their clients. This recording would normally be from the beginning 3242 of the media session. Clients can randomly access the media between 3243 now and the beginning of the media session. This live media with 3244 recording is indicated by the content of the Media-Properties header 3245 in the SETUP response by (see also Section 16.28): 3247 o Random-Access set to random-access; 3249 o Content Modifications set to Time-Progressing; 3251 o Retention set to Time-limited or Unlimited 3253 The SETUP response 200 OK MUST include the Media-Range header (see 3254 Section 16.29) for this type of media. For live media with recording 3255 the Range header indicates the current playback time in the media and 3256 the Media-Range header indicates the currently available media window 3257 around the current time. This window can cover recorded content in 3258 the past (seen from current time in the media) or recorded content in 3259 the future (seen from current time in the media). The server adjusts 3260 the play point to the requested border of the window, if the client 3261 requests a play point that is located outside the recording windows, 3262 e.g., if requested to far in the past, the server selects the oldest 3263 range in the recording. The considerations in Section 13.5.3 apply, 3264 if a client requests playback at Scale (Section 16.44) values other 3265 than 1.0 (Normal playback rate) while playing live media with 3266 recording. 3268 13.4.8. Playing Live with Time-Shift 3270 Certain media server may offer time-shift services to their clients. 3271 This time shift records a fixed interval in the past, i.e., a sliding 3272 window recording mechanism, but not past this interval. Clients can 3273 randomly access the media between now and the interval. This live 3274 media with recording is indicated by the content of the Media- 3275 Properties header in the SETUP response by (see also Section 16.28): 3277 o Random-Access set to random-access; 3279 o Content Modifications set to Time-Progressing; 3280 o Retention set to Time-Duration and a value indicating the 3281 recording interval (>0). 3283 The SETUP response 200 OK MUST include the Media-Range header (see 3284 Section 16.29) for this type of media. For live media with recording 3285 the Range header indicates the current time in the media and the 3286 Media Range indicates a window around the current time. This window 3287 can cover recorded content in the past (seen from current time in the 3288 media) or recorded content in the future (seen from current time in 3289 the media). The server adjusts the play point to the requested 3290 border of the window, if the client requests a play point that is 3291 located outside the recording windows, e.g., if requested too far in 3292 the past, the server selects the oldest range in the recording. The 3293 considerations in Section 13.5.3 apply, if a client requests playback 3294 at Scale (Section 16.44) values other than 1.0 (Normal playback rate) 3295 while playing live media with time-shift. 3297 13.5. PLAY_NOTIFY 3299 The PLAY_NOTIFY method is issued by a server to inform a client about 3300 an asynchronously event for a session in play state. The Session 3301 header MUST be presented in a PLAY_NOTIFY request and indicates the 3302 scope of the request. Sending of PLAY_NOTIFY requests requires a 3303 persistent connection between server and client, otherwise there is 3304 no way for the server to send this request method to the client. 3306 PLAY_NOTIFY requests have an end-to-end (i.e. server to client) 3307 scope, as they carry the Session header, and apply only to the given 3308 session. The client SHOULD immediately return a response to the 3309 server. 3311 PLAY_NOTIFY requests MAY be used with a message body, depending on 3312 the value of the Notify-Reason header. It is described in the 3313 particular section for each Notify-Reason if a message body is used. 3314 However, currently there is no Notify-Reason that allows using a 3315 message body. There is in this case a need to obey some limitations 3316 when adding new Notify-Reasons that intend to use a message body: The 3317 server can send any type of message body, but it is not ensured that 3318 the client can understand the received message body. This is related 3319 to DESCRIBE (seeSection 13.2 ), but in this particular case the 3320 client can state its acceptable message bodies by using the Accept 3321 header. In the case of PLAY_NOTIFY, the server does not know which 3322 message bodies are understood by the client. 3324 The Notify-Reason header (see Section 16.31) specifies the reason why 3325 the server sends the PLAY_NOTIFY request. This is extensible and new 3326 reasons MAY be added in the future. In case the client does not 3327 understand the reason for the notification it MUST respond with an 3328 465 (Notification Reason Unknown) (Section 15.4.30) error code. 3329 Servers can send PLAY_NOTIFY with these types: 3331 o end-of-stream (see Section 13.5.1); 3333 o media-properties-update (see Section 13.5.2); 3335 o scale-change (see Section 13.5.3). 3337 13.5.1. End-of-Stream 3339 A PLAY_NOTIFY request with Notify-Reason header set to end-of-stream 3340 indicates the completion or near completion of the PLAY request and 3341 the ending delivery of the media stream(s). The request MUST NOT be 3342 issued unless the server is in the playing state. The end of the 3343 media stream delivery notification may be used to indicate either a 3344 successful completion of the PLAY request currently being served, or 3345 to indicate some error resulting in failure to complete the request. 3346 The Request-Status header (Section 16.41) MUST be included to 3347 indicate which request the notification is for and its completion 3348 status. The message response status codes (Section 8.1.1) are used 3349 to indicate how the PLAY request concluded. The sender of a 3350 PALY_NOTIFY can issue an updated PALY_NOTIFY, in the case of a 3351 PLAY_NOTIFY sent with wrong information. For instance, a PLAY_NOTIFY 3352 was issued before reaching the end-of-stream, but some error occurred 3353 resulting in that the previously sent PLAY_NOTIFY contained a wrong 3354 time when the stream will end. In this case a new PLAY_NOTIFY MUST 3355 be sent including the correct status for the completion and all 3356 additional information. 3358 PLAY_NOTIFY requests with Notify-Reason header set to end-of-stream 3359 MUST include a Range header and the Scale header if the scale value 3360 is not 1. The Range header indicates the point in the stream or 3361 streams where delivery is ending with the timescale that was used by 3362 the server in the PLAY response for the request being fulfilled. The 3363 server MUST NOT use the "now" constant in the Range header; it MUST 3364 use the actual numeric end position in the proper timescale. When 3365 end-of-stream notifications are issued prior to having sent the last 3366 media packets, this is evident as the end time in the Range header is 3367 beyond the current time in the media being received by the client, 3368 e.g., npt=-15, if npt is currently at 14.2 seconds. The Scale header 3369 is to be included so that it is evident if the media time scale is 3370 moving backwards and/or have a non-default pace. 3372 If RTP is used as media transport, a RTP-Info header MUST be 3373 included, and the RTP-Info header MUST indicate the last sequence 3374 number in the seq parameter. 3376 A PLAY_NOTIFY request with Notify-Reason header set to end-of-stream 3377 MUST NOT carry a message body. 3379 This example request notifies the client about a future end-of-stream 3380 event: 3382 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3383 CSeq: 854 3384 Notify-Reason: end-of-stream 3385 Request-Status: cseq=853 status=200 reason="OK" 3386 Range: npt=-145 3387 RTP-Info:url="rtsp://example.com/audio" 3388 ssrc=0D12F123:seq=14783;rtptime=2345962545 3389 Session: uZ3ci0K+Ld-M 3391 C->S: RTSP/2.0 200 OK 3392 CSeq: 854 3393 User-Agent: PhonyClient/1.2 3395 13.5.2. Media-Properties-Update 3397 A PLAY_NOTIFY request with Notify-Reason header set to media- 3398 properties-update indicates an update of the media properties for the 3399 given session (see Section 16.28) and/or the available media range 3400 that can be played as indicated by Media-Range (Section 16.29). 3401 PLAY_NOTIFY requests with Notify-Reason header set to media- 3402 properties-update MUST include a Media-Properties and Date header and 3403 SHOULD include a Media-Range header. 3405 This notification MUST be sent for media that are time-progressing 3406 every time an event happens that changes the basis for making 3407 estimations on how the media range progress. In addition it is 3408 RECOMMENDED that the server sends these notifications every 5 minutes 3409 for time-progressing content to ensure the long term stability of the 3410 client estimation and allowing for clock skew detection by the 3411 client. Requests for the just mentioned reasons MUST include Media- 3412 Range header to provide current Media duration and the Range header 3413 to indicate the current playing point and any remaining parts of the 3414 requested range. 3416 The recommendation for sending updates every 5 minutes is due to 3417 any clock skew issues. In 5 minutes the clock skew should not 3418 become too significant as this is not used for media playback and 3419 synchronization, only for determining which content is available 3420 to the user. 3422 A PLAY_NOTIFY request with Notify-Reason header set to media- 3423 properties-update MUST NOT carry a message body. 3425 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3426 Date: Tue, 14 Apr 2008 15:48:06 GMT 3427 CSeq: 854 3428 Notify-Reason: media-properties-update 3429 Session: uZ3ci0K+Ld-M 3430 Media-Properties: Time-Progressing, 3431 Time-Limited=20080415T153919.36Z, Random-Access=5.0 3432 Media-Range: npt=0-1:37:21.394 3433 Range: npt=1:15:49.873- 3435 C->S: RTSP/2.0 200 OK 3436 CSeq: 854 3437 User-Agent: PhonyClient/1.2 3439 13.5.3. Scale-Change 3441 The server may be forced to change the rate, when a client request 3442 playback at Scale (Section 16.44) values other than 1.0 (normal 3443 playback rate). For time progressing media with some retention, i.e. 3444 the server stores already sent content, a client requesting to play 3445 with Scale values larger than 1 may catch up with the front end of 3446 the media. The server will then be unable to continue to provide 3447 with content at Scale larger than 1 as content is only made available 3448 by the server at Scale=1. Another case is when Scale < 1 and the 3449 media retention is time-duration limited. In this case the playback 3450 point can reach the oldest media unit available, and further playback 3451 at this scale becomes impossible as there will be no media available. 3452 To avoid having the client loose any media, the scale will need to be 3453 adjusted to the same rate which the media is removed from the storage 3454 buffer, commonly scale = 1.0. 3456 Another case is when the content itself consist of spliced pieces or 3457 is dynamically updated. In these cases the server may be required to 3458 change from one supported scale value (different than Scale=1.0) to 3459 another. In this case the server will pick the closest value and 3460 inform the client of what it has picked. In these case the media 3461 properties will also be sent updating the supported Scale values. 3462 This enables a client to adjust the used Scale value. 3464 To minimize impact on playback in any of the above cases the server 3465 MUST modify the playback properties and set Scale to a supportable 3466 value and continue delivery the media. When doing this modification 3467 it MUST send a PLAY_NOTIFY message with the Notify-Reason header set 3468 to "scale-change". The request MUST contain a Range header with the 3469 media time where the change took effect, a Scale header with the new 3470 value in use, Session header with the ID for the session it applies 3471 to and a Date header with the server wallclock time of the change. 3472 For time progressing content also the Media-Range and the Media- 3473 Properties at this point in time MUST be included. The Media- 3474 Properties header MUST be included if the scale change was due to the 3475 content changing what scale values that is supported. 3477 For media streams being delivered using RTP also a RTP-Info header 3478 MUST be included. It MUST contain the rtptime parameter with a value 3479 corresponding to the point of change in that media and optionally 3480 also the sequence number. 3482 A PLAY_NOTIFY request with Notify-Reason header set to "Scale-Change" 3483 MUST NOT carry a message body. 3485 S->C: PLAY_NOTIFY rtsp://example.com/fizzle/foo RTSP/2.0 3486 Date: Tue, 14 Apr 2008 15:48:06 GMT 3487 CSeq: 854 3488 Notify-Reason: scale-change 3489 Session: uZ3ci0K+Ld-M 3490 Media-Properties: Time-Progressing, 3491 Time-Limited=20080415T153919.36Z, Random-Access=5.0 3492 Media-Range: npt=0-1:37:21.394 3493 Range: npt=1:37:21.394- 3494 Scale: 1 3495 RTP-Info: url="rtsp://example.com/fizzle/foo/audio" 3496 ssrc=0D12F123:rtptime=2345962545 3498 C->S: RTSP/2.0 200 OK 3499 CSeq: 854 3500 User-Agent: PhonyClient/1.2 3502 13.6. PAUSE 3504 The PAUSE request causes the stream delivery to immediately be 3505 interrupted (halted). A PAUSE request MUST be done either with the 3506 aggregated control URI for aggregated sessions, resulting in all 3507 media being halted, or the media URI for non-aggregated sessions. 3508 Any attempt to do muting of a single media with an PAUSE request in 3509 an aggregated session MUST be responded with error 460 (Only 3510 Aggregate Operation Allowed). After resuming playback, 3511 synchronization of the tracks MUST be maintained. Any server 3512 resources are kept, though servers MAY close the session and free 3513 resources after being paused for the duration specified with the 3514 timeout parameter of the Session header in the SETUP message. 3516 Example: 3518 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3519 CSeq: 834 3520 Session: 12345678 3521 User-Agent: PhonyClient/1.2 3523 S->C: RTSP/2.0 200 OK 3524 CSeq: 834 3525 Date: Thu, 23 Jan 1997 15:35:06 GMT 3526 Range: npt=45.76- 3528 The PAUSE request causes stream delivery to be interrupted 3529 immediately on receipt of the message and the pause point is set to 3530 the current point in the presentation. That pause point in the media 3531 stream needs to be maintained. A subsequent PLAY request without 3532 Range header resume from the pause point and play until media end. 3534 The pause point after any PAUSE request MUST be returned to the 3535 client by adding a Range header with what remains unplayed of the 3536 PLAY request's range. For media with random access properties, if 3537 one desires to resume playing a ranged request, one simply includes 3538 the Range header from the PAUSE response and include the Seek-Style 3539 header with the Next policy in the PLAY request. For media that is 3540 time-progressing and has retention duration=0 the follow-up PLAY 3541 request to start media delivery again, will need to use "npt=now-" 3542 and not the answer in the pause-response. 3544 C->S: PLAY rtsp://example.com/fizzle/foo RTSP/2.0 3545 CSeq: 834 3546 Session: 12345678 3547 Range: npt=10-30 3548 User-Agent: PhonyClient/1.2 3550 S->C: RTSP/2.0 200 OK 3551 CSeq: 834 3552 Date: Thu, 23 Jan 1997 15:35:06 GMT 3553 Server: PhonyServer 1.0 3554 Range: npt=10-30 3555 Seek-Style: First-Prior 3556 RTP-Info:url="rtsp://example.com/fizzle/audiotrack" 3557 ssrc=0D12F123:seq=5712;rtptime=934207921, 3558 url="rtsp://example.com/fizzle/videotrack" 3559 ssrc=4FAD8726:seq=57654;rtptime=2792482193 3560 Session: 12345678 3562 After 11 seconds, i.e. at 21 seconds into the presentation: 3563 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3564 CSeq: 835 3565 Session: 12345678 3566 User-Agent: PhonyClient/1.2 3568 S->C: RTSP/2.0 200 OK 3569 CSeq: 835 3570 Date: 23 Jan 1997 15:35:09 GMT 3571 Server: PhonyServer 1.0 3572 Range: npt=21-30 3573 Session: 12345678 3575 If a client issues a PAUSE request and the server acknowledges and 3576 enters the READY state, the proper server response, if the player 3577 issues another PAUSE, is still 200 OK. The 200 OK response MUST 3578 include the Range header with the current pause point. See examples 3579 below: 3581 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3582 CSeq: 834 3583 Session: 12345678 3584 User-Agent: PhonyClient/1.2 3586 S->C: RTSP/2.0 200 OK 3587 CSeq: 834 3588 Session: 12345678 3589 Date: Thu, 23 Jan 1997 15:35:06 GMT 3590 Range: npt=45.76-98.36 3592 C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/2.0 3593 CSeq: 835 3594 Session: 12345678 3595 User-Agent: PhonyClient/1.2 3597 S->C: RTSP/2.0 200 OK 3598 CSeq: 835 3599 Session: 12345678 3600 Date: 23 Jan 1997 15:35:07 GMT 3601 Range: npt=45.76-98.36 3603 13.7. TEARDOWN 3605 13.7.1. Client to Server 3607 The TEARDOWN client to server request stops the stream delivery for 3608 the given URI, freeing the resources associated with it. A TEARDOWN 3609 request MAY be performed on either an aggregated or a media control 3610 URI. However some restrictions apply depending on the current state. 3611 The TEARDOWN request MUST contain a Session header indicating what 3612 session the request applies to. 3614 A TEARDOWN using the aggregated control URI or the media URI in a 3615 session under non-aggregated control (single media session) MAY be 3616 done in any state (Ready, and Play). A successful request MUST 3617 result in that media delivery is immediately halted and the session 3618 state is destroyed. This MUST be indicated through the lack of a 3619 Session header in the response. 3621 A TEARDOWN using a media URI in an aggregated session MAY only be 3622 done in Ready state. Such a request only removes the indicated media 3623 stream and associated resources from the session. This may result in 3624 that a session returns to non-aggregated control, due to that it only 3625 contains a single media after the requests completion. A session 3626 that will exist after the processing of the TEARDOWN request MUST in 3627 the response to that TEARDOWN request contain a Session header. Thus 3628 the presence of the Session header indicates to the receiver of the 3629 response if the session is still existing or has been removed. 3631 Example: 3633 C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/2.0 3634 CSeq: 892 3635 Session: 12345678 3636 User-Agent: PhonyClient/1.2 3638 S->C: RTSP/2.0 200 OK 3639 CSeq: 892 3640 Server: PhonyServer 1.0 3642 13.7.2. Server to Client 3644 The server can send TEARDOWN requests in the server to client 3645 direction to indicate that the server has been forced to terminate 3646 the ongoing session. This may happen for several reasons such as, 3647 server maintenance without available backup, or session have been 3648 inactive for extended periods of time. The reason is provided in the 3649 Terminate-Reason header (Section 16.50). 3651 When a RTSP client has maintained a RTSP session that otherwise is 3652 inactive for an extended period of time the server may reclaim the 3653 resources. That is done by issuing a REDIRECT request with the 3654 Terminate-Reason set to "Session-Timeout". This MAY be done when the 3655 client has been inactive in the RTSP session for more than one 3656 Session Timeout period (Section 16.48). However, the server is 3657 RECOMMENDED to not perform this operation until an extended period of 3658 inactivity has passed. The time period is considered extended when 3659 it is 10 times the Session Timeout period. Consideration of the 3660 application of the server and its content should be performed when 3661 configuring what is considered as extended periods of time. 3663 In case the server needs to stop provide service to the established 3664 sessions and their is no server to point at in a REDIRECT request 3665 TEARDOWN shall be used to terminate the session. This method can 3666 also be used when non-recoverable internal errors have happened and 3667 the server has no other option then to terminate the sessions. 3669 The TEARDOWN request is normally done on the session aggregate 3670 control URI and MUST include the following headers; Session and 3671 Terminate-Reason headers. The request only applies to the session 3672 identified in the Session header. The server may include a message 3673 to the client's user with the "user-msg" parameter. 3675 The TEARDOWN request may alternatively be done on the wild card URI * 3676 and without any session header. The scope of such a request is 3677 limited to the next-hop (i.e. the RTSP agent in direct communication 3678 with the server) and applies, as well, to the control connection 3679 between the next-hop RTSP agent and the server. This request 3680 indicates that all sessions and pending requests being managed via 3681 the control connection are terminated. Any intervening proxies 3682 SHOULD do all of the following in the order listed: 3684 1. respond to the TEARDOWN request 3686 2. disconnect the control channel from the requesting server 3688 3. pass the TEARDOWN request to each applicable client (typically 3689 those clients with an active session or an unanswered request) 3691 Note: The proxy is responsible for accepting TEARDOWN responses 3692 from its clients; these responses MUST NOT be passed on to either 3693 the original server or the redirected server. 3695 13.8. GET_PARAMETER 3697 The GET_PARAMETER request retrieves the value of any specified 3698 parameter or parameters for a presentation or stream specified in the 3699 URI. If the Session header is present in a request, the value of a 3700 parameter MUST be retrieved in the specified session context. There 3701 are two ways of specifying the parameters to be retrieved. The first 3702 is by including headers which have been defined such that you can use 3703 them for this purpose. Header for this purpose should allow empty, 3704 or stripped value parts to avoid having to specify bogus data when 3705 indicating the desire to retrieve a value. The successful completion 3706 of the request should also be evident from any filled out values in 3707 the response. The Media-Range header (Section 16.29) is one such 3708 header. The other is to specify a message body that lists the 3709 parameter(s) that are desirable to retrieve. The Content-Type header 3710 (Section 16.18) is used to specify which format the message body has. 3712 The headers that MAY be used for retrieving their current value using 3713 GET_PARAMETER are: 3715 o Accept-Ranges 3717 o Media-Range 3719 o Media-Properties 3721 o Range 3723 o RTP-Info 3724 The method MAY also be used without a message body or any header that 3725 request parameters for keep-alive purpose. Any request that is 3726 successful, i.e., a 200 OK response is received, then the keep-alive 3727 timer has been updated. Any non-required header present in such a 3728 request may or may not been processed. Normally the presence of 3729 filled out values in the header will be indication that the header 3730 has been processed. However, for cases when this is difficult to 3731 determine, it is recommended to use a feature-tag and the Require 3732 header. Due to this reason it is usually easier if any parameters to 3733 be retrieved are sent in the body, rather than using any header. 3735 Parameters specified within the body of the message must all be 3736 understood by the request receiving agent. If one or more parameters 3737 are not understood a 451 (Parameter Not Understood) MUST be sent 3738 including a body listing these parameters that wasn't understood. If 3739 all parameters are understood their value is filled in and returned 3740 in the response message body. 3742 Example: 3744 S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/2.0 3745 CSeq: 431 3746 Content-Type: text/parameters 3747 Session: 12345678 3748 Content-Length: 26 3749 User-Agent: PhonyClient/1.2 3751 packets_received 3752 jitter 3754 C->S: RTSP/2.0 200 OK 3755 CSeq: 431 3756 Content-Length: 38 3757 Content-Type: text/parameters 3759 packets_received: 10 3760 jitter: 0.3838 3762 13.9. SET_PARAMETER 3764 This method requests to set the value of a parameter or a set of 3765 parameters for a presentation or stream specified by the URI. The 3766 method MAY also be used without a message body. It is the 3767 RECOMMENDED method to use in request sent for the sole purpose of 3768 updating the keep-alive timer. If this request is successful, i.e. a 3769 200 OK response is received, then the keep-alive timer has been 3770 updated. Any non-required header present in such a request may or 3771 may not been processed. To allow a client to determine if any such 3772 header has been processed, it is necessary to use a feature tag and 3773 the Require header. Due to this reason it is RECOMMENDED that any 3774 parameters are sent in the body, rather than using any header. 3776 A request is RECOMMENDED to only contain a single parameter to allow 3777 the client to determine why a particular request failed. If the 3778 request contains several parameters, the server MUST only act on the 3779 request if all of the parameters can be set successfully. A server 3780 MUST allow a parameter to be set repeatedly to the same value, but it 3781 MAY disallow changing parameter values. If the receiver of the 3782 request does not understand or cannot locate a parameter, error 451 3783 (Parameter Not Understood) MUST be used. In the case a parameter is 3784 not allowed to change, the error code is 458 (Parameter Is Read- 3785 Only). The response body MUST contain only the parameters that have 3786 errors. Otherwise no body MUST be returned. 3788 Note: transport parameters for the media stream MUST only be set with 3789 the SETUP command. 3791 Restricting setting transport parameters to SETUP is for the 3792 benefit of firewalls. 3794 The parameters are split in a fine-grained fashion so that there 3795 can be more meaningful error indications. However, it may make 3796 sense to allow the setting of several parameters if an atomic 3797 setting is desirable. Imagine device control where the client 3798 does not want the camera to pan unless it can also tilt to the 3799 right angle at the same time. 3801 Example: 3803 C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/2.0 3804 CSeq: 421 3805 User-Agent: PhonyClient/1.2 3806 Content-length: 20 3807 Content-type: text/parameters 3809 barparam: barstuff 3811 S->C: RTSP/2.0 451 Parameter Not Understood 3812 CSeq: 421 3813 Content-length: 10 3814 Content-type: text/parameters 3816 barparam: barstuff 3818 13.10. REDIRECT 3820 The REDIRECT method is issued by a server to inform a client that the 3821 service provided will be terminated and where a corresponding service 3822 can provided instead. This happens for different reasons. One is 3823 that the server is being administrated such that it must stop 3824 providing service. Thus the client is required to connect to another 3825 server location to access the resource indicated by the Request-URI. 3827 The REDIRECT request SHALL contain a Terminate-Reason header 3828 (Section 16.50) to inform the client of the reason for the request. 3829 Additional parameters related to the reason may also be included. 3830 The intention here is to allow an server administrator to do a 3831 controlled shutdown of the RTSP server. That requires sufficient 3832 time to inform all entities having associated state with the server 3833 and for them to perform a controlled migration from this server to a 3834 fall back server. 3836 A REDIRECT request with a Session header has end-to-end (i.e. server 3837 to client) scope and applies only to the given session. Any 3838 intervening proxies SHOULD NOT disconnect the control channel while 3839 there are other remaining end-to-end sessions. The REQUIRED Location 3840 header MUST contain a complete absolute URI pointing to the resource 3841 to which the client SHOULD reconnect. Specifically, the Location 3842 MUST NOT contain just the host and port. A client may receive a 3843 REDIRECT request with a Session header, if and only if, an end-to-end 3844 session has been established. 3846 A client may receive a REDIRECT request without a Session header at 3847 any time when it has communication or a connection established with a 3848 server. The scope of such a request is limited to the next-hop (i.e. 3849 the RTSP agent in direct communication with the server) and applies 3850 to all sessions controlled, as well as the control connection between 3851 the next-hop RTSP agent and the server. A REDIRECT request without a 3852 Session header indicates that all sessions and pending requests being 3853 managed via the control connection MUST be redirected. The REQUIRED 3854 Location header, if included in such a request, SHOULD contain an 3855 absolute URI with only the host address and the OPTIONAL port number 3856 of the server to which the RTSP agent SHOULD reconnect. Any 3857 intervening proxies SHOULD do all of the following in the order 3858 listed: 3860 1. respond to the REDIRECT request 3862 2. disconnect the control channel from the requesting server 3864 3. connect to the server at the given host address 3865 4. pass the REDIRECT request to each applicable client (typically 3866 those clients with an active session or an unanswered request) 3868 Note: The proxy is responsible for accepting REDIRECT responses 3869 from its clients; these responses MUST NOT be passed on to either 3870 the original server or the redirected server. 3872 When the server lacks any alternative server and needs to terminate a 3873 session or all sessions the TEARDOWN request SHALL be used instead. 3875 When no Terminate-Reason "time" parameter are included in a REDIRECT 3876 request, the client SHALL perform the redirection immediately and 3877 return a response to the server. The server shall consider the 3878 session as terminated and can free any associated state after it 3879 receives the successful (2xx) response. The server MAY close the 3880 signalling connection upon receiving the response and the client 3881 SHOULD close the signalling connection after sending the 2xx 3882 response. The exception to this is when the client has several 3883 sessions on the server being managed by the given signalling 3884 connection. In this case, the client SHOULD close the connection 3885 when it has received and responded to REDIRECT requests for all the 3886 sessions managed by the signalling connection. 3888 The Terminate-Reason header "time" parameter MAY be used to indicate 3889 the wallclock time by when the redirection MUST have take place. To 3890 allow a client to determine that redirect time without being time 3891 synchronized with the server, the server MUST include a Date header 3892 in the request. The client should have before the redirection time- 3893 line terminated the session and close the control connection. The 3894 server MAY simple cease to provide service when the deadline time has 3895 been reached, or it may issue TEARDOWN requests to the remaining 3896 sessions. 3898 The differentiation of REDIRECT requests with and without range 3899 header is to allow for clear and explicit state handling. As the 3900 state in the server needs to be kept until the point of 3901 redirection, the handling becomes more clear if the client is 3902 required to TEARDOWN the session at the redirect point. 3904 If the REDIRECT request times out following the rules in Section 10.4 3905 the server MAY terminate the session or transport connection that 3906 would be redirected by the request. This is a safeguard against 3907 misbehaving clients that refuses to respond to a REDIRECT request. 3908 That should not provide any benefit. 3910 After a REDIRECT request has been processed, a client that wants to 3911 continue to send or receive media for the resource identified by the 3912 Request-URI will have to establish a new session with the designated 3913 host. If the URI given in the Location header is a valid resource 3914 URI, a client SHOULD issue a DESCRIBE request for the URI. 3916 Note: The media resource indicated by the Location header can be 3917 identical, slightly different or totally different. This is the 3918 reason why a new DESCRIBE request SHOULD be issued. 3920 If the Location header contains only a host address, the client MAY 3921 assume that the media on the new server is identical to the media on 3922 the old server, i.e. all media configuration information from the old 3923 session is still valid except for the host address. However the 3924 usage of conditional SETUP using MTag identifiers are RECOMMENDED to 3925 verify the assumption. 3927 This example request redirects traffic for this session to the new 3928 server at the given absolute time: 3930 S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/2.0 3931 CSeq: 732 3932 Location: rtsp://s2.example.com:8001 3933 Terminate-Reason: Server-Admin ;time=19960213T143205Z 3934 Session: uZ3ci0K+Ld-M 3935 Date: Thu, 13 Feb 1996 14:30:43 GMT 3937 C->S: RTSP/2.0 200 OK 3938 CSeq: 732 3939 User-Agent: PhonyClient/1.2 3941 14. Embedded (Interleaved) Binary Data 3943 In order to fulfill certain requirements on the network side, e.g. in 3944 conjunction with network address translators that block RTP traffic 3945 over UDP, it may be necessary to interleave RTSP messages and media 3946 stream data. This interleaving should generally be avoided unless 3947 necessary since it complicates client and server operation and 3948 imposes additional overhead. Also head of line blocking may cause 3949 problems. Interleaved binary data SHOULD only be used if RTSP is 3950 carried over TCP. 3952 Stream data such as RTP packets is encapsulated by an ASCII dollar 3953 sign (24 decimal), followed by a one-byte channel identifier, 3954 followed by the length of the encapsulated binary data as a binary, 3955 two-byte integer in network byte order. The stream data follows 3956 immediately afterwards, without a CRLF, but including the upper-layer 3957 protocol headers. Each $ block MUST contain exactly one upper-layer 3958 protocol data unit, e.g., one RTP packet. 3959 0 1 2 3 3960 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 3961 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3962 | "$" = 24 | Channel ID | Length in bytes | 3963 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3964 : Length number of bytes of binary data : 3965 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3967 The channel identifier is defined in the Transport header with the 3968 interleaved parameter (Section 16.52). 3970 When the transport choice is RTP, RTCP messages are also interleaved 3971 by the server over the TCP connection. The usage of RTCP messages is 3972 indicated by including a interval containing a second channel in the 3973 interleaved parameter of the Transport header, see Section 16.52. If 3974 RTCP is used, packets MUST be sent on the first available channel 3975 higher than the RTP channel. The channels are bi-directional and 3976 therefore RTCP traffic are sent on the second channel in both 3977 directions. 3979 RTCP is sometime needed for synchronization when two or more 3980 streams are interleaved in such a fashion. Also, this provides a 3981 convenient way to tunnel RTP/RTCP packets through the TCP control 3982 connection when required by the network configuration and transfer 3983 them onto UDP when possible. 3985 C->S: SETUP rtsp://example.com/bar.file RTSP/2.0 3986 CSeq: 2 3987 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 3988 Accept-Ranges: NPT, SMPTE, UTC 3989 User-Agent: PhonyClient/1.2 3991 S->C: RTSP/2.0 200 OK 3992 CSeq: 2 3993 Date: Thu, 05 Jun 1997 18:57:18 GMT 3994 Transport: RTP/AVP/TCP;unicast;interleaved=5-6 3995 Session: 12345678 3996 Accept-Ranges: NPT 3997 Media-Properties: Random-Access=0.2, Unmutable, Unlimited 3999 C->S: PLAY rtsp://example.com/bar.file RTSP/2.0 4000 CSeq: 3 4001 Session: 12345678 4002 User-Agent: PhonyClient/1.2 4004 S->C: RTSP/2.0 200 OK 4005 CSeq: 3 4006 Session: 12345678 4007 Date: Thu, 05 Jun 1997 18:59:15 GMT 4008 RTP-Info: url="rtsp://example.com/bar.file" 4009 ssrc=0D12F123:seq=232433;rtptime=972948234 4010 Range: npt=0-56.8 4011 Seek-Style: RAP 4013 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 4014 S->C: $005{2 byte length}{"length" bytes data, w/RTP header} 4015 S->C: $006{2 byte length}{"length" bytes RTCP packet} 4017 15. Status Code Definitions 4019 Where applicable, HTTP status [H10] codes are reused. Status codes 4020 that have the same meaning are not repeated here. See Table 4 for a 4021 listing of which status codes may be returned by which requests. All 4022 error messages, 4xx and 5xx MAY return a body containing further 4023 information about the error. 4025 15.1. Success 1xx 4027 15.1.1. 100 Continue 4029 The client SHOULD continue with its request. This interim response 4030 is used to inform the client that the initial part of the request has 4031 been received and has not yet been rejected by the server. The 4032 client SHOULD continue by sending the remainder of the request or, if 4033 the request has already been completed, ignore this response. The 4034 server MUST send a final response after the request has been 4035 completed. 4037 15.2. Success 2xx 4039 This class of status code indicates that the client's request was 4040 successfully received, understood, and accepted. 4042 15.2.1. 200 OK 4044 The request has succeeded. The information returned with the 4045 response is dependent on the method used in the request. 4047 15.3. Redirection 3xx 4049 The notation "3rr" indicates response codes from 300 to 399 inclusive 4050 which are meant for redirection. The response code 304 is excluded 4051 from this set, as it is not used for redirection. 4053 Within RTSP, redirection may be used for load balancing or 4054 redirecting stream requests to a server topologically closer to the 4055 client. Mechanisms to determine topological proximity are beyond the 4056 scope of this specification. 4058 An 3rr code MAY be used to respond to any request. It is RECOMMENDED 4059 that they are used if necessary before a session is established, 4060 i.e., in response to DESCRIBE or SETUP. However in cases where a 4061 server is not able to send a REDIRECT request to the client, the 4062 server MAY need to resort to using 3rr responses to inform a client 4063 with an established session about the need for redirecting the 4064 session. If an 3rr response is received for a request in relation to 4065 an established session, the client SHOULD send a TEARDOWN request for 4066 the session, and MAY reestablish the session using the resource 4067 indicated by the Location. 4069 If the Location header is used in a response it MUST contain an 4070 absolute URI pointing out the media resource the client is redirected 4071 to, the URI MUST NOT only contain the host name. 4073 15.3.1. 301 Moved Permanently 4075 The request resource are moved permanently and resides now at the URI 4076 given by the location header. The user client SHOULD redirect 4077 automatically to the given URI. This response MUST NOT contain a 4078 message-body. The Location header MUST be included in the response. 4080 15.3.2. 302 Found 4082 The requested resource resides temporarily at the URI given by the 4083 Location header. The Location header MUST be included in the 4084 response. This response is intended to be used for many types of 4085 temporary redirects; e.g., load balancing. It is RECOMMENDED that 4086 the server set the reason phrase to something more meaningful than 4087 "Found" in these cases. The user client SHOULD redirect 4088 automatically to the given URI. This response MUST NOT contain a 4089 message-body. 4091 This example shows a client being redirected to a different server: 4093 C->S: SETUP rtsp://example.com/fizzle/foo RTSP/2.0 4094 CSeq: 2 4095 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 4096 Accept-Ranges: NPT, SMPTE, UTC 4097 User-Agent: PhonyClient/1.2 4099 S->C: RTSP/2.0 302 Try Other Server 4100 CSeq: 2 4101 Location: rtsp://s2.example.com:8001/fizzle/foo 4103 15.3.3. 303 See Other 4105 This status code MUST NOT be used in RTSP. However, it was allowed 4106 to use in RTSP 1.0 (RFC 2326). 4108 15.3.4. 304 Not Modified 4110 If the client has performed a conditional DESCRIBE or SETUP (see 4111 Section 16.24) and the requested resource has not been modified, the 4112 server SHOULD send a 304 response. This response MUST NOT contain a 4113 message-body. 4115 The response MUST include the following header fields: 4117 o Date 4119 o MTag and/or Content-Location, if the header(s) would have been 4120 sent in a 200 response to the same request. 4122 o Expires, Cache-Control, and/or Vary, if the field-value might 4123 differ from that sent in any previous response for the same 4124 variant. 4126 This response is independent for the DESCRIBE and SETUP requests. 4127 That is, a 304 response to DESCRIBE does NOT imply that the resource 4128 content is unchanged (only the session description) and a 304 4129 response to SETUP does NOT imply that the resource description is 4130 unchanged. The MTag and If-Match headers may be used to link the 4131 DESCRIBE and SETUP in this manner. 4133 15.3.5. 305 Use Proxy 4135 The requested resource MUST be accessed through the proxy given by 4136 the Location field. The Location field gives the URI of the proxy. 4137 The recipient is expected to repeat this single request via the 4138 proxy. 305 responses MUST only be generated by origin servers. 4140 15.4. Client Error 4xx 4142 15.4.1. 400 Bad Request 4144 The request could not be understood by the server due to malformed 4145 syntax. The client SHOULD NOT repeat the request without 4146 modifications. If the request does not have a CSeq header, the 4147 server MUST NOT include a CSeq in the response. 4149 15.4.2. 401 Unauthorized 4151 The request requires user authentication. The response MUST include 4152 a WWW-Authenticate header (Section 16.57) field containing a 4153 challenge applicable to the requested resource. The client MAY 4154 repeat the request with a suitable Authorization header field. If 4155 the request already included Authorization credentials, then the 401 4156 response indicates that authorization has been refused for those 4157 credentials. If the 401 response contains the same challenge as the 4158 prior response, and the user agent has already attempted 4159 authentication at least once, then the user SHOULD be presented the 4160 entity that was given in the response, since that entity might 4161 include relevant diagnostic information. HTTP access authentication 4162 is explained in [RFC2617]. 4164 15.4.3. 402 Payment Required 4166 This code is reserved for future use. 4168 15.4.4. 403 Forbidden 4170 The server understood the request, but is refusing to fulfill it. 4171 Authorization will not help and the request SHOULD NOT be repeated. 4172 If the server wishes to make public why the request has not been 4173 fulfilled, it SHOULD describe the reason for the refusal in the 4174 entity. If the server does not wish to make this information 4175 available to the client, the status code 404 (Not Found) can be used 4176 instead. 4178 15.4.5. 404 Not Found 4180 The server has not found anything matching the Request-URI. No 4181 indication is given of whether the condition is temporary or 4182 permanent. The 410 (Gone) status code SHOULD be used if the server 4183 knows, through some internally configurable mechanism, that an old 4184 resource is permanently unavailable and has no forwarding address. 4185 This status code is commonly used when the server does not wish to 4186 reveal exactly why the request has been refused, or when no other 4187 response is applicable. 4189 15.4.6. 405 Method Not Allowed 4191 The method specified in the request is not allowed for the resource 4192 identified by the Request-URI. The response MUST include an Allow 4193 header containing a list of valid methods for the requested resource. 4194 This status code is also to be used if a request attempts to use a 4195 method not indicated during SETUP. 4197 15.4.7. 406 Not Acceptable 4199 The resource identified by the request is only capable of generating 4200 response entities which have content characteristics not acceptable 4201 according to the accept headers sent in the request. 4203 The response SHOULD include an message body containing a list of 4204 available entity characteristics and location(s) from which the user 4205 or user agent can choose the one most appropriate. The entity format 4206 is specified by the media type given in the Content-Type header 4207 field. Depending upon the format and the capabilities of the user 4208 agent, selection of the most appropriate choice MAY be performed 4209 automatically. However, this specification does not define any 4210 standard for such automatic selection. 4212 If the response could be unacceptable, a user agent SHOULD 4213 temporarily stop receipt of more data and query the user for a 4214 decision on further actions. 4216 15.4.8. 407 Proxy Authentication Required 4218 This code is similar to 401 (Unauthorized) (Section 15.4.2), but 4219 indicates that the client must first authenticate itself with the 4220 proxy. The proxy MUST return a Proxy-Authenticate header field 4221 (Section 16.33) containing a challenge applicable to the proxy for 4222 the requested resource. 4224 15.4.9. 408 Request Timeout 4226 The client did not produce a request within the time that the server 4227 was prepared to wait. The client MAY repeat the request without 4228 modifications at any later time. 4230 15.4.10. 410 Gone 4232 The requested resource is no longer available at the server and the 4233 forwarding address is not known. This condition is expected to be 4234 considered permanent. If the server does not know, or has no 4235 facility to determine, whether or not the condition is permanent, the 4236 status code 404 (Not Found) SHOULD be used instead. This response is 4237 cacheable unless indicated otherwise. 4239 The 410 response is primarily intended to assist the task of 4240 repository maintenance by notifying the recipient that the resource 4241 is intentionally unavailable and that the server owners desire that 4242 remote links to that resource be removed. Such an event is common 4243 for limited-time, promotional services and for resources belonging to 4244 individuals no longer working at the server's site. It is not 4245 necessary to mark all permanently unavailable resources as "gone" or 4246 to keep the mark for any length of time -- that is left to the 4247 discretion of the owner of the server. 4249 15.4.11. 411 Length Required 4251 The server refuses to accept the request without a defined Content- 4252 Length. The client MAY repeat the request if it adds a valid 4253 Content-Length header field containing the length of the message-body 4254 in the request message. 4256 15.4.12. 412 Precondition Failed 4258 The precondition given in one or more of the request-header fields 4259 evaluated to false when it was tested on the server. This response 4260 code allows the client to place preconditions on the current resource 4261 meta information (header field data) and thus prevent the requested 4262 method from being applied to a resource other than the one intended. 4264 15.4.13. 413 Request Message Body Too Large 4266 The server is refusing to process a request because the request 4267 message body is larger than the server is willing or able to process. 4268 The server MAY close the connection to prevent the client from 4269 continuing the request. 4271 If the condition is temporary, the server SHOULD include a Retry- 4272 After header field to indicate that it is temporary and after what 4273 time the client MAY try again. 4275 15.4.14. 414 Request-URI Too Long 4277 The server is refusing to service the request because the Request-URI 4278 is longer than the server is willing to interpret. This rare 4279 condition is only likely to occur when a client has used a request 4280 with long query information, when the client has descended into a URI 4281 "black hole" of redirection (e.g., a redirected URI prefix that 4282 points to a suffix of itself), or when the server is under attack by 4283 a client attempting to exploit security holes present in some servers 4284 using fixed-length buffers for reading or manipulating the Request- 4285 URI. 4287 15.4.15. 415 Unsupported Media Type 4289 The server is refusing to service the request because the entity of 4290 the request is in a format not supported by the requested resource 4291 for the requested method. 4293 15.4.16. 451 Parameter Not Understood 4295 The recipient of the request does not support one or more parameters 4296 contained in the request. When returning this error message the 4297 sender SHOULD return a message body containing the offending 4298 parameter(s). 4300 15.4.17. 452 reserved 4302 This error code was removed from RFC 2326 [RFC2326] as it is 4303 obsolete. This error code MUST NOT be used anymore. 4305 15.4.18. 453 Not Enough Bandwidth 4307 The request was refused because there was insufficient bandwidth. 4308 This may, for example, be the result of a resource reservation 4309 failure. 4311 15.4.19. 454 Session Not Found 4313 The RTSP session identifier in the Session header is missing, 4314 invalid, or has timed out. 4316 15.4.20. 455 Method Not Valid in This State 4318 The client or server cannot process this request in its current 4319 state. The response MUST contain an Allow header to make error 4320 recovery possible. 4322 15.4.21. 456 Header Field Not Valid for Resource 4324 The server could not act on a required request header. For example, 4325 if PLAY contains the Range header field but the stream does not allow 4326 seeking. This error message may also be used for specifying when the 4327 time format in Range is impossible for the resource. In that case 4328 the Accept-Ranges header MUST be returned to inform the client of 4329 which format(s) that are allowed. 4331 15.4.22. 457 Invalid Range 4333 The Range value given is out of bounds, e.g., beyond the end of the 4334 presentation. 4336 15.4.23. 458 Parameter Is Read-Only 4338 The parameter to be set by SET_PARAMETER can be read but not 4339 modified. When returning this error message the sender SHOULD return 4340 a message body containing the offending parameter(s). 4342 15.4.24. 459 Aggregate Operation Not Allowed 4344 The requested method may not be applied on the URI in question since 4345 it is an aggregate (presentation) URI. The method may be applied on 4346 a media URI. 4348 15.4.25. 460 Only Aggregate Operation Allowed 4350 The requested method may not be applied on the URI in question since 4351 it is not an aggregate control (presentation) URI. The method may be 4352 applied on the aggregate control URI. 4354 15.4.26. 461 Unsupported Transport 4356 The Transport field did not contain a supported transport 4357 specification. 4359 15.4.27. 462 Destination Unreachable 4361 The data transmission channel could not be established because the 4362 client address could not be reached. This error will most likely be 4363 the result of a client attempt to place an invalid dest_addr 4364 parameter in the Transport field. 4366 15.4.28. 463 Destination Prohibited 4368 The data transmission channel was not established because the server 4369 prohibited access to the client address. This error is most likely 4370 the result of a client attempt to redirect media traffic to another 4371 destination with a dest_addr parameter in the Transport header. 4373 15.4.29. 464 Data Transport Not Ready Yet 4375 The data transmission channel to the media destination is not yet 4376 ready for carrying data. However the responding entity still expects 4377 that the data transmission channel will be established at this point 4378 in time. Note however that this may result in a permanent failure 4379 like 462 "Destination Unreachable". 4381 An example when this error may occur is in the case a client sends a 4382 PLAY request to a server prior to ensuring that the TCP connections 4383 negotiated for carrying media data was successful established (In 4384 violation of this specification). The server would use this error 4385 code to indicate that the requested action could not be performed due 4386 to the failure of completing the connection establishment. 4388 15.4.30. 465 Notification Reason Unknown 4390 This indicates that the client has received a PLAY_NOTIFY 4391 (Section 13.5) with a Notify-Reason header (Section 16.31) unknown to 4392 the client. 4394 15.4.31. 470 Connection Authorization Required 4396 The secured connection attempt need user or client authorization 4397 before proceeding. The next hops certificate is included in this 4398 response in the Accept-Credentials header. 4400 15.4.32. 471 Connection Credentials not accepted 4402 When performing a secure connection over multiple connections, a 4403 intermediary has refused to connect to the next hop and carry out the 4404 request due to unacceptable credentials for the used policy. 4406 15.4.33. 472 Failure to establish secure connection 4408 A proxy fails to establish a secure connection to the next hop RTSP 4409 agent. This is primarily caused by a fatal failure at the TLS 4410 handshake, for example due to server not accepting any cipher suits. 4412 15.5. Server Error 5xx 4414 Response status codes beginning with the digit "5" indicate cases in 4415 which the server is aware that it has erred or is incapable of 4416 performing the request The server SHOULD include an entity containing 4417 an explanation of the error situation, and whether it is a temporary 4418 or permanent condition. User agents SHOULD display any included 4419 entity to the user. These response codes are applicable to any 4420 request method. 4422 15.5.1. 500 Internal Server Error 4424 The server encountered an unexpected condition which prevented it 4425 from fulfilling the request. 4427 15.5.2. 501 Not Implemented 4429 The server does not support the functionality required to fulfill the 4430 request. This is the appropriate response when the server does not 4431 recognize the request method and is not capable of supporting it for 4432 any resource. 4434 15.5.3. 502 Bad Gateway 4436 The server, while acting as a gateway or proxy, received an invalid 4437 response from the upstream server it accessed in attempting to 4438 fulfill the request. 4440 15.5.4. 503 Service Unavailable 4442 The server is currently unable to handle the request due to a 4443 temporary overloading or maintenance of the server. The implication 4444 is that this is a temporary condition which will be alleviated after 4445 some delay. If known, the length of the delay MAY be indicated in a 4446 Retry-After header. If no Retry-After is given, the client SHOULD 4447 handle the response as it would for a 500 response. 4449 Note: The existence of the 503 status code does not imply that 4450 a server must use it when becoming overloaded. Some servers 4451 may wish to simply refuse the connection. 4453 15.5.5. 504 Gateway Timeout 4455 The server, while acting as a proxy, did not receive a timely 4456 response from the upstream server specified by the URI or some other 4457 auxiliary server (e.g. DNS) it needed to access in attempting to 4458 complete the request. 4460 15.5.6. 505 RTSP Version Not Supported 4462 The server does not support, or refuses to support, the RTSP protocol 4463 version that was used in the request message. The server is 4464 indicating that it is unable or unwilling to complete the request 4465 using the same major version as the client other than with this error 4466 message. The response SHOULD contain an message body describing why 4467 that version is not supported and what other protocols are supported 4468 by that server. 4470 15.5.7. 551 Option not supported 4472 A feature-tag given in the Require or the Proxy-Require fields was 4473 not supported. The Unsupported header MUST be returned stating the 4474 feature for which there is no support. 4476 16. Header Field Definitions 4478 +---------------+----------------+--------+---------+------+ 4479 | method | direction | object | acronym | Body | 4480 +---------------+----------------+--------+---------+------+ 4481 | DESCRIBE | C -> S | P,S | DES | r | 4482 | | | | | | 4483 | GET_PARAMETER | C -> S, S -> C | P,S | GPR | R,r | 4484 | | | | | | 4485 | OPTIONS | C -> S | P,S | OPT | | 4486 | | | | | | 4487 | | S -> C | | | | 4488 | | | | | | 4489 | PAUSE | C -> S | P,S | PSE | | 4490 | | | | | | 4491 | PLAY | C -> S | P,S | PLY | | 4492 | | | | | | 4493 | PLAY_NOTIFY | S -> C | P,S | PNY | R | 4494 | | | | | | 4495 | REDIRECT | S -> C | P,S | RDR | | 4496 | | | | | | 4497 | SETUP | C -> S | S | STP | | 4498 | | | | | | 4499 | SET_PARAMETER | C -> S, S -> C | P,S | SPR | R,r | 4500 | | | | | | 4501 | TEARDOWN | C -> S | P,S | TRD | | 4502 +---------------+----------------+--------+---------+------+ 4504 Table 8: Overview of RTSP methods, their direction, and what objects 4505 (P: presentation, S: stream) they operate on. Body notes if a method 4506 is allowed to carry body and in which direction, R = Request, 4507 r=response. Note: It is allowed for all error messages 4xx and 5xx to 4508 have a body 4510 The general syntax for header fields is covered in Section 5.2. This 4511 section lists the full set of header fields along with notes on 4512 meaning, and usage. The syntax definition for header fields are 4513 present in Section 20.2.3. Throughout this section, we use [HX.Y] to 4514 informational refer to Section X.Y of the current HTTP/1.1 4515 specification RFC 2616 [RFC2616]. Examples of each header field are 4516 given. 4518 Information about header fields in relation to methods and proxy 4519 processing is summarized in Table 9, Table 10, Table 11, and 4520 Table 12. 4522 The "where" column describes the request and response types in which 4523 the header field can be used. Values in this column are: 4525 R: header field may only appear in requests; 4527 r: header field may only appear in responses; 4529 2xx, 4xx, etc.: A numerical value or range indicates response codes 4530 with which the header field can be used; 4532 c: header field is copied from the request to the response. 4534 An empty entry in the "where" column indicates that the header field 4535 may be present in both requests and responses. 4537 The "proxy" column describes the operations a proxy may perform on a 4538 header field. An empty proxy column indicates that the proxy MUST 4539 NOT do any changes to that header, all allowed operations are 4540 explicitly stated: 4542 a: A proxy can add or concatenate the header field if not present. 4544 m: A proxy can modify an existing header field value. 4546 d: A proxy can delete a header field value. 4548 r: A proxy needs to be able to read the header field, and thus 4549 this header field cannot be encrypted. 4551 The rest of the columns relate to the presence of a header field in a 4552 method. The method names when abbreviated, are according to Table 8: 4554 c: Conditional; requirements on the header field depend on the 4555 context of the message. 4557 m: The header field is mandatory. 4559 m*: The header field SHOULD be sent, but clients/servers need to be 4560 prepared to receive messages without that header field. 4562 o: The header field is optional. 4564 *: The header field MUST be present if the message body is not 4565 empty. See Section 16.16, Section 16.18 and Section 5.3 for 4566 details. 4568 -: The header field is not applicable. 4570 "Optional" means that a Client/Server MAY include the header field in 4571 a request or response. The Client/Server behavior when receiving 4572 such headers varies, for some it may ignore the header field, in 4573 other case it is request to process the header. This is regulated by 4574 the method and header descriptions. Example of headers that require 4575 processing are the Require and Proxy-Require header fields discussed 4576 in Section 16.42 and Section 16.35. A "mandatory" header field MUST 4577 be present in a request, and MUST be understood by the Client/Server 4578 receiving the request. A mandatory response header field MUST be 4579 present in the response, and the header field MUST be understood by 4580 the Client/Server processing the response. "Not applicable" means 4581 that the header field MUST NOT be present in a request. If one is 4582 placed in a request by mistake, it MUST be ignored by the Client/ 4583 Server receiving the request. Similarly, a header field labeled "not 4584 applicable" for a response means that the Client/Server MUST NOT 4585 place the header field in the response, and the Client/Server MUST 4586 ignore the header field in the response. 4588 An RTSP agent MUST ignore extension headers that are not understood. 4590 The From and Location header fields contain an URI. If the URI 4591 contains a comma, or semicolon, the URI MUST be enclosed in double 4592 quotes ("). Any URI parameters are contained within these quotes. 4593 If the URI is not enclosed in double quotas, any semicolon- delimited 4594 parameters are header-parameters, not URI parameters. 4596 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4597 | Header | Wher | Pro | DES | OPT | SETU | PLA | PAUS | TRD | 4598 | | e | xy | | | P | Y | E | | 4599 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4600 | Accept | R | | o | - | - | - | - | - | 4601 | | | | | | | | | | 4602 | Accept-Credent | R | r | o | o | o | o | o | o | 4603 | ials | | | | | | | | | 4604 | | | | | | | | | | 4605 | Accept-Encodin | R | r | o | - | - | - | - | - | 4606 | g | | | | | | | | | 4607 | | | | | | | | | | 4608 | Accept-Languag | R | r | o | - | - | - | - | - | 4609 | e | | | | | | | | | 4610 | | | | | | | | | | 4611 | Accept-Ranges | R | r | - | - | m | - | - | - | 4612 | | | | | | | | | | 4613 | Accept-Ranges | r | r | - | - | o | - | - | - | 4614 | | | | | | | | | | 4615 | Accept-Ranges | 456 | r | - | - | - | o | - | - | 4616 | | | | | | | | | | 4617 | Allow | r | am | c | c | c | - | - | - | 4618 | | | | | | | | | | 4619 | Allow | 405 | am | m | m | m | m | m | m | 4620 | | | | | | | | | | 4621 | Authorization | R | | o | o | o | o | o | o | 4622 | | | | | | | | | | 4623 | Bandwidth | R | | o | o | o | o | - | - | 4624 | | | | | | | | | | 4625 | Blocksize | R | | o | - | o | o | - | - | 4626 | | | | | | | | | | 4627 | Cache-Control | | r | o | - | o | - | - | - | 4628 | | | | | | | | | | 4629 | Connection | | | o | o | o | o | o | o | 4630 | | | | | | | | | | 4631 | Connection-Cre | 470, | ar | o | o | o | o | o | o | 4632 | dentials | 407 | | | | | | | | 4633 | | | | | | | | | | 4634 | Content-Base | r | | o | - | - | - | - | - | 4635 | | | | | | | | | | 4636 | Content-Base | 4xx, | | o | o | o | o | o | o | 4637 | | 5xx | | | | | | | | 4638 | | | | | | | | | | 4639 | Content-Encodi | R | r | - | - | - | - | - | - | 4640 | ng | | | | | | | | | 4641 | | | | | | | | | | 4642 | Content-Encodi | r | r | o | - | - | - | - | - | 4643 | ng | | | | | | | | | 4644 | | | | | | | | | | 4645 | Content-Encodi | 4xx, | r | o | o | o | o | o | o | 4646 | ng | 5xx | | | | | | | | 4647 | | | | | | | | | | 4648 | Content-Langua | R | r | - | - | - | - | - | - | 4649 | ge | | | | | | | | | 4650 | | | | | | | | | | 4651 | Content-Langua | r | r | o | - | - | - | - | - | 4652 | ge | | | | | | | | | 4653 | | | | | | | | | | 4654 | Content-Langua | 4xx, | r | o | o | o | o | o | o | 4655 | ge | 5xx | | | | | | | | 4656 | | | | | | | | | | 4657 | Content-Length | r | r | * | - | - | - | - | - | 4658 | | | | | | | | | | 4659 | Content-Length | 4xx, | r | * | * | * | * | * | * | 4660 | | 5xx | | | | | | | | 4661 | | | | | | | | | | 4662 | Content-Locati | r | | o | - | - | - | - | - | 4663 | on | | | | | | | | | 4664 | | | | | | | | | | 4665 | Content-Locati | 4xx, | | o | o | o | o | o | o | 4666 | on | 5xx | | | | | | | | 4667 | | | | | | | | | | 4668 | Content-Type | r | | * | - | - | - | - | - | 4669 | Content-Type | 4xx, | | * | * | * | * | * | * | 4670 | | 5xx | | | | | | | | 4671 | | | | | | | | | | 4672 | CSeq | Rc | rm | m | m | m | m | m | m | 4673 | | | | | | | | | | 4674 | Date | | am | o | o | o | o | o | o | 4675 | | | | | | | | | | 4676 | MTag | r | r | o | - | o | - | - | - | 4677 | | | | | | | | | | 4678 | Expires | r | r | o | - | - | - | - | - | 4679 | | | | | | | | | | 4680 | From | R | r | o | o | o | o | o | o | 4681 | | | | | | | | | | 4682 | If-Match | R | r | - | - | o | - | - | - | 4683 | | | | | | | | | | 4684 | If-Modified-Si | R | r | o | - | o | - | - | - | 4685 | nce | | | | | | | | | 4686 | | | | | | | | | | 4687 | If-None-Match | R | r | o | - | - | - | - | - | 4688 | | | | | | | | | | 4689 | Last-Modified | r | r | o | - | - | - | - | - | 4690 | | | | | | | | | | 4691 | Location | 3rr | | o | o | o | o | o | o | 4692 +----------------+------+-----+-----+-----+------+-----+------+-----+ 4694 Table 9: Overview of RTSP header fields (A-L) related to methods 4695 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 4697 +--------------+-------+------+----+----+------+------+-------+-----+ 4698 | Header | Where | Prox | DE | OP | SETU | PLAY | PAUSE | TRD | 4699 | | | y | S | T | P | | | | 4700 +--------------+-------+------+----+----+------+------+-------+-----+ 4701 | Media- | | | - | - | r | r | r | - | 4702 | Properties | | | | | | | | | 4703 | | | | | | | | | | 4704 | Media- Range | | | - | - | r | r | r | - | 4705 | | | | | | | | | | 4706 | Pipelined- | | amdr | - | o | o | o | o | o | 4707 | Requests | | | | | | | | | 4708 | | | | | | | | | | 4709 | Proxy- | 407 | amr | m | m | m | m | m | m | 4710 | Authenticate | | | | | | | | | 4711 | | | | | | | | | | 4712 | Proxy- | R | rd | o | o | o | o | o | o | 4713 | Authorizatio | | | | | | | | | 4714 | n | | | | | | | | | 4715 | | | | | | | | | | 4716 | Proxy- | R | ar | o | o | o | o | o | o | 4717 | Require | | | | | | | | | 4718 | | | | | | | | | | 4719 | Proxy- | r | r | c | c | c | c | c | c | 4720 | Require | | | | | | | | | 4721 | | | | | | | | | | 4722 | Proxy- | R | amr | c | c | c | c | c | c | 4723 | Supported | | | | | | | | | 4724 | | | | | | | | | | 4725 | Proxy- | r | | c | c | c | c | c | c | 4726 | Supported | | | | | | | | | 4727 | | | | | | | | | | 4728 | Public | r | admr | - | m | - | - | - | - | 4729 | | | | | | | | | | 4730 | Public | 501 | admr | m | m | m | m | m | m | 4731 | | | | | | | | | | 4732 | Range | R | | - | - | - | o | - | - | 4733 | | | | | | | | | | 4734 | Range | r | | - | - | c | m | m | - | 4735 | | | | | | | | | | 4736 | Terminate-Re | R | r | - | - | - | - | - | - | 4737 | ason | | | | | | | | | 4738 | | | | | | | | | | 4739 | Referer | R | | o | o | o | o | o | o | 4740 | | | | | | | | | | 4741 | Request- | R | | - | - | - | - | - | - | 4742 | Status | | | | | | | | | 4743 | | | | | | | | | | 4744 | Require | R | | o | o | o | o | o | o | 4745 | | | | | | | | | | 4746 | Retry-After | 3rr,5 | | o | o | o | - | - | - | 4747 | | 03 | | | | | | | | 4748 | | | | | | | | | | 4749 | Retry-After | 413 | | o | o | o | o | o | o | 4750 | | | | | | | | | | 4751 | RTP-Info | r | | - | - | c | c | - | - | 4752 | | | | | | | | | | 4753 | Scale | | | - | - | - | o | - | - | 4754 | | | | | | | | | | 4755 | Seek-Style | R | | - | - | - | o | - | - | 4756 | | | | | | | | | | 4757 | Seek-Style | r | | - | - | - | m | - | - | 4758 | | | | | | | | | | 4759 | Session | R | r | - | o | o | m | m | m | 4760 | | | | | | | | | | 4761 | Session | r | r | - | c | m | m | m | o | 4762 | | | | | | | | | | 4763 | Server | R | r | - | o | - | - | - | - | 4764 | Server | r | r | o | o | o | o | o | o | 4765 | | | | | | | | | | 4766 | Speed | | | - | - | - | o | - | - | 4767 | | | | | | | | | | 4768 | Supported | R | amr | o | o | o | o | o | o | 4769 | | | | | | | | | | 4770 | Supported | r | amr | c | c | c | c | c | c | 4771 | | | | | | | | | | 4772 | Timestamp | R | admr | o | o | o | o | o | o | 4773 | | | | | | | | | | 4774 | Timestamp | c | admr | m | m | m | m | m | m | 4775 | | | | | | | | | | 4776 | Transport | | amr | - | - | m | - | - | - | 4777 | | | | | | | | | | 4778 | Unsupported | r | | c | c | c | c | c | c | 4779 | | | | | | | | | | 4780 | User-Agent | R | | m* | m* | m* | m* | m* | m* | 4781 | | | | | | | | | | 4782 | Vary | r | | c | c | c | c | c | c | 4783 | | | | | | | | | | 4784 | Via | R | amr | o | o | o | o | o | o | 4785 | | | | | | | | | | 4786 | Via | c | dr | m | m | m | m | m | m | 4787 | | | | | | | | | | 4788 | WWW- | 401 | | m | m | m | m | m | m | 4789 | Authenticate | | | | | | | | | 4790 +--------------+-------+------+----+----+------+------+-------+-----+ 4792 Table 10: Overview of RTSP header fields (P-W) related to methods 4793 DESCRIBE, OPTIONS, SETUP, PLAY, PAUSE, and TEARDOWN. 4795 +------------------------+---------+-------+-----+-----+-----+-----+ 4796 | Header | Where | Proxy | GPR | SPR | RDR | PNY | 4797 +------------------------+---------+-------+-----+-----+-----+-----+ 4798 | Accept-Credentials | R | r | o | o | o | - | 4799 | | | | | | | | 4800 | Allow | 405 | amr | m | m | m | - | 4801 | | | | | | | | 4802 | Authorization | R | | o | o | o | - | 4803 | | | | | | | | 4804 | Bandwidth | R | | - | o | - | - | 4805 | | | | | | | | 4806 | Blocksize | R | | - | o | - | - | 4807 | | | | | | | | 4808 | Connection | | | o | o | o | - | 4809 | | | | | | | | 4810 | Connection-Credentials | 470,407 | ar | o | o | o | - | 4811 | | | | | | | | 4812 | Content-Base | R | | o | o | - | - | 4813 | | | | | | | | 4814 | Content-Base | r | | o | o | - | - | 4815 | | | | | | | | 4816 | Content-Base | 4xx,5xx | | o | o | o | - | 4817 | | | | | | | | 4818 | Content-Encoding | R | r | o | o | - | - | 4819 | | | | | | | | 4820 | Content-Encoding | r | r | o | o | - | - | 4821 | | | | | | | | 4822 | Content-Encoding | 4xx,5xx | r | o | o | o | - | 4823 | | | | | | | | 4824 | Content-Language | R | r | o | o | - | - | 4825 | | | | | | | | 4826 | Content-Language | r | r | o | o | - | - | 4827 | | | | | | | | 4828 | Content-Language | 4xx,5xx | r | o | o | o | - | 4829 | | | | | | | | 4830 | Content-Length | R | r | * | * | - | - | 4831 | | | | | | | | 4832 | Content-Length | r | r | * | * | - | - | 4833 | | | | | | | | 4834 | Content-Length | 4xx,5xx | r | * | * | * | - | 4835 | | | | | | | | 4836 | Content-Location | R | | o | o | - | - | 4837 | | | | | | | | 4838 | Content-Location | r | | o | o | - | - | 4839 | | | | | | | | 4840 | Content-Location | 4xx,5xx | | o | o | o | - | 4841 | | | | | | | | 4842 | Content-Type | R | | * | * | - | - | 4843 | | | | | | | | 4844 | Content-Type | r | | * | * | - | - | 4845 | | | | | | | | 4846 | Content-Type | 4xx | | * | * | * | - | 4847 | | | | | | | | 4848 | CSeq | R,c | mr | m | m | m | m | 4849 | | | | | | | | 4850 | Date | R | a | o | o | m | - | 4851 | | | | | | | | 4852 | Date | r | am | o | o | o | - | 4853 | | | | | | | | 4854 | From | R | r | o | o | o | - | 4855 | | | | | | | | 4856 | Last-Modified | R | r | - | - | - | - | 4857 | | | | | | | | 4858 | Last-Modified | r | r | o | - | - | - | 4859 | | | | | | | | 4860 | Location | 3rr | | o | o | o | - | 4861 | | | | | | | | 4862 | Location | R | | - | - | m | - | 4863 | | | | | | | | 4864 | Media-Properties | | | - | - | - | | 4865 | | | | | | | | 4866 | Media-Range | R | | o | - | - | c | 4867 | | | | | | | | 4868 | Media-Range | r | | c | - | - | - | 4869 | | | | | | | | 4870 | Notify-Reason | R | | - | - | - | m | 4871 | | | | | | | | 4872 | Pipelined-Requests | | amdr | o | o | o | - | 4873 | | | | | | | | 4874 | Proxy-Authenticate | 407 | amr | m | m | m | - | 4875 | | | | | | | | 4876 | Proxy-Authorization | R | rd | o | o | o | - | 4877 | | | | | | | | 4878 | Proxy-Require | R | ar | o | o | o | - | 4879 | | | | | | | | 4880 | Proxy-Require | r | r | c | c | c | - | 4881 | | | | | | | | 4882 | Proxy-Supported | R | amr | c | c | c | - | 4883 | | | | | | | | 4884 | Proxy-Supported | r | | c | c | c | - | 4885 | | | | | | | | 4886 | Public | 501 | admr | m | m | m | - | 4887 +------------------------+---------+-------+-----+-----+-----+-----+ 4889 Table 11: Overview of RTSP header fields (A-P) related to methods 4890 GET_PARAMETER, SET_PARAMETER, PLAY_NOTIFY, and REDIRECT. 4892 +------------------+-------------+-------+-----+-----+-----+-----+ 4893 | Header | Where | Proxy | GPR | SPR | RDR | PNY | 4894 +------------------+-------------+-------+-----+-----+-----+-----+ 4895 | Range | R | | - | - | o | m | 4896 | | | | | | | | 4897 | Terminate-Reason | R | r | - | - | m | - | 4898 | | | | | | | | 4899 | Referer | R | | o | o | o | - | 4900 | | | | | | | | 4901 | Request-Status | R | | - | - | - | m | 4902 | | | | | | | | 4903 | Require | R | r | o | o | o | - | 4904 | | | | | | | | 4905 | Retry-After | 3rr,413,503 | | o | o | - | - | 4906 | | | | | | | | 4907 | Retry-After | 413 | | o | o | o | o | 4908 | Scale | | | - | - | - | c | 4909 | | | | | | | | 4910 | Seek-Style | | | - | - | - | - | 4911 | | | | | | | | 4912 | Session | R | r | o | o | o | m | 4913 | | | | | | | | 4914 | Session | r | r | c | c | o | m | 4915 | | | | | | | | 4916 | Server | R | r | o | o | o | - | 4917 | | | | | | | | 4918 | Server | r | r | o | o | - | - | 4919 | | | | | | | | 4920 | Supported | R | adrm | o | o | o | - | 4921 | | | | | | | | 4922 | Supported | r | adrm | c | c | c | - | 4923 | | | | | | | | 4924 | Timestamp | R | adrm | o | o | o | - | 4925 | | | | | | | | 4926 | Timestamp | c | adrm | m | m | m | - | 4927 | | | | | | | | 4928 | Unsupported | r | arm | c | c | c | - | 4929 | | | | | | | | 4930 | User-Agent | R | r | m* | m* | - | - | 4931 | | | | | | | | 4932 | User-Agent | r | r | - | - | m* | - | 4933 | | | | | | | | 4934 | Vary | r | | c | c | - | - | 4935 | | | | | | | | 4936 | Via | R | amr | o | o | o | - | 4937 | | | | | | | | 4938 | Via | c | dr | m | m | m | - | 4939 | | | | | | | | 4940 | WWW-Authenticate | 401 | | m | m | m | - | 4941 +------------------+-------------+-------+-----+-----+-----+-----+ 4943 Table 12: Overview of RTSP header fields (R-W) related to methods 4944 GET_PARAMETER, SET_PARAMETER, PLAY_NOTIFY, and REDIRECT. 4946 16.1. Accept 4948 The Accept request-header field can be used to specify certain 4949 presentation description content types which are acceptable for the 4950 response. 4952 See Section 20.2.3 for the syntax. 4954 Example of use: 4955 Accept: application/example ;q=1.0, application/sdp 4957 16.2. Accept-Credentials 4959 The Accept-Credentials header is a request header used to indicate to 4960 any trusted intermediary how to handle further secured connections to 4961 proxies or servers. See Section 19 for the usage of this header. It 4962 MUST NOT be included in server to client requests. 4964 In a request the header MUST contain the method (User, Proxy, or Any) 4965 for approving credentials selected by the requester. The method MUST 4966 NOT be changed by any proxy, unless it is "proxy" when a proxy MAY 4967 change it to "user" to take the role of user approving each further 4968 hop. If the method is "User" the header contains zero or more of 4969 credentials that the client accepts. The header may contain zero 4970 credentials in the first RTSP request to a RTSP server when using the 4971 "User" method. This as the client has not yet received any 4972 credentials to accept. Each credential MUST consist of one URI 4973 identifying the proxy or server, the hash algorithm identifier, and 4974 the hash over that entity's DER encoded certificate [RFC5280] in 4975 Base64 [RFC4648]. All RTSP clients and proxies MUST implement the 4976 SHA-256[FIPS-pub-180-2] algorithm for computation of the hash of the 4977 DER encoded certificate. The SHA-256 algorithm is identified by the 4978 token "sha-256". 4980 The intention with allowing for other hash algorithms is to enable 4981 the future retirement of algorithms that are not implemented 4982 somewhere else than here. Thus the definition of future algorithms 4983 for this purpose is intended to be extremely limited. A feature tag 4984 can be used to ensure that support for the replacement algorithm 4985 exist. 4987 Example: 4988 Accept-Credentials:User 4989 "rtsps://proxy2.example.com/";sha-256;exaIl9VMbQMOFGClx5rXnPJKVNI=, 4990 "rtsps://server.example.com/";sha-256;lurbjj5khhB0NhIuOXtt4bBRH1M= 4992 16.3. Accept-Encoding 4994 The Accept-Encoding request-header field is similar to Accept, but 4995 restricts the content-codings that are acceptable in the response. 4997 A server tests whether a content-coding is acceptable, according to 4998 an Accept-Encoding field, using these rules: 5000 1. If the content-coding is one of the content-codings listed in the 5001 Accept-Encoding field, then it is acceptable, unless it is 5002 accompanied by a qvalue of 0. (As defined in section 3.9, a 5003 qvalue of 0 means "not acceptable.") 5005 2. The special "*" symbol in an Accept-Encoding field matches any 5006 available content-coding not explicitly listed in the header 5007 field. 5009 3. If multiple content-codings are acceptable, then the acceptable 5010 content-coding with the highest non-zero qvalue is preferred. 5012 4. The "identity" content-coding is always acceptable, unless 5013 specifically refused because the Accept-Encoding field includes 5014 "identity;q=0", or because the field includes "*;q=0" and does 5015 not explicitly include the "identity" content-coding. If the 5016 Accept-Encoding field-value is empty, then only the "identity" 5017 encoding is acceptable. 5019 If an Accept-Encoding field is present in a request, and if the 5020 server cannot send a response which is acceptable according to the 5021 Accept-Encoding header, then the server SHOULD send an error response 5022 with the 406 (Not Acceptable) status code. 5024 If no Accept-Encoding field is present in a request, the server MAY 5025 assume that the client will accept any content coding. In this case, 5026 if "identity" is one of the available content-codings, then the 5027 server SHOULD use the "identity" content-coding, unless it has 5028 additional information that a different content-coding is meaningful 5029 to the client. 5031 16.4. Accept-Language 5033 The Accept-Language request-header field is similar to Accept, but 5034 restricts the set of natural languages that are preferred as a 5035 response to the request. Note that the language specified applies to 5036 the presentation description and any reason phrases, but not the 5037 media content. 5039 A language tag identifies a natural language spoken, written, or 5040 otherwise conveyed by human beings for communication of information 5041 to other human beings. Computer languages are explicitly excluded. 5042 The syntax and registry of RTSP 2.0 language tags is the same as that 5043 defined by [RFC4646]. 5045 Each language-range MAY be given an associated quality value which 5046 represents an estimate of the user's preference for the languages 5047 specified by that range. The quality value defaults to "q=1". For 5048 example: 5050 Accept-Language: da, en-gb;q=0.8, en;q=0.7 5052 would mean: "I prefer Danish, but will accept British English and 5053 other types of English." A language-range matches a language-tag if 5054 it exactly equals the tag, or if it exactly equals a prefix of the 5055 tag such that the first tag character following the prefix is "-". 5056 The special range "*", if present in the Accept-Language field, 5057 matches every tag not matched by any other range present in the 5058 Accept-Language field. 5060 Note: This use of a prefix matching rule does not imply that 5061 language tags are assigned to languages in such a way that it is 5062 always true that if a user understands a language with a certain 5063 tag, then this user will also understand all languages with tags 5064 for which this tag is a prefix. The prefix rule simply allows the 5065 use of prefix tags if this is the case. 5067 The language quality factor assigned to a language-tag by the Accept- 5068 Language field is the quality value of the longest language- range in 5069 the field that matches the language-tag. If no language- range in 5070 the field matches the tag, the language quality factor assigned is 0. 5071 If no Accept-Language header is present in the request, the server 5072 SHOULD assume that all languages are equally acceptable. If an 5073 Accept-Language header is present, then all languages which are 5074 assigned a quality factor greater than 0 are acceptable. 5076 16.5. Accept-Ranges 5078 The Accept-Ranges request and response-header field allows indication 5079 of the format supported in the Range header. The client MUST include 5080 the header in SETUP requests to indicate which formats it support to 5081 receive in PLAY and PAUSE responses, and REDIRECT requests. The 5082 server MUST include the header in SETUP and 456 error responses to 5083 indicate the formats supported for the resource indicated by the 5084 request URI. The header MAY be included in GET_PARAMETER request and 5085 response pairs. The GET_PARAMETER request MUST contain a Session 5086 header to identify the session context the request are related to. 5087 The requester and responder will indicate their capabilities 5088 regarding Range formats respectively. 5089 Accept-Ranges: NPT, SMPTE 5091 The syntax is defined in Section 20.2.3. 5093 16.6. Allow 5095 The Allow message-header field lists the methods supported by the 5096 resource identified by the Request-URI. The purpose of this field is 5097 to strictly inform the recipient of valid methods associated with the 5098 resource. An Allow header field MUST be present in a 405 (Method Not 5099 Allowed) response. The Allow header MUST also be present in all 5100 OPTIONS responses where the content of the header will not include 5101 exactly the same methods as listed in the Public header. 5103 The Allow MUST also be included in SETUP and DESCRIBE responses, if 5104 the methods allowed for the resource is different than the minimal 5105 implementation set. 5107 Example of use: 5108 Allow: SETUP, PLAY, SET_PARAMETER, DESCRIBE 5110 16.7. Authorization 5112 An RTSP client that wishes to authenticate itself with a server, 5113 usually, but not necessarily, after receiving a 401 response, does so 5114 by including an Authorization request-header field with the request. 5115 The Authorization field value consists of credentials containing the 5116 authentication information of the user agent for the realm of the 5117 resource being requested. 5119 If a request is authenticated and a realm specified, the same 5120 credentials SHOULD be valid for all other requests within this realm 5121 (assuming that the authentication scheme itself does not require 5122 otherwise, such as credentials that vary according to a challenge 5123 value or using synchronized clocks). 5125 When a shared cache (see Section 18) receives a request containing an 5126 Authorization field, it MUST NOT return the corresponding response as 5127 a reply to any other request, unless one of the following specific 5128 exceptions holds: 5130 1. If the response includes the "maxage" cache-control directive, 5131 the cache MAY use that response in replying to a subsequent 5132 request. But (if the specified maximum age has passed) a proxy 5133 cache MUST first revalidate it with the origin server, using the 5134 request-headers from the new request to allow the origin server 5135 to authenticate the new request. (This is the defined behavior 5136 for maxage.) If the response includes "maxage=0", the proxy MUST 5137 always revalidate it before re-using it. 5139 2. If the response includes the "must-revalidate" cache-control 5140 directive, the cache MAY use that response in replying to a 5141 subsequent request. But if the response is stale, all caches 5142 MUST first revalidate it with the origin server, using the 5143 request-headers from the new request to allow the origin server 5144 to authenticate the new request. 5146 3. If the response includes the "public" cache-control directive, it 5147 MAY be returned in reply to any subsequent request. 5149 16.8. Bandwidth 5151 The Bandwidth request-header field describes the estimated bandwidth 5152 available to the client, expressed as a positive integer and measured 5153 in bits per second. The bandwidth available to the client may change 5154 during an RTSP session, e.g., due to mobility, congestion, etc. 5156 Example: 5157 Bandwidth: 62360 5159 16.9. Blocksize 5161 The Blocksize request-header field is sent from the client to the 5162 media server asking the server for a particular media packet size. 5163 This packet size does not include lower-layer headers such as IP, 5164 UDP, or RTP. The server is free to use a blocksize which is lower 5165 than the one requested. The server MAY truncate this packet size to 5166 the closest multiple of the minimum, media-specific block size, or 5167 override it with the media-specific size if necessary. The block 5168 size MUST be a positive decimal number, measured in octets. The 5169 server only returns an error (4xx) if the value is syntactically 5170 invalid. 5172 16.10. Cache-Control 5174 The Cache-Control general-header field is used to specify directives 5175 that MUST be obeyed by all caching mechanisms along the request/ 5176 response chain. 5178 Cache directives MUST be passed through by a proxy or gateway 5179 application, regardless of their significance to that application, 5180 since the directives may be applicable to all recipients along the 5181 request/response chain. It is not possible to specify a cache- 5182 directive for a specific cache. 5184 Cache-Control should only be specified in a SETUP request and its 5185 response. Note: Cache-Control does not govern the caching of 5186 responses as for HTTP, instead it applies to the media stream 5187 identified by the SETUP request. The RTSP requests are generally not 5188 cacheable, for further information see Section 18. Below is the 5189 description of the cache directives that can be included in the 5190 Cache-Control header. 5192 no-cache: Indicates that the media stream MUST NOT be cached 5193 anywhere. This allows an origin server to prevent caching even 5194 by caches that have been configured to return stale responses 5195 to client requests. Note, there is no security function 5196 enforcing that the content can't be cached. 5198 public: Indicates that the media stream is cacheable by any cache. 5200 private: Indicates that the media stream is intended for a single 5201 user and MUST NOT be cached by a shared cache. A private (non- 5202 shared) cache may cache the media streams. 5204 no-transform: An intermediate cache (proxy) may find it useful to 5205 convert the media type of a certain stream. A proxy might, for 5206 example, convert between video formats to save cache space or 5207 to reduce the amount of traffic on a slow link. Serious 5208 operational problems may occur, however, when these 5209 transformations have been applied to streams intended for 5210 certain kinds of applications. For example, applications for 5211 medical imaging, scientific data analysis and those using end- 5212 to-end authentication all depend on receiving a stream that is 5213 bit-for-bit identical to the original media stream. Therefore, 5214 if a response includes the no-transform directive, an 5215 intermediate cache or proxy MUST NOT change the encoding of the 5216 stream. Unlike HTTP, RTSP does not provide for partial 5217 transformation at this point, e.g., allowing translation into a 5218 different language. 5220 only-if-cached: In some cases, such as times of extremely poor 5221 network connectivity, a client may want a cache to return only 5222 those media streams that it currently has stored, and not to 5223 receive these from the origin server. To do this, the client 5224 may include the only-if-cached directive in a request. If it 5225 receives this directive, a cache SHOULD either respond using a 5226 cached media stream that is consistent with the other 5227 constraints of the request, or respond with a 504 (Gateway 5228 Timeout) status. However, if a group of caches is being 5229 operated as a unified system with good internal connectivity, 5230 such a request MAY be forwarded within that group of caches. 5232 max-stale: Indicates that the client is willing to accept a media 5233 stream that has exceeded its expiration time. If max-stale is 5234 assigned a value, then the client is willing to accept a 5235 response that has exceeded its expiration time by no more than 5236 the specified number of seconds. If no value is assigned to 5237 max-stale, then the client is willing to accept a stale 5238 response of any age. 5240 min-fresh: Indicates that the client is willing to accept a media 5241 stream whose freshness lifetime is no less than its current age 5242 plus the specified time in seconds. That is, the client wants 5243 a response that will still be fresh for at least the specified 5244 number of seconds. 5246 must-revalidate: When the must-revalidate directive is present in a 5247 SETUP response received by a cache, that cache MUST NOT use the 5248 entry after it becomes stale to respond to a subsequent request 5249 without first revalidating it with the origin server. That is, 5250 the cache is required to do an end-to-end revalidation every 5251 time, if, based solely on the origin server's Expires, the 5252 cached response is stale.) 5254 proxy-revalidate: The proxy-revalidate directive has the same 5255 meaning as the must-revalidate directive, except that it does 5256 not apply to non-shared user agent caches. It can be used on a 5257 response to an authenticated request to permit the user's cache 5258 to store and later return the response without needing to 5259 revalidate it (since it has already been authenticated once by 5260 that user), while still requiring proxies that service many 5261 users to revalidate each time (in order to make sure that each 5262 user has been authenticated). Note that such authenticated 5263 responses also need the public cache control directive in order 5264 to allow them to be cached at all. 5266 max-age: When an intermediate cache is forced, by means of a max- 5267 age=0 directive, to revalidate its own cache entry, and the 5268 client has supplied its own validator in the request, the 5269 supplied validator might differ from the validator currently 5270 stored with the cache entry. In this case, the cache MAY use 5271 either validator in making its own request without affecting 5272 semantic transparency. 5274 However, the choice of validator might affect performance. The best 5275 approach is for the intermediate cache to use its own validator when 5276 making its request. If the server replies with 304 (Not Modified), 5277 then the cache can return its now validated copy to the client with a 5278 200 (OK) response. If the server replies with a new entity and cache 5279 validator, however, the intermediate cache can compare the returned 5280 validator with the one provided in the client's request, using the 5281 strong comparison function. If the client's validator is equal to 5282 the origin server's, then the intermediate cache simply returns 304 5283 (Not Modified). Otherwise, it returns the new entity with a 200 (OK) 5284 response. 5286 16.11. Connection 5288 The Connection general-header field allows the sender to specify 5289 options that are desired for that particular connection and MUST NOT 5290 be communicated by proxies over further connections. 5292 RTSP 2.0 proxies MUST parse the Connection header field before a 5293 message is forwarded and, for each connection-token in this field, 5294 remove any header field(s) from the message with the same name as the 5295 connection-token. Connection options are signaled by the presence of 5296 a connection-token in the Connection header field, not by any 5297 corresponding additional header field(s), since the additional header 5298 field may not be sent if there are no parameters associated with that 5299 connection option. 5301 Message headers listed in the Connection header MUST NOT include end- 5302 to-end headers, such as Cache-Control. 5304 The use of the connection option "close" in RTSP messages SHOULD be 5305 limited to error messages when the server is unable to recover and 5306 therefore see it necessary to close the connection. The reason is 5307 that the client has the choice of continuing using a connection 5308 indefinitely, as long as it sends valid messages. 5310 16.12. Connection-Credentials 5312 The Connection-Credentials response header is used to carry the chain 5313 of credentials of any next hop that need to be approved by the 5314 requester. It MUST only be used in server to client responses. 5316 The Connection-Credentials header in an RTSP response MUST, if 5317 included, contain the credential information (in form of a list of 5318 certificates providing the chain of certification) of the next hop 5319 that an intermediary needs to securely connect to. The header MUST 5320 include the URI of the next hop (proxy or server) and a base64 5321 [RFC4648] encoded binary structure containing a sequence of DER 5322 encoded X.509v3 certificates[RFC5280] . 5324 The binary structure starts with the number of certificates 5325 (NR_CERTS) included as a 16 bit unsigned integer. This is followed 5326 by NR_CERTS number of 16 bit unsigned integers providing the size in 5327 octets of each DER encoded certificate. This is followed by NR_CERTS 5328 number of DER encoded X.509v3 certificates in a sequence (chain). 5329 The proxy or server's certificate must come first in the structure. 5330 Each following certificate must directly certify the one preceding 5331 it. Because certificate validation requires that root keys be 5332 distributed independently, the self-signed certificate which 5333 specifies the root certificate authority may optionally be omitted 5334 from the chain, under the assumption that the remote end must already 5335 possess it in order to validate it in any case. 5337 Example: 5339 Connection-Credentials:"rtsps://proxy2.example.com/";MIIDNTCC... 5341 Where MIIDNTCC... is a BASE64 encoding of the following structure: 5343 0 1 2 3 5344 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 5345 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5346 | Number of certificates | Size of certificate #1 | 5347 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5348 | Size of certificate #2 | Size of certificate #3 | 5349 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5350 : DER Encoding of Certificate #1 : 5351 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5352 : DER Encoding of Certificate #2 : 5353 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5354 : DER Encoding of Certificate #3 : 5355 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5357 16.13. Content-Base 5359 The Content-Base message-header field may be used to specify the base 5360 URI for resolving relative URIs within the message body. 5361 Content-Base: rtsp://media.example.com/movie/twister 5362 If no Content-Base field is present, the base URI of an message body 5363 is defined either by its Content-Location (if that Content-Location 5364 URI is an absolute URI) or the URI used to initiate the request, in 5365 that order of precedence. Note, however, that the base URI of the 5366 contents within the message-body may be redefined within that 5367 message-body. 5369 16.14. Content-Encoding 5371 The Content-Encoding header field is used as a modifier to the media- 5372 type. When present, its value indicates what additional content 5373 codings have been applied to the message body, and thus what decoding 5374 mechanisms must be applied in order to obtain the media-type 5375 referenced by the Content-Type header field. Content-Encoding is 5376 primarily used to allow a document to be compressed without losing 5377 the identity of its underlying media type. 5379 The content-coding is a characteristic of the entity identified by 5380 the Request-URI. Typically, the message body is stored with this 5381 encoding and is only decoded before rendering or analogous usage. 5383 However, a non-transparent proxy MAY modify the content-coding if the 5384 new coding is known to be acceptable to the recipient, unless the 5385 "no-transform" cache-control directive is present in the message. 5387 If the content-coding of an message body is not "identity", then the 5388 response MUST include a Content-Encoding entity-header that lists the 5389 non-identity content-coding(s) used. 5391 If the content-coding of an message body in a request message is not 5392 acceptable to the origin server, the server SHOULD respond with a 5393 status code of 415 (Unsupported Media Type). 5395 If multiple encodings have been applied to a message body, the 5396 content codings MUST be listed in the order in which they were 5397 applied. Additional information about the encoding parameters MAY be 5398 provided by other header fields not defined by this specification. 5400 16.15. Content-Language 5402 The Content-Language header field describes the natural language(s) 5403 of the intended audience for the enclosed message body. Note that 5404 this might not be equivalent to all the languages used within the 5405 message body. 5407 Language tags are mentioned in Section 16.4. The primary purpose of 5408 Content-Language is to allow a user to identify and differentiate 5409 entities according to the user's own preferred language. Thus, if 5410 the body content is intended only for a Danish-literate audience, the 5411 appropriate field is 5413 Content-Language: da 5415 If no Content-Language is specified, the default is that the content 5416 is intended for all language audiences. This might mean that the 5417 sender does not consider it to be specific to any natural language, 5418 or that the sender does not know for which language it is intended. 5420 Multiple languages MAY be listed for content that is intended for 5421 multiple audiences. For example, a rendition of the "Treaty of 5422 Waitangi," presented simultaneously in the original Maori and English 5423 versions, would call for 5425 Content-Language: mi, en 5427 However, just because multiple languages are present within an entity 5428 does not mean that it is intended for multiple linguistic audiences. 5429 An example would be a beginner's language primer, such as "A First 5430 Lesson in Latin," which is clearly intended to be used by an English- 5431 literate audience. In this case, the Content-Language would properly 5432 only include "en". 5434 Content-Language MAY be applied to any media type -- it is not 5435 limited to textual documents. 5437 16.16. Content-Length 5439 The Content-Length general-header field contains the length of the 5440 message body of the RTSP message (i.e. after the double CRLF 5441 following the last header). Unlike HTTP, it MUST be included in all 5442 messages that carry a message body beyond the header portion of the 5443 RTSP message. If it is missing, a default value of zero is assumed. 5444 Any Content-Length greater than or equal to zero is a valid value. 5446 16.17. Content-Location 5448 The Content-Location header field MAY be used to supply the resource 5449 location for the entity enclosed in the message when that entity is 5450 accessible from a location separate from the requested resource's 5451 URI. A server SHOULD provide a Content-Location for the variant 5452 corresponding to the response entity; especially in the case where a 5453 resource has multiple entities associated with it, and those entities 5454 actually have separate locations by which they might be individually 5455 accessed, the server SHOULD provide a Content-Location for the 5456 particular variant which is returned. 5458 The Content-Location value is not a replacement for the original 5459 requested URI; it is only a statement of the location of the resource 5460 corresponding to this particular entity at the time of the request. 5461 Future requests MAY specify the Content-Location URI as the request- 5462 URI if the desire is to identify the source of that particular 5463 entity. 5465 A cache cannot assume that an entity with a Content-Location 5466 different from the URI used to retrieve it can be used to respond to 5467 later requests on that Content-Location URI. However, the Content- 5468 Location can be used to differentiate between multiple entities 5469 retrieved from a single requested resource. 5471 If the Content-Location is a relative URI, the relative URI is 5472 interpreted relative to the Request-URI. 5474 16.18. Content-Type 5476 The Content-Type header indicates the media type of the message body 5477 sent to the recipient. Note that the content types suitable for RTSP 5478 are likely to be restricted in practice to presentation descriptions 5479 and parameter-value types. 5481 16.19. CSeq 5483 The CSeq general-header field specifies the sequence number for an 5484 RTSP request-response pair. This field MUST be present in all 5485 requests and responses. For every RTSP request containing the given 5486 sequence number, the corresponding response will have the same 5487 number. Any retransmitted request MUST contain the same sequence 5488 number as the original (i.e. the sequence number is not incremented 5489 for retransmissions of the same request). For each new RTSP request 5490 the CSeq value MUST be incremented by one. The initial sequence 5491 number MAY be any number, however it is RECOMMENDED to start at 0. 5492 Each sequence number series is unique between each requester and 5493 responder, i.e. the client has one series for its request to a server 5494 and the server has another when sending request to the client. Each 5495 requester and responder is identified with its network address. 5497 Proxies that aggregate several sessions on the same transport will 5498 regularly need to renumber the CSeq header field in requests and 5499 responses to fulfill the rules for the header. 5501 Example: 5502 CSeq: 239 5504 16.20. Date 5506 The Date header field represents the date and time at which the 5507 message was originated. The inclusion of the Date header in RTSP 5508 message follows these rules: 5510 o An RTSP message, sent either by the client or the server, 5511 containing a body MUST include a Date header, if the sending host 5512 has a clock; 5514 o Clients and servers are RECOMMENDED to include a Date header in 5515 all other RTSP messages, if the sending host has a clock; 5517 o If the server does not have a clock that can provide a reasonable 5518 approximation of the current time, its responses MUST NOT include 5519 a Date header field. In this case, this rule MUST be followed: 5520 Some origin server implementations might not have a clock 5521 available. An origin server without a clock MUST NOT assign 5522 Expires or Last- Modified values to a response, unless these 5523 values were associated with the resource by a system or user with 5524 a reliable clock. It MAY assign an Expires value that is known, 5525 at or before server configuration time, to be in the past (this 5526 allows "pre-expiration" of responses without storing separate 5527 Expires values for each resource). 5529 A received message that does not have a Date header field MUST be 5530 assigned one by the recipient if the message will be cached by that 5531 recipient . An RTSP implementation without a clock MUST NOT cache 5532 responses without revalidating them on every use. An RTSP cache, 5533 especially a shared cache, SHOULD use a mechanism, such as NTP, to 5534 synchronize its clock with a reliable external standard. 5536 The RTSP-date sent in a Date header SHOULD NOT represent a date and 5537 time subsequent to the generation of the message. It SHOULD 5538 represent the best available approximation of the date and time of 5539 message generation, unless the implementation has no means of 5540 generating a reasonably accurate date and time. In theory, the date 5541 ought to represent the moment just before the entity is generated. 5542 In practice, the date can be generated at any time during the message 5543 origination without affecting its semantic value. 5545 16.21. Expires 5547 The Expires message-header field gives a date and time after which 5548 the description or media-stream should be considered stale. The 5549 interpretation depends on the method: 5551 DESCRIBE response: The Expires header indicates a date and time 5552 after which the presentation description (body) SHOULD be 5553 considered stale. 5555 SETUP response: The Expires header indicate a date and time after 5556 which the media stream SHOULD be considered stale. 5558 A stale cache entry may not normally be returned by a cache (either a 5559 proxy cache or an user agent cache) unless it is first validated with 5560 the origin server (or with an intermediate cache that has a fresh 5561 copy of the message body). See Section 18 for further discussion of 5562 the expiration model. 5564 The presence of an Expires field does not imply that the original 5565 resource will change or cease to exist at, before, or after that 5566 time. 5568 Editor's note: The below line is contradicting, as HTTP-date also 5569 allows rfc850 and ASCII style (see [H3.3]); 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. 5814 The value 0 have no meaning and must not be used. 5816 An Example of this header for first an on-demand content and then a 5817 live stream without recording. 5819 On-demand: 5820 Media-Properties: Random-Access=2.5s, Unlimited, Immutable, 5821 Scales="-20, -10, -4, 0.5:1.5, 4, 8, 10, 15, 20" 5823 Live stream without recording/timeshifting: 5824 Media-Properties: No-Seeking, Time-Progressing, Time-Duration=0.0 5826 16.29. Media-Range 5828 The Media-Range general header is used to give the range of the media 5829 at the time of sending the RTSP message. This header MUST be 5830 included in SETUP response, and PLAY and PAUSE response for media 5831 that are Time-Progressing, and PLAY and PAUSE response after any 5832 change for media that are Dynamic, and in PLAY_NOTIFY request that 5833 are sent due to Media-Property-Update. Media-Range header without 5834 any range specifications MAY be included in GET_PARAMETER requests to 5835 the server to request the current range. The server MUST in this 5836 case include the current range at the time of sending the response. 5838 The header MUST include range specifications for all time formats 5839 supported for the media, as indicated in Accept-Ranges header 5840 (Section 16.5) when setting up the media. The server MAY include 5841 more than one range specification of any given time format to 5842 indicate media that has non-continuous range. 5844 For media that has the Time-Progressing property, the Media-Range 5845 values will only be valid for the particular point in time when it 5846 was issued. As wallclock progresses so will also the media range. 5847 However it shall be assumed that media time progress in direct 5848 relationship to wallclock time (with the exception of clock skew) so 5849 that a reasonably accurate estimation of the media range can be 5850 calculated. 5852 16.30. MTag 5854 The MTag response header MAY be included in DESCRIBE or SETUP 5855 responses. The message body tags (Section 4.8) returned in a 5856 DESCRIBE response, and the one in SETUP refers to the presentation, 5857 i.e. both the returned session description and the media stream. 5858 This allows for verification that one has the right session 5859 description to a media resource at the time of the SETUP request. 5860 However it has the disadvantage that a change in any of the parts 5861 results in invalidation of all the parts. 5863 If the MTag is provided both inside the message body, e.g. within the 5864 "a=mtag" attribute in SDP, and in the response message, then both 5865 tags MUST be identical. It is RECOMMENDED that the MTag is primarily 5866 given in the RTSP response message, to ensure that caches can use the 5867 MTag without requiring content inspection. However for session 5868 descriptions that are distributed outside of RTSP, for example using 5869 HTTP, etc. it will be necessary to include the message body tag in 5870 the session description as specified in Appendix D.1.9. 5872 SETUP and DESCRIBE requests can be made conditional upon the MTag 5873 using the headers If-Match (Section 16.23) and If-None-Match ( 5874 Section 16.25). 5876 16.31. Notify-Reason 5878 The Notify Reason header is solely used in the PLAY_NOTIFY method. 5879 It indicates the reason why the server has sent the asynchronous 5880 PLAY_NOTIFY request (see Section 13.5). 5882 16.32. Pipelined-Requests 5884 The Pipelined-Requests general header is used to indicate that a 5885 request is to be executed in the context created by previous 5886 requests. The primary usage of this header is to allow pipelining of 5887 SETUP requests so that any additional SETUP request after the first 5888 one does not need to wait for the session ID to be sent back to the 5889 requesting entity. The header contains a unique identifier that is 5890 scoped by the persistent connection used to send the requests. 5892 Upon receiving a request with the Pipelined-Requests the responding 5893 entity MUST look up if there exist a binding between this Pipelined- 5894 Requests identifier for the current persistent connection and an RTSP 5895 session ID. If that exists then the received request is processed 5896 the same way as if it did contain the Session header with the looked 5897 up session ID. If there doesn't exist a mapping and no Session 5898 header is included in the request, the responding entity MUST create 5899 a binding upon the successful completion of a session creating 5900 request, i.e. SETUP. If the request failed to create an RTSP 5901 session no binding MUST be created. In case the request contains 5902 both a Session header and the Pipelined-Requests header the 5903 Pipelined-Requests MUST be ignored. 5905 Note: Based on the above definition at least the first request 5906 containing a new unique Pipelined-Requests will be required to be a 5907 SETUP request (unless the protocol is extended with new methods of 5908 creating a session). After that first one, additional SETUP requests 5909 or request of any type using the RTSP session context may include the 5910 Pipelined-Requests header. 5912 For all responses to request that contained the Pipelined-Requests, 5913 the Session header and the Pipelined-Requests MUST both be included, 5914 assuming that it is allowed for that response and that the binding 5915 between the header values exist. Pipelined-Requests SHOULD NOT be 5916 used in requests after that the client has received the RTSP Session 5917 ID. This as using the real session ID allows the request to be used 5918 also in cases the persistent connection has been terminated and a new 5919 connection is needed. 5921 It is the sender of the request that is responsible for using a 5922 previously unused identifier within this transport connection scope 5923 when a new RTSP session is to be created with this method. A server 5924 side binding MUST be deleted upon the termination of the related RTSP 5925 session. Note: Although this definition would allow for reusing 5926 previously used pipelining identifiers, this is NOT RECOMMENDED to 5927 allow for better error handling and logging. 5929 RTSP Proxies may need to translate Pipelined-Requests identifier 5930 values from incoming request to outgoing to allow for aggregation of 5931 requests onto a persistent connection. 5933 16.33. Proxy-Authenticate 5935 The Proxy-Authenticate response-header field MUST be included as part 5936 of a 407 (Proxy Authentication Required) response. The field value 5937 consists of a challenge that indicates the authentication scheme and 5938 parameters applicable to the proxy for this Request-URI. 5940 The HTTP access authentication process is described in [RFC2617]. 5941 Unlike WWW-Authenticate, the Proxy-Authenticate header field applies 5942 only to the current connection and SHOULD NOT be passed on to 5943 downstream clients. However, an intermediate proxy might need to 5944 obtain its own credentials by requesting them from the downstream 5945 client, which in some circumstances will appear as if the proxy is 5946 forwarding the Proxy-Authenticate header field. 5948 16.34. Proxy-Authorization 5950 The Proxy-Authorization request-header field allows the client to 5951 identify itself (or its user) to a proxy which requires 5952 authentication. The Proxy-Authorization field value consists of 5953 credentials containing the authentication information of the user 5954 agent for the proxy and/or realm of the resource being requested. 5956 The HTTP access authentication process is described in [RFC2617]. 5957 Unlike Authorization, the Proxy-Authorization header field applies 5958 only to the next outbound proxy that demanded authentication using 5959 the Proxy- Authenticate field. When multiple proxies are used in a 5960 chain, the Proxy-Authorization header field is consumed by the first 5961 outbound proxy that was expecting to receive credentials. A proxy 5962 MAY relay the credentials from the client request to the next proxy 5963 if that is the mechanism by which the proxies cooperatively 5964 authenticate a given request. 5966 16.35. Proxy-Require 5968 The Proxy-Require request-header field is used to indicate proxy- 5969 sensitive features that MUST be supported by the proxy. Any Proxy- 5970 Require header features that are not supported by the proxy MUST be 5971 negatively acknowledged by the proxy to the client using the 5972 Unsupported header. The proxy MUST use the 551 (Option Not 5973 Supported) status code in the response. Any feature-tag included in 5974 the Proxy-Require does not apply to the end-point (server or client). 5975 To ensure that a feature is supported by both proxies and servers the 5976 tag needs to be included in also a Require header. 5978 See Section 16.42 for more details on the mechanics of this message 5979 and a usage example. See discussion in the proxies section 5980 (Section 17.1) about when to consider that a feature requires proxy 5981 support. 5983 Example of use: 5984 Proxy-Require: play.basic 5986 16.36. Proxy-Supported 5988 The Proxy-Supported header field enumerates all the extensions 5989 supported by the proxy using feature-tags. The header carries the 5990 intersection of extensions supported by the forwarding proxies. The 5991 Proxy-Supported header MAY be included in any request by a proxy. It 5992 MUST be added by any proxy if the Supported header is present in a 5993 request. When present in a request, the receiver MUST in the 5994 response copy the received Proxy-Supported header. 5996 The Proxy-Supported header field contains a list of feature-tags 5997 applicable to proxies, as described in Section 4.7. The list are the 5998 intersection of all feature-tags understood by the proxies. To 5999 achieve an intersection, the proxy adding the Proxy-Supported header 6000 includes all proxy feature-tags it understands. Any proxy receiving 6001 a request with the header, checks the list and removes any feature- 6002 tag it do not support. A Proxy-Supported header present in the 6003 response MUST NOT be touched by the proxies. 6005 Example: 6007 C->P1: OPTIONS rtsp://example.com/ RTSP/2.0 6008 Supported: foo, bar, blech 6009 User-Agent: PhonyClient/1.2 6011 P1->P2: OPTIONS rtsp://example.com/ RTSP/2.0 6012 Supported: foo, bar, blech 6013 Proxy-Supported: proxy-foo, proxy-bar, proxy-blech 6014 Via: 2.0 pro.example.com 6016 P2->S: OPTIONS rtsp://example.com/ RTSP/2.0 6017 Supported: foo, bar, blech 6018 Proxy-Supported: proxy-foo, proxy-blech 6019 Via: 2.0 pro.example.com, 2.0 prox2.example.com 6021 S->C: RTSP/2.0 200 OK 6022 Supported: foo, bar, baz 6023 Proxy-Supported: proxy-foo, proxy-blech 6024 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 6025 Via: 2.0 pro.example.com, 2.0 prox2.example.com 6027 16.37. Public 6029 The Public response header field lists the set of methods supported 6030 by the response sender. This header applies to the general 6031 capabilities of the sender and its only purpose is to indicate the 6032 sender's capabilities to the recipient. The methods listed may or 6033 may not be applicable to the Request-URI; the Allow header field 6034 (Section 16.6) MAY be used to indicate methods allowed for a 6035 particular URI. 6037 Example of use: 6038 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 6040 In the event that there are proxies between the sender and the 6041 recipient of a response, each intervening proxy MUST modify the 6042 Public header field to remove any methods that are not supported via 6043 that proxy. The resulting Public header field will contain an 6044 intersection of the sender's methods and the methods allowed through 6045 by the intervening proxies. 6047 In general, proxies should allow all methods to transparently pass 6048 through from the sending RTSP agent to the receiving RTSP agent, 6049 but there may be cases where this is not desirable for a given 6050 proxy. Modification of the Public response header field by the 6051 intervening proxies ensures that the request sender gets an 6052 accurate response indicating the methods that can be used on the 6053 target agent via the proxy chain. 6055 16.38. Range 6057 The Range header specifies a time range in PLAY (Section 13.4), PAUSE 6058 (Section 13.6), SETUP (Section 13.3), REDIRECT (Section 13.10), and 6059 PLAY_NOTIFY (Section 13.5) requests and responses. It MAY be 6060 included in GET_PARAMETER request from he client to the server with 6061 only a Range format and no value to request the current media 6062 position independent if the session is in playing or ready state in 6063 the included format. The server SHALL if supporting that range 6064 format respond with the current playing point or pause point as the 6065 start of the range. If an explicit stop point was used in the 6066 previous PLAY request, then that value shall be included as stop 6067 point. Note that if the server is currently under any type of media 6068 playback manipulation affecting the interpretation of Range, like 6069 Scale, that is also required to be included in any GET_PARAMETER 6070 response to provide complete information. 6072 The range can be specified in a number of units. This specification 6073 defines smpte (Section 4.4), npt (Section 4.5), and clock 6074 (Section 4.6) range units. While byte ranges [H14.35.1] and other 6075 extended units MAY be used, their behavior is unspecified since they 6076 are not normally meaningful in RTSP. Servers supporting the Range 6077 header MUST understand the NPT range format and SHOULD understand the 6078 SMPTE range format. If the Range header is sent in a time format 6079 that is not understood, the recipient SHOULD return 456 (Header Field 6080 Not Valid for Resource) and include an Accept-Ranges header 6081 indicating the supported time formats for the given resource. 6083 Example: 6084 Range: clock=19960213T143205Z- 6086 The Range header contains a range of one single range format. A 6087 range is a half-open interval with a start and an end point, 6088 including the start point, but excluding the end point. A range may 6089 either be fully specified with explicit values for start point and 6090 end point, or have either start or end point be implicit. An 6091 implicit start point indicates the session's pause point, and if no 6092 pause point is set the start of the content. An implicit end point 6093 indicates the end of the content. The usage of both implicit start 6094 and end point is not allowed in the same range header, however, the 6095 exclusion of the range header has that meaning, i.e. from pause point 6096 (or start) until end of content. 6098 Regarding the half-open intervals; a range of A-B starts exactly 6099 at time A, but ends just before B. Only the start time of a media 6100 unit such as a video or audio frame is relevant. For example, 6101 assume that video frames are generated every 40 ms. A range of 6102 10.0-10.1 would include a video frame starting at 10.0 or later 6103 time and would include a video frame starting at 10.08, even 6104 though it lasted beyond the interval. A range of 10.0-10.08, on 6105 the other hand, would exclude the frame at 10.08. 6107 Please note the difference between NPT time scales' "now" and an 6108 implicit start value. Implicit value reference the current pause- 6109 point. While "now" is the currently ongoing time. In a time- 6110 progressing session with recording (retention for some or full 6111 time) the pause point may be 2 min into the session while now 6112 could be 1 hour into the session. 6114 By default, range intervals increase, where the second point is 6115 larger than the first point. 6117 Example: 6118 Range: npt=10-15 6120 However, range intervals can also decrease if the Scale header (see 6121 Section 16.44) indicates a negative scale value. For example, this 6122 would be the case when a playback in reverse is desired. 6124 Example: 6125 Scale: -1 6126 Range: npt=15-10 6128 Decreasing ranges are still half open intervals as described above. 6129 Thus, for range A-B, A is closed and B is open. In the above 6130 example, 15 is closed and 10 is open. An exception to this rule is 6131 the case when B=0 in a decreasing range. In this case, the range is 6132 closed on both ends, as otherwise there would be no way to reach 0 on 6133 a reverse playback for formats that have such a notion, like NPT and 6134 SMPTE. 6136 Example: 6137 Scale: -1 6138 Range: npt=15-0 6140 In this range both 15 and 0 are closed. 6142 A decreasing range interval without a corresponding negative Scale 6143 header is not valid. 6145 16.39. Referer 6147 The Referer request-header field allows the client to specify, for 6148 the server's benefit, the address (URI) of the resource from which 6149 the Request-URI was obtained (the "referrer", although the header 6150 field is misspelled.) The URI refers to that of the presentation 6151 description, typically retrieved via HTTP. The Referer request- 6152 header allows a server to generate lists of back-links to resources 6153 for interest, logging, optimized caching, etc. It also allows 6154 obsolete or mistyped links to be traced for maintenance. The Referer 6155 field MUST NOT be sent if the Request-URI was obtained from a source 6156 that does not have its own URI, such as input from the user keyboard. 6158 If the field value is a relative URI, it SHOULD be interpreted 6159 relative to the Request-URI. The URI MUST NOT include a fragment. 6161 See [H15.1.3] for security considerations on Referer. 6163 16.40. Retry-After 6165 The Retry-After response-header field can be used with a 503 (Service 6166 Unavailable) response to indicate how long the service is expected to 6167 be unavailable to the requesting client. This field MAY also be used 6168 with any 3xx (Redirection) response to indicate the minimum time the 6169 user-agent is asked wait before issuing the redirected request. The 6170 value of this field can be either an RTSP-date or an integer number 6171 of seconds (in decimal) after the time of the response. 6173 Example: 6174 Retry-After: Fri, 31 Dec 1999 23:59:59 GMT 6175 Retry-After: 120 6177 In the latter example, the delay is 2 minutes. 6179 16.41. Request-Status 6181 This request header is used to indicate the end result for requests 6182 that takes time to complete, such a PLAY (Section 13.4). It is sent 6183 in PLAY_NOTIFY (Section 13.5) with the end-of-stream reason to report 6184 how the PLAY request concluded, either in success or in failure. The 6185 header carries a reference to the request is reports on using the 6186 CSeq number for the session indicated by the Session header in the 6187 request. It provides both a numerical status code (according to 6188 Section 8.1.1) and a human readable reason phrase. 6190 Example: 6191 Request-Status: cseq=63 status=500 reason="Media data unavailable" 6193 16.42. Require 6195 The Require request-header field is used by clients or servers to 6196 ensure that the other end-point supports features that are required 6197 in respect to this request. It can also be used to query if the 6198 other end-point supports certain features, however the use of the 6199 Supported (Section 16.49) is much more effective in this purpose. 6200 The server MUST respond to this header by using the Unsupported 6201 header to negatively acknowledge those feature-tags which are NOT 6202 supported. The response MUST use the error code 551 (Option Not 6203 Supported). This header does not apply to proxies, for the same 6204 functionality in respect to proxies see Proxy-Require header 6205 (Section 16.35) with the exception of media modifying proxies. Media 6206 modifying proxies due to their nature of handling media in a way that 6207 is very similar to what a server, do need to understand also the 6208 server features to correctly serve the client. 6210 This is to make sure that the client-server interaction will 6211 proceed without delay when all features are understood by both 6212 sides, and only slow down if features are not understood (as in 6213 the example below). For a well-matched client-server pair, the 6214 interaction proceeds quickly, saving a round-trip often required 6215 by negotiation mechanisms. In addition, it also removes state 6216 ambiguity when the client requires features that the server does 6217 not understand. 6219 Example (Not complete): 6220 C->S: SETUP rtsp://server.com/foo/bar/baz.rm RTSP/2.0 6221 CSeq: 302 6222 Require: funky-feature 6223 Funky-Parameter: funkystuff 6225 S->C: RTSP/2.0 551 Option not supported 6226 CSeq: 302 6227 Unsupported: funky-feature 6229 In this example, "funky-feature" is the feature-tag which indicates 6230 to the client that the fictional Funky-Parameter field is required. 6231 The relationship between "funky-feature" and Funky-Parameter is not 6232 communicated via the RTSP exchange, since that relationship is an 6233 immutable property of "funky-feature" and thus should not be 6234 transmitted with every exchange. 6236 Proxies and other intermediary devices MUST ignore this header. If a 6237 particular extension requires that intermediate devices support it, 6238 the extension should be tagged in the Proxy-Require field instead 6239 (see Section 16.35). See discussion in the proxies section 6240 (Section 17.1) about when to consider that a feature requires proxy 6241 support. 6243 16.43. RTP-Info 6245 The RTP-Info response-header field is used to set RTP-specific 6246 parameters in the PLAY response. For streams using RTP as transport 6247 protocol the RTP-Info header SHOULD be part of a 200 response to 6248 PLAY. 6250 The exclusion of the RTP-Info in a PLAY response for RTP 6251 transported media will result in that a client needs to 6252 synchronize the media streams using RTCP. This may have negative 6253 impact as the RTCP can be lost, and does not need to be 6254 particularly timely in their arrival. Also functionality as 6255 informing the client from which packet a seek has occurred is 6256 affected. 6258 The RTP-Info MAY be included in SETUP responses to provide 6259 synchronization information when changing transport parameters, see 6260 Section 13.3. The RTP-Info header MAY also be included in 6261 GET_PARAMETER requests from client to server without any value to 6262 indicate a request for this information. In such a case the Range 6263 header MUST also be included in the request. The server SHALL 6264 respond if the session is in playing state with the RTP-Info value 6265 corresponding to the given Range value. 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 Editor's note: this section needs to reviewed, as RTSP does not cache 6965 responses. 6967 The Vary field value indicates the set of request-header fields that 6968 fully determines, while the response is fresh, whether a cache is 6969 permitted to use the response to reply to a subsequent request 6970 without revalidation. For uncacheable or stale responses, the Vary 6971 field value advises the user agent about the criteria that were used 6972 to select the representation. A Vary field value of "*" implies that 6973 a cache cannot determine from the request headers of a subsequent 6974 request whether this response is the appropriate representation. See 6975 section 13.6 XXX for use of the Vary header field by caches 6977 An RTSP server SHOULD include a Vary header field with any cacheable 6978 response that is subject to server-driven negotiation. Doing so 6979 allows a cache to properly interpret future requests on that resource 6980 and informs the user agent about the presence of negotiation on that 6981 resource. A server MAY include a Vary header field with a non- 6982 cacheable response that is subject to server-driven negotiation, 6983 since this might provide the user agent with useful information about 6984 the dimensions over which the response varies at the time of the 6985 response. 6987 A Vary field value consisting of a list of field-names signals that 6988 the representation selected for the response is based on a selection 6989 algorithm which considers ONLY the listed request-header field values 6990 in selecting the most appropriate representation. A cache MAY assume 6991 that the same selection will be made for future requests with the 6992 same values for the listed field names, for the duration of time for 6993 which the response is fresh. 6995 The field-names given are not limited to the set of standard request- 6996 header fields defined by this specification. Field names are case- 6997 insensitive. 6999 A Vary field value of "*" signals that unspecified parameters not 7000 limited to the request-headers (e.g., the network address of the 7001 client), play a role in the selection of the response representation. 7002 The "*" value MUST NOT be generated by a proxy server; it may only be 7003 generated by an origin server. 7005 16.56. Via 7007 The Via general-header field MUST be used by proxies to indicate the 7008 intermediate protocols and recipients between the user agent and the 7009 server on requests, and between the origin server and the client on 7010 responses. The field is intended to be used for tracking message 7011 forwards, avoiding request loops, and identifying the protocol 7012 capabilities of all senders along the request/response chain. 7014 Multiple Via field values represents each proxy that has forwarded 7015 the message. Each recipient MUST append its information such that 7016 the end result is ordered according to the sequence of forwarding 7017 applications. 7019 Proxies (e.g., Access Proxy or Translator Proxy) SHOULD NOT, by 7020 default, forward the names and ports of hosts within the private/ 7021 protected region. This information SHOULD only be propagated if 7022 explicitly enabled. If not enabled, the via-received of any host 7023 behind the firewall/NAT SHOULD be replaced by an appropriate 7024 pseudonym for that host. 7026 For organizations that have strong privacy requirements for hiding 7027 internal structures, a proxy MAY combine an ordered subsequence of 7028 Via header field entries with identical sent-protocol values into a 7029 single such entry. Applications MUST NOT combine entries which have 7030 different received-protocol values. 7032 16.57. WWW-Authenticate 7034 The WWW-Authenticate response-header field MUST be included in 401 7035 (Unauthorized) response messages. The field value consists of at 7036 least one challenge that indicates the authentication scheme(s) and 7037 parameters applicable to the Request-URI. 7039 The HTTP access authentication process is described in [RFC2617]. 7040 User agents are advised to take special care in parsing the WWW- 7041 Authenticate field value as it might contain more than one challenge, 7042 or if more than one WWW-Authenticate header field is provided, the 7043 contents of a challenge itself can contain a comma-separated list of 7044 authentication parameters. 7046 17. Proxies 7048 RTSP Proxies are RTSP agents that sit in between a client and a 7049 server. A proxy can take on both the role as a client and as server 7050 depending on what it tries to accomplish. Proxies are also 7051 introduced for several different reasons and the below are often 7052 combined. 7054 Caching Proxy: This type of proxy is used to reduce the workload on 7055 servers and connections. By caching the description and media 7056 streams, i.e., the presentation, the proxy can serve a client 7057 with content, but without requesting it from the server once it 7058 has been cached and has not become stale. See the caching 7059 Section 18. This type of proxy is also expected to understand 7060 RTSP end-point functionality, i.e., functionality identified in 7061 the Require header in addition to what Proxy-Require demands. 7063 Translator Proxy: This type of proxy is used to ensure that an RTSP 7064 client get access to servers and content on an external network 7065 or using content encodings not supported by the client. The 7066 proxy performs the necessary translation of addresses, 7067 protocols or encodings. This type of proxy is expected to also 7068 understand RTSP end-point functionality, i.e. functionality 7069 identified in the Require header in addition to what Proxy- 7070 Require demands. 7072 Access Proxy: This type of proxy is used to ensure that a RTSP 7073 client get access to servers on an external network. Thus this 7074 proxy is placed on the border between two domains, e.g. a 7075 private address space and the public Internet. The proxy 7076 performs the necessary translation, usually addresses. This 7077 type of proxies are required to redirect the media to 7078 themselves or a controlled gateway that perform the translation 7079 before the media can reach the client. 7081 Security Proxy: This type of proxy is used to help facilitate 7082 security functions around RTSP. For example when having a 7083 firewalled network, the security proxy request that the 7084 necessary pinholes in the firewall is opened when a client in 7085 the protected network want to access media streams on the 7086 external side. This proxy can also limit the clients access to 7087 certain type of content. This proxy can perform its function 7088 without redirecting the media between the server and client. 7089 However, in deployments with private address spaces this proxy 7090 is likely to be combined with the access proxy. Anyway, the 7091 functionality of this proxy is usually closely tied into 7092 understand all aspects of how the media transport. 7094 Auditing Proxy: RTSP proxies can also provide network owners with a 7095 logging and audit point for RTSP sessions, e.g. for 7096 corporations that tracks their employees usage of the network. 7097 This type of proxy can perform its function without inserting 7098 itself or any other node in the media transport. This proxy 7099 type can also accept unknown methods as it doesn't interfere 7100 with the clients requests. 7102 All type of proxies can be used also when using secured communication 7103 with TLS as RTSP 2.0 allows the client to approve certificate chains 7104 used for connection establishment from a proxy, see Section 19.3.2. 7105 However that trust model may not be suitable for all type of 7106 deployment, and instead secured sessions do by-pass of the proxies. 7108 Access proxies SHOULD NOT be used in equipment like NATs and 7109 firewalls that aren't expected to be regularly maintained, like home 7110 or small office equipment. In these cases it is better to use the 7111 NAT traversal procedures defined for RTSP 2.0 7112 [I-D.ietf-mmusic-rtsp-nat]. The reason for these recommendations is 7113 that any extensions of RTSP resulting in new media transport 7114 protocols or profiles, new parameters etc may fail in a proxy that 7115 isn't maintained. Thus resulting in blocking further development of 7116 RTSP and its usage. 7118 17.1. Proxies and Protocol Extensions 7120 The existence of proxies must always be considered when developing 7121 new RTSP extensions. Most type of proxies will need to implement any 7122 new method to operate correct in the presence of that extension. New 7123 headers will be possible to introduce without being blocked by 7124 proxies not yet updated. However, it is important to consider if 7125 this header and its function is required to be understood by the 7126 proxy or can be forwarded. If the header needs to be understood a 7127 feature-tag representing the functionality needs to be included in 7128 the Proxy-Require header. Below are guidelines for analysis if the 7129 header needs to be understood. The transport header and its 7130 parameters also shows that headers that are extensible and requires 7131 correct interpretation in the proxy also requires handling rules. 7133 When defining a new RTSP header it needs to be considered if RTSP 7134 proxies are required to understand them to achieve correct 7135 functionality. Determining this is not easy as the functionality for 7136 proxies are widely varied as can be understood from the above list of 7137 functionality. When evaluating this one can dived the functionality 7138 into three main categories: 7140 Media modifying: The caching and translator proxies are modifying 7141 the actual media and therefore needs to understand also request 7142 directed to the server that affects how the media is rendered. 7143 Thus this type of proxies needs to also understand the server side 7144 functionality. 7146 Transport modifying: The access and the security proxy both need to 7147 understand the how the transport is performed, either for opening 7148 pinholes or to translate the outer headers, e.g. IP and UDP. 7150 Non-modifying: The audit proxy is special in that it do not modify 7151 the messages in other ways than to insert the Via header. That 7152 makes it possible for this type to forward RTSP message that 7153 contains different type of unknown methods, headers or header 7154 parameters. 7156 Based on the above classification one should evaluate if ones 7157 functionality requires the Transport modifying type of proxies to 7158 understand it or not. 7160 18. Caching 7162 In HTTP, response-request pairs are cached. RTSP differs 7163 significantly in that respect. Responses are not cacheable, with the 7164 exception of the presentation description returned by DESCRIBE. 7165 (Since the responses for anything but DESCRIBE and GET_PARAMETER do 7166 not return any data, caching is not really an issue for these 7167 requests.) However, it is desirable for the continuous media data, 7168 typically delivered out-of-band with respect to RTSP, to be cached, 7169 as well as the session description. 7171 On receiving a SETUP or PLAY request, a proxy ascertains whether it 7172 has an up-to-date copy of the continuous media content and its 7173 description. It can determine whether the copy is up-to-date by 7174 issuing a SETUP or DESCRIBE request, respectively, and comparing the 7175 Last-Modified header with that of the cached copy. If the copy is 7176 not up-to-date, it modifies the SETUP transport parameters as 7177 appropriate and forwards the request to the origin server. 7178 Subsequent control commands such as PLAY or PAUSE then pass the proxy 7179 unmodified. The proxy delivers the continuous media data to the 7180 client, while possibly making a local copy for later reuse. The 7181 exact behavior allowed to the cache is given by the cache-response 7182 directives described in Section 16.10. A cache MUST answer any 7183 DESCRIBE requests if it is currently serving the stream to the 7184 requester, as it is possible that low-level details of the stream 7185 description may have changed on the origin-server. 7187 Note that an RTSP cache, unlike the HTTP cache, is of the "cut- 7188 through" variety. Rather than retrieving the whole resource from the 7189 origin server, the cache simply copies the streaming data as it 7190 passes by on its way to the client. Thus, it does not introduce 7191 additional latency. 7193 To the client, an RTSP proxy cache appears like a regular media 7194 server, to the media origin server like a client. Just as an HTTP 7195 cache has to store the content type, content language, and so on for 7196 the objects it caches, a media cache has to store the presentation 7197 description. Typically, a cache eliminates all transport-references 7198 (that is, e.g. multicast information) from the presentation 7199 description, since these are independent of the data delivery from 7200 the cache to the client. Information on the encodings remains the 7201 same. If the cache is able to translate the cached media data, it 7202 would create a new presentation description with all the encoding 7203 possibilities it can offer. 7205 18.1. Validation Model (HTTP) 7207 When a cache has a stale entry that it would like to use as a 7208 response to a client's request, it first has to check with the origin 7209 server (or possibly an intermediate cache with a fresh response) to 7210 see if its cached entry is still usable. We call this "validating" 7211 the cache entry. Since we do not want to have to pay the overhead of 7212 retransmitting the full response if the cached entry is good, and we 7213 do not want to pay the overhead of an extra round trip if the cached 7214 entry is invalid, the RTSP protocol supports the use of conditional 7215 methods. 7217 The key protocol features for supporting conditional methods are 7218 those concerned with "cache validators." When an origin server 7219 generates a full response, it attaches some sort of validator to it, 7220 which is kept with the cache entry. When a client (user agent or 7221 proxy cache) makes a conditional request for a resource for which it 7222 has a cache entry, it includes the associated validator in the 7223 request. 7225 The server then checks that validator against the current validator 7226 for the entity, and, if they match (see Section 18.1.3), it responds 7227 with a special status code (usually, 304 (Not Modified)) and no 7228 message body. Otherwise, it returns a full response (including 7229 message body). Thus, we avoid transmitting the full response if the 7230 validator matches, and we avoid an extra round trip if it does not 7231 match. 7233 In RTSP, a conditional request looks exactly the same as a normal 7234 request for the same resource, except that it carries a special 7235 header (which includes the validator) that implicitly turns the 7236 method (usually DESCRIBE) into a conditional. 7238 The protocol includes both positive and negative senses of cache- 7239 validating conditions. That is, it is possible to request either 7240 that a method be performed if and only if a validator matches or if 7241 and only if no validators match. 7243 Note: a response that lacks a validator may still be cached, and 7244 served from cache until it expires, unless this is explicitly 7245 prohibited by a cache-control directive (see Section 16.10). 7246 However, a cache cannot do a conditional retrieval if it does not 7247 have a validator for the entity, which means it will not be 7248 refreshable after it expires. 7250 18.1.1. Last-Modified Dates 7252 The Last-Modified header (Section 16.26) value is often used as a 7253 cache validator. In simple terms, a cache entry is considered to be 7254 valid if the entity has not been modified since the Last-Modified 7255 value. 7257 18.1.2. Message Body Tag Cache Validators 7259 The MTag response-header field value, an message body tag, provides 7260 for an "opaque" cache validator. This might allow more reliable 7261 validation in situations where it is inconvenient to store 7262 modification dates, where the one-second resolution of RTSP-date 7263 values is not sufficient, or where the origin server wishes to avoid 7264 certain paradoxes that might arise from the use of modification 7265 dates. 7267 Message body tags are described in Section 5.3 7269 18.1.3. Weak and Strong Validators 7271 Since both origin servers and caches will compare two validators to 7272 decide if they represent the same or different entities, one normally 7273 would expect that if the message body (i.e., the presentation 7274 description) or any associated message body headers changes in any 7275 way, then the associated validator would change as well. If this is 7276 true, then we call this validator a "strong validator." We call 7277 message body (i.e., the presentation description) or any associated 7278 message body headers an entity for a better understanding. 7280 However, there might be cases when a server prefers to change the 7281 validator only on semantically significant changes, and not when 7282 insignificant aspects of the entity change. A validator that does 7283 not always change when the resource changes is a "weak validator." 7285 Message body tags are normally "strong validators," but the protocol 7286 provides a mechanism to tag an message body tag as "weak." One can 7287 think of a strong validator as one that changes whenever the bits of 7288 an entity changes, while a weak value changes whenever the meaning of 7289 an entity changes. Alternatively, one can think of a strong 7290 validator as part of an identifier for a specific entity, while a 7291 weak validator is part of an identifier for a set of semantically 7292 equivalent entities. 7294 Note: One example of a strong validator is an integer that is 7295 incremented in stable storage every time an entity is changed. 7297 An entity's modification time, if represented with one-second 7298 resolution, could be a weak validator, since it is possible that 7299 the resource might be modified twice during a single second. 7301 Support for weak validators is optional. However, weak validators 7302 allow for more efficient caching of equivalent objects; for 7303 example, a hit counter on a site is probably good enough if it is 7304 updated every few days or weeks, and any value during that period 7305 is likely "good enough" to be equivalent. 7307 A "use" of a validator is either when a client generates a request 7308 and includes the validator in a validating header field, or when a 7309 server compares two validators. 7311 Strong validators are usable in any context. Weak validators are 7312 only usable in contexts that do not depend on exact equality of an 7313 entity. For example, either kind is usable for a conditional 7314 DESCRIBE of a full entity. However, only a strong validator is 7315 usable for a sub-range retrieval, since otherwise the client might 7316 end up with an internally inconsistent entity. 7318 Clients MAY issue DESCRIBE requests with either weak validators or 7319 strong validators. Clients MUST NOT use weak validators in other 7320 forms of request. 7322 The only function that the RTSP protocol defines on validators is 7323 comparison. There are two validator comparison functions, depending 7324 on whether the comparison context allows the use of weak validators 7325 or not: 7327 o The strong comparison function: in order to be considered equal, 7328 both validators MUST be identical in every way, and both MUST NOT 7329 be weak. 7331 o The weak comparison function: in order to be considered equal, 7332 both validators MUST be identical in every way, but either or both 7333 of them MAY be tagged as "weak" without affecting the result. 7335 An message body tag is strong unless it is explicitly tagged as weak. 7337 A Last-Modified time, when used as a validator in a request, is 7338 implicitly weak unless it is possible to deduce that it is strong, 7339 using the following rules: 7341 o The validator is being compared by an origin server to the actual 7342 current validator for the entity and, 7344 o That origin server reliably knows that the associated entity did 7345 not change twice during the second covered by the presented 7346 validator. 7348 OR 7350 o The validator is about to be used by a client in an If-Modified- 7351 Since, because the client has a cache entry for the associated 7352 entity, and 7354 o That cache entry includes a Date value, which gives the time when 7355 the origin server sent the original response, and 7357 o The presented Last-Modified time is at least 60 seconds before the 7358 Date value. 7360 OR 7362 o The validator is being compared by an intermediate cache to the 7363 validator stored in its cache entry for the entity, and 7365 o That cache entry includes a Date value, which gives the time when 7366 the origin server sent the original response, and 7368 o The presented Last-Modified time is at least 60 seconds before the 7369 Date value. 7371 This method relies on the fact that if two different responses were 7372 sent by the origin server during the same second, but both had the 7373 same Last-Modified time, then at least one of those responses would 7374 have a Date value equal to its Last-Modified time. The arbitrary 60- 7375 second limit guards against the possibility that the Date and Last- 7376 Modified values are generated from different clocks, or at somewhat 7377 different times during the preparation of the response. An 7378 implementation MAY use a value larger than 60 seconds, if it is 7379 believed that 60 seconds is too short. 7381 If a client wishes to perform a sub-range retrieval on a value for 7382 which it has only a Last-Modified time and no opaque validator, it 7383 MAY do this only if the Last-Modified time is strong in the sense 7384 described here. 7386 18.1.4. Rules for When to Use Entity Tags and Last-Modified Dates 7388 We adopt a set of rules and recommendations for origin servers, 7389 clients, and caches regarding when various validator types ought to 7390 be used, and for what purposes. 7392 RTSP origin servers: 7394 o SHOULD send an message body tag validator unless it is not 7395 feasible to generate one. 7397 o MAY send a weak message body tag instead of a strong message body 7398 tag, if performance considerations support the use of weak message 7399 body tags, or if it is unfeasible to send a strong message body 7400 tag. 7402 o SHOULD send a Last-Modified value if it is feasible to send one, 7403 unless the risk of a breakdown in semantic transparency that could 7404 result from using this date in an If-Modified-Since header would 7405 lead to serious problems. 7407 In other words, the preferred behavior for an RTSP origin server is 7408 to send both a strong message body tag and a Last-Modified value. 7410 In order to be legal, a strong message body tag MUST change whenever 7411 the associated entity value changes in any way. A weak message body 7412 tag SHOULD change whenever the associated entity changes in a 7413 semantically significant way. Editor's note: all this would benefit 7414 from an example for the implementors IMHO. 7416 Note: in order to provide semantically transparent caching, an 7417 origin server must avoid reusing a specific strong message body 7418 tag value for two different entities, or reusing a specific weak 7419 message body tag value for two semantically different entities. 7420 Cache entries might persist for arbitrarily long periods, 7421 regardless of expiration times, so it might be inappropriate to 7422 expect that a cache will never again attempt to validate an entry 7423 using a validator that it obtained at some point in the past. 7425 RTSP clients: 7427 o If an message body tag has been provided by the origin server, 7428 MUST use that message body tag in any cache-conditional request 7429 (using If- Match or If-None-Match). 7431 o If only a Last-Modified value has been provided by the origin 7432 server, SHOULD use that value in non-subrange cache-conditional 7433 requests (using If-Modified-Since). 7435 o If both an message body tag and a Last-Modified value have been 7436 provided by the origin server, SHOULD use both validators in 7437 cache-conditional requests. 7439 An RTSP origin server, upon receiving a conditional request that 7440 includes both a Last-Modified date (e.g., in an If-Modified-Since 7441 header) and one or more message body tags (e.g., in an If-Match, If- 7442 None-Match, or If-Range header field) as cache validators, MUST NOT 7443 return a response status of 304 (Not Modified) unless doing so is 7444 consistent with all of the conditional header fields in the request. 7446 Note: The general principle behind these rules is that RTSP 7447 servers and clients should transmit as much non-redundant 7448 information as is available in their responses and requests. RTSP 7449 systems receiving this information will make the most conservative 7450 assumptions about the validators they receive. 7452 18.1.5. Non-validating Conditionals 7454 The principle behind message body tags is that only the service 7455 author knows the semantics of a resource well enough to select an 7456 appropriate cache validation mechanism, and the specification of any 7457 validator comparison function more complex than byte-equality would 7458 open up a can of worms. Thus, comparisons of any other headers are 7459 never used for purposes of validating a cache entry. 7461 18.2. Invalidation After Updates or Deletions (HTTP) 7463 The effect of certain methods performed on a resource at the origin 7464 server might cause one or more existing cache entries to become non- 7465 transparently invalid. That is, although they might continue to be 7466 "fresh," they do not accurately reflect what the origin server would 7467 return for a new request on that resource. 7469 There is no way for the RTSP protocol to guarantee that all such 7470 cache entries are marked invalid. For example, the request that 7471 caused the change at the origin server might not have gone through 7472 the proxy where a cache entry is stored. However, several rules help 7473 reduce the likelihood of erroneous behavior. 7475 In this section, the phrase "invalidate an entity" means that the 7476 cache will either remove all instances of that entity from its 7477 storage, or will mark these as "invalid" and in need of a mandatory 7478 revalidation before they can be returned in response to a subsequent 7479 request. 7481 Some HTTP methods MUST cause a cache to invalidate an entity. This 7482 is either the entity referred to by the Request-URI, or by the 7483 Location or Content-Location headers (if present). These methods 7484 are: 7486 o DESCRIBE 7488 o SETUP 7490 In order to prevent denial of service attacks, an invalidation based 7491 on the URI in a Location or Content-Location header MUST only be 7492 performed if the host part is the same as in the Request-URI. 7494 A cache that passes through requests for methods it does not 7495 understand SHOULD invalidate any entities referred to by the Request- 7496 URI. 7498 19. Security Framework 7500 The RTSP security framework consists of two high level components: 7501 the pure authentication mechanisms based on HTTP authentication, and 7502 the transport protection based on TLS, which is independent of RTSP. 7503 Because of the similarity in syntax and usage between RTSP servers 7504 and HTTP servers, the security for HTTP is re-used to a large extent. 7506 19.1. RTSP and HTTP Authentication 7508 RTSP and HTTP share common authentication schemes, and thus follow 7509 the same usage guidelines as specified in[RFC2617] and also in [H15]. 7510 Servers SHOULD implement both basic and digest [RFC2617] 7511 authentication. Client MUST implement both basic and digest 7512 authentication [RFC2617] so that Server who requires the client to 7513 authenticate can trust that the capability is present. 7515 Editor's note: The text above is still referring to [H15] as the text 7516 over there some sort of granted, i.e., security rules defined and 7517 implemented. 7519 It should be stressed that using the HTTP authentication alone does 7520 not provide full control message security. Therefore, in 7521 environments requiring tighter security for the control messages, TLS 7522 SHOULD be used, see Section 19.2. 7524 19.2. RTSP over TLS 7526 RTSP MUST follow the same guidelines with regards to TLS [RFC5246] 7527 usage as specified for HTTP, see [RFC2818]. RTSP over TLS is 7528 separated from unsecured RTSP both on URI level and port level. 7529 Instead of using the "rtsp" scheme identifier in the URI, the "rtsps" 7530 scheme identifier MUST be used to signal RTSP over TLS. If no port 7531 is given in a URI with the "rtsps" scheme, port 322 MUST be used for 7532 TLS over TCP/IP. 7534 When a client tries to setup an insecure channel to the server (using 7535 the "rtsp" URI), and the policy for the resource requires a secure 7536 channel, the server MUST redirect the client to the secure service by 7537 sending a 301 redirect response code together with the correct 7538 Location URI (using the "rtsps" scheme). A user or client MAY 7539 upgrade a non secured URI to a secured by changing the scheme from 7540 "rtsp" to "rtsps". A server implementing support for "rtsps" MUST 7541 allow this. 7543 It should be noted that TLS allows for mutual authentication (when 7544 using both server and client certificates). Still, one of the more 7545 common way TLS is used is to only provide server side authentication 7546 (often to avoid client certificates). TLS is then used in addition 7547 to HTTP authentication, providing transport security and server 7548 authentication, while HTTP Authentication is used to authenticate the 7549 client. 7551 RTSP includes the possibility to keep a TCP session up between the 7552 client and server, throughout the RTSP session lifetime. It may be 7553 convenient to keep the TCP session, not only to save the extra setup 7554 time for TCP, but also the extra setup time for TLS (even if TLS uses 7555 the resume function, there will be almost two extra round trips). 7556 Still, when TLS is used, such behavior introduces extra active state 7557 in the server, not only for TCP and RTSP, but also for TLS. This may 7558 increase the vulnerability to DoS attacks. 7560 In addition to these recommendations, Section 19.3 gives further 7561 recommendations of TLS usage with proxies. 7563 19.3. Security and Proxies 7565 The nature of a proxy is often to act as a "man-in-the-middle", while 7566 security is often about preventing the existence of a "man-in-the- 7567 middle". This section provides clients with the possibility to use 7568 proxies even when applying secure transports (TLS) between the RTSP 7569 agents. The TLS proxy mechanism allows for server and proxy 7570 identification using certificates. However, the client can not be 7571 identified based on certificates. The client needs to select between 7572 using the procedure specified below or using a TLS connection 7573 directly (by-passing any proxies) to the server. The choice may be 7574 dependent on policies. 7576 There are basically two categories of proxies, the transparent 7577 proxies (of which the client is not aware) and the non-transparent 7578 proxies (of which the client is aware). An infrastructure based on 7579 proxies requires that the trust model is such that both client and 7580 servers can trust the proxies to handle the RTSP messages correctly. 7581 To be able to trust a proxy, the client and server also needs to be 7582 aware of the proxy. Hence, transparent proxies cannot generally be 7583 seen as trusted and will not work well with security (unless they 7584 work only at transport layer). In the rest of this section any 7585 reference to proxy will be to a non-transparent proxy, which inspects 7586 or manipulate the RTSP messages. 7588 HTTP Authentication is built on the assumption of proxies and can 7589 provide user-proxy authentication and proxy-proxy/server 7590 authentication in addition to the client-server authentication. 7592 When TLS is applied and a proxy is used, the client will connect to 7593 the proxy's address when connecting to any RTSP server. This implies 7594 that for TLS, the client will authenticate the proxy server and not 7595 the end server. Note that when the client checks the server 7596 certificate in TLS, it MUST check the proxy's identity (URI or 7597 possibly other known identity) against the proxy's identity as 7598 presented in the proxy's Certificate message. 7600 The problem is that for a proxy accepted by the client, the proxy 7601 needs to be provided information on which grounds it should accept 7602 the next-hop certificate. Both the proxy and the user may have rules 7603 for this, and the user have the possibility to select the desired 7604 behavior. To handle this case, the Accept-Credentials header (See 7605 Section 16.2) is used, where the client can force the proxy/proxies 7606 to relay back the chain of certificates used to authenticate any 7607 intermediate proxies as well as the server. Given the assumption 7608 that the proxies are viewed as trusted, it gives the user a 7609 possibility to enforce policies to each trusted proxy of whether it 7610 should accept the next entity in the chain. 7612 A proxy MUST use TLS for the next hop if the RTSP request includes a 7613 "rtsps" URI. TLS MAY be applied on intermediate links (e.g. between 7614 client and proxy, or between proxy and proxy), even if the resource 7615 and the end server does not require to use it. The proxy MUST when 7616 initiating the next hop TLS connection use the incoming TLS 7617 connections cipher suite list, only modified by removing any cipher 7618 suits that the proxy does not support. In case a proxy fails to 7619 establish a TLS connection due to cipher suite mismatch between proxy 7620 and next hop proxy or server, this is indicated using error code 472 7621 (Failure to establish secure connection). 7623 19.3.1. Accept-Credentials 7625 The Accept-Credentials header can be used by the client to distribute 7626 simple authorization policies to intermediate proxies. The client 7627 includes the Accept-Credentials header to dictate how the proxy 7628 treats the server/next proxy certificate. There are currently three 7629 methods defined: 7631 Any, which means that the proxy (or proxies) MUST accept whatever 7632 certificate presented. This is of course not a recommended 7633 option to use, but may be useful in certain circumstances (such 7634 as testing). 7636 Proxy, which means that the proxy (or proxies) MUST use its own 7637 policies to validate the certificate and decide whether to 7638 accept it or not. This is convenient in cases where the user 7639 has a strong trust relation with the proxy. Reason why a 7640 strong trust relation may exist are; personal/company proxy, 7641 proxy has a out-of-band policy configuration mechanism. 7643 User, which means that the proxy (or proxies) MUST send credential 7644 information about the next hop to the client for authorization. 7645 The client can then decide whether the proxy should accept the 7646 certificate or not. See Section 19.3.2 for further details. 7648 If the Accept-Credentials header is not included in the RTSP request 7649 from the client, then the "Proxy" method MUST be used as default. If 7650 another method than the "Proxy" is to be used, then the Accept- 7651 Credentials header MUST be included in all of the RTSP request from 7652 the client. This is because it cannot be assumed that the proxy 7653 always keeps the TLS state or the users previous preference between 7654 different RTSP messages (in particular if the time interval between 7655 the messages is long). 7657 With the "Any" and "Proxy" methods the proxy will apply the policy as 7658 defined for respectively method. If the policy does not accept the 7659 credentials of the next hop, the entity MUST respond with a message 7660 using status code 471 (Connection Credentials not accepted). 7662 An RTSP request in the direction server to client MUST NOT include 7663 the Accept-Credential header. As for the non-secured communication, 7664 the possibility for these requests depends on the presence of a 7665 client established connection. However if the server to client 7666 request is in relation to a session established over a TLS secured 7667 channel, it MUST be sent in a TLS secured connection. That secured 7668 connection MUST also be the one used by the last client to server 7669 request. If no such transport connection exist at the time when the 7670 server desires to send the request, it silently fails. 7672 Further policies MAY be defined and registered, but should be done so 7673 with caution. 7675 19.3.2. User approved TLS procedure 7677 For the "User" method each proxy MUST perform the following procedure 7678 for each RTSP request: 7680 o Setup the TLS session to the next hop if not already present (i.e. 7681 run the TLS handshake, but do not send the RTSP request). 7683 o Extract the peer certificate chain for the TLS session. 7685 o Check if a matching identity and hash of the peer certificate is 7686 present in the Accept-Credentials header. If present, send the 7687 message to the next hop, and conclude these procedures. If not, 7688 go to the next step. 7690 o The proxy responds to the RTSP request with a 470 or 407 response 7691 code. The 407 response code MAY be used when the proxy requires 7692 both user and connection authorization from user or client. In 7693 this message the proxy MUST include a Connection-Credentials 7694 header, see Section 16.12 with the next hop's identity and 7695 certificate. 7697 The client MUST upon receiving a 470 or 407 response with Connection- 7698 Credentials header take the decision on whether to accept the 7699 certificate or not (if it cannot do so, the user SHOULD be 7700 consulted). If the certificate is accepted, the client has to again 7701 send the RTSP request. In that request the client has to include the 7702 Accept-Credentials header including the hash over the DER encoded 7703 certificate for all trusted proxies in the chain. 7705 Example: 7707 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7708 CSeq: 2 7709 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7710 "192.0.2.5:4589" 7711 Accept-Ranges: NPT, SMPTE, UTC 7712 Accept-Credentials: User 7713 P->C: RTSP/2.0 470 Connection Authorization Required 7714 CSeq: 2 7715 Connection-Credentials: "rtsps://test.example.org"; 7716 MIIDNTCCAp... 7718 C->P: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7719 CSeq: 2 7720 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7721 "192.0.2.5:4589" 7722 Accept-Credentials: User "rtsps://test.example.org";sha-256; 7723 dPYD7txpoGTbAqZZQJ+vaeOkyH4= 7724 Accept-Ranges: NPT, SMPTE, UTC 7725 P->S: SETUP rtsps://test.example.org/secret/audio RTSP/2.0 7726 CSeq: 2 7727 Transport: RTP/AVP;unicast;dest_addr="192.0.2.5:4588"/ 7728 "192.0.2.5:4589" 7729 Via: RTSP/2.0 proxy.example.org 7730 Accept-Credentials: User "rtsps://test.example.org";sha-256; 7731 dPYD7txpoGTbAqZZQJ+vaeOkyH4= 7732 Accept-Ranges: NPT, SMPTE, UTC 7734 One implication of this process is that the connection for secured 7735 RTSP messages may take significantly more round-trip times for the 7736 first message. An complete extra message exchange between the proxy 7737 connecting to the next hop and the client results because of the 7738 process for approval for each hop. However after the first message 7739 exchange the remaining message should not be delayed, if each message 7740 contains the chain of proxies that the requester accepts. The 7741 procedure of including the credentials in each request rather than 7742 building state in each proxy, avoids the need for revocation 7743 procedures. 7745 20. Syntax 7747 The RTSP syntax is described in an Augmented Backus-Naur Form (ABNF) 7748 as defined in RFC 5234 [RFC5234]. It uses the basic definitions 7749 present in RFC 5234. 7751 Please note that ABNF strings, e.g. "Accept", are case insensitive 7752 as specified in section 2.3 of RFC 5234. 7754 20.1. Base Syntax 7756 RTSP header values can be folded onto multiple lines if the 7757 continuation line begins with a space or horizontal tab. All linear 7758 white space, including folding, has the same semantics as SP. A 7759 recipient MAY replace any linear white space with a single SP before 7760 interpreting the field value or forwarding the message downstream. 7761 This is intended to behave exactly as HTTP/1.1 as described in RFC 7762 2616 [RFC2616]. The SWS construct is used when linear white space is 7763 optional, generally between tokens and separators. 7765 To separate the header name from the rest of value, a colon is used, 7766 which, by the above rule, allows whitespace before, but no line 7767 break, and whitespace after, including a line break. The HCOLON 7768 defines this construct. 7770 OCTET = %x00-FF ; any 8-bit sequence of data 7771 CHAR = %x01-7F ; any US-ASCII character (octets 1 - 127) 7772 UPALPHA = %x41-5A ; any US-ASCII uppercase letter "A".."Z" 7773 LOALPHA = %x61-7A ;any US-ASCII lowercase letter "a".."z" 7774 ALPHA = UPALPHA / LOALPHA 7775 DIGIT = %x30-39 ; any US-ASCII digit "0".."9" 7776 CTL = %x00-1F / %x7F ; any US-ASCII control character 7777 ; (octets 0 - 31) and DEL (127) 7778 CR = %x0D ; US-ASCII CR, carriage return (13 7779 LF = %x0A ; US-ASCII LF, linefeed (10) 7780 SP = %x20 ; US-ASCII SP, space (32) 7781 HT = %x09 ; US-ASCII HT, horizontal-tab (9) 7782 DQ = %x22 ; US-ASCII double-quote mark (34) 7783 BACKSLASH = %x5C ; US-ASCII backslash (92) 7784 CRLF = CR LF 7785 LWS = [CRLF] 1*( SP / HT ) 7786 SWS = [LWS] ; sep whitespace 7787 HCOLON = *( SP / HT ) ":" SWS 7788 TEXT = %x20-7E / %x80-FF ; any OCTET except CTLs 7789 tspecials = "(" / ")" / "<" / ">" / "@" 7790 / "," / ";" / ":" / BACKSLASH / DQ 7791 / "/" / "[" / "]" / "?" / "=" 7792 / "{" / "}" / SP / HT 7793 token = 1*(%x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39 7794 / %x41-5A / %x5E-7A / %x7C / %x7E) 7795 ; 1* 7796 quoted-string = ( DQ *qdtext DQ ) 7797 qdtext = %x20-21 / %x23-7E / %x80-FF ; any TEXT except <"> 7798 quoted-pair = BACKSLASH CHAR 7799 ctext = %x20-27 / %x2A-7E 7800 / %x80-FF ; any OCTET except CTLs, "(" and ")" 7801 generic-param = token [ EQUAL gen-value ] 7802 gen-value = token / host / quoted-string 7804 safe = "$" / "-" / "_" / "." / "+" 7805 extra = "!" / "*" / "'" / "(" / ")" / "," 7806 rtsp-extra = "!" / "*" / "'" / "(" / ")" 7808 HEX = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" 7809 / "a" / "b" / "c" / "d" / "e" / "f" 7810 LHEX = DIGIT / %x61-66 ;lowercase a-f 7811 reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" 7813 unreserved = ALPHA / DIGIT / safe / extra 7814 rtsp-unreserved = ALPHA / DIGIT / safe / rtsp-extra 7816 base64 = *base64-unit [base64-pad] 7817 base64-unit = 4base64-char 7818 base64-pad = (2base64-char "==") / (3base64-char "=") 7819 base64-char = ALPHA / DIGIT / "+" / "/" 7820 SLASH = SWS "/" SWS ; slash 7821 EQUAL = SWS "=" SWS ; equal 7822 LPAREN = SWS "(" SWS ; left parenthesis 7823 RPAREN = SWS ")" SWS ; right parenthesis 7824 COMMA = SWS "," SWS ; comma 7825 SEMI = SWS ";" SWS ; semicolon 7826 COLON = SWS ":" SWS ; colon 7827 MINUS = SWS "-" SWS ; minus/dash 7828 LDQUOT = SWS DQ ; open double quotation mark 7829 RDQUOT = DQ SWS ; close double quotation mark 7830 RAQUOT = ">" SWS ; right angle quote 7831 LAQUOT = SWS "<" ; left angle quote 7833 TEXT-UTF8char = %x21-7E / UTF8-NONASCII 7834 UTF8-NONASCII = %xC0-DF 1UTF8-CONT 7835 / %xE0-EF 2UTF8-CONT 7836 / %xF0-F7 3UTF8-CONT 7837 / %xF8-FB 4UTF8-CONT 7838 / %xFC-FD 5UTF8-CONT 7839 UTF8-CONT = %x80-BF 7841 FLOAT = ["-"] 1*39DIGIT ["." 1*46DIGIT] 7842 POS-FLOAT = 1*39DIGIT ["." 1*46DIGIT] 7844 20.2. RTSP Protocol Definition 7846 20.2.1. Generic Protocol elements 7847 RTSP-IRI = schemes ":" IRI-rest 7848 IRI-rest = ihier-part [ "?" iquery ] [ "#" ifragment ] 7849 ihier-part = "//" iauthority ipath-abempty 7850 RTSP-IRI-ref = RTSP-IRI / irelative-ref 7851 irelative-ref = irelative-part [ "?" iquery ] [ "#" ifragment ] 7852 irelative-part = "//" iauthority ipath-abempty 7853 / ipath-absolute 7854 / ipath-noscheme 7855 / ipath-empty 7857 iauthority = < As defined in RFC 3987> 7858 ipath = ipath-abempty ; begins with "/" or is empty 7859 / ipath-absolute ; begins with "/" but not "//" 7860 / ipath-noscheme ; begins with a non-colon segment 7861 / ipath-rootless ; begins with a segment 7862 / ipath-empty ; zero characters 7864 ipath-abempty = *( "/" isegment ) 7865 ipath-absolute = "/" [ isegment-nz *( "/" isegment ) ] 7866 ipath-noscheme = isegment-nz-nc *( "/" isegment ) 7867 ipath-rootless = isegment-nz *( "/" isegment ) 7868 ipath-empty = 0 7870 isegment = *ipchar [";" *ipchar] 7871 isegment-nz = 1*ipchar [";" *ipchar] 7872 / ";" *ipchar 7873 isegment-nz-nc = (1*ipchar-nc [";" *ipchar-nc]) 7874 / ";" *ipchar-nc 7875 ; non-zero-length segment without any colon ":" 7877 ipchar = iunreserved / pct-encoded / sub-delims / ":" / "@" 7878 ipchar-nc = iunreserved / pct-encoded / sub-delims / "@" 7880 iquery = < As defined in RFC 3987> 7881 ifragment = < As defined in RFC 3987> 7882 iunreserved = < As defined in RFC 3987> 7883 pct-encoded = < As defined in RFC 3987> 7884 RTSP-URI = schemes ":" URI-rest 7885 RTSP-REQ-URI = schemes ":" URI-req-rest 7886 RTSP-URI-Ref = RTSP-URI / RTSP-Relative 7887 RTSP-REQ-Ref = RTSP-REQ-URI / RTSP-REQ-Rel 7888 schemes = "rtsp" / "rtsps" / scheme 7889 scheme = < As defined in RFC 3986> 7890 URI-rest = hier-part [ "?" query ] [ "#" fragment ] 7891 URI-req-rest = hier-part [ "?" query ] 7892 ; Note fragment part not allowed in requests 7893 hier-part = "//" authority path-abempty 7895 RTSP-Relative = relative-part [ "?" query ] [ "#" fragment ] 7896 RTSP-REQ-Rel = relative-part [ "?" query ] 7897 relative-part = "//" authority path-abempty 7898 / path-absolute 7899 / path-noscheme 7900 / path-empty 7902 authority = < As defined in RFC 3986> 7903 query = < As defined in RFC 3986> 7904 fragment = < As defined in RFC 3986> 7906 path = path-abempty ; begins with "/" or is empty 7907 / path-absolute ; begins with "/" but not "//" 7908 / path-noscheme ; begins with a non-colon segment 7909 / path-rootless ; begins with a segment 7910 / path-empty ; zero characters 7912 path-abempty = *( "/" segment ) 7913 path-absolute = "/" [ segment-nz *( "/" segment ) ] 7914 path-noscheme = segment-nz-nc *( "/" segment ) 7915 path-rootless = segment-nz *( "/" segment ) 7916 path-empty = 0 7918 segment = *pchar [";" *pchar] 7919 segment-nz = ( 1*pchar [";" *pchar]) / (";" *pchar) 7920 segment-nz-nc = ( 1*pchar-nc [";" *pchar-nc]) / (";" *pchar-nc) 7921 ; non-zero-length segment without any colon ":" 7923 pchar = unreserved / pct-encoded / sub-delims / ":" / "@" 7924 pchar-nc = unreserved / pct-encoded / sub-delims / "@" 7926 sub-delims = "!" / "$" / "&" / "'" / "(" / ")" 7927 / "*" / "+" / "," / "=" 7929 smpte-range = smpte-type ["=" smpte-range-spec] 7930 ; See section 3.4 7931 smpte-range-spec = ( smpte-time "-" [ smpte-time ] ) 7932 / ( "-" smpte-time ) 7933 smpte-type = "smpte" / "smpte-30-drop" 7934 / "smpte-25" / smpte-type-extension 7935 ; other timecodes may be added 7936 smpte-type-extension = "smpte" token 7937 smpte-time = 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT 7938 [ ":" 1*2DIGIT [ "." 1*2DIGIT ] ] 7940 npt-range = "npt" ["=" npt-range-spec] 7941 npt-range-spec = ( npt-time "-" [ npt-time ] ) / ( "-" npt-time ) 7942 npt-time = "now" / npt-sec / npt-hhmmss 7943 npt-sec = 1*DIGIT [ "." *DIGIT ] 7944 npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ] 7945 npt-hh = 1*DIGIT ; any positive number 7946 npt-mm = 1*2DIGIT ; 0-59 7947 npt-ss = 1*2DIGIT ; 0-59 7949 utc-range = "clock" ["=" utc-range-spec] 7950 utc-range-spec = ( utc-time "-" [ utc-time ] ) / ( "-" utc-time ) 7951 utc-time = utc-date "T" utc-clock "Z" 7952 utc-date = 8DIGIT 7953 utc-clock = 6DIGIT [ "." fraction ] 7954 fraction = 1*DIGIT 7956 feature-tag = token 7958 session-id = 1*256( ALPHA / DIGIT / safe ) 7960 extension-header = header-name HCOLON header-value 7961 header-name = token 7962 header-value = *(TEXT-UTF8char / UTF8-CONT / LWS) 7964 20.2.2. Message Syntax 7965 RTSP-message = Request / Response ; RTSP/2.0 messages 7967 Request = Request-Line 7968 *((general-header 7969 / request-header 7970 / message-header) CRLF) 7971 CRLF 7972 [ message-body ] 7974 Response = Status-Line 7975 *((general-header 7976 / response-header 7977 / message-header) CRLF) 7978 CRLF 7979 [ message-body ] 7981 Request-Line = Method SP Request-URI SP RTSP-Version CRLF 7983 Status-Line = RTSP-Version SP Status-Code SP Reason-Phrase CRLF 7984 Method = "DESCRIBE" 7985 / "GET_PARAMETER" 7986 / "OPTIONS" 7987 / "PAUSE" 7988 / "PLAY" 7989 / "PLAY_NOTIFY" 7990 / "REDIRECT" 7991 / "SETUP" 7992 / "SET_PARAMETER" 7993 / "TEARDOWN" 7994 / extension-method 7996 extension-method = token 7998 Request-URI = "*" / RTSP-REQ-URI 7999 RTSP-Version = "RTSP/" 1*DIGIT "." 1*DIGIT 8001 message-body = 1*OCTET 8003 Status-Code = "100" ; Continue 8004 / "200" ; OK 8005 / "301" ; Moved Permanently 8006 / "302" ; Found 8007 / "303" ; See Other 8008 / "304" ; Not Modified 8009 / "305" ; Use Proxy 8010 / "400" ; Bad Request 8011 / "401" ; Unauthorized 8012 / "402" ; Payment Required 8013 / "403" ; Forbidden 8014 / "404" ; Not Found 8015 / "405" ; Method Not Allowed 8016 / "406" ; Not Acceptable 8017 / "407" ; Proxy Authentication Required 8018 / "408" ; Request Time-out 8019 / "410" ; Gone 8020 / "411" ; Length Required 8021 / "412" ; Precondition Failed 8022 / "413" ; Request Message Body Too Large 8023 / "414" ; Request-URI Too Large 8024 / "415" ; Unsupported Media Type 8025 / "451" ; Parameter Not Understood 8026 / "452" ; reserved 8027 / "453" ; Not Enough Bandwidth 8028 / "454" ; Session Not Found 8029 / "455" ; Method Not Valid in This State 8030 / "456" ; Header Field Not Valid for Resource 8031 / "457" ; Invalid Range 8032 / "458" ; Parameter Is Read-Only 8033 / "459" ; Aggregate operation not allowed 8034 / "460" ; Only aggregate operation allowed 8035 / "461" ; Unsupported Transport 8036 / "462" ; Destination Unreachable 8037 / "463" ; Destination Prohibited 8038 / "464" ; Data Transport Not Ready Yet 8039 / "470" ; Connection Authorization Required 8040 / "471" ; Connection Credentials not accepted 8041 / "472" ; Failure to establish secure connection 8042 / "500" ; Internal Server Error 8043 / "501" ; Not Implemented 8044 / "502" ; Bad Gateway 8045 / "503" ; Service Unavailable 8046 / "504" ; Gateway Time-out 8047 / "505" ; RTSP Version not supported 8048 / "551" ; Option not supported 8049 / extension-code 8051 extension-code = 3DIGIT 8053 Reason-Phrase = *TEXT 8054 general-header = Cache-Control 8055 / Connection 8056 / CSeq 8057 / Date 8058 / Media-Properties 8059 / Media-Range 8060 / Pipelined-Requests 8061 / Proxy-Supported 8062 / Seek-Style 8063 / Supported 8064 / Timestamp 8065 / Via 8066 / extension-header 8068 request-header = Accept 8069 / Accept-Credentials 8070 / Accept-Encoding 8071 / Accept-Language 8072 / Authorization 8073 / Bandwidth 8074 / Blocksize 8075 / From 8076 / If-Match 8077 / If-Modified-Since 8078 / If-None-Match 8079 / Notify-Reason 8080 / Proxy-Require 8081 / Range 8082 / Referer 8083 / Request-Status 8084 / Require 8085 / Scale 8086 / Session 8087 / Speed 8088 / Supported 8089 / Terminate-Reason 8090 / Transport 8091 / User-Agent 8092 / extension-header 8094 response-header = Accept-Credentials 8095 / Accept-Ranges 8096 / Connection-Credentials 8097 / MTag 8098 / Location 8099 / Proxy-Authenticate 8100 / Public 8101 / Range 8102 / Retry-After 8103 / RTP-Info 8104 / Scale 8105 / Session 8106 / Server 8107 / Speed 8108 / Transport 8109 / Unsupported 8110 / Vary 8111 / WWW-Authenticate 8112 / extension-header 8114 message-header = Allow 8115 / Content-Base 8116 / Content-Encoding 8117 / Content-Language 8118 / Content-Length 8119 / Content-Location 8120 / Content-Type 8121 / Expires 8122 / Last-Modified 8123 / extension-header 8125 20.2.3. Header Syntax 8127 All header syntaxes not defined in this section are defined in 8128 section 14 of the HTTP 1.1 specification [RFC2616]. 8130 Accept = "Accept" HCOLON 8131 [ accept-range *(COMMA accept-range) ] 8132 accept-range = media-type-range *(SEMI accept-param) 8133 media-type-range = ( "*/*" 8134 / ( m-type SLASH "*" ) 8135 / ( m-type SLASH m-subtype ) 8136 ) *( SEMI m-parameter ) 8137 accept-param = ("q" EQUAL qvalue) / generic-param 8138 qvalue = ( "0" [ "." *3DIGIT ] ) 8139 / ( "1" [ "." *3("0") ] ) 8140 Accept-Credentials = "Accept-Credentials" HCOLON cred-decision 8141 cred-decision = ("User" [LWS cred-info]) 8142 / "Proxy" 8143 / "Any" 8144 / (token [LWS 1*TEXT]) ; For future extensions 8145 cred-info = cred-info-data *(COMMA cred-info-data) 8147 cred-info-data = DQ RTSP-REQ-URI DQ SEMI hash-alg SEMI base64 8148 hash-alg = "sha-256" / extension-alg 8149 extension-alg = token 8150 Accept-Encoding = "Accept-Encoding" HCOLON 8151 [ encoding *(COMMA encoding) ] 8152 encoding = codings *(SEMI accept-param) 8153 codings = content-coding / "*" 8154 content-coding = token 8155 Accept-Language = "Accept-Language" HCOLON 8156 [ language *(COMMA language) ] 8157 language = language-range *(SEMI accept-param) 8158 language-range = (1*8ALPHA *( "-" 1*8ALPHA)) / "*" 8159 Accept-Ranges = "Accept-Ranges" HCOLON acceptable-ranges 8160 acceptable-ranges = (range-unit *(COMMA range-unit)) 8161 / "none" 8162 range-unit = "NPT" / "SMPTE" / "UTC" / extension-format 8163 extension-format = token 8164 Allow = "Allow" HCOLON [Method *(COMMA Method)] 8165 Authorization = "Authorization" HCOLON credentials 8166 credentials = ("Digest" LWS digest-response) 8167 / other-response 8168 digest-response = dig-resp *(COMMA dig-resp) 8169 dig-resp = username / realm / nonce / digest-uri 8170 / dresponse / algorithm / cnonce 8171 / opaque / message-qop 8172 / nonce-count / auth-param 8173 username = "username" EQUAL username-value 8174 username-value = quoted-string 8175 digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT 8176 digest-uri-value = Request-URI 8177 ; by HTTP/1.1 8178 message-qop = "qop" EQUAL qop-value 8179 cnonce = "cnonce" EQUAL cnonce-value 8180 cnonce-value = nonce-value 8181 nonce-count = "nc" EQUAL nc-value 8182 nc-value = 8LHEX 8183 dresponse = "response" EQUAL request-digest 8184 request-digest = LDQUOT 32LHEX RDQUOT 8185 auth-param = auth-param-name EQUAL 8186 ( token / quoted-string ) 8187 auth-param-name = token 8188 other-response = auth-scheme LWS auth-param 8189 *(COMMA auth-param) 8191 auth-scheme = token 8193 Bandwidth = "Bandwidth" HCOLON 1*DIGIT 8195 Blocksize = "Blocksize" HCOLON 1*DIGIT 8197 Cache-Control = "Cache-Control" HCOLON cache-directive 8198 *(COMMA cache-directive) 8199 cache-directive = cache-rqst-directive 8200 / cache-rspns-directive 8202 cache-rqst-directive = "no-cache" 8203 / "max-stale" [EQUAL delta-seconds] 8204 / "min-fresh" EQUAL delta-seconds 8205 / "only-if-cached" 8206 / cache-extension 8208 cache-rspns-directive = "public" 8209 / "private" 8210 / "no-cache" 8211 / "no-transform" 8212 / "must-revalidate" 8213 / "proxy-revalidate" 8214 / "max-age" EQUAL delta-seconds 8215 / cache-extension 8217 cache-extension = token [EQUAL (token / quoted-string)] 8218 delta-seconds = 1*DIGIT 8220 Connection-Credentials = "Connection-Credentials" HCOLON cred-chain 8221 cred-chain = DQ RTSP-REQ-URI DQ SEMI base64 8223 Connection = "Connection" HCOLON connection-token 8224 *(COMMA connection-token) 8225 connection-token = token 8227 Content-Base = "Content-Base" HCOLON RTSP-URI-Ref 8228 Content-Encoding = "Content-Encoding" HCOLON 8229 content-coding *(COMMA content-coding) 8230 Content-Language = "Content-Language" HCOLON 8231 language-tag *(COMMA language-tag) 8232 language-tag = primary-tag *( "-" subtag ) 8233 primary-tag = 1*8ALPHA 8234 subtag = 1*8ALPHA 8235 Content-Length = "Content-Length" HCOLON 1*DIGIT 8236 Content-Location = "Content-Location" HCOLON RTSP-REQ-Ref 8237 Content-Type = ( "Content-Type" / "c" ) HCOLON media-type 8238 media-type = m-type SLASH m-subtype *(SEMI m-parameter) 8239 m-type = discrete-type / composite-type 8240 discrete-type = "text" / "image" / "audio" / "video" 8241 / "application" / extension-token 8242 composite-type = "message" / "multipart" / extension-token 8243 extension-token = ietf-token / x-token 8244 ietf-token = token 8245 x-token = "x-" token 8246 m-subtype = extension-token / iana-token 8247 iana-token = token 8248 m-parameter = m-attribute EQUAL m-value 8249 m-attribute = token 8250 m-value = token / quoted-string 8252 CSeq = "CSeq" HCOLON cseq-nr 8253 cseq-nr = 1*9DIGIT 8254 Date = "Date" HCOLON RTSP-date 8255 RTSP-date = rfc1123-date ; HTTP-date 8256 rfc1123-date = wkday "," SP date1 SP time SP "GMT" 8257 date1 = 2DIGIT SP month SP 4DIGIT 8258 ; day month year (e.g., 02 Jun 1982) 8259 time = 2DIGIT ":" 2DIGIT ":" 2DIGIT 8260 ; 00:00:00 - 23:59:59 8261 wkday = "Mon" / "Tue" / "Wed" 8262 / "Thu" / "Fri" / "Sat" / "Sun" 8263 month = "Jan" / "Feb" / "Mar" / "Apr" 8264 / "May" / "Jun" / "Jul" / "Aug" 8265 / "Sep" / "Oct" / "Nov" / "Dec" 8267 Expires = "Expires" HCOLON RTSP-date 8268 From = "From" HCOLON from-spec 8269 from-spec = ( name-addr / addr-spec ) *( SEMI from-param ) 8270 name-addr = [ display-name ] LAQUOT addr-spec RAQUOT 8271 addr-spec = RTSP-REQ-URI / absolute-URI 8272 absolute-URI = < As defined in RFC 3986> 8273 display-name = *(token LWS) / quoted-string 8274 from-param = tag-param / generic-param 8275 tag-param = "tag" EQUAL token 8276 If-Match = "If-Match" HCOLON ("*" / message-tag-list) 8277 message-tag-list = message-tag *(COMMA message-tag) 8278 message-tag = [ weak ] opaque-tag 8279 weak = "W/" 8280 opaque-tag = quoted-string 8281 If-Modified-Since = "If-Modified-Since" HCOLON RTSP-date 8282 If-None-Match = "If-None-Match" HCOLON ("*" / message-tag-list) 8283 Last-Modified = "Last-Modified" HCOLON RTSP-date 8284 Location = "Location" HCOLON RTSP-REQ-URI 8285 Media-Properties = "Media-Properties" HCOLON [media-prop-list] 8286 media-prop-list = media-prop-value *(COMMA media-prop-value) 8287 media-prop-value = ("Random-Access" [EQUAL POS-FLOAT]) 8288 / "Begining-Only" 8289 / "No-Seeking" 8290 / "Immutable" 8291 / "Dynamic" 8292 / "Time-Progressing" 8293 / "Unlimited" 8294 / ("Time-Limited" EQUAL utc-range-spec) 8295 / ("Time-Duration" EQUAL POS-FLOAT) 8296 / ("Scales" EQUAL scale-value-list) 8297 / media-prop-ext 8298 media-prop-ext = token [EQUAL (1*rtsp-unreserved / quoted-string)] 8299 scale-value-list = DQ scale-entry *(COMMA scale-entry) DQ 8300 scale-entry = scale-value / (scale-value COLON scale-value) 8301 scale-value = ["-"] 1*8DIGIT ["." 1*8DIGIT] 8302 Media-Range = "Media-Range" HCOLON [ranges-list] 8303 ranges-list = ranges-spec *(COMMA ranges-spec) 8304 MTag = "MTag" HCOLON message-tag 8305 Notify-Reason = "Notify-Reason" HCOLON Notify-Reas-val 8306 Notify-Reas-val = "end-of-stream" 8307 / "media-properties-update" 8308 / "scale-change" 8309 / Notify-Reason-extension 8310 Notify-Reason-extension = token 8311 Pipelined-Requests = "Pipelined-Requests" HCOLON startup-id 8312 startup-id = 1*8DIGIT 8314 Proxy-Authenticate = "Proxy-Authenticate" HCOLON challenge-list 8315 challenge-list = challenge *(COMMA challenge) 8316 challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) 8317 / other-challenge 8318 other-challenge = auth-scheme LWS auth-param 8319 *(COMMA auth-param) 8320 digest-cln = realm / domain / nonce 8321 / opaque / stale / algorithm 8322 / qop-options / auth-param 8323 realm = "realm" EQUAL realm-value 8324 realm-value = quoted-string 8325 domain = "domain" EQUAL LDQUOT RTSP-REQ-Ref 8326 *(1*SP RTSP-REQ-Ref ) RDQUOT 8327 nonce = "nonce" EQUAL nonce-value 8328 nonce-value = quoted-string 8329 opaque = "opaque" EQUAL quoted-string 8330 stale = "stale" EQUAL ( "true" / "false" ) 8331 algorithm = "algorithm" EQUAL ("MD5" / "MD5-sess" / token) 8332 qop-options = "qop" EQUAL LDQUOT qop-value 8333 *("," qop-value) RDQUOT 8334 qop-value = "auth" / "auth-int" / token 8335 Proxy-Require = "Proxy-Require" HCOLON feature-tag 8336 *(COMMA feature-tag) 8338 Proxy-Supported = "Proxy-Supported" HCOLON feature-tag 8339 *(COMMA feature-tag) 8341 Public = "Public" HCOLON Method *(COMMA Method) 8343 Range = "Range" HCOLON ranges-spec 8345 ranges-spec = npt-range / utc-range / smpte-range 8346 / range-ext 8347 range-ext = extension-format ["=" range-value] 8348 range-value = 1*(rtsp-unreserved / quoted-string / ":" ) 8350 Referer = "Referer" HCOLON RTSP-REQ-Ref 8351 Request-Status = "Request-Status" HCOLON req-status-info 8352 req-status-info = cseq-info LWS status-info LWS reason-info 8353 cseq-info = "cseq" EQUAL cseq-nr 8354 status-info = "status" EQUAL Status-Code 8355 reason-info = "reason" EQUAL DQ Reason-Phrase DQ 8356 Require = "Require" HCOLON feature-tag-list 8357 feature-tag-list = feature-tag *(COMMA feature-tag) 8358 RTP-Info = "RTP-Info" HCOLON [rtsp-info-spec 8359 *(COMMA rtsp-info-spec)] 8360 rtsp-info-spec = stream-url 1*ssrc-parameter 8361 stream-url = "url" EQUAL DQ RTSP-REQ-Ref DQ 8362 ssrc-parameter = LWS "ssrc" EQUAL ssrc HCOLON 8363 ri-parameter *(SEMI ri-parameter) 8364 ri-parameter = ("seq" EQUAL 1*DIGIT) 8365 / ("rtptime" EQUAL 1*DIGIT) 8366 / generic-param 8368 Retry-After = "Retry-After" HCOLON delta-seconds 8369 [ comment ] *( SEMI retry-param ) 8370 retry-param = ("duration" EQUAL delta-seconds) 8371 / generic-param 8373 Scale = "Scale" HCOLON ["-"] 1*DIGIT [ "." *DIGIT ] 8374 Seek-Style = "Seek-Style" HCOLON Seek-S-values 8375 Seek-S-values = "RAP" 8376 / "First-Prior" 8377 / "Next" 8378 / Seek-S-value-ext 8379 Seek-S-value-ext = token 8380 Speed = "Speed" HCOLON POS-FLOAT MINUS POS-FLOAT 8381 Server = "Server" HCOLON ( product / comment ) 8382 *(LWS (product / comment)) 8383 product = token [SLASH product-version] 8384 product-version = token 8385 comment = LPAREN *( ctext / quoted-pair) RPAREN 8387 Session = "Session" HCOLON session-id 8388 [ SEMI "timeout" EQUAL delta-seconds ] 8390 Supported = "Supported" HCOLON [feature-tag-list] 8391 Terminate-Reason = "Terminate-Reason" HCOLON TR-Info 8392 TR-Info = TR-Reason *(SEMI TR-Parameter) 8393 TR-Reason = "Session-Timeout" 8394 / "Server-Admin" 8395 / "Internal-Error" 8396 / token 8397 TR-Parameter = TR-time / TR-user-msg / generic-param 8398 TR-time = "time" EQUAL utc-time 8399 TR-user-msg = "user-msg" EQUAL quoted-string 8401 Timestamp = "Timestamp" HCOLON timestamp-value LWS [delay] 8402 timestamp-value = *DIGIT [ "." *DIGIT ] 8403 delay = *DIGIT [ "." *DIGIT ] 8405 Transport = "Transport" HCOLON transport-spec 8406 *(COMMA transport-spec) 8407 transport-spec = transport-id *trns-parameter 8408 transport-id = trans-id-rtp / other-trans 8409 trans-id-rtp = "RTP/" profile ["/" lower-transport] 8410 ; no LWS is allowed inside transport-id 8411 other-trans = token *("/" token) 8413 profile = "AVP" / "SAVP" / "AVPF" / token 8414 lower-transport = "TCP" / "UDP" / token 8415 trns-parameter = (SEMI ( "unicast" / "multicast" )) 8416 / (SEMI "interleaved" EQUAL channel [ "-" channel ]) 8417 / (SEMI "ttl" EQUAL ttl) 8418 / (SEMI "layers" EQUAL 1*DIGIT) 8419 / (SEMI "ssrc" EQUAL ssrc *(SLASH ssrc)) 8420 / (SEMI "mode" EQUAL mode-spec) 8421 / (SEMI "dest_addr" EQUAL addr-list) 8422 / (SEMI "src_addr" EQUAL addr-list) 8423 / (SEMI trn-param-ext) 8424 / (SEMI "setup" EQUAL contrans-setup) 8425 / (SEMI "connection" EQUAL contrans-con) 8426 / (SEMI "RTCP-mux") 8427 contrans-setup = "active" / "passive" / "actpass" 8428 contrans-con = "new" / "existing" 8429 trn-param-ext = par-name [EQUAL trn-par-value] 8430 par-name = token 8431 trn-par-value = *(rtsp-unreserved / quoted-string) 8432 ttl = 1*3DIGIT ; 0 to 255 8433 ssrc = 8HEX 8434 channel = 1*3DIGIT 8435 mode-spec = ( DQ mode *(COMMA mode) DQ ) 8436 mode = "PLAY" / token 8437 addr-list = quoted-addr *(SLASH quoted-addr) 8438 quoted-addr = DQ (host-port / extension-addr) DQ 8439 host-port = host [":" port] 8440 / ":" port 8441 extension-addr = 1*qdtext 8442 host = < As defined in RFC 3986> 8443 port = < As defined in RFC 3986> 8444 Unsupported = "Unsupported" HCOLON feature-tag-list 8446 User-Agent = "User-Agent" HCOLON ( product / comment ) 8447 0*(LWS (product / comment)) 8449 Vary = "Vary" HCOLON ( "*" / field-name-list) 8450 field-name-list = field-name *(COMMA field-name) 8451 field-name = token 8452 Via = "Via" HCOLON via-parm *(COMMA via-parm) 8453 via-parm = sent-protocol LWS sent-by *( SEMI via-params ) 8454 via-params = via-ttl / via-maddr 8455 / via-received / via-branch 8456 / via-extension 8457 via-ttl = "ttl" EQUAL ttl 8458 via-maddr = "maddr" EQUAL host 8459 via-received = "received" EQUAL (IPv4address / IPv6address) 8460 IPv4address = < As defined in RFC 3986> 8461 IPv6address = < As defined in RFC 3986> 8462 via-branch = "branch" EQUAL token 8463 via-extension = generic-param 8464 sent-protocol = protocol-name SLASH protocol-version 8465 SLASH transport-prot 8466 protocol-name = "RTSP" / token 8467 protocol-version = token 8468 transport-prot = "UDP" / "TCP" / "TLS" / other-transport 8469 other-transport = token 8470 sent-by = host [ COLON port ] 8472 WWW-Authenticate = "WWW-Authenticate" HCOLON challenge-list 8474 20.3. SDP extension Syntax 8476 This section defines in ABNF the SDP extensions defined for RTSP. 8477 See Appendix D for the definition of the extensions in text. 8479 control-attribute = "a=control:" *SP RTSP-REQ-REF 8481 a-range-def = "a=range:" ranges-spec CRLF 8483 a-mtag-def = "a=mtag:" message-tag CRLF 8485 21. Security Considerations 8487 Because of the similarity in syntax and usage between RTSP servers 8488 and HTTP servers, the security considerations outlined in [H15] 8489 apply. 8491 Editor's note: The text above is still referring to [H15] as the text 8492 over there some sort of granted, i.e., security rules defined and 8493 implemented. 8495 Specifically, please note the following: 8497 Abuse of Server Log Information: RTSP and HTTP servers will 8498 presumably have similar logging mechanisms, and thus should be 8499 equally guarded in protecting the contents of those logs, thus 8500 protecting the privacy of the users of the servers. See 8501 [H15.1.1] for HTTP server recommendations regarding server 8502 logs. 8504 Transfer of Sensitive Information: There is no reason to believe 8505 that information transferred or controlled via RTSP may be any 8506 less sensitive than that normally transmitted via HTTP. 8507 Therefore, all of the precautions regarding the protection of 8508 data privacy and user privacy apply to implementors of RTSP 8509 clients, servers, and proxies. See [H15.1.2] for further 8510 details. 8512 Attacks Based On File and Path Names: Though RTSP URIs are opaque 8513 handles that do not necessarily have file system semantics, it 8514 is anticipated that many implementations will translate 8515 portions of the Request-URIs directly to file system calls. In 8516 such cases, file systems SHOULD follow the precautions outlined 8517 in [H15.5], such as checking for ".." in path components. 8519 Personal Information: RTSP clients are often privy to the same 8520 information that HTTP clients are (user name, location, etc.) 8521 and thus should be equally sensitive. See [H15.1] for further 8522 recommendations. 8524 Privacy Issues Connected to Accept Headers: Since may of the same 8525 "Accept" headers exist in RTSP as in HTTP, the same caveats 8526 outlined in [H15.1.4] with regards to their use should be 8527 followed. 8529 DNS Spoofing: Presumably, given the longer connection times 8530 typically associated to RTSP sessions relative to HTTP 8531 sessions, RTSP client DNS optimizations should be less 8532 prevalent. Nonetheless, the recommendations provided in 8534 [H15.3] are still relevant to any implementation which attempts 8535 to rely on a DNS-to-IP mapping to hold beyond a single use of 8536 the mapping. 8538 Location Headers and Spoofing: If a single server supports multiple 8539 organizations that do not trust each another, then it needs to 8540 check the values of Location and Content-Location header fields 8541 in responses that are generated under control of said 8542 organizations to make sure that they do not attempt to 8543 invalidate resources over which they have no authority. 8544 ([H15.4]) 8546 In addition to the recommendations in the current HTTP specification 8547 (RFC 2616 [RFC2616], as of this writing) and also of the previous 8548 RFC2068 [RFC2068], future HTTP specifications may provide additional 8549 guidance on security issues. 8551 The following are added considerations for RTSP implementations. 8553 Concentrated denial-of-service attack: The protocol offers the 8554 opportunity for a remote-controlled denial-of-service attack. 8555 See Section 21.1. 8557 Session hijacking: Since there is no or little relation between a 8558 transport layer connection and an RTSP session, it is possible 8559 for a malicious client to issue requests with random session 8560 identifiers which would affect unsuspecting clients. The 8561 server SHOULD use a large, random and non-sequential session 8562 identifier to minimize the possibility of this kind of attack. 8563 However, unless the RTSP signalling always are confidentiality 8564 protected, e.g. using TLS, an on-path attacker will be able to 8565 hijack a session. For real session security, client 8566 authentication needs to be performed. 8568 Authentication: Servers SHOULD implement both basic and digest 8569 [RFC2617] authentication. In environments requiring tighter 8570 security for the control messages, the transport layer 8571 mechanism TLS [RFC5246] SHOULD be used. 8573 Stream issues: RTSP only provides for stream control. Stream 8574 delivery issues are not covered in this section, nor in the 8575 rest of this draft. RTSP implementations will most likely rely 8576 on other protocols such as RTP, IP multicast, RSVP and IGMP, 8577 and should address security considerations brought up in those 8578 and other applicable specifications. 8580 Persistently suspicious behavior: RTSP servers SHOULD return error 8581 code 403 (Forbidden) upon receiving a single instance of 8582 behavior which is deemed a security risk. RTSP servers SHOULD 8583 also be aware of attempts to probe the server for weaknesses 8584 and entry points and MAY arbitrarily disconnect and ignore 8585 further requests clients which are deemed to be in violation of 8586 local security policy. 8588 Scope of Multicast: If RTSP is used to control the transmission of 8589 media onto a multicast network it is need to consider the scope 8590 that delivery has. RTSP supports the TTL Transport header 8591 parameter to indicate this scope. However such scope control 8592 is risk as it may be set to large and distribute media beyond 8593 the intended scope. 8595 TLS through proxies: If one uses the possibility to connect TLS in 8596 multiple legs (Section 19.3 one really needs to be aware of the 8597 trust model. That procedure requires full faith and trust in 8598 all proxies that one allows to connect through. They are man 8599 in the middle and has access to all that goes on over the TLS 8600 connection. Thus it is important to consider if that trust 8601 model is acceptable in the actual application. 8603 Resource Exhaustion As RTSP is a stateful protocol and establish 8604 resource usages on the server there is a clear possibility to 8605 attack the server by trying to overbook these resources to 8606 perform an denial of service attack. This attack can be both 8607 against ongoing sessions and to prevent others from 8608 establishing sessions. RTSP agents will need to have mechanism 8609 to prevent single peers from consuming extensive amounts of 8610 resources. 8612 21.1. Remote denial of Service Attack 8614 The attacker may initiate traffic flows to one or more IP addresses 8615 by specifying them as the destination in SETUP requests. While the 8616 attacker's IP address may be known in this case, this is not always 8617 useful in prevention of more attacks or ascertaining the attackers 8618 identity. Thus, an RTSP server MUST only allow client-specified 8619 destinations for RTSP-initiated traffic flows if the server has 8620 ensured that the specified destination address accepts receiving 8621 media through different security mechanisms. Security mechanisms 8622 that are acceptable in an increased generality are: 8624 o Verification of the client's identity, either against a database 8625 of known users using RTSP authentication mechanisms (preferably 8626 digest authentication or stronger) 8628 o A list of addresses that accept to be media destinations, 8629 especially considering user identity 8631 o Media path based verification 8633 The server SHOULD NOT allow the destination field to be set unless a 8634 mechanism exists in the system to authorize the request originator to 8635 direct streams to the recipient. It is preferred that this 8636 authorization be performed by the media recipient (destination) 8637 itself and the credentials passed along to the server. However, in 8638 certain cases, such as when recipient address is a multicast group, 8639 or when the recipient is unable to communicate with the server in an 8640 out-of-band manner, this may not be possible. In these cases the 8641 server may chose another method such as a server-resident 8642 authorization list to ensure that the request originator has the 8643 proper credentials to request stream delivery to the recipient. 8645 One solution that performs the necessary verification of acceptance 8646 of media suitable for unicast based delivery is the ICE based NAT 8647 traversal method described in [I-D.ietf-mmusic-rtsp-nat]. By using 8648 random passwords and username the probability of unintended 8649 indication as a valid media destination is very low. If the server 8650 include in its STUN requests a cookie (consisting of random material) 8651 that is the destination echo back the solution is also safe against 8652 having a off-path attacker being able to spoof the STUN checks. 8653 Leaving this solution vulnerable only to on-path attackers that can 8654 see the STUN requests go to the target of attack. 8656 For delivery to multicast addresses there is need for another 8657 solution which is not specified here. 8659 22. IANA Considerations 8661 This section sets up a number of registries for RTSP 2.0 that should 8662 be maintained by IANA. For each registry there is a description on 8663 what it is required to contain, what specification is needed when 8664 adding a entry with IANA, and finally the entries that this document 8665 needs to register. See also the Section 2.7 "Extending RTSP". There 8666 is also an IANA registration of two SDP attributes. 8668 The sections describing how to register an item uses some of the 8669 requirements level described in RFC 5226 [RFC5226], namely "First 8670 Come, First Served", "Expert Review, "Specification Required", and 8671 "Standards Action". 8673 A registration request to IANA MUST contain the following 8674 information: 8676 o A name of the item to register according to the rules specified by 8677 the intended registry. 8679 o Indication of who has change control over the feature (for 8680 example, IETF, ISO, ITU-T, other international standardization 8681 bodies, a consortium, a particular company or group of companies, 8682 or an individual); 8684 o A reference to a further description, if available, for example 8685 (in decreasing order of preference) an RFC, a published standard, 8686 a published paper, a patent filing, a technical report, documented 8687 source code or a computer manual; 8689 o For proprietary features, contact information (postal and email 8690 address); 8692 22.1. Feature-tags 8694 22.1.1. Description 8696 When a client and server try to determine what part and functionality 8697 of the RTSP specification and any future extensions that its counter 8698 part implements there is need for a namespace. This registry 8699 contains named entries representing certain functionality. 8701 The usage of feature-tags is explained in Section 11 and 8702 Section 13.1. 8704 22.1.2. Registering New Feature-tags with IANA 8706 The registering of feature-tags is done on a first come, first served 8707 basis. 8709 The name of the feature MUST follow these rules: The name may be of 8710 any length, but SHOULD be no more than twenty characters long. The 8711 name MUST NOT contain any spaces, or control characters. The 8712 registration MUST indicate if the feature-tag applies to clients, 8713 servers, or proxies only or any combinations of these. Any 8714 proprietary feature MUST have as the first part of the name a vendor 8715 tag, which identifies the organization. 8717 22.1.3. Registered entries 8719 The following feature-tags are in this specification defined and 8720 hereby registered. The change control belongs to the IETF. 8722 play.basic: The minimal implementation for playback operations 8723 according to this specification. Applies for both clients, 8724 servers and proxies. 8726 play.scale: Support of scale operations for media playback. Applies 8727 only for servers. 8729 play.speed: Support of the speed functionality for playback. 8730 Applies only for servers. 8732 22.2. RTSP Methods 8734 22.2.1. Description 8736 What a method is, is described in section Section 13. Extending the 8737 protocol with new methods allow for totally new functionality. 8739 22.2.2. Registering New Methods with IANA 8741 A new method MUST be registered through an IETF Standards Action. 8742 The reason is that new methods may radically change the protocols 8743 behavior and purpose. 8745 A specification for a new RTSP method MUST consist of the following 8746 items: 8748 o A method name which follows the ABNF rules for methods. 8750 o A clear specification on what action and response a request with 8751 the method will result in. Which directions the method is used, 8752 C->S or S->C or both. How the use of headers, if any, modifies 8753 the behavior and effect of the method. 8755 o A list or table specifying which of the registered headers that 8756 are allowed to use with the method in request or/and response. 8758 o Describe how the method relates to network proxies. 8760 22.2.3. Registered Entries 8762 This specification, RFCXXXX, registers 10 methods: DESCRIBE, 8763 GET_PARAMETER, OPTIONS, PAUSE, PLAY, PLAY_NOTIFY REDIRECT, SETUP, 8764 SET_PARAMETER, and TEARDOWN. 8766 22.3. RTSP Status Codes 8768 22.3.1. Description 8770 A status code is the three digit numbers used to convey information 8771 in RTSP response messages, seeSection 8. The number space is limited 8772 and care should be taken not to fill the space. 8774 22.3.2. Registering New Status Codes with IANA 8776 A new status code can only be registered by an IETF Standards Action. 8777 A specification for a new status code MUST specify the following: 8779 o The requested number. 8781 o A description what the status code means and the expected behavior 8782 of the sender and receiver of the code. 8784 22.3.3. Registered Entries 8786 RFCXXXX, registers the numbered status code defined in the ABNF entry 8787 "Status-Code" except "extension-code" in Section 20.2.2. 8789 22.4. RTSP Headers 8791 22.4.1. Description 8793 By specifying new headers a method(s) can be enhanced in many 8794 different ways. An unknown header will be ignored by the receiving 8795 entity. If the new header is vital for a certain functionality, a 8796 feature-tag for the functionality can be created and demanded to be 8797 used by the counter-part with the inclusion of a Require header 8798 carrying the feature-tag. 8800 22.4.2. Registering New Headers with IANA 8802 Registrations in the registry can be done following the Expert Review 8803 policy. A specification SHOULD be provided, preferable an IETF RFC 8804 or other Standards Developing Organization specification. The 8805 minimal information in a registration request is the header name and 8806 the contact information. 8808 The specification SHOULD contain the following information: 8810 o The name of the header. 8812 o An ABNF specification of the header syntax. 8814 o A list or table specifying when the header may be used, 8815 encompassing all methods, their request or response, the direction 8816 (C->S or S->C). 8818 o How the header is to be handled by proxies. 8820 o A description of the purpose of the header. 8822 22.4.3. Registered entries 8824 All headers specified in Section 16 in RFCXXXX are to be registered. 8826 Furthermore the following RTSP headers defined in other 8827 specifications are registered: 8829 o x-wap-profile defined in [3gpp-26234]. 8831 o x-wap-profile-diff defined in [3gpp-26234]. 8833 o x-wap-profile-warning defined in [3gpp-26234]. 8835 o x-predecbufsize defined in [3gpp-26234]. 8837 o x-initpredecbufperiod defined in [3gpp-26234]. 8839 o x-initpostdecbufperiod defined in [3gpp-26234]. 8841 o 3gpp-videopostdecbufsize defined in [3gpp-26234]. 8843 o 3GPP-Link-Char defined in [3gpp-26234]. 8845 o 3GPP-Adaptation defined in [3gpp-26234]. 8847 o 3GPP-QoE-Metrics defined in [3gpp-26234]. 8849 o 3GPP-QoE-Feedback defined in [3gpp-26234]. 8851 The use of "x-" is NOT RECOMMENDED but the above headers in the 8852 register list was defined prior to the clarification. 8854 22.5. Accept-Credentials 8856 The security framework's TLS connection mechanism has two registrable 8857 entities. 8859 22.5.1. Accept-Credentials policies 8861 In Section 19.3.1 three policies for how to handle certificates are 8862 specified. Further policies may be defined and MUST be registered 8863 with IANA using the following rules: 8865 o Registering requires an IETF Standards Action 8867 o A registration is required to name a contact person. 8869 o Name of the policy. 8871 o A describing text that explains how the policy works for handling 8872 the certificates. 8874 This specification registers the following values: 8876 Any 8878 Proxy 8880 User 8882 22.5.2. Accept-Credentials hash algorithms 8884 The Accept-Credentials header (See Section 16.2) allows for the usage 8885 of other algorithms for hashing the DER records of accepted entities. 8886 The registration of any future algorithm is expected to be extremely 8887 rare and could also cause interoperability problems. Therefore the 8888 bar for registering new algorithms is intentionally placed high. 8890 Any registration of a new hash algorithm MUST fulfill the following 8891 requirement: 8893 o Follow the IETF Standards Action policy. 8895 o A definition of the algorithm and its identifier meeting the 8896 "token" ABNF requirement. 8898 22.6. Cache-Control Cache Directive Extensions 8900 There exist a number of cache directives which can be sent in the 8901 Cache-Control header. A registry for these cache directives MUST be 8902 defined with the following rules: 8904 o Registering requires an IETF Standards Action. 8906 o A registration is required to contain a contact person. 8908 o Name of the directive and a definition of the value, if any. 8910 o Specification if it is an request or response directive. 8912 o A describing text that explains how the cache directive is used 8913 for RTSP controlled media streams. 8915 This specification registers the following values: 8917 no-cache: 8919 public: 8921 private: 8923 no-transform: 8925 only-if-cached: 8927 max-stale: 8929 min-fresh: 8931 must-revalidate: 8933 proxy-revalidate: 8935 max-age: 8937 22.7. Media Properties 8938 22.7.1. Description 8940 The media streams being controlled by RTSP can have many different 8941 properties. The media properties required to cover the use cases 8942 that was in mind when writing the specification are defined. 8943 However, it can be expected that further innovation will result in 8944 new use cases or media streams with properties not covered by the 8945 ones specified here. Thus new media properties can be specified. As 8946 new media properties may need a substantial amount of new definitions 8947 to correctly specify behavior for this property the bar is intended 8948 to be high. 8950 22.7.2. Registration Rules 8952 Registering new media property MUST fulfill the following 8953 requirements 8955 o Follow the Specification Required policy and get the approval of 8956 the designated Expert. 8958 o Have an ABNF definition of the media property value name that 8959 meets "media-prop-ext" definition 8961 o A Contact Person for the Registration 8963 o Description of all changes to the behavior of the RTSP protocol as 8964 result of these changes. 8966 22.7.3. Registered Values 8968 This specification registers the 9 values listed in Section 16.28. 8970 22.8. Notify-Reason header 8972 22.8.1. Description 8974 Notify-Reason values used to indicate why a notification was sent. 8975 They may also imply that certain headers are required for the client 8976 to act properly upon the information the notification carries. New 8977 notification behaviors need to be described to result in 8978 interoperable usage, thus a specification of each new value is 8979 required. 8981 22.8.2. Registration Rules 8983 Registrations for new Notify-Reason value MUST fulfill the following 8984 requirements 8985 o Follow the Specification Required policy and get the approval of 8986 the designated Expert. 8988 o Have a ABNF definition of the Notify reason value name that meets 8989 "Notify-Reason-extension" definition 8991 o A Contact Person for the Registration 8993 o Description of which headers shall be included in the request and 8994 response, when it should be sent, and any effect it has on the 8995 server client state. 8997 22.8.3. Registered Values 8999 This specification registers 3 values defined in the Notify-Reas-val 9000 ABNFSection 20.2.3: 9002 o end-of-stream 9004 o media-properties-update 9006 o scale-change 9008 22.9. Range header formats 9010 The Range header allows for different range formats. New ones may be 9011 registered, but moderation should be applied as it makes 9012 interoperability more difficult. A registration MUST fulfill the 9013 following requirements: 9015 o Follow the Specification Required policy. 9017 o An ABNF definition of the range format that fulfills the "range- 9018 ext" definition. 9020 o A Contact person for the registration. 9022 o Rules for how one handles the range when using a negative Scale. 9024 22.10. Terminate-Reason Header 9026 The Terminate-Reason header (Section 16.50) has two registries for 9027 extensions. 9029 22.10.1. Redirect Reasons 9031 Registrations are done under the policy of Expert Review. The 9032 registered value needs to follow syntax, i.e. be a token. The 9033 specification needs to provide definition of what the procedures that 9034 is to be followed when a client receives this redirect reason. This 9035 specification registers two values: 9037 o Session-Timeout 9039 o Server-Admin 9041 22.10.2. Terminate-Reason Header Parameters 9043 Registrations are done under the policy of Specification Required. 9044 The registrations must define a syntax for the parameter that also 9045 follows the allowed by the RTSP 2.0 specification. A contact person 9046 is also required. This specification registers: 9048 o time 9050 o user-msg 9052 22.11. RTP-Info header parameters 9054 22.11.1. Description 9056 The RTP-Info header (Section 16.43) carries one or more parameter 9057 value pairs with information about a particular point in the RTP 9058 stream. RTP extensions or new usages may need new types of 9059 information. As RTP information that could be needed is likely to be 9060 generic enough and to maximize the interoperability registration 9061 requires specification required. 9063 22.11.2. Registration Rules 9065 Registrations for new Notify-Reason value MUST fulfill the following 9066 requirements 9068 o Follow the Specification Required policy and get the approval of 9069 the designated Expert. 9071 o Have a ABNF definition that meets the "generic-param" definition 9073 o A Contact Person for the Registration 9075 22.11.3. Registered Values 9077 This specification registers 2 parameter value pairs: 9079 o seq 9081 o rtptime 9083 22.12. Seek-Style Policies 9085 22.12.1. Description 9087 New seek policies may be registered, however a large number of these 9088 will complicate implementation substantially. The impact of unknown 9089 policies is that the server will not honor the unknown and use the 9090 server default policy instead. 9092 22.12.2. Registration Rules 9094 Registrations of new Seek-Style polices MUST fulfill the following 9095 requirements 9097 o Follow the Specification Required policy. 9099 o Have a ABNF definition of the Seek-Style policy name that meets 9100 "Seek-S-value-ext" definition 9102 o A Contact Person for the Registration 9104 o Description of which headers shall be included in the request and 9105 response, when it should be sent, and any affect it has on the 9106 server client state. 9108 22.12.3. Registered Values 9110 This specification registers 3 values: 9112 o RAP 9114 o First-Prior 9116 o Next 9118 22.13. Transport Header Registries 9120 The transport header contains a number of parameters which have 9121 possibilities for future extensions. Therefore registries for these 9122 needs to be defined. 9124 22.13.1. Transport Protocol Specification 9126 A registry for the parameter transport-protocol specification MUST be 9127 defined with the following rules: 9129 o Registering uses the policy of Specification Required. 9131 o A contact person or organization with address and email. 9133 o A value definition that are following the ABNF syntax definition. 9135 o A describing text that explains how the registered value are used 9136 in RTSP. 9138 This specification registers the following values: 9140 RTP/AVP: Use of the RTP[RFC3550] protocol for media transport in 9141 combination with the "RTP profile for audio and video 9142 conferences with minimal control"[RFC3551] over UDP. The usage 9143 is explained in RFC XXXX, appendix Appendix C.1. 9145 RTP/AVP/UDP: the same as RTP/AVP. 9147 RTP/AVPF: Use of the RTP[RFC3550] protocol for media transport in 9148 combination with the "Extended RTP Profile for RTCP-based 9149 Feedback (RTP/AVPF)" [RFC4585] over UDP. The usage is 9150 explained in RFC XXXX, appendix Appendix C.1. 9152 RTP/AVPF/UDP: the same as RTP/AVPF. 9154 RTP/SAVP: Use of the RTP[RFC3550] protocol for media transport in 9155 combination with the "The Secure Real-time Transport Protocol 9156 (SRTP)" [RFC3711] over UDP. The usage is explained in RFC 9157 XXXX, appendix Appendix C.1. 9159 RTP/SAVP/UDP: the same as RTP/SAVP. 9161 RTP/SAVPF: Use of the RTP[RFC3550] protocol for media transport in 9162 combination with the "[RFC5124] over UDP. The usage is 9163 explained in RFC XXXX, appendix Appendix C.1. 9165 RTP/SAVPF/UDP: the same as RTP/SAVPF. 9167 RTP/AVP/TCP: Use of the RTP[RFC3550] protocol for media transport in 9168 combination with the "RTP profile for audio and video 9169 conferences with minimal control"[RFC3551] over TCP. The usage 9170 is explained in RFC XXXX, appendix Appendix C.2.2. 9172 RTP/AVPF/TCP: Use of the RTP[RFC3550] protocol for media transport 9173 in combination with the "Extended RTP Profile for RTCP-based 9174 Feedback (RTP/AVPF)"[RFC4585] over TCP. The usage is explained 9175 in RFC XXXX, appendix Appendix C.2.2. 9177 RTP/SAVP/TCP: Use of the RTP[RFC3550] protocol for media transport 9178 in combination with the "The Secure Real-time Transport 9179 Protocol (SRTP)" [RFC3711] over TCP. The usage is explained in 9180 RFC XXXX, appendix Appendix C.2.2. 9182 RTP/SAVPF/TCP: Use of the RTP[RFC3550] protocol for media transport 9183 in combination with the "[RFC5124] over TCP. The usage is 9184 explained in RFC XXXX, appendix Appendix C.2.2. 9186 22.13.2. Transport modes 9188 A registry for the transport parameter mode MUST be defined with the 9189 following rules: 9191 o Registering requires an IETF Standards Action. 9193 o A contact person or organization with address and email. 9195 o A value definition that are following the ABNF token definition. 9197 o A describing text that explains how the registered value are used 9198 in RTSP. 9200 This specification registers 1 value: 9202 PLAY: See RFC XXXX. 9204 22.13.3. Transport Parameters 9206 A registry for parameters that may be included in the Transport 9207 header MUST be defined with the following rules: 9209 o Registering uses the Specification Required policy. 9211 o A value definition that are following the ABNF token definition. 9213 o A describing text that explains how the registered value are used 9214 in RTSP. 9216 This specification registers all the transport parameters defined in 9217 Section 16.52. 9219 22.14. URI Schemes 9221 This specification defines two URI schemes ("rtsp" and "rtsps") and 9222 reserves a third one ("rtspu"). Registrations are following RFC 9223 4395[RFC4395]. 9225 22.14.1. The rtsp URI Scheme 9227 URI scheme name: rtsp 9229 Status: Permanent 9231 URI scheme syntax: See Section 20.2.1 of RFC XXXX. 9233 URI scheme semantics: The rtsp scheme is used to indicate resources 9234 accessible through the usage of the Real-time Streaming 9235 Protocol (RTSP). RTSP allows different operations on the 9236 resource identified by the URI, but the primary purpose is the 9237 streaming delivery of the resource to a client. However the 9238 operations that are currently defined are: Describing the 9239 resource for the purpose of configuring the receiving entity 9240 (DESCRIBE), configuring the delivery method and its addressing 9241 (SETUP), controlling the delivery (PLAY and PAUSE), reading or 9242 setting of resource related parameters (SET_PARAMETER and 9243 GET_PARAMETER, and termination of the session context created 9244 (TEARDOWN). 9246 Encoding considerations: IRIs in this scheme are defined and needs 9247 to be encoded as RTSP URIs when used within the RTSP protocol. 9248 That encoding is done according to RFC 3987. 9250 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9251 2326), RTSP 2.0 (RFC XXXX) 9253 Interoperability considerations: The change in URI syntax performed 9254 between RTSP 1.0 and 2.0 can create interoperability issues. 9256 Security considerations: All the security threats identified in 9257 Section 7 of RFC 3986 applies also to this scheme. They need 9258 to be reviewed and considered in any implementation utilizing 9259 this scheme. 9261 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9263 Author/Change controller: IETF 9264 References: RFC 2326, RFC 3986, RFC 3987, RFC XXXX 9266 22.14.2. The rtsps URI Scheme 9268 URI scheme name: rtsps 9270 Status: Permanent 9272 URI scheme syntax: See Section 20.2.1 of RFC XXXX. 9274 URI scheme semantics: The rtsps scheme is used to indicate resources 9275 accessible through the usage of the Real-time Streaming 9276 Protocol (RTSP) over TLS. RTSP allows different operations on 9277 the resource identified by the URI, but the primary purpose is 9278 the streaming delivery of the resource to a client. However 9279 the operations that are currently defined are: Describing the 9280 resource for the purpose of configuring the receiving entity 9281 (DESCRIBE), configuring the delivery method and its addressing 9282 (SETUP), controlling the delivery (PLAY and PAUSE), reading or 9283 setting of resource related parameters (SET_PARAMETER and 9284 GET_PARAMETER, and termination of the session context created 9285 (TEARDOWN). 9287 Encoding considerations: IRIs in this scheme are defined and needs 9288 to be encoded as RTSP URIs when used within the RTSP protocol. 9289 That encoding is done according to RFC 3987. 9291 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9292 2326), RTSP 2.0 (RFC XXXX) 9294 Interoperability considerations: The change in URI syntax performed 9295 between RTSP 1.0 and 2.0 can create interoperability issues. 9297 Security considerations: All the security threats identified in 9298 Section 7 of RFC 3986 applies also to this scheme. They need 9299 to be reviewed and considered in any implementation utilizing 9300 this scheme. 9302 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9304 Author/Change controller: IETF 9306 References: RFC 2326, RFC 3986, RFC 3987, RFC XXXX 9308 22.14.3. The rtspu URI Scheme 9310 URI scheme name: rtspu 9312 Status: Permanent 9314 URI scheme syntax: See Section 3.2 of RFC 2326. 9316 URI scheme semantics: The rtspu scheme is used to indicate resources 9317 accessible through the usage of the Real-time Streaming 9318 Protocol (RTSP) over unreliable datagram transport. RTSP 9319 allows different operations on the resource identified by the 9320 URI, but the primary purpose is the streaming delivery of the 9321 resource to a client. However the operations that are 9322 currently defined are: Describing the resource for the purpose 9323 of configuring the receiving entity (DESCRIBE), configuring the 9324 delivery method and its addressing (SETUP), controlling the 9325 delivery (PLAY and PAUSE), reading or setting of resource 9326 related parameters (SET_PARAMETER and GET_PARAMETER, and 9327 termination of the session context created (TEARDOWN). 9329 Encoding considerations: IRIs in this scheme are defined and needs 9330 to be encoded as RTSP URIs when used within the RTSP protocol. 9331 That encoding is done according to RFC 3987. 9333 Applications/protocols that use this URI scheme name: RTSP 1.0 (RFC 9334 2326) 9336 Interoperability considerations: The definition of the transport 9337 mechanism of RTSP over UDP has interoperability issues. That 9338 makes the usage of this scheme problematic. 9340 Security considerations: All the security threats identified in 9341 Section 7 of RFC 3986 applies also to this scheme. They needs 9342 to be reviewed and considered in any implementation utilizing 9343 this scheme. 9345 Contact: Magnus Westerlund, magnus.westerlund@ericsson.com 9347 Author/Change controller: IETF 9349 References: RFC 2326, RFC 3986, RFC 3987 9351 22.15. SDP attributes 9353 This specification defines three SDP [RFC4566] attributes that it is 9354 requested that IANA register. 9356 SDP Attribute ("att-field"): 9358 Attribute name: range 9359 Long form: Media Range Attribute 9360 Type of name: att-field 9361 Type of attribute: Media and session level 9362 Subject to charset: No 9363 Purpose: RFC XXXX 9364 Reference: RFC XXXX 9365 Values: See ABNF definition. 9367 Attribute name: control 9368 Long form: RTSP control URI 9369 Type of name: att-field 9370 Type of attribute: Media and session level 9371 Subject to charset: No 9372 Purpose: RFC XXXX 9373 Reference: RFC XXXX 9374 Values: Absolute or Relative URIs. 9376 Attribute name: mtag 9377 Long form: Message Tag 9378 Type of name: att-field 9379 Type of attribute: Media and session level 9380 Subject to charset: No 9381 Purpose: RFC XXXX 9382 Reference: RFC XXXX 9383 Values: See ABNF definition 9385 22.16. Media Type Registration for text/parameters 9387 Type name: text 9389 Subtype name: parameters 9391 Required parameters: 9393 Optional parameters: 9395 Encoding considerations: 9397 Security considerations: This format may carry any type of 9398 parameters. Some can clear have security requirements, like 9399 privacy, confidentiality or integrity requirements. The format 9400 has no built in security protection. For the usage it was defined 9401 the transport can be protected between server and client using 9402 TLS. However, care must be take to consider if also the proxies 9403 are trusted with the parameters in case hop-by-hop security is 9404 used. If stored as file in file system the necessary precautions 9405 needs to be taken in relation to the parameters requirements 9406 including object security such as S/MIME [RFC3851]. 9408 Interoperability considerations: This media type was mentioned as a 9409 fictional example in RFC 2326 but was not formally specified. 9410 This have resulted in usage of this media type which may not match 9411 its formal definition. 9413 Published specification: RFC XXXX, Appendix F. 9415 Applications that use this media type: Applications that use RTSP 9416 and have additional parameters they like to read and set using the 9417 RTSP GET_PARAMETER and SET_PARAMETER methods. 9419 Additional information: 9421 Magic number(s): 9423 File extension(s): 9425 Macintosh file type code(s): 9427 Person & email address to contact for further information: Magnus 9428 Westerlund (magnus.westerlund@ericsson.com) 9430 Intended usage: Common 9432 Restrictions on usage: None 9434 Author: Magnus Westerlund (magnus.westerlund@ericsson.com) 9436 Change controller: IETF 9438 Addition Notes: 9440 23. References 9442 23.1. Normative References 9444 [3gpp-26234] 9445 Third Generation Partnership Project (3GPP), "Transparent 9446 end-to-end Packet-switched Streaming Service (PSS); 9447 Protocols and codecs; Technical Specification 26.234", 9448 December 2002. 9450 [FIPS-pub-180-2] 9451 National Institute of Standards and Technology (NIST), 9452 "Federal Information Processing Standards Publications 9453 (FIPS PUBS) 180-2: Secure Hash Standard", August 2002. 9455 [I-D.ietf-avt-rtp-and-rtcp-mux] 9456 Perkins, C. and M. Westerlund, "Multiplexing RTP Data and 9457 Control Packets on a Single Port", 9458 draft-ietf-avt-rtp-and-rtcp-mux-07 (work in progress), 9459 August 2007. 9461 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 9462 August 1980. 9464 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 9465 RFC 793, September 1981. 9467 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 9468 Requirement Levels", BCP 14, RFC 2119, March 1997. 9470 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 9471 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 9472 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 9474 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 9475 Leach, P., Luotonen, A., and L. Stewart, "HTTP 9476 Authentication: Basic and Digest Access Authentication", 9477 RFC 2617, June 1999. 9479 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 9481 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 9482 Jacobson, "RTP: A Transport Protocol for Real-Time 9483 Applications", STD 64, RFC 3550, July 2003. 9485 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 9486 Video Conferences with Minimal Control", STD 65, RFC 3551, 9487 July 2003. 9489 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 9490 10646", STD 63, RFC 3629, November 2003. 9492 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 9493 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 9494 RFC 3711, March 2004. 9496 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 9497 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 9498 August 2004. 9500 [RFC3851] Ramsdell, B., "Secure/Multipurpose Internet Mail 9501 Extensions (S/MIME) Version 3.1 Message Specification", 9502 RFC 3851, July 2004. 9504 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 9505 Resource Identifier (URI): Generic Syntax", STD 66, 9506 RFC 3986, January 2005. 9508 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 9509 Identifiers (IRIs)", RFC 3987, January 2005. 9511 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 9512 Requirements for Security", BCP 106, RFC 4086, June 2005. 9514 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 9515 Architecture", RFC 4291, February 2006. 9517 [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and 9518 Registration Procedures for New URI Schemes", BCP 35, 9519 RFC 4395, February 2006. 9521 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 9522 Description Protocol", RFC 4566, July 2006. 9524 [RFC4567] Arkko, J., Lindholm, F., Naslund, M., Norrman, K., and E. 9525 Carrara, "Key Management Extensions for Session 9526 Description Protocol (SDP) and Real Time Streaming 9527 Protocol (RTSP)", RFC 4567, July 2006. 9529 [RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP) 9530 and RTP Control Protocol (RTCP) Packets over Connection- 9531 Oriented Transport", RFC 4571, July 2006. 9533 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 9534 "Extended RTP Profile for Real-time Transport Control 9535 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, 9536 July 2006. 9538 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 9539 Languages", BCP 47, RFC 4646, September 2006. 9541 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 9542 Encodings", RFC 4648, October 2006. 9544 [RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for 9545 Real-time Transport Control Protocol (RTCP)-Based Feedback 9546 (RTP/SAVPF)", RFC 5124, February 2008. 9548 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 9549 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 9550 May 2008. 9552 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 9553 Specifications: ABNF", STD 68, RFC 5234, January 2008. 9555 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 9556 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 9558 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 9559 Housley, R., and W. Polk, "Internet X.509 Public Key 9560 Infrastructure Certificate and Certificate Revocation List 9561 (CRL) Profile", RFC 5280, May 2008. 9563 [RFC5378] Bradner, S. and J. Contreras, "Rights Contributors Provide 9564 to the IETF Trust", BCP 78, RFC 5378, November 2008. 9566 23.2. Informative References 9568 [I-D.ietf-mmusic-rtsp-nat] 9569 Goldberg, J., Westerlund, M., and T. Zeng, "An Network 9570 Address Translator (NAT) Traversal mechanism for media 9571 controlled by Real-Time Streaming Protocol (RTSP)", 9572 draft-ietf-mmusic-rtsp-nat-07 (work in progress), 9573 July 2008. 9575 [IETF-Trust-License-Policy] 9576 IETF, "IETF TRUST Legal Provisions Relating to IETF 9577 Documents", 2009. 9579 [ISO.13818-6.1995] 9580 International Organization for Standardization, 9581 "Information technology - Generic coding of moving 9582 pictures and associated audio information - part 6: 9583 Extension for digital storage media and control", 9584 ISO Draft Standard 13818-6, November 1995. 9586 [ISO.8601.2000] 9587 International Organization for Standardization, "Data 9588 elements and interchange formats - Information interchange 9589 - Representation of dates and times", ISO/IEC Standard 9590 8601, December 2000. 9592 [RFC1123] Braden, R., "Requirements for Internet Hosts - Application 9593 and Support", STD 3, RFC 1123, October 1989. 9595 [RFC1305] Mills, D., "Network Time Protocol (Version 3) 9596 Specification, Implementation", RFC 1305, March 1992. 9598 [RFC1644] Braden, B., "T/TCP -- TCP Extensions for Transactions 9599 Functional Specification", RFC 1644, July 1994. 9601 [RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. 9602 Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", 9603 RFC 2068, January 1997. 9605 [RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time 9606 Streaming Protocol (RTSP)", RFC 2326, April 1998. 9608 [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address 9609 Translator (NAT) Terminology and Considerations", 9610 RFC 2663, August 1999. 9612 [RFC2974] Handley, M., Perkins, C., and E. Whelan, "Session 9613 Announcement Protocol", RFC 2974, October 2000. 9615 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 9616 A., Peterson, J., Sparks, R., Handley, M., and E. 9617 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 9618 June 2002. 9620 [RFC3388] Camarillo, G., Eriksson, G., Holler, J., and H. 9621 Schulzrinne, "Grouping of Media Lines in the Session 9622 Description Protocol (SDP)", RFC 3388, December 2002. 9624 [RFC4145] Yon, D. and G. Camarillo, "TCP-Based Media Transport in 9625 the Session Description Protocol (SDP)", RFC 4145, 9626 September 2005. 9628 [Stevens98] 9629 Stevens, W., "Unix Networking Programming - Volume 1, 9630 second edition", 1998. 9632 Appendix A. Examples 9634 This section contains several different examples trying to illustrate 9635 possible ways of using RTSP. The examples can also help with the 9636 understanding of how functions of RTSP work. However remember that 9637 this is examples and the normative and syntax description in the 9638 other sections takes precedence. Please also note that many of the 9639 example contain syntax illegal line breaks to accommodate the 9640 formatting restriction that the RFC series impose. 9642 A.1. Media on Demand (Unicast) 9644 The is an example of media on demand streaming of a media stored in a 9645 container file. For purposes of this example, a container file is a 9646 storage entity in which multiple continuous media types pertaining to 9647 the same end-user presentation are present. In effect, the container 9648 file represents an RTSP presentation, with each of its components 9649 being RTSP controlled media streams. Container files are a widely 9650 used means to store such presentations. While the components are 9651 transported as independent streams, it is desirable to maintain a 9652 common context for those streams at the server end. 9654 This enables the server to keep a single storage handle open 9655 easily. It also allows treating all the streams equally in case 9656 of any priorization of streams by the server. 9658 It is also possible that the presentation author may wish to prevent 9659 selective retrieval of the streams by the client in order to preserve 9660 the artistic effect of the combined media presentation. Similarly, 9661 in such a tightly bound presentation, it is desirable to be able to 9662 control all the streams via a single control message using an 9663 aggregate URI. 9665 The following is an example of using a single RTSP session to control 9666 multiple streams. It also illustrates the use of aggregate URIs. In 9667 a container file it is also desirable to not write any URI parts 9668 which is not kept, when the container is distributed, like the host 9669 and most of the path element. Therefore this example also uses the 9670 "*" and relative URI in the delivered SDP. 9672 Client C requests a presentation from media server M. The movie is 9673 stored in a container file. The client has obtained an RTSP URI to 9674 the container file. 9676 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 9677 CSeq: 1 9678 User-Agent: PhonyClient/1.2 9680 M->C: RTSP/2.0 200 OK 9681 CSeq: 1 9682 Server: PhonyServer/1.0 9683 Date: Thu, 23 Jan 1997 15:35:06 GMT 9684 Content-Type: application/sdp 9685 Content-Length: 271 9686 Content-Base: rtsp://example.com/twister.3gp/ 9687 Expires: 24 Jan 1997 15:35:06 GMT 9689 v=0 9690 o=- 2890844256 2890842807 IN IP4 192.0.2.5 9691 s=RTSP Session 9692 i=An Example of RTSP Session Usage 9693 e=adm@example.com 9694 c=IN IP4 0.0.0.0 9695 a=control: * 9696 a=range: npt=0-0:10:34.10 9697 t=0 0 9698 m=audio 0 RTP/AVP 0 9699 a=control: trackID=1 9700 m=video 0 RTP/AVP 26 9701 a=control: trackID=4 9703 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 9704 CSeq: 2 9705 User-Agent: PhonyClient/1.2 9706 Require: play.basic 9707 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 9708 Accept-Ranges: NPT, SMPTE, UTC 9710 M->C: RTSP/2.0 200 OK 9711 CSeq: 2 9712 Server: PhonyServer/1.0 9713 Transport: RTP/AVP;unicast; ssrc=93CB001E; 9714 dest_addr="192.0.2.53:8000"/"192.0.2.53:8001"; 9715 src_addr="192.0.2.5:9000"/"192.0.2.5:9001" 9716 Session: 12345678 9717 Expires: 24 Jan 1997 15:35:12 GMT 9718 Date: 23 Jan 1997 15:35:12 GMT 9719 Accept-Ranges: NPT 9720 Media-Properties: Random-Access=0.02, Unmutable, Unlimited 9722 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/2.0 9723 CSeq: 3 9724 User-Agent: PhonyClient/1.2 9725 Require: play.basic 9726 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 9727 Session: 12345678 9728 Accept-Ranges: NPT, SMPTE, UTC 9730 M->C: RTSP/2.0 200 OK 9731 CSeq: 3 9732 Server: PhonyServer/1.0 9733 Transport: RTP/AVP;unicast; ssrc=A813FC13; 9734 dest_addr="192.0.2.53:8002"/"192.0.2.53:8003"; 9735 src_addr="192.0.2.5:9002"/"192.0.2.5:9003"; 9737 Session: 12345678 9738 Expires: 24 Jan 1997 15:35:13 GMT 9739 Date: 23 Jan 1997 15:35:13 GMT 9740 Accept-Range: NPT 9741 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 9743 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9744 CSeq: 4 9745 User-Agent: PhonyClient/1.2 9746 Range: npt=30- 9747 Seek-Style: RAP 9748 Session: 12345678 9750 M->C: RTSP/2.0 200 OK 9751 CSeq: 4 9752 Server: PhonyServer/1.0 9753 Date: 23 Jan 1997 15:35:14 GMT 9754 Session: 12345678 9755 Range: npt=30-623.10 9756 Seek-Style: RAP 9757 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9758 ssrc=0D12F123:seq=12345;rtptime=3450012, 9759 url="rtsp://example.com/twister.3gp/trackID=1" 9760 ssrc=4F312DD8:seq=54321;rtptime=2876889 9762 C->M: PAUSE rtsp://example.com/twister.3gp/ RTSP/2.0 9763 CSeq: 5 9764 User-Agent: PhonyClient/1.2 9765 Session: 12345678 9767 M->C: RTSP/2.0 200 OK 9768 CSeq: 5 9769 Server: PhonyServer/1.0 9770 Date: 23 Jan 1997 15:36:01 GMT 9771 Session: 12345678 9772 Range: npt=34.57-623.10 9774 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9775 CSeq: 6 9776 User-Agent: PhonyClient/1.2 9777 Range: npt=34.57-623.10 9778 Seek-Style: Next 9779 Session: 12345678 9781 M->C: RTSP/2.0 200 OK 9782 CSeq: 6 9783 Server: PhonyServer/1.0 9784 Date: 23 Jan 1997 15:36:01 GMT 9785 Session: 12345678 9786 Range: npt=34.57-623.10 9787 Seek-Style: Next 9788 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9789 ssrc=0D12F123:seq=12555;rtptime=6330012, 9790 url="rtsp://example.com/twister.3gp/trackID=1" 9791 ssrc=4F312DD8:seq=55021;rtptime=3132889 9793 A.2. Media on Demand using Pipelining 9795 This example is basically the example above (Appendix A.1), but now 9796 utilizing pipelining to speed up the setup. It requires only two 9797 round trip times until the media starts flowing. First of all, the 9798 session description is retrieved to determine what media resources 9799 need to be setup. In the second step, one sends the necessary SETUP 9800 requests and the PLAY request to initiate media delivery. 9802 Client C requests a presentation from media server M. The movie is 9803 stored in a container file. The client has obtained an RTSP URI to 9804 the container file. 9806 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 9807 CSeq: 1 9808 User-Agent: PhonyClient/1.2 9810 M->C: RTSP/2.0 200 OK 9811 CSeq: 1 9812 Server: PhonyServer/1.0 9813 Date: Thu, 23 Jan 1997 15:35:06 GMT 9814 Content-Type: application/sdp 9815 Content-Length: 271 9816 Content-Base: rtsp://example.com/twister.3gp/ 9817 Expires: 24 Jan 1997 15:35:06 GMT 9819 v=0 9820 o=- 2890844256 2890842807 IN IP4 192.0.2.5 9821 s=RTSP Session 9822 i=An Example of RTSP Session Usage 9823 e=adm@example.com 9824 c=IN IP4 0.0.0.0 9825 a=control: * 9826 a=range: npt=0-0:10:34.10 9827 t=0 0 9828 m=audio 0 RTP/AVP 0 9829 a=control: trackID=1 9830 m=video 0 RTP/AVP 26 9831 a=control: trackID=4 9833 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 9834 CSeq: 2 9835 User-Agent: PhonyClient/1.2 9836 Require: play.basic 9837 Transport: RTP/AVP;unicast;dest_addr=":8000"/":8001" 9838 Accept-Ranges: NPT, SMPTE, UTC 9839 Pipelined-Requests: 7654 9841 C->M: SETUP rtsp://example.com/twister.3gp/trackID=4 RTSP/2.0 9842 CSeq: 3 9843 User-Agent: PhonyClient/1.2 9844 Require: play.basic 9845 Transport: RTP/AVP;unicast;dest_addr=":8002"/":8003" 9846 Accept-Ranges: NPT, SMPTE, UTC 9847 Pipelined-Requests: 7654 9849 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 9850 CSeq: 4 9851 User-Agent: PhonyClient/1.2 9852 Range: npt=0- 9853 Seek-Style: RAP 9854 Session: 12345678 9855 Pipelined-Requests: 7654 9857 M->C: RTSP/2.0 200 OK 9858 CSeq: 2 9859 Server: PhonyServer/1.0 9860 Transport: RTP/AVP;unicast; 9861 dest_addr="192.0.2.53:8000"/"192.0.2.53:8001"; 9862 src_addr="192.0.2.5:9000"/"192.0.2.5:9001"; 9863 ssrc=93CB001E 9864 Session: 12345678 9865 Expires: 24 Jan 1997 15:35:12 GMT 9866 Date: 23 Jan 1997 15:35:12 GMT 9867 Accept-Ranges: NPT 9868 Pipelined-Requests: 7654 9869 Media-Properties: Random-Access=0.2, Unmutable, Unlimited 9871 M->C: RTSP/2.0 200 OK 9872 CSeq: 3 9873 Server: PhonyServer/1.0 9874 Transport: RTP/AVP;unicast; 9875 dest_addr="192.0.2.53:8002"/"192.0.2.53:8003; 9876 src_addr="192.0.2.5:9002"/"192.0.2.5:9003"; 9877 ssrc=A813FC13 9878 Session: 12345678 9879 Expires: 24 Jan 1997 15:35:13 GMT 9880 Date: 23 Jan 1997 15:35:13 GMT 9881 Accept-Range: NPT 9882 Pipelined-Requests: 7654 9883 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 9885 M->C: RTSP/2.0 200 OK 9886 CSeq: 4 9887 Server: PhonyServer/1.0 9888 Date: 23 Jan 1997 15:35:14 GMT 9889 Session: 12345678 9890 Range: npt=0-623.10 9891 Seek-Style: RAP 9892 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=4" 9893 ssrc=0D12F123:seq=12345;rtptime=3450012, 9895 url="rtsp://example.com/twister.3gp/trackID=1" 9896 ssrc=4F312DD8:seq=54321;rtptime=2876889 9897 Pipelined-Requests: 7654 9899 A.3. Media on Demand (Unicast) 9901 An alternative example of media on demand with a bit more tweaks is 9902 the following. Client C requests a movie distributed from two 9903 different media servers A (audio.example.com) and V ( 9904 video.example.com). The media description is stored on a web server 9905 W. The media description contains descriptions of the presentation 9906 and all its streams, including the codecs that are available, dynamic 9907 RTP payload types, the protocol stack, and content information such 9908 as language or copyright restrictions. It may also give an 9909 indication about the timeline of the movie. 9911 In this example, the client is only interested in the last part of 9912 the movie. 9914 C->W: GET /twister.sdp HTTP/1.1 9915 Host: www.example.com 9916 Accept: application/sdp 9918 W->C: HTTP/1.0 200 OK 9919 Date: Thu, 23 Jan 1997 15:35:06 GMT 9920 Content-Type: application/sdp 9921 Content-Length: 278 9922 Expires: 23 Jan 1998 15:35:06 GMT 9924 v=0 9925 o=- 2890844526 2890842807 IN IP4 192.0.2.5 9926 s=RTSP Session 9927 e=adm@example.com 9928 c=IN IP4 0.0.0.0 9929 a=range:npt=0-1:49:34 9930 t=0 0 9931 m=audio 0 RTP/AVP 0 9932 a=control:rtsp://audio.example.com/twister/audio.en 9933 m=video 0 RTP/AVP 31 9934 a=control:rtsp://video.example.com/twister/video 9936 C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/2.0 9937 CSeq: 1 9938 User-Agent: PhonyClient/1.2 9939 Transport: RTP/AVP/UDP;unicast;dest_addr=":3056"/":3057", 9940 RTP/AVP/TCP;unicast;interleaved=0-1 9941 Accept-Ranges: NPT, SMPTE, UTC 9943 A->C: RTSP/2.0 200 OK 9944 CSeq: 1 9945 Session: 12345678 9946 Transport: RTP/AVP/UDP;unicast; 9947 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057"; 9948 src_addr="192.0.2.5:5000"/"192.0.2.5:5001" 9949 Date: 23 Jan 1997 15:35:12 GMT 9950 Server: PhonyServer/1.0 9951 Expires: 24 Jan 1997 15:35:12 GMT 9952 Cache-Control: public 9953 Accept-Ranges: NPT, SMPTE 9954 Media-Properties: Random-Access=0.02, Unmutable, Unlimited 9956 C->V: SETUP rtsp://video.example.com/twister/video RTSP/2.0 9957 CSeq: 1 9958 User-Agent: PhonyClient/1.2 9959 Transport: RTP/AVP/UDP;unicast; 9960 dest_addr="192.0.2.53:3058"/"192.0.2.53:3059", 9961 RTP/AVP/TCP;unicast;interleaved=0-1 9962 Accept-Ranges: NPT, SMPTE, UTC 9964 V->C: RTSP/2.0 200 OK 9965 CSeq: 1 9966 Session: 23456789 9967 Transport: RTP/AVP/UDP;unicast; 9968 dest_addr="192.0.2.53:3058"/"192.0.2.53:3059"; 9969 src_addr="192.0.2.5:5002"/"192.0.2.5:5003" 9970 Date: 23 Jan 1997 15:35:12 GMT 9971 Server: PhonyServer/1.0 9972 Cache-Control: public 9973 Expires: 24 Jan 1997 15:35:12 GMT 9974 Accept-Ranges: NPT, SMPTE 9975 Media-Properties: Random-Access=1.2, Unmutable, Unlimited 9977 C->V: PLAY rtsp://video.example.com/twister/video RTSP/2.0 9978 CSeq: 2 9979 User-Agent: PhonyClient/1.2 9980 Session: 23456789 9981 Range: smpte=0:10:00- 9983 V->C: RTSP/2.0 200 OK 9984 CSeq: 2 9985 Session: 23456789 9986 Range: smpte=0:10:00-1:49:23 9987 Seek-Style: First-Prior 9988 RTP-Info: url="rtsp://video.example.com/twister/video" 9989 ssrc=A17E189D:seq=12312232;rtptime=78712811 9990 Server: PhonyServer/2.0 9991 Date: 23 Jan 1997 15:35:13 GMT 9993 C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/2.0 9994 CSeq: 2 9995 User-Agent: PhonyClient/1.2 9996 Session: 12345678 9997 Range: smpte=0:10:00- 9999 A->C: RTSP/2.0 200 OK 10000 CSeq: 2 10001 Session: 12345678 10002 Range: smpte=0:10:00-1:49:23 10003 Seek-Style: First-Prior 10004 RTP-Info: url="rtsp://audio.example.com/twister/audio.en" 10005 ssrc=3D124F01:seq=876655;rtptime=1032181 10006 Server: PhonyServer/1.0 10007 Date: 23 Jan 1997 15:35:13 GMT 10009 C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/2.0 10010 CSeq: 3 10011 User-Agent: PhonyClient/1.2 10012 Session: 12345678 10014 A->C: RTSP/2.0 200 OK 10015 CSeq: 3 10016 Server: PhonyServer/1.0 10017 Date: 23 Jan 1997 15:36:52 GMT 10019 C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/2.0 10020 CSeq: 3 10021 User-Agent: PhonyClient/1.2 10022 Session: 23456789 10024 V->C: RTSP/2.0 200 OK 10025 CSeq: 3 10026 Server: PhonyServer/2.0 10027 Date: 23 Jan 1997 15:36:52 GMT 10029 Even though the audio and video track are on two different servers 10030 that may start at slightly different times and may drift with respect 10031 to each other over time, the client can perform initial 10032 synchronization of the two media using RTP-Info and Range received in 10033 the PLAY responses. If the two servers are time synchronized the 10034 RTCP packets can also be used to maintain synchronization. 10036 A.4. Single Stream Container Files 10038 Some RTSP servers may treat all files as though they are "container 10039 files", yet other servers may not support such a concept. Because of 10040 this, clients needs to use the rules set forth in the session 10041 description for Request-URIs, rather than assuming that a consistent 10042 URI may always be used throughout. Below are an example of how a 10043 multi-stream server might expect a single-stream file to be served: 10045 C->S: DESCRIBE rtsp://foo.com/test.wav RTSP/2.0 10046 Accept: application/x-rtsp-mh, application/sdp 10047 CSeq: 1 10048 User-Agent: PhonyClient/1.2 10050 S->C: RTSP/2.0 200 OK 10051 CSeq: 1 10052 Content-base: rtsp://foo.com/test.wav/ 10053 Content-type: application/sdp 10054 Content-length: 163 10055 Server: PhonyServer/1.0 10056 Date: Thu, 23 Jan 1997 15:35:06 GMT 10057 Expires: 23 Jan 1997 17:00:00 GMT 10059 v=0 10060 o=- 872653257 872653257 IN IP4 192.0.2.5 10061 s=mu-law wave file 10062 i=audio test 10063 c=IN IP4 0.0.0.0 10064 t=0 0 10065 a=control: * 10066 m=audio 0 RTP/AVP 0 10067 a=control:streamid=0 10069 C->S: SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/2.0 10070 Transport: RTP/AVP/UDP;unicast; 10071 dest_addr=":6970"/":6971";mode="PLAY" 10072 CSeq: 2 10073 User-Agent: PhonyClient/1.2 10074 Accept-Ranges: NPT, SMPTE, UTC 10076 S->C: RTSP/2.0 200 OK 10077 Transport: RTP/AVP/UDP;unicast; 10078 dest_addr="192.0.2.53:6970"/"192.0.2.53:6971"; 10079 src_addr="192.0.2.5:6970"/"192.0.2.5:6971"; 10080 mode="PLAY";ssrc=EAB98712 10081 CSeq: 2 10082 Session: 2034820394 10083 Expires: 23 Jan 1997 16:00:00 GMT 10084 Server: PhonyServer/1.0 10085 Date: 23 Jan 1997 15:35:07 GMT 10086 Accept-Ranges: NPT 10087 Media-Properties: Begining-Only, Unmutable, Unlimited 10089 C->S: PLAY rtsp://foo.com/test.wav/ RTSP/2.0 10090 CSeq: 3 10091 User-Agent: PhonyClient/1.2 10092 Session: 2034820394 10094 S->C: RTSP/2.0 200 OK 10095 CSeq: 3 10096 Server: PhonyServer/1.0 10097 Date: 23 Jan 1997 15:35:08 GMT 10098 Session: 2034820394 10099 Range: npt=0-600 10100 Seek-Style: RAP 10101 RTP-Info: url="rtsp://foo.com/test.wav/streamid=0" 10102 ssrc=0D12F123:seq=981888;rtptime=3781123 10104 Note the different URI in the SETUP command, and then the switch back 10105 to the aggregate URI in the PLAY command. This makes complete sense 10106 when there are multiple streams with aggregate control, but is less 10107 than intuitive in the special case where the number of streams is 10108 one. However the server has declared that the aggregated control URI 10109 in the SDP and therefore this is legal. 10111 In this case, it is also required that servers accept implementations 10112 that use the non-aggregated interpretation and use the individual 10113 media URI, like this: 10115 C->S: PLAY rtsp://example.com/test.wav/streamid=0 RTSP/2.0 10116 CSeq: 3 10117 User-Agent: PhonyClient/1.2 10118 Session: 2034820394 10120 A.5. Live Media Presentation Using Multicast 10122 The media server M chooses the multicast address and port. Here, it 10123 is assumed that the web server only contains a pointer to the full 10124 description, while the media server M maintains the full description. 10126 C->W: GET /sessions.html HTTP/1.1 10127 Host: www.example.com 10129 W->C: HTTP/1.1 200 OK 10130 Content-Type: text/html 10132 10133 ... 10134 10136 ... 10137 10139 C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/2.0 10140 CSeq: 1 10141 Supported: play.basic, play.scale 10142 User-Agent: PhonyClient/1.2 10144 M->C: RTSP/2.0 200 OK 10145 CSeq: 1 10146 Content-Type: application/sdp 10147 Content-Length: 183 10148 Server: PhonyServer/1.0 10149 Date: Thu, 23 Jan 1997 15:35:06 GMT 10150 Supported: play.basic 10152 v=0 10153 o=- 2890844526 2890842807 IN IP4 192.0.2.5 10154 s=RTSP Session 10155 t=0 0 10156 m=audio 3456 RTP/AVP 0 10157 c=IN IP4 224.2.0.1/16 10158 a=control: rtsp://live.example.com/concert/audio 10159 a=range:npt=0- 10161 C->M: SETUP rtsp://live.example.com/concert/audio RTSP/2.0 10162 CSeq: 2 10163 Transport: RTP/AVP;multicast 10164 Accept-Ranges: NPT, SMPTE, UTC 10165 User-Agent: PhonyClient/1.2 10167 M->C: RTSP/2.0 200 OK 10168 CSeq: 2 10169 Server: PhonyServer/1.0 10170 Date: Thu, 23 Jan 1997 15:35:06 GMT 10171 Transport: RTP/AVP;multicast; 10172 dest_addr="224.2.0.1:3456"/"224.2.0.1:3457";ttl=16 10173 Session: 0456804596 10174 Accept-Ranges: NPT, UTC 10175 Media-Properties: No-Seeking, Time-Progressing, Time-Duration=0 10177 C->M: PLAY rtsp://live.example.com/concert/audio RTSP/2.0 10178 CSeq: 3 10179 Session: 0456804596 10180 User-Agent: PhonyClient/1.2 10182 M->C: RTSP/2.0 200 OK 10183 CSeq: 3 10184 Server: PhonyServer/1.0 10185 Date: 23 Jan 1997 15:35:07 GMT 10186 Session: 0456804596 10187 Seek-Style: Next 10188 Range:npt=1256- 10189 RTP-Info: url="rtsp://live.example.com/concert/audio" 10190 ssrc=0D12F123:seq=1473; rtptime=80000 10192 A.6. Capability Negotiation 10194 This examples illustrate how the client and server determines their 10195 capability to support a special feature, in this case "play.scale". 10196 The server, through the clients request and the included Supported 10197 header, learns the client supports RTSP 2.0, and also supports the 10198 playback time scaling feature of RTSP. The server's response 10199 contains the following feature related information to the client; it 10200 supports the basic playback (play.basic), the extended functionality 10201 of time scaling of content (play.scale), and one "example.com" 10202 proprietary feature (com.example.flight). The client also learns the 10203 methods supported (Public header) by the server for the indicated 10204 resource. 10206 C->S: OPTIONS rtsp://media.example.com/movie/twister.3gp RTSP/2.0 10207 CSeq: 1 10208 Supported: play.basic, play.scale 10209 User-Agent: PhonyClient/1.2 10211 S->C: RTSP/2.0 200 OK 10212 CSeq: 1 10213 Public: OPTIONS, SETUP, PLAY, PAUSE, TEARDOWN 10214 Server: PhonyServer/2.0 10215 Supported: play.basic, play.scale, com.example.flight 10217 When the client sends its SETUP request it tells the server that it 10218 requires support of the play.scale feature for this session by 10219 including the Require header. 10221 C->S: SETUP rtsp://media.example.com/twister.3gp/trackID=1 RTSP/2.0 10222 CSeq: 3 10223 User-Agent: PhonyClient/1.2 10224 Transport: RTP/AVP/UDP;unicast; 10225 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057", 10226 RTP/AVP/TCP;unicast;interleaved=0-1 10227 Require: play.scale 10228 Accept-Ranges: NPT, SMPTE, UTC 10229 User-Agent: PhonyClient/1.2 10231 S->C: RTSP/2.0 200 OK 10232 CSeq: 3 10233 Session: 12345678 10234 Transport: RTP/AVP/UDP;unicast; 10235 dest_addr="192.0.2.53:3056"/"192.0.2.53:3057"; 10236 src_addr="192.0.2.5:5000"/"192.0.2.5:5001" 10237 Server: PhonyServer/2.0 10238 Accept-Ranges: NPT, SMPTE 10239 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 10241 Appendix B. RTSP Protocol State Machine 10243 The RTSP session state machine describes the behavior of the protocol 10244 from RTSP session initialization through RTSP session termination. 10246 The State machine is defined on a per session basis which is uniquely 10247 identified by the RTSP session identifier. The session may contain 10248 one or more media streams depending on state. If a single media 10249 stream is part of the session it is in non-aggregated control. If 10250 two or more is part of the session it is in aggregated control. 10252 The below state machine is a normative description of the protocols 10253 behavior. However, in case of ambiguity with the earlier parts of 10254 this specification, the description in the earlier parts MUST take 10255 precedence. 10257 B.1. States 10259 The state machine contains three states, described below. For each 10260 state there exist a table which shows which requests and events that 10261 are allowed and if they will result in a state change. 10263 Init: Initial state no session exist. 10265 Ready: Session is ready to start playing. 10267 Play: Session is playing, i.e. sending media stream data in the 10268 direction S->C. 10270 B.2. State variables 10272 This representation of the state machine needs more than its state to 10273 work. A small number of variables are also needed and is explained 10274 below. 10276 NRM: The number of media streams part of this session. 10278 RP: Resume point, the point in the presentation time line at which 10279 a request to continue will resume from. A time format for the 10280 variable is not mandated. 10282 B.3. Abbreviations 10284 To make the state tables more compact a number of abbreviations are 10285 used, which are explained below. 10287 IFI: IF Implemented. 10289 md: Media 10291 PP: Pause Point, the point in the presentation time line at which 10292 the presentation was paused. 10294 Prs: Presentation, the complete multimedia presentation. 10296 RedP: Redirect Point, the point in the presentation time line at 10297 which a REDIRECT was specified to occur. 10299 SES: Session. 10301 B.4. State Tables 10303 This section contains a table for each state. The table contains all 10304 the requests and events that this state is allowed to act on. The 10305 events which is method names are, unless noted, requests with the 10306 given method in the direction client to server (C->S). In some cases 10307 there exist one or more requisite. The response column tells what 10308 type of response actions should be performed. Possible actions that 10309 is requested for an event includes: response codes, e.g. 200, headers 10310 that MUST be included in the response, setting of state variables, or 10311 setting of other session related parameters. The new state column 10312 tells which state the state machine changes to. 10314 The response to valid request meeting the requisites is normally a 10315 2xx (SUCCESS) unless other noted in the response column. The 10316 exceptions need to be given a response according to the response 10317 column. If the request does not meet the requisite, is erroneous or 10318 some other type of error occur, the appropriate response code MUST be 10319 sent. If the response code is a 4xx the session state is unchanged. 10320 A response code of 3rr will result in that the session is ended and 10321 its state is changed to Init. A response code of 304 results in no 10322 state change. However there exist restrictions to when a 3rr 10323 response may be used. A 5xx response MUST NOT result in any change 10324 of the session state, except if the error is not possible to recover 10325 from. A unrecoverable error MUST result the ending of the session. 10326 As it in the general case can't be determined if it was a 10327 unrecoverable error or not the client will be required to test. In 10328 the case that the next request after a 5xx is responded with 454 10329 (Session Not Found) the client knows that the session has ended. 10331 The server will timeout the session after the period of time 10332 specified in the SETUP response, if no activity from the client is 10333 detected. Therefore there exist a timeout event for all states 10334 except Init. 10336 In the case that NRM = 1 the presentation URI is equal to the media 10337 URI or a specified presentation URI. For NRM > 1 the presentation 10338 URI MUST be other than any of the medias that are part of the 10339 session. This applies to all states. 10341 +---------------+-----------------+---------------------------------+ 10342 | Event | Prerequisite | Response | 10343 +---------------+-----------------+---------------------------------+ 10344 | DESCRIBE | Needs REDIRECT | 3rr, Redirect | 10345 | | | | 10346 | DESCRIBE | | 200, Session description | 10347 | | | | 10348 | OPTIONS | Session ID | 200, Reset session timeout | 10349 | | | timer | 10350 | | | | 10351 | OPTIONS | | 200 | 10352 | | | | 10353 | SET_PARAMETER | Valid parameter | 200, change value of parameter | 10354 | | | | 10355 | GET_PARAMETER | Valid parameter | 200, return value of parameter | 10356 +---------------+-----------------+---------------------------------+ 10358 Table 13: None state-machine changing events 10360 The methods in Table 13 do not have any effect on the state machine 10361 or the state variables. However some methods do change other session 10362 related parameters, for example SET_PARAMETER which will set the 10363 parameter(s) specified in its body. Also all of these methods that 10364 allows Session header will also update the keep-alive timer for the 10365 session. 10367 +------------------+----------------+-----------+-------------------+ 10368 | Action | Requisite | New State | Response | 10369 +------------------+----------------+-----------+-------------------+ 10370 | SETUP | | Ready | NRM=1, RP=0.0 | 10371 | | | | | 10372 | SETUP | Needs Redirect | Init | 3rr Redirect | 10373 | | | | | 10374 | S -> C: REDIRECT | No Session hdr | Init | Terminate all SES | 10375 +------------------+----------------+-----------+-------------------+ 10377 Table 14: State: Init 10379 The initial state of the state machine, see Table 14 can only be left 10380 by processing a correct SETUP request. As seen in the table the two 10381 state variables are also set by a correct request. This table also 10382 shows that a correct SETUP can in some cases be redirected to another 10383 URI and/or server by a 3rr response. 10385 +--------------+-----------------+-----------+----------------------+ 10386 | Action | Requisite | New State | Response | 10387 +--------------+-----------------+-----------+----------------------+ 10388 | SETUP | New URI | Ready | NRM +=1 | 10389 | | | | | 10390 | SETUP | URI Setup prior | Ready | Change transport | 10391 | | | | param | 10392 | | | | | 10393 | TEARDOWN | Prs URI, | Init | No session hdr, NRM | 10394 | | | | = 0 | 10395 | | | | | 10396 | TEARDOWN | md URI,NRM=1 | Init | No Session hdr, NRM | 10397 | | | | = 0 | 10398 | | | | | 10399 | TEARDOWN | md URI,NRM>1 | Ready | Session hdr, NRM -= | 10400 | | | | 1 | 10401 | | | | | 10402 | PLAY | Prs URI, No | Play | Play from RP | 10403 | | range | | | 10404 | | | | | 10405 | PLAY | Prs URI, Range | Play | According to range | 10406 | | | | | 10407 | PAUSE | Prs URI | Ready | Return PP | 10408 | | | | | 10409 | SC:REDIRECT | Range hdr | Ready | Set RedP | 10410 | | | | | 10411 | SC:REDIRECT | no range hdr | Init | Session is removed | 10412 | | | | | 10413 | Timeout | | Init | | 10414 | | | | | 10415 | RedP reached | | Init | TEARDOWN of session | 10416 +--------------+-----------------+-----------+----------------------+ 10418 Table 15: State: Ready 10420 In the Ready state, see Table 15, some of the actions are depending 10421 on the number of media streams (NRM) in the session, i.e. aggregated 10422 or non-aggregated control. A setup request in the ready state can 10423 either add one more media stream to the session or, if the media 10424 stream (same URI) already is part of the session, change the 10425 transport parameters. TEARDOWN is depending on both the Request-URI 10426 and the number of media stream within the session. If the Request- 10427 URI is the presentations URI the whole session is torn down. If a 10428 media URI is used in the TEARDOWN request and more than one media 10429 exist in the session, the session will remain and a session header 10430 MUST be returned in the response. If only a single media stream 10431 remains in the session when performing a TEARDOWN with a media URI 10432 the session is removed. The number of media streams remaining after 10433 tearing down a media stream determines the new state. 10435 +--------------+-----------------+-----------+----------------------+ 10436 | Action | Requisite | New State | Response | 10437 +--------------+-----------------+-----------+----------------------+ 10438 | PAUSE | PrsURI | Ready | Set RP to present | 10439 | | | | point | 10440 | | | | | 10441 | PP reached | | Ready | RP = PP | 10442 | | | | | 10443 | End of media | All media | Play | Set RP = End of | 10444 | | | | media | 10445 | | | | | 10446 | End of range | | Play | Set RP = End of | 10447 | | | | range | 10448 | | | | | 10449 | PLAY | Prs URI, No | Play | Play from present | 10450 | | range | | point | 10451 | | | | | 10452 | PLAY | Prs URI, Range | Play | According to range | 10453 | | | | | 10454 | PLAY_NOTIFY | | Play | 200 | 10455 | | | | | 10456 | SETUP | New URI | Play | 455 | 10457 | | | | | 10458 | SETUP | Setuped URI | Play | 455 | 10459 | | | | | 10460 | SETUP | Setuped URI, | Play | Change transport | 10461 | | IFI | | param. | 10462 | | | | | 10463 | TEARDOWN | Prs URI | Init | No session hdr | 10464 | | | | | 10465 | TEARDOWN | md URI,NRM=1 | Init | No Session hdr, | 10466 | | | | NRM=0 | 10467 | | | | | 10468 | TEARDOWN | md URI | Play | 455 | 10469 | | | | | 10470 | SC:REDIRECT | Range hdr | Play | Set RedP | 10471 | | | | | 10472 | SC:REDIRECT | no range hdr | Init | Session is removed | 10473 | | | | | 10474 | RedP reached | | Init | TEARDOWN of session | 10475 | | | | | 10476 | Timeout | | Init | Stop Media playout | 10477 +--------------+-----------------+-----------+----------------------+ 10479 Table 16: State: Play 10481 The Play state table, see Table 16, is the largest. The table 10482 contains an number of requests that has presentation URI as a 10483 prerequisite on the Request-URI, this is due to the exclusion of non- 10484 aggregated stream control in sessions with more than one media 10485 stream. 10487 To avoid inconsistencies between the client and server, automatic 10488 state transitions are avoided. This can be seen at for example "End 10489 of media" event when all media has finished playing, the session 10490 still remain in Play state. An explicit PAUSE request MUST be sent 10491 to change the state to Ready. It may appear that there exist an 10492 automatic transitions in "RedP reached" and "PP reached", however 10493 they are requested and acknowledge before they take place. The time 10494 at which the transition will happen is known by looking at the range 10495 header. If the client sends request close in time to these 10496 transitions it needs to be prepared for getting error message as the 10497 state may or may not have changed. 10499 Appendix C. Media Transport Alternatives 10501 This section defines how certain combinations of protocols, profiles 10502 and lower transports are used. This includes the usage of the 10503 Transport header's source and destination address parameters 10504 "src_addr" and "dest_addr". 10506 C.1. RTP 10508 This section defines the interaction of RTSP with respect to the RTP 10509 protocol [RFC3550]. It also defines any necessary media transport 10510 signalling with regards to RTP. 10512 The available RTP profiles and lower layer transports are described 10513 below along with rules on signalling the available combinations. 10515 C.1.1. AVP 10517 The usage of the "RTP Profile for Audio and Video Conferences with 10518 Minimal Control" [RFC3551] when using RTP for media transport over 10519 different lower layer transport protocols is defined below in regards 10520 to RTSP. 10522 One such case is defined within this document, the use of embedded 10523 (interleaved) binary data as defined in Section 14. The usage of 10524 this method is indicated by include the "interleaved" parameter. 10526 When using embedded binary data the "src_addr" and "dest_addr" MUST 10527 NOT be used. This addressing and multiplexing is used as defined 10528 with use of channel numbers and the interleaved parameter. 10530 C.1.2. AVP/UDP 10532 This part describes sending of RTP [RFC3550] over lower transport 10533 layer UDP [RFC0768] according to the profile "RTP Profile for Audio 10534 and Video Conferences with Minimal Control" defined in RFC 3551 10535 [RFC3551]. This profile requires one or two uni- or bi-directional 10536 UDP flows per media stream. The first UDP flow is for RTP and the 10537 second is for RTCP. Embedding of RTP data with the RTSP messages, in 10538 accordance with Section 14, SHOULD NOT be performed when RTSP 10539 messages are transported over unreliable transport protocols, like 10540 UDP [RFC0768]. 10542 The RTP/UDP and RTCP/UDP flows can be established using the Transport 10543 header's "src_addr", and "dest_addr" parameters. 10545 In RTSP PLAY mode, the transmission of RTP packets from client to 10546 server is unspecified. The behavior in regards to such RTP packets 10547 MAY be defined in future. 10549 The "src_addr" and "dest_addr" parameters are used in the following 10550 way for media playback, i.e. Mode=PLAY: 10552 o The "src_addr" and "dest_addr" parameters MUST contain either 1 or 10553 2 address specifications. 10555 o Each address specification for RTP/AVP/UDP or RTP/AVP/TCP MUST 10556 contain either: 10558 * both an address and a port number, or 10560 * a port number without an address. 10562 o The first address and port pair given in either of the parameters 10563 applies to the RTP stream. The second address and port pair if 10564 present applies to the RTCP stream. 10566 o The RTP/UDP packets from the server to the client MUST be sent to 10567 the address and port given by first address and port pair of the 10568 "dest_addr" parameter. 10570 o The RTCP/UDP packets from the server to the client MUST be sent to 10571 the address and port given by the second address and port pair of 10572 the "dest_addr" parameter. If no second pair is specified RTCP 10573 MUST NOT be sent. 10575 o The RTCP/UDP packets from the client to the server MUST be sent to 10576 the address and port given by the second address and port pair of 10577 the "src_addr" parameter. If no second pair is given RTCP MUST 10578 NOT be sent. 10580 o The RTP/UDP packets from the client to the server MUST be sent to 10581 the address and port given by the first address and port pair of 10582 the "src_addr" parameter. 10584 o RTP and RTCP Packets SHOULD be sent from the corresponding 10585 receiver port, i.e. RTCP packets from server should be sent from 10586 the "src_addr" parameters second address port pair. 10588 C.1.3. AVPF/UDP 10590 The RTP profile "Extended RTP Profile for RTCP-based Feedback (RTP/ 10591 AVPF)"[RFC4585] MAY be used as RTP profiles in session using RTP. 10592 All that is defined for AVP MUST also apply for AVPF. 10594 The usage of AVPF is indicated by the media initialization protocol 10595 used. In the case of SDP it is indicated by media lines (m=) 10596 containing the profile RTP/AVPF. That SDP MAY also contain further 10597 AVPF related SDP attributes configuring the AVPF session regarding 10598 reporting interval and feedback messages that shall be used that MUST 10599 be followed. 10601 C.1.4. SAVP/UDP 10603 The RTP profile "The Secure Real-time Transport Protocol (SRTP)" 10604 [RFC3711] is an RTP profile (SAVP) that MAY be used in RTSP sessions 10605 using RTP. All that is defined for AVP MUST also apply for SAVP. 10607 The usage of SRTP requires that a security association is 10608 established. The RECOMMENDED mechanism for establishing that 10609 security association is to use MIKEY with RTSP as defined in RFC 4567 10610 [RFC4567]. 10612 C.1.5. SAVPF/UDP 10614 The RTP profile "Extended Secure RTP Profile for RTCP-based Feedback 10615 (RTP/SAVPF)" [RFC5124] is an RTP profile (SAVPF) that MAY be used in 10616 RTSP sessions using RTP. All that is defined for AVP MUST also apply 10617 for SAVPF. 10619 The usage of SRTP requires that a security association is 10620 established. The RECOMMENDED mechanism for establishing that 10621 security association is to use MIKEY[RFC3830] with RTSP as defined in 10622 RFC 4567 [RFC4567]. 10624 C.1.6. RTCP usage with RTSP 10626 RTCP has several usages when RTP is used for media transport as 10627 explained below. Due to that RTCP MUST be supported if an RTSP agent 10628 handles RTP. 10630 C.1.6.1. Media synchronization 10632 RTCP provides media synchronization and clock drift compensation. 10633 The initial media synchronization is available from RTP-Info header. 10634 However to be able to handle any clock drift between the media 10635 streams, RTCP is needed. 10637 C.1.6.2. RTSP Session keep-alive 10639 RTCP traffic from the RTSP client to the RTSP server MUST function as 10640 keep-alive. Which requires an RTSP server supporting RTP to use the 10641 received RTCP packets as indications that the client desires the 10642 related RTSP session to be kept alive. 10644 C.1.6.3. Bit-rate adaption 10646 RTCP Receiver reports and any additional feedback from the client 10647 MUST be used adapt the bit-rate used over the transport for all cases 10648 when RTP is sent over UDP. An RTP sender without reserved resources 10649 MUST NOT use more than its fair share of the available resources. 10650 This can be determined by comparing on short to medium term (some 10651 seconds) the used bit-rate and adapt it so that the RTP sender sends 10652 at a bit-rate comparable to what a TCP sender would achieve on 10653 average over the same path. 10655 C.1.6.4. RTP and RTCP Multiplexing 10657 RTSP can be used to negotiate the usage of RTP and RTCP multiplexing 10658 as described in [I-D.ietf-avt-rtp-and-rtcp-mux]. This allows servers 10659 and client to reduce the amount of resources required for the session 10660 by only requiring one underlying transport stream per media stream 10661 instead of two when using RTP and RTCP. This lessens the server port 10662 consumption and also the necessary state and keep-alive work when 10663 operating across Network and Address Translators [RFC2663]. 10665 Content must be prepared with some consideration for RTP and RTCP 10666 multiplexing, mainly ensuring that the RTP payload types used does 10667 not collide with the ones used for RTCP packet types this option 10668 likely needs explicit support from the content unless the RTP payload 10669 types can be remapped by the server and that is correctly reflected 10670 in the session description. Beyond that support of this feature 10671 should come at little cost and much gain. 10673 It is recommended that if the content and server supports RTP and 10674 RTCP multiplexing that this is indicated in the session description, 10675 for example using the SDP attribute "a=rtcp-mux". If the SDP message 10676 contains the a=rtcp-mux attribute for a media stream, the server MUST 10677 support RTP and RTCP multiplexing. If indicated or otherwise desired 10678 by the client it can include the Transport parameter "RTCP-mux" in 10679 any transport specification where it desires to use RTCP-mux. The 10680 server will indicate if it supports RTCP-mux. Server and Client 10681 SHOULD support RTP and RTCP multiplexing. 10683 C.2. RTP over TCP 10685 Transport of RTP over TCP can be done in two ways, over independent 10686 TCP connections using RFC 4571 [RFC4571] or interleaved in the RTSP 10687 control connection. In both cases the protocol MUST be "rtp" and the 10688 lower layer MUST be TCP. The profile may be any of the above 10689 specified ones; AVP, AVPF, SAVP or SAVPF. 10691 C.2.1. Interleaved RTP over TCP 10693 The use of embedded (interleaved) binary data transported on the RTSP 10694 connection is possible as specified in Section 14. When using this 10695 declared combination of interleaved binary data the RTSP messages 10696 MUST be transported over TCP. TLS may or may not be used. 10698 One should however consider that this will result that all media 10699 streams go through any proxy. Using independent TCP connections can 10700 avoid that issue. 10702 C.2.2. RTP over independent TCP 10704 In this Appendix, we describe the sending of RTP [RFC3550] over lower 10705 transport layer TCP [RFC0793] according to "Framing Real-time 10706 Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over 10707 Connection-Oriented Transport" [RFC4571]. This Appendix adapts the 10708 guidelines for using RTP over TCP within SIP/SDP [RFC4145] to work 10709 with RTSP. 10711 A client codes the support of RTP over independent TCP by specifying 10712 an RTP/AVP/TCP transport option without an interleaved parameter in 10713 the Transport line of a SETUP request. This transport option MUST 10714 include the "unicast" parameter. 10716 If the client wishes to use RTP with RTCP, two ports (or two address/ 10717 port pairs) are specified by the dest_addr parameter. If the client 10718 wishes to use RTP without RTCP, one port (or one address/port pair) 10719 is specified by the dest_addr parameter. Ordering rules of dest_addr 10720 ports follow the rules for RTP/AVP/UDP. 10722 If the client wishes to play the active role in initiating the TCP 10723 connection, it MAY set the "setup" parameter (See Section 16.52) on 10724 the Transport line to be "active", or it MAY omit the setup 10725 parameter, as active is the default. If the client signals the 10726 active role, the ports for all dest_addr values MUST be set to 9 (the 10727 discard port). 10729 If the client wishes to play the passive role in TCP connection 10730 initiation, it MUST set the "setup" parameter on the Transport line 10731 to be "passive". If the client is able to assume the active or the 10732 passive role, it MUST set the "setup" parameter on the Transport line 10733 to be "actpass". In either case, the dest_addr port value for RTP 10734 MUST be set to the TCP port number on which the client is expecting 10735 to receive the RTP stream connection, and the dest_addr port value 10736 for RTCP MUST be set to the TCP port number on which the client is 10737 expecting to receive the RTCP stream connection. 10739 If upon receipt of a non-interleaved RTP/AVP/TCP SETUP request, a 10740 server decides to accept this requested option, the 2xx reply MUST 10741 contain a Transport option that specifies RTP/AVP/TCP (without using 10742 the interleaved parameter, and with using the unicast parameter). 10743 The dest_addr parameter value MUST be echoed from the parameter value 10744 in the client request unless the destination address (only port) was 10745 not provided in which can the server MAY include the source address 10746 of the RTSP TCP connection with the port number unchanged. 10748 In addition, the server reply MUST set the setup parameter on the 10749 Transport line, to indicate the role the server will play in the 10750 connection setup. Permissible values are "active" (if a client set 10751 "setup" to "passive" or "actpass") and "passive" (if a client set 10752 "setup" to "active" or "actpass"). 10754 If a server sets "setup" to "passive", the "src_addr" in the reply 10755 MUST indicate the ports the server is willing to receive an RTP 10756 connection and (if the client requested an RTCP connection by 10757 specifying two dest_addr ports or address/port pairs) and RTCP 10758 connection. If a server sets "setup" to "active", the ports 10759 specified in "src_addr" MUST be set to 9. The server MAY use the 10760 "ssrc" parameter, following the guidance in Section 16.52. Port 10761 ordering for src_addr follows the rules for RTP/AVP/UDP. 10763 For cases when servers have a public IP-address it is RECOMMENDED 10764 that the server take the passive role and the client the active role. 10765 This help in cases when the client is behind a NAT. 10767 After sending (receiving) a 2xx reply for a SETUP method for a non- 10768 interleaved RTP/AVP/TCP media stream, the active party SHOULD 10769 initiate the TCP connection as soon as possible. The client MUST NOT 10770 send a PLAY request prior to the establishment of all the TCP 10771 connections negotiated using SETUP for the session. In case the 10772 server receives a PLAY request in a session that has not yet 10773 established all the TCP connections, it MUST respond using the 464 10774 "Data Transport Not Ready Yet" (Section 15.4.29) error code. 10776 Once the PLAY request for a media resource transported over non- 10777 interleaved RTP/AVP/TCP occurs, media begins to flow from server to 10778 client over the RTP TCP connection, and RTCP packets flow 10779 bidirectionally over the RTCP TCP connection. As in the RTP/UDP 10780 case, client to server traffic on the TCP port is unspecified by this 10781 memo. The packets that travel on these connections MUST be framed 10782 using the protocol defined in [RFC4571], not by the framing defined 10783 for interleaving RTP over the RTSP control connection defined in 10784 Section 14. 10786 A successful PAUSE request for a media being transported over RTP/ 10787 AVP/TCP pauses the flow of packets over the connections, without 10788 closing the connections. A successful TEARDOWN request signals that 10789 the TCP connections for RTP and RTCP are to be closed as soon as 10790 possible. 10792 Subsequent SETUP requests on an already-SETUP RTP/AVP/TCP URI may be 10793 ambiguous in the following way: does the client wish to open up new 10794 TCP RTP and RTCP connections for the URI, or does the client wish to 10795 continue using the existing TCP RTP and RTCP connections? The client 10796 SHOULD use the "connection" parameter (defined in Section 16.52) on 10797 the Transport line to make its intention clear in the regard (by 10798 setting "connection" to "new" if new connections are needed, and by 10799 setting "connection" to "existing" if the existing connections are to 10800 be used). After a 2xx reply for a SETUP request for a new 10801 connection, parties should close the pre-existing connections, after 10802 waiting a suitable period for any stray RTP or RTCP packets to 10803 arrive. 10805 Below, we rewrite part of the example media on demand example shown 10806 in Appendix A.1 to use RTP/AVP/TCP non-interleaved: 10808 C->M: DESCRIBE rtsp://example.com/twister.3gp RTSP/2.0 10809 CSeq: 1 10810 User-Agent: PhonyClient/1.2 10812 M->C: RTSP/2.0 200 OK 10813 CSeq: 1 10814 Server: PhonyServer/1.0 10815 Date: Thu, 23 Jan 1997 15:35:06 GMT 10816 Content-Type: application/sdp 10817 Content-Length: 227 10818 Content-Base: rtsp://example.com/twister.3gp/ 10819 Expires: 24 Jan 1997 15:35:06 GMT 10821 v=0 10822 o=- 2890844256 2890842807 IN IP4 192.0.2.5 10823 s=RTSP Session 10824 i=An Example of RTSP Session Usage 10825 e=adm@example.com 10826 c=IN IP4 0.0.0.0 10827 a=control: * 10828 a=range: npt=0-0:10:34.10 10829 t=0 0 10830 m=audio 0 RTP/AVP 0 10831 a=control: trackID=1 10833 C->M: SETUP rtsp://example.com/twister.3gp/trackID=1 RTSP/2.0 10834 CSeq: 2 10835 User-Agent: PhonyClient/1.2 10836 Require: play.basic 10837 Transport: RTP/AVP/TCP;unicast;dest_addr=":9"/":9"; 10838 setup=active;connection=new 10839 Accept-Ranges: NPT, SMPTE, UTC 10841 M->C: RTSP/2.0 200 OK 10842 CSeq: 2 10843 Server: PhonyServer/1.0 10844 Transport: RTP/AVP/TCP;unicast; 10845 dest_addr=":9"/":9"; 10846 src_addr="192.0.2.5:9000"/"192.0.2.5:9001"; 10847 setup=passive;connection=new;ssrc=93CB001E 10848 Session: 12345678 10849 Expires: 24 Jan 1997 15:35:12 GMT 10850 Date: 23 Jan 1997 15:35:12 GMT 10851 Accept-Ranges: NPT 10852 Media-Properties: Random-Access=0.8, Unmutable, Unlimited 10854 C->M: TCP Connection Establishment 10856 C->M: PLAY rtsp://example.com/twister.3gp/ RTSP/2.0 10857 CSeq: 4 10858 User-Agent: PhonyClient/1.2 10859 Range: npt=30- 10860 Session: 12345678 10862 M->C: RTSP/2.0 200 OK 10863 CSeq: 4 10864 Server: PhonyServer/1.0 10865 Date: 23 Jan 1997 15:35:14 GMT 10866 Session: 12345678 10867 Range: npt=30-623.10 10868 Seek-Style: First-Prior 10869 RTP-Info: url="rtsp://example.com/twister.3gp/trackID=1" 10870 ssrc=4F312DD8:seq=54321;rtptime=2876889 10872 C.3. Handling Media Clock Time Jumps in the RTP Media Layer 10874 RTSP allows media clients to control selected, non-contiguous 10875 sections of media presentations, rendering those streams with an RTP 10876 media layer [RFC3550]. Two cases occur, the first is when a new PLAY 10877 request replaces an old ongoing request and the new request results 10878 in a jump in the media. This should produce in the RTP layer a 10879 continuous media stream. A client may also directly following a 10880 completed PLAY request perform a new PLAY request. This will result 10881 in some gap in the media layer. The below text will look into both 10882 cases. 10884 A PLAY request that replaces a ongoing request allows the media layer 10885 rendering the RTP stream without being affected by jumps in media 10886 clock time. The RTP timestamps for the new media range is set so 10887 that they become continuous with the previous media range in the 10888 previous request. The RTP sequence number for the first packet in 10889 the new range will be the next following the last packet in the 10890 previous range, i.e. monotonically increasing. The goal is to allow 10891 the media rendering layer to work without interruption or 10892 reconfiguration across the jumps in media clock. This should be 10893 possible in all cases of replaced PLAY requests for media that has 10894 random-access properties. In this case care is needed to align 10895 frames or similar media dependent structures. 10897 In cases where jumps in media clock time are a result of RTSP 10898 signalling operations arriving after a completed PLAY operation, the 10899 request timing will result in that media becomes non-continuous. The 10900 server becomes unable to send the media so that it arrive timely and 10901 still carry timestamps to make the media stream continuous. In these 10902 cases the server will produce RTP streams where there are gaps in the 10903 RTP timeline for the media. In such cases, if the media has frame 10904 structure, aligning the timestamp for the next frame with the 10905 previous structure reduces the burden to render this media. The gap 10906 should represent the time the server hasn't been serving media, e.g. 10907 the time between the end of the media stream or a PAUSE request and 10908 the new PLAY request. In these cases the RTP sequence number would 10909 normally be monotonically increasing across the gap. 10911 For RTSP sessions with media that lacks random access properties, 10912 like live streams, any media clock jump is commonly result of 10913 correspondingly long pause of delivery. The RTP timestamp will have 10914 increased in direct proportion to the duration of the paused 10915 delivery. Note also that in this case the RTP sequence number should 10916 be the next packet number. If not, the RTCP packet loss reporting 10917 will indicate as loss all packets not received between the point of 10918 pausing and later resuming. This may trigger congestion avoidance 10919 mechanisms. An allowed exception from the above recommendation on 10920 monotonically increasing RTP sequence number is live media streams, 10921 likely being relayed. In this case, when the client resumes 10922 delivery, it will get the media that is currently being delivered to 10923 the server itself. For this type of basic delivery of live streams 10924 to multiple users over unicast, individual rewriting of RTP sequence 10925 numbers becomes quite a burden. For solutions that anyway caches 10926 media, timeshifts, etc, the rewriting should be a minor issue. 10928 The goal when handling jumps in media clock time is that the provided 10929 stream is continuous without gaps in RTP timestamp or sequence 10930 number. However, when delivery has been halted for some reason the 10931 RTP timestamp when resuming MUST represent the duration the delivery 10932 was halted. RTP sequence number MUST generally be the next number, 10933 i.e. monotonically increasing modulo 65536. For media resources with 10934 the properties Time-Progressing and Time-Duration=0.0 the server MAY 10935 create RTP media streams with RTP sequence number jumps in them due 10936 to client first halting delivery and later resuming it (PAUSE and 10937 then later PLAY). However, servers utilizing this exception must 10938 take into consideration the resulting RTCP receiver reports that 10939 likely contains loss report for all the packets part of the 10940 discontinuity. A client can not rely on that a server will align 10941 when resuming playing even if it is RECOMMENDED. The RTP-Info header 10942 will provide information on how the server acts in each case. 10944 We cannot assume that the RTSP client can communicate with the RTP 10945 media agent, as the two may be independent processes. If the RTP 10946 timestamp shows the same gap as the NPT, the media agent will 10947 assume that there is a pause in the presentation. If the jump in 10948 NPT is large enough, the RTP timestamp may roll over and the media 10949 agent may believe later packets to be duplicates of packets just 10950 played out. Having the RTP timestamp jump will also affect the 10951 RTCP measurements based on this. 10953 As an example, assume a RTP timestamp frequency of 8000 Hz, a 10954 packetization interval of 100 ms and an initial sequence number and 10955 timestamp of zero. 10957 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 10958 CSeq: 4 10959 Session: abcdefg 10960 Range: npt=10-15 10961 User-Agent: PhonyClient/1.2 10963 S->C: RTSP/2.0 200 OK 10964 CSeq: 4 10965 Session: abcdefg 10966 Range: npt=10-15 10967 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 10968 ssrc=0D12F123:seq=0;rtptime=0 10970 The ensuing RTP data stream is depicted below: 10972 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 10973 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 10974 . . . 10975 S -> C: RTP packet - seq = 49, rtptime = 39200, NPT time = 14.9s 10977 Immediately after the end of the play range, the client follows up 10978 with a request to PLAY from a new NPT. 10980 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 10981 CSeq: 5 10982 Session: abcdefg 10983 Range: npt=18-20 10984 User-Agent: PhonyClient/1.2 10986 S->C: RTSP/2.0 200 OK 10987 CSeq: 5 10988 Session: abcdefg 10989 Range: npt=18-20 10990 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 10991 ssrc=0D12F123:seq=50;rtptime=40100 10993 The ensuing RTP data stream is depicted below: 10995 S->C: RTP packet - seq = 50, rtptime = 40100, NPT time = 18s 10996 S->C: RTP packet - seq = 51, rtptime = 40900, NPT time = 18.1s 10997 . . . 10998 S->C: RTP packet - seq = 69, rtptime = 55300, NPT time = 19.9s 11000 In this example, first, NPT 10 through 15 is played, then the client 11001 request the server to skip ahead and play NPT 18 through 20. The 11002 first segment is presented as RTP packets with sequence numbers 0 11003 through 49 and timestamp 0 through 39,200. The second segment 11004 consists of RTP packets with sequence number 50 through 69, with 11005 timestamps 40,100 through 55,200. While there is a gap in the NPT, 11006 there is no gap in the sequence number space of the RTP data stream. 11008 The RTP timestamp gap is present in the above example due to the time 11009 it takes to perform the second play request, in this case 12.5 ms 11010 (100/8000). 11012 C.4. Handling RTP Timestamps after PAUSE 11014 During a PAUSE / PLAY interaction in an RTSP session, the duration of 11015 time for which the RTP transmission was halted MUST be reflected in 11016 the RTP timestamp of each RTP stream. The duration can be calculated 11017 for each RTP stream as the time elapsed from when the last RTP packet 11018 was sent before the PAUSE request was received and when the first RTP 11019 packet was sent after the subsequent PLAY request was received. The 11020 duration includes all latency incurred and processing time required 11021 to complete the request. 11023 The RTP RFC [RFC3550] states that: The RTP timestamp for each unit 11024 [packet] would be related to the wallclock time at which the unit 11025 becomes current on the virtual presentation timeline. 11027 In order to satisfy the requirements of [RFC3550], the RTP 11028 timestamp space needs to increase continuously with real time. 11029 While this is not optimal for stored media, it is required for RTP 11030 and RTCP to function as intended. Using a continuous RTP 11031 timestamp space allows the same timestamp model for both stored 11032 and live media and allows better opportunity to integrate both 11033 types of media under a single control. 11035 As an example, assume a clock frequency of 8000 Hz, a packetization 11036 interval of 100 ms and an initial sequence number and timestamp of 11037 zero. 11039 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 11040 CSeq: 4 11041 Session: abcdefg 11042 Range: npt=10-15 11043 User-Agent: PhonyClient/1.2 11045 S->C: RTSP/2.0 200 OK 11046 CSeq: 4 11047 Session: abcdefg 11048 Range: npt=10-15 11049 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11050 ssrc=0D12F123:seq=0;rtptime=0 11052 The ensuing RTP data stream is depicted below: 11054 S -> C: RTP packet - seq = 0, rtptime = 0, NPT time = 10s 11055 S -> C: RTP packet - seq = 1, rtptime = 800, NPT time = 10.1s 11056 S -> C: RTP packet - seq = 2, rtptime = 1600, NPT time = 10.2s 11057 S -> C: RTP packet - seq = 3, rtptime = 2400, NPT time = 10.3s 11059 The client then sends a PAUSE request: 11061 C->S: PAUSE rtsp://example.com/fizzle RTSP/2.0 11062 CSeq: 5 11063 Session: abcdefg 11064 User-Agent: PhonyClient/1.2 11066 S->C: RTSP/2.0 200 OK 11067 CSeq: 5 11068 Session: abcdefg 11069 Range: npt=10.4-15 11071 20 seconds elapse and then the client sends a PLAY request. In 11072 addition the server requires 15 ms to process the request: 11074 C->S: PLAY rtsp://example.com/fizzle RTSP/2.0 11075 CSeq: 6 11076 Session: abcdefg 11077 User-Agent: PhonyClient/1.2 11079 S->C: RTSP/2.0 200 OK 11080 CSeq: 6 11081 Session: abcdefg 11082 Range: npt=10.4-15 11083 RTP-Info: url="rtsp://example.com/fizzle/audiotrack" 11084 ssrc=0D12F123:seq=4;rtptime=164400 11086 The ensuing RTP data stream is depicted below: 11088 S -> C: RTP packet - seq = 4, rtptime = 164400, NPT time = 10.4s 11089 S -> C: RTP packet - seq = 5, rtptime = 165200, NPT time = 10.5s 11090 S -> C: RTP packet - seq = 6, rtptime = 166000, NPT time = 10.6s 11092 First, NPT 10 through 10.3 is played, then a PAUSE is received by the 11093 server. After 20 seconds a PLAY is received by the server which take 11094 15ms to process. The duration of time for which the session was 11095 paused is reflected in the RTP timestamp of the RTP packets sent 11096 after this PLAY request. 11098 A client can use the RTSP range header and RTP-Info header to map NPT 11099 time of a presentation with the RTP timestamp. 11101 Note: In RFC 2326 [RFC2326], this matter was not clearly defined and 11102 was misunderstood commonly. However for RTSP 2.0 it is expected that 11103 this will be handled correctly and no exception handling will be 11104 required. 11106 Note Further: To ensure correct media decoding and usually jitter- 11107 buffer handling reseting some of the state when issuing a PLAY 11108 request is needed. 11110 C.5. RTSP / RTP Integration 11112 For certain datatypes, tight integration between the RTSP layer and 11113 the RTP layer will be necessary. This by no means precludes the 11114 above restrictions. Combined RTSP/RTP media clients should use the 11115 RTP-Info field to determine whether incoming RTP packets were sent 11116 before or after a seek or before or after a PAUSE. 11118 C.6. Scaling with RTP 11120 For scaling (see Section 16.44), RTP timestamps should correspond to 11121 the playback timing. For example, when playing video recorded at 30 11122 frames/second at a scale of two and speed (Section 16.46) of one, the 11123 server would drop every second frame to maintain and deliver video 11124 packets with the normal timestamp spacing of 3,000 per frame, but NPT 11125 would increase by 1/15 second for each video frame. 11127 Note: The above scaling puts requirements on the media codec or a 11128 media stream to support it. For example motion JPEG or other non- 11129 predictive video coding can easier handle the above example. 11131 C.7. Maintaining NPT synchronization with RTP timestamps 11133 The client can maintain a correct display of NPT (Normal Play Time) 11134 by noting the RTP timestamp value of the first packet arriving after 11135 repositioning. The sequence parameter of the RTP-Info 11136 (Section 16.43) header provides the first sequence number of the next 11137 segment. 11139 C.8. Continuous Audio 11141 For continuous audio, the server SHOULD set the RTP marker bit at the 11142 beginning of serving a new PLAY request or at jumps in timeline. 11143 This allows the client to perform playout delay adaptation. 11145 C.9. Multiple Sources in an RTP Session 11147 Note that more than one SSRC MAY be sent in the media stream. If it 11148 happens all sources are expected to be rendered simultaneously. 11150 C.10. Usage of SSRCs and the RTCP BYE Message During an RTSP Session 11152 The RTCP BYE message indicates the end of use of a given SSRC. If 11153 all sources leave an RTP session, it can, in most cases, be assumed 11154 to have ended. Therefore, a client or server MUST NOT send a RTCP 11155 BYE message until it has finished using a SSRC. A server SHOULD keep 11156 using a SSRC until the RTP session is terminated. Prolonging the use 11157 of a SSRC allows the established synchronization context associated 11158 with that SSRC to be used to synchronize subsequent PLAY requests 11159 even if the PLAY response is late. 11161 An SSRC collision with the SSRC that transmits media does also have 11162 consequences, as it will force the media sender to change its SSRC in 11163 accordance with the RTP specification[RFC3550]. This will result in 11164 a loss of synchronization context, and require any receiver to wait 11165 for RTCP sender reports for all media requiring synchronization 11166 before being able to play out synchronized. Due to these reasons a 11167 client joining a session should take care to not select the same SSRC 11168 as the server. Any SSRC signalled in the Transport header SHOULD be 11169 avoided. A client detecting a collision prior to sending any RTP or 11170 RTCP messages can also select a new SSRC. 11172 C.11. Future Additions 11174 It is the intention that any future protocol or profile regarding 11175 both for media delivery and lower transport should be easy to add to 11176 RTSP. This section provides the necessary steps that needs to be 11177 meet. 11179 The following things needs to be considered when adding a new 11180 protocol or profile for use with RTSP: 11182 o The protocol or profile needs to define a name tag representing 11183 it. This tag is required to be a ABNF "token" to be possible to 11184 use in the Transport header specification. 11186 o The useful combinations of protocol, profiles and lower layer 11187 transport for this extension needs to be defined. For each 11188 combination declare the necessary parameters to use in the 11189 Transport header. 11191 o For new media protocols the interaction with RTSP needs to be 11192 addressed. One important factor will be the media 11193 synchronization. May need new headers similar to RTP info to 11194 carry information. 11196 o Discuss congestion control for media, especially if transport 11197 without built in congestion control is used. 11199 See the IANA section (Section 22) for information how to register new 11200 attributes. 11202 Appendix D. Use of SDP for RTSP Session Descriptions 11204 The Session Description Protocol (SDP, [RFC4566]) may be used to 11205 describe streams or presentations in RTSP. This description is 11206 typically returned in reply to a DESCRIBE request on an URI from a 11207 server to a client, or received via HTTP from a server to a client. 11209 This appendix describes how an SDP file determines the operation of 11210 an RTSP session. SDP as is provides no mechanism by which a client 11211 can distinguish, without human guidance, between several media 11212 streams to be rendered simultaneously and a set of alternatives 11213 (e.g., two audio streams spoken in different languages). However the 11214 SDP extension "Grouping of Media Lines in the Session Description 11215 Protocol (SDP)" [RFC3388] may provide such functionality depending on 11216 need. Also future grouping semantics may in the future be developed. 11218 D.1. Definitions 11220 The terms "session-level", "media-level" and other key/attribute 11221 names and values used in this appendix are to be used as defined in 11222 SDP (RFC 4566 [RFC4566]): 11224 D.1.1. Control URI 11226 The "a=control:" attribute is used to convey the control URI. This 11227 attribute is used both for the session and media descriptions. If 11228 used for individual media, it indicates the URI to be used for 11229 controlling that particular media stream. If found at the session 11230 level, the attribute indicates the URI for aggregate control 11231 (presentation URI). The session level URI MUST be different from any 11232 media level URI. The presence of a session level control attribute 11233 MUST be interpreted as support for aggregated control. The control 11234 attribute MUST be present on media level unless the presentation only 11235 contains a single media stream, in which case the attribute MAY only 11236 be present on the session level. 11238 ABNF for the attribute is defined in Section 20.3. 11240 Example: 11241 a=control:rtsp://example.com/foo 11243 This attribute MAY contain either relative or absolute URIs, 11244 following the rules and conventions set out in RFC 3986 [RFC3986]. 11245 Implementations MUST look for a base URI in the following order: 11247 1. the RTSP Content-Base field; 11248 2. the RTSP Content-Location field; 11250 3. the RTSP Request-URI. 11252 If this attribute contains only an asterisk (*), then the URI MUST be 11253 treated as if it were an empty embedded URI, and thus inherit the 11254 entire base URI. 11256 Note, RFC 2326 was very unclear on the processing of relative URI 11257 and several RTSP 1.0 implementations at the point of publishing 11258 this document did not perform RFC 3986 processing to determine the 11259 resulting URI, instead simple concatenation is common. To avoid 11260 this issue completely it is recommended to use absolute URI in the 11261 SDP. 11263 The URI handling for SDPs from container files need special 11264 consideration. For example lets assume that a container file has the 11265 URI: "rtsp://example.com/container.mp4". Lets further assume this 11266 URI is the base URI, and that there is a absolute media level URI: 11267 "rtsp://example.com/container.mp4/trackID=2". A relative media level 11268 URI that resolves in accordance with RFC 3986 [RFC3986] to the above 11269 given media URI is: "container.mp4/trackID=2". It is usually not 11270 desirable to need to include in or modify the SDP stored within the 11271 container file with the server local name of the container file. To 11272 avoid this, one can modify the base URI used to include a trailing 11273 slash, e.g. "rtsp://example.com/container.mp4/". In this case the 11274 relative URI for the media will only need to be: "trackID=2". 11275 However this will also mean that using "*" in the SDP will result in 11276 control URI including the trailing slash, i.e. 11277 "rtsp://example.com/container.mp4/". 11279 Note: The usage of TrackID in the above is not an standardized 11280 form, but one example out of several similar strings such as 11281 TrackID, Track_ID, StreamID that is used by different server 11282 vendors to indicate a particular piece of media inside a container 11283 file. 11285 D.1.2. Media Streams 11287 The "m=" field is used to enumerate the streams. It is expected that 11288 all the specified streams will be rendered with appropriate 11289 synchronization. If the session is over multicast, the port number 11290 indicated SHOULD be used for reception. The client MAY try to 11291 override the destination port, through the Transport header. The 11292 servers MAY allow this, the response will indicate if allowed or not. 11293 If the session is unicast, the port numbers are the ones RECOMMENDED 11294 by the server to the client, about which receiver ports to use; the 11295 client MUST still include its receiver ports in its SETUP request. 11297 The client MAY ignore this recommendation. If the server has no 11298 preference, it SHOULD set the port number value to zero. 11300 The "m=" lines contain information about which transport protocol, 11301 profile, and possibly lower-layer is to be used for the media stream. 11302 The combination of transport, profile and lower layer, like RTP/AVP/ 11303 UDP needs to be defined for how to be used with RTSP. The currently 11304 defined combinations are defined in Appendix C, further combinations 11305 MAY be specified. 11307 Usage of grouping of media lines [RFC3388] to determine which media 11308 lines should or should not be included in a RTSP session is 11309 unspecified. 11311 Example: 11312 m=audio 0 RTP/AVP 31 11314 D.1.3. Payload Type(s) 11316 The payload type(s) are specified in the "m=" line. In case the 11317 payload type is a static payload type from RFC 3551 [RFC3551], no 11318 other information may be required. In case it is a dynamic payload 11319 type, the media attribute "rtpmap" is used to specify what the media 11320 is. The "encoding name" within the "rtpmap" attribute may be one of 11321 those specified in RFC 3551 (Sections 5 and 6), or an MIME type 11322 registered with IANA, or an experimental encoding as specified in SDP 11323 (RFC 4566 [RFC4566]). Codec-specific parameters are not specified in 11324 this field, but rather in the "fmtp" attribute described below. 11326 D.1.4. Format-Specific Parameters 11328 Format-specific parameters are conveyed using the "fmtp" media 11329 attribute. The syntax of the "fmtp" attribute is specific to the 11330 encoding(s) that the attribute refers to. Note that some of the 11331 format specific parameters may be specified outside of the fmtp 11332 parameters, like for example the "ptime" attribute for most audio 11333 encodings. 11335 D.1.5. Directionality of media stream 11337 The SDP attributes "a=sendrecv", "a=recvonly" and "a=sendonly" 11338 provides instructions on which direction the media streams flow 11339 within a session. When using RTSP the SDP can be delivered to a 11340 client using either RTSP DESCRIBE or a number of RTSP external 11341 methods, like HTTP, FTP, and email. Based on this the SDP applies to 11342 how the RTSP client will see the complete session. Thus for media 11343 streams delivered from the RTSP server to the client would be given 11344 the "a=recvonly" attribute. 11346 The direction attributes are not commonly used in SDPs for RTSP, but 11347 may occur. "a=recvonly" in a SDP provided to the RTSP client MUST 11348 indicate that media delivery will only occur in the direction from 11349 the RTSP server to the client. In SDP provided to the RTSP client 11350 that lacks any of the directionality attributes (a=recvonly, 11351 a=sendonly, a=sendrecv) MUST behave as if the "a=recvonly" attribute 11352 was received. Note that this overrules the normal default rule 11353 defined in SDP[RFC4566]. The usage of "a=sendonly" or "a=sendrecv" 11354 is not defined, nor is the interpretation of SDP by other entities 11355 than the RTSP client. 11357 D.1.6. Range of Presentation 11359 The "a=range" attribute defines the total time range of the stored 11360 session or an individual media. Non-seekable live sessions can be 11361 indicated, while the length of live sessions can be deduced from the 11362 "t" and "r" SDP parameters. 11364 The attribute is both a session and a media level attribute. For 11365 presentations that contains media streams of the same durations, the 11366 range attribute SHOULD only be used at session-level. In case of 11367 different length the range attribute MUST be given at media level for 11368 all media, and SHOULD NOT be given at session level. If the 11369 attribute is present at both media level and session level the media 11370 level values MUST be used. 11372 Note: Usually one will specify the same length for all media, even if 11373 there isn't media available for the full duration on all media. 11374 However that requires that the server accepts PLAY requests within 11375 that range. 11377 Servers MUST take care to provide RTSP Range (see Section 16.38) 11378 values that are consistent with what is presented in the SDP for the 11379 content. There is no reason for non dynamic content, like media 11380 clips provided on demand to have inconsistent values. Inconsistent 11381 values between the SDP and the actual values for the content handled 11382 by the server is likely to generate some failure, like 457 "Invalid 11383 Range", in case the client uses PLAY requests with a Range header. 11384 In case the content is dynamic in length and it is infeasible to 11385 provide a correct value in the SDP the server is recommended to 11386 describe this as non-seekable content (see below). The server MAY 11387 override that property in the response to a PLAY request using the 11388 correct values in the Range header. 11390 The unit is specified first, followed by the value range. The units 11391 and their values are as defined in Section 4.4, Section 4.5 and 11392 Section 4.6 and MAY be extended with further formats. Any open ended 11393 range (start-), i.e. without stop range, is of unspecified duration 11394 and MUST be considered as non-seekable content unless this property 11395 is overridden. Multiple instances carrying different clock formats 11396 MAY be included at either session or media level. 11398 ABNF for the attribute is defined in Section 20.3. 11400 Examples: 11401 a=range:npt=0-34.4368 11402 a=range:clock=19971113T211503Z-19971113T220300Z 11403 Non seekable stream of unknown duration: 11404 a=range:npt=0- 11406 D.1.7. Time of Availability 11408 The "t=" field MUST contain suitable values for the start and stop 11409 times for both aggregate and non-aggregate stream control. The 11410 server SHOULD indicate a stop time value for which it guarantees the 11411 description to be valid, and a start time that is equal to or before 11412 the time at which the DESCRIBE request was received. It MAY also 11413 indicate start and stop times of 0, meaning that the session is 11414 always available. 11416 For sessions that are of live type, i.e. specific start time, unknown 11417 stop time, likely unseekable, the "t=" and "r=" field SHOULD be used 11418 to indicate the start time of the event. The stop time SHOULD be 11419 given so that the live event will have ended at that time, while 11420 still not be unnecessary long into the future. 11422 D.1.8. Connection Information 11424 In SDP, the "c=" field contains the destination address for the media 11425 stream. For on-demand unicast streams and some multicast streams, 11426 the destination address MAY be specified by the client via the SETUP 11427 request, thus overriding any specified address. To identify streams 11428 without a fixed destination address, where the client is required to 11429 specify a destination address, the "c=" field SHOULD be set to a null 11430 value. For addresses of type "IP4", this value MUST be "0.0.0.0", 11431 and for type "IP6", this value MUST be "0:0:0:0:0:0:0:0" (can also be 11432 written as "::"), i.e. the unspecified address according to RFC 4291 11433 [RFC4291]. 11435 D.1.9. Message Body Tag 11437 The optional "a=mtag" attribute identifies a version of the session 11438 description. It is opaque to the client. SETUP requests may include 11439 this identifier in the If-Match field (see Section 16.23) to only 11440 allow session establishment if this attribute value still corresponds 11441 to that of the current description. The attribute value is opaque 11442 and may contain any character allowed within SDP attribute values. 11444 ABNF for the attribute is defined in Section 20.3. 11446 Example: 11447 a=mtag:"158bb3e7c7fd62ce67f12b533f06b83a" 11449 One could argue that the "o=" field provides identical 11450 functionality. However, it does so in a manner that would put 11451 constraints on servers that need to support multiple session 11452 description types other than SDP for the same piece of media 11453 content. 11455 D.2. Aggregate Control Not Available 11457 If a presentation does not support aggregate control no session level 11458 "a=control:" attribute is specified. For a SDP with multiple media 11459 sections specified, each section will have its own control URI 11460 specified via the "a=control:" attribute. 11462 Example: 11463 v=0 11464 o=- 2890844256 2890842807 IN IP4 192.0.2.56 11465 s=I came from a web page 11466 e=adm@example.com 11467 c=IN IP4 0.0.0.0 11468 t=0 0 11469 m=video 8002 RTP/AVP 31 11470 a=control:rtsp://audio.com/movie.aud 11471 m=audio 8004 RTP/AVP 3 11472 a=control:rtsp://video.com/movie.vid 11474 Note that the position of the control URI in the description implies 11475 that the client establishes separate RTSP control sessions to the 11476 servers audio.com and video.com. 11478 It is recommended that an SDP file contains the complete media 11479 initialization information even if it is delivered to the media 11480 client through non-RTSP means. This is necessary as there is no 11481 mechanism to indicate that the client should request more detailed 11482 media stream information via DESCRIBE. 11484 D.3. Aggregate Control Available 11486 In this scenario, the server has multiple streams that can be 11487 controlled as a whole. In this case, there are both a media-level 11488 "a=control:" attributes, which are used to specify the stream URIs, 11489 and a session-level "a=control:" attribute which is used as the 11490 Request-URI for aggregate control. If the media-level URI is 11491 relative, it is resolved to absolute URIs according to Appendix D.1.1 11492 above. 11494 Example: 11495 C->M: DESCRIBE rtsp://example.com/movie RTSP/2.0 11496 CSeq: 1 11497 User-Agent: PhonyClient/1.2 11499 M->C: RTSP/2.0 200 OK 11500 CSeq: 1 11501 Date: Thu, 23 Jan 1997 15:35:06 GMT 11502 Content-Type: application/sdp 11503 Content-Base: rtsp://example.com/movie/ 11504 Content-Length: 227 11506 v=0 11507 o=- 2890844256 2890842807 IN IP4 192.0.2.211 11508 s=I contain 11509 i= 11510 e=adm@example.com 11511 c=IN IP4 0.0.0.0 11512 a=control:* 11513 t=0 0 11514 m=video 8002 RTP/AVP 31 11515 a=control:trackID=1 11516 m=audio 8004 RTP/AVP 3 11517 a=control:trackID=2 11519 In this example, the client is required to establish a single RTSP 11520 session to the server, and uses the URIs 11521 rtsp://example.com/movie/trackID=1 and 11522 rtsp://example.com/movie/trackID=2 to set up the video and audio 11523 streams, respectively. The URI rtsp://example.com/movie/, which is 11524 resolved from the "*", controls the whole presentation (movie). 11526 A client is not required to issues SETUP requests for all streams 11527 within an aggregate object. Servers should allow the client to ask 11528 for only a subset of the streams. 11530 D.4. RTSP external SDP delivery 11532 There are some considerations that needs to be made when the session 11533 description is delivered to client outside of RTSP, for example in 11534 HTTP or email. 11536 First of all the SDP needs to contain absolute URIs, relative will in 11537 most cases not work as the delivery will not correctly forward the 11538 base URI. And as SDP might be temporarily stored on file system 11539 before being loaded into an RTSP capable client, thus if possible to 11540 transport the base URI it still would need to be merged into the 11541 file. 11543 The writing of the SDP session availability information, i.e. "t=" 11544 and "r=", needs to be carefully considered. When the SDP is fetched 11545 by the DESCRIBE method, the probability that it is valid is very 11546 high. However the same are much less certain for SDPs distributed 11547 using other methods. Therefore the publisher of the SDP should take 11548 care to follow the recommendations about availability in the SDP 11549 specification [RFC4566]. 11551 Appendix E. RTSP Use Cases 11553 This Appendix describes the most important and considered use cases 11554 for RTSP. They are listed in descending order of importance in 11555 regards to ensuring that all necessary functionality is present. 11556 This specification only fully supports usage of the two first. Also 11557 in these first two cases, there are special cases or exceptions that 11558 are not supported without extensions, e.g. the redirection of media 11559 to another address than the controlling entity. 11561 E.1. On-demand Playback of Stored Content 11563 An RTSP capable server stores content suitable for being streamed to 11564 a client. A client desiring playback of any of the stored content 11565 uses RTSP to set up the media transport required to deliver the 11566 desired content. RTSP is then used to initiate, halt and manipulate 11567 the actual transmission (playout) of the content. RTSP is also 11568 required to provide necessary description and synchronization 11569 information for the content. 11571 The above high level description can be broken down into a number of 11572 functions that RTSP needs to be capable of. 11574 Presentation Description: Provide initialization information about 11575 the presentation (content); for example, which media codecs are 11576 needed for the content. Other information that is important 11577 includes the number of media stream the presentation contains, 11578 the transport protocols used for the media streams, and 11579 identifiers for these media streams. This information is 11580 required before setup of the content is possible and to 11581 determine if the client is even capable of using the content. 11583 This information need not be sent using RTSP; other external 11584 protocols can be used to transmit the transport presentation 11585 descriptions. Two good examples are the use of HTTP [RFC2616] 11586 or email to fetch or receive presentation descriptions like SDP 11587 [RFC4566] 11589 Setup: Set up some or all of the media streams in a presentation. 11590 The setup itself consist of selecting the protocol for media 11591 transport and the necessary parameters for the protocol, like 11592 addresses and ports. 11594 Control of Transmission: After the necessary media streams have been 11595 established the client can request the server to start 11596 transmitting the content. The client must be allowed to start 11597 or stop the transmission of the content at arbitrary times. 11598 The client must also be able to start the transmission at any 11599 point in the timeline of the presentation. 11601 Synchronization: For media transport protocols like RTP [RFC3550] it 11602 might be beneficial to carry synchronization information within 11603 RTSP. This may be due to either the lack of inter-media 11604 synchronization within the protocol itself, or the potential 11605 delay before the synchronization is established (which is the 11606 case for RTP when using RTCP). 11608 Termination: Terminate the established contexts. 11610 For this use case there are a number of assumptions about how it 11611 works. These are: 11613 On-Demand content: The content is stored at the server and can be 11614 accessed at any time during a time period when it is intended 11615 to be available. 11617 Independent sessions: A server is capable of serving a number of 11618 clients simultaneously, including from the same piece of 11619 content at different points in that presentations time-line. 11621 Unicast Transport: Content for each individual client is transmitted 11622 to them using unicast traffic. 11624 It is also possible to redirect the media traffic to a different 11625 destination than that of the entity controlling the traffic. 11626 However, allowing this without appropriate mechanisms for checking 11627 that the destination approves of this allows for distributed denial 11628 of service attacks (DDoS). 11630 E.2. Unicast Distribution of Live Content 11632 This use case is similar to the above on-demand content case (see 11633 Appendix E.1) the difference is the nature of the content itself. 11634 Live content is continuously distributed as it becomes available from 11635 a source; i.e., the main difference from on-demand is that one starts 11636 distributing content before the end of it has become available to the 11637 server. 11639 In many cases the consumer of live content is only interested in 11640 consuming what is actually happens "now"; i.e., very similar to 11641 broadcast TV. However in this case it is assumed that there exist no 11642 broadcast or multicast channel to the users, and instead the server 11643 functions as a distribution node, sending the same content to 11644 multiple receivers, using unicast traffic between server and client. 11645 This unicast traffic and the transport parameters are individually 11646 negotiated for each receiving client. 11648 Another aspect of live content is that it often has a very limited 11649 time of availability, as it is only is available for the duration of 11650 the event the content covers. An example of such a live content 11651 could be a music concert which lasts 2 hour and starts at a 11652 predetermined time. Thus there is need to announce when and for how 11653 long the live content is available. 11655 In some cases, the server providing live content may be saving some 11656 or all of the content to allow clients to pause the stream and resume 11657 it from the paused point, or to "rewind" and play continuously from a 11658 point earlier than the live point. Hence, this use case does not 11659 necessarily exclude playing from other than the live point of the 11660 stream, playing with scales other than 1.0, etc. 11662 E.3. On-demand Playback using Multicast 11664 It is possible to use RTSP to request that media be delivered to a 11665 multicast group. The entity setting up the session (the controller) 11666 will then control when and what media is delivered to the group. 11667 This use case has some potential for denial of service attacks by 11668 flooding a multicast group. Therefore, a mechanism is needed to 11669 indicate that the group actually accepts the traffic from the RTSP 11670 server. 11672 An open issue in this use case is how one ensures that all receivers 11673 listening to the multicast or broadcast receives the session 11674 presentation configuring the receivers. This memo has to rely on a 11675 external solution to solve this issue. 11677 E.4. Inviting an RTSP server into a conference 11679 If one has an established conference or group session, it is possible 11680 to have an RTSP server distribute media to the whole group. 11681 Transmission to the group is simplest when controlled by a single 11682 participant or leader of the conference. Shared control might be 11683 possible, but would require further investigation and possibly 11684 extensions. 11686 This use case assumes that there exists either multicast or a 11687 conference focus that redistribute media to all participants. 11689 This use case is intended to be able to handle the following 11690 scenario: A conference leader or participant (hereafter called the 11691 controller) has some pre-stored content on an RTSP server that he 11692 wants to share with the group. The controller sets up an RTSP 11693 session at the streaming server for this content and retrieves the 11694 session description for the content. The destination for the media 11695 content is set to the shared multicast group or conference focus. 11697 When desired by the controller, he/she can start and stop the 11698 transmission of the media to the conference group. 11700 There are several issues with this use case that are not solved by 11701 this core specification for RTSP: 11703 Denial of service: To avoid an RTSP server from being an unknowing 11704 participant in a denial of service attack the server needs to 11705 be able to verify the destination's acceptance of the media. 11706 Such a mechanism to verify the approval of received media does 11707 not yet exist; instead, only policies can be used, which can be 11708 made to work in controlled environments. 11710 Distributing the presentation description to all participants in the 11711 group: To enable a media receiver to correctly decode the content 11712 the media configuration information needs to be distributed 11713 reliably to all participants. This will most likely require 11714 support from an external protocol. 11716 Passing control of the session: If it is desired to pass control of 11717 the RTSP session between the participants, some support will be 11718 required by an external protocol to exchange state information 11719 and possibly floor control of who is controlling the RTSP 11720 session. 11722 If there interest in this use case, further work is required on the 11723 necessary extensions. 11725 E.5. Live Content using Multicast 11727 This use case in its simplest form does not require any use of RTSP 11728 at all; this is what multicast conferences being announced with SAP 11729 [RFC2974] and SDP are intended to handle. However in use cases where 11730 more advanced features like access control to the multicast session 11731 are desired, RTSP could be used for session establishment. 11733 A client desiring to join a live multicasted media session with 11734 cryptographic (encryption) access control could use RTSP in the 11735 following way. The source of the session announces the session and 11736 gives all interested an RTSP URI. The client connects to the server 11737 and requests the presentation description, allowing configuration for 11738 reception of the media. In this step it is possible for the client 11739 to use secured transport and any desired level of authentication; for 11740 example, for billing or access control. An RTSP link also allows for 11741 load balancing between multiple servers. 11743 If these were the only goals, they could be achieved by simply using 11744 HTTP. However, for cases where the sender likes to keep track of 11745 each individual receiver of a session, and possibly use the session 11746 as a side channel for distributing key-updates or other information 11747 on a per-receiver basis, and the full set of receivers is not know 11748 prior to the session start, the state establishment that RTSP 11749 provides can be beneficial. In this case a client would establish an 11750 RTSP session for this multicast group with the RTSP server. The RTSP 11751 server will not transmit any media, but instead will point to the 11752 multicast group. The client and server will be able to keep the 11753 session alive for as long as the receiver participates in the session 11754 thus enabling, for example, the server to push updates to the client. 11756 This use case will most likely not be able to be implemented without 11757 some extensions to the server-to-client push mechanism. Here the 11758 PLAY_NOTIFY method (see Section 13.5) with a suitable extension could 11759 provide clear benefits. 11761 Appendix F. Text format for Parameters 11763 A resource of type "text/parameters" consists of either 1) a list of 11764 parameters (for a query) or 2) a list of parameters and associated 11765 values (for an response or setting of the parameter). Each entry of 11766 the list is a single line of text. Parameters are separated from 11767 values by a colon. The parameter name MUST only use US-ASCII visible 11768 characters while the values are UTF-8 text strings. The media type 11769 registration template is in Section 22.16. 11771 There exist a potential interoperability issue for this format. It 11772 was named in RFC 2326 but never defined, even if used in examples 11773 that hint at the syntax. This format matches the purpose and its 11774 syntax supports the examples provided. However, it goes further by 11775 allowing UTF-8 in the value part, thus usage of UTF-8 strings may not 11776 be supported. However, as individual parameters are not defined, the 11777 using application anyway needs to have out-of-band agreement or using 11778 feature-tag to determine if the end-point supports the parameters. 11780 The ABNF [RFC5234] grammar for "text/parameters" content is: 11782 file = *((parameter / parameter-value) CRLF) 11783 parameter = 1*visible-except-colon 11784 parameter-value = parameter *WSP ":" value 11785 visible-except-colon = %x21-39 / %x3B-7E ; VCHAR - ":" 11786 value = *(TEXT-UTF8char / WSP) 11787 TEXT-UTF8char = %x21-7E / UTF8-NONASCII 11788 UTF8-NONASCII = %xC0-DF 1UTF8-CONT 11789 / %xE0-EF 2UTF8-CONT 11790 / %xF0-F7 3UTF8-CONT 11791 / %xF8-FB 4UTF8-CONT 11792 / %xFC-FD 5UTF8-CONT 11793 UTF8-CONT = %x80-BF 11794 WSP = ; Space or HTAB 11795 VCHAR = 11796 CRLF = 11798 Appendix G. Requirements for Unreliable Transport of RTSP 11800 This section provides anyone intending to define how to transport of 11801 RTSP messages over a unreliable transport protocol with some 11802 information learned by the attempt in RFC 2326 [RFC2326]. RFC 2326 11803 define both an URI scheme and some basic functionality for transport 11804 of RTSP messages over UDP, however it was not sufficient for reliable 11805 usage and successful interoperability. 11807 The RTSP scheme defined for unreliable transport of RTSP messages was 11808 "rtspu". It has been reserved by this specification as at least one 11809 commercial implementation exist, thus avoiding any collisions in the 11810 name space. 11812 The following considerations should exist for operation of RTSP over 11813 an unreliable transport protocol: 11815 o Request shall be acknowledged by the receiver. If there is no 11816 acknowledgement, the sender may resend the same message after a 11817 timeout of one round-trip time (RTT). Any retransmissions due to 11818 lack of acknowledgement must carry the same sequence number as the 11819 original request. 11821 o The round-trip time can be estimated as in TCP (RFC 1123) 11822 [RFC1123], with an initial round-trip value of 500 ms. An 11823 implementation may cache the last RTT measurement as the initial 11824 value for future connections. 11826 o If RTSP is used over a small-RTT LAN, standard procedures for 11827 optimizing initial TCP round trip estimates, such as those used in 11828 T/TCP (RFC 1644) [RFC1644], can be beneficial. 11830 o The Timestamp header (Section 16.51) is used to avoid the 11831 retransmission ambiguity problem [Stevens98]. 11833 o The registered default port for RTSP over UDP for the server is 11834 554. 11836 o RTSP messages can be carried over any lower-layer transport 11837 protocol that is 8-bit clean. 11839 o RTSP messages are vulnerable to bit errors and should not be 11840 subjected to them. 11842 o Source authentication, or at least validation that RTSP messages 11843 comes from the same entity becomes extremely important, as session 11844 hijacking may be substantially easier for RTSP message transport 11845 using an unreliable protocol like UDP than for TCP. 11847 There exist two RTSP headers thats primarily are intended for being 11848 used by the unreliable handling of RTSP messages and which will be 11849 maintained: 11851 o [CSeq] See Section 16.19 11853 o [Timestamp] See Section 16.51 11855 Appendix H. Backwards Compatibility Considerations 11857 This section contains notes on issues about backwards compatibility 11858 with clients or servers being implemented according to RFC 2326 11859 [RFC2326]. Note that there exist no requirement to implement RTSP 11860 1.0, in fact we recommend against it as it is difficult to do in an 11861 interoperable way. 11863 A server implementing RTSP/2.0 MUST include a RTSP-Version of 11864 RTSP/2.0 in all responses to requests containing RTSP-Version 11865 RTSP/2.0. If a server receives a RTSP/1.0 request, it MAY respond 11866 with a RTSP/1.0 response if it chooses to support RFC 2326. If the 11867 server chooses not to support RFC 2326, it MUST respond with a 505 11868 (RTSP Version not supported) status code. A server MUST NOT respond 11869 to a RTSP-Version RTSP/1.0 request with a RTSP-Version RTSP/2.0 11870 response. 11872 Clients implementing RTSP/2.0 MAY use an OPTIONS request with a RTSP- 11873 Version of 2.0 to determine whether a server supports RTSP/2.0. If 11874 the server responds with either a RTSP-Version of 1.0 or a status 11875 code of 505 (RTSP Version not supported), the client will have to use 11876 RTSP/1.0 requests if it chooses to support RFC 2326. 11878 H.1. Play Request in Play mode 11880 The behavior in the server when a Play is received in Play mode has 11881 changed (Section 13.4). In RFC 2326, the new PLAY request would be 11882 queued until the current Play completed. Any new PLAY request now 11883 take effect immediately replacing the previous request. 11885 H.2. Using Persistent Connections 11887 Some server implementations of RFC 2326 maintain a one-to-one 11888 relationship between a connection and an RTSP session. Such 11889 implementations require clients to use a persistent connection to 11890 communicate with the server and when a client closes its connection, 11891 the server may remove the RTSP session. This is worth noting if a 11892 RTSP 2.0 client also supporting 1.0 connects to a 1.0 server. 11894 Appendix I. Open Issues 11896 Open issues are filed and tracked in the bug and feature trackers at 11897 http://rtspspec.sourceforge.net. Open issues are discussed on MMUSIC 11898 list. 11900 Appendix J. Changes 11902 Compared to RTSP 1.0 (RFC 2326), the below changes has been made when 11903 defining RTSP 2.0. Note that this list does not reflect minor 11904 changes in wording or correction of typographical errors. 11906 o The section on minimal implementation was deleted without 11907 substitution. 11909 o The Transport header has been changed in the following way: 11911 * The ABNF has been changed to define that extensions are 11912 possible, and that unknown extension parameters are to be 11913 ignored. 11915 * To prevent backwards compatibility issues, any extension or new 11916 parameter requires the usage of a feature-tag combined with the 11917 Require header. 11919 * Syntax unclarities with the Mode parameter has been resolved. 11921 * Syntax error with ";" for multicast and unicast has been 11922 resolved. 11924 * Two new addressing parameters has been defined, src_addr and 11925 dest_addr. These replaces the parameters "port", 11926 "client_port", "server_port", "destination", "source". 11928 * Support for IPv6 explicit addresses in all address fields has 11929 been included. 11931 * To handle URI definitions that contain ";" or "," a quoted URI 11932 format has been introduced and is required. 11934 * Defined IANA registries for the transport headers parameters, 11935 transport-protocol, profile, lower-transport, and mode. 11937 * The transport headers interleaved parameter's text was made 11938 more strict and use formal requirements levels. It was also 11939 clarified that the interleaved channels are symmetric and that 11940 it is the server that sets the channel numbers. 11942 * It has been clarified that the client can't request of the 11943 server to use a certain RTP SSRC, using a request with the 11944 transport parameter SSRC. 11946 * Syntax definition for SSRC has been clarified to require 8HEX. 11947 It has also been extend to allow multiple values for clients 11948 supporting this version. 11950 * Clarified the text on the transport headers "dest_addr" 11951 parameters regarding what security precautions the server is 11952 required to perform. 11954 o The Range formats has been changed in the following way: 11956 * The NPT format has been given a initial NPT identifier that 11957 must now be used. 11959 * All formats now support initial open ended formats of type 11960 "npt=-10". 11962 o RTSP message handling has been changed in the following way: 11964 * RTSP messages now uses URIs rather then URLs. 11966 * It has been clarified that a 4xx message due to missing CSeq 11967 header shall be returned without a CSeq header. 11969 * The 300 (Multiple Choices) response code has been removed. 11971 * Rules for how to handle timing out RTSP messages has been 11972 added. 11974 * Extended Pipelining rules allowing for quick session startup. 11976 o The HTTP references has been updated to RFC 2616 and RFC 2617. 11977 This has resulted in that the Public, and the Content-Base header 11978 needed to be defined in the RTSP specification. Known effects on 11979 RTSP due to HTTP clarifications: 11981 * Content-Encoding header can include encoding of type 11982 "identity". 11984 o The state machine section has completely been rewritten. It 11985 includes now more details and are also more clear about the model 11986 used. 11988 o A IANA section has been included with contains a number of 11989 registries and their rules. This will allow us to use IANA to 11990 keep track of RTSP extensions. 11992 o Than transport of RTSP messages has seen the following changes: 11994 * The use of UDP for RTSP message transport has been deprecated 11995 due to missing interest and to broken specification. 11997 * The rules for how TCP connections is to be handled has been 11998 clarified. Now it is made clear that servers should not close 11999 the TCP connection unless they have been unused for significant 12000 time. 12002 * Strong recommendations why server and clients should use 12003 persistent connections has also been added. 12005 * There is now a requirement on the servers to handle non- 12006 persistent connections as this provides fault tolerance. 12008 * Added wording on the usage of Connection:Close for RTSP. 12010 * specified usage of TLS for RTSP messages, including a scheme to 12011 approve a proxies TLS connection to the next hop. 12013 o The following header related changes have been made: 12015 * Accept-Ranges response header is added. This header clarifies 12016 which range formats that can be used for a resource. 12018 * Fixed the missing definitions for the Cache-Control header. 12019 Also added to the syntax definition the missing delta-seconds 12020 for max-stale and min-fresh parameters. 12022 * Put requirement on CSeq header that the value is increased by 12023 one for each new RTSP request. A Recommendation to start at 1 12024 has also been added. 12026 * Added requirement that the Date header must be used for all 12027 messages with message body and the Server should always include 12028 it. 12030 * Removed possibility of using Range header with Scale header to 12031 indicate when it is to be activated, since it can't work as 12032 defined. Also added rule that lack of Scale header in response 12033 indicates lack of support for the header. Feature-tags for 12034 scaled playback has been defined. 12036 * The Speed header must now be responded to indicate support and 12037 the actual speed going to be used. A feature-tag is defined. 12038 Notes on congestion control was also added. 12040 * The Supported header was borrowed from SIP [RFC3261] to help 12041 with the feature negotiation in RTSP. 12043 * Clarified that the Timestamp header can be used to resolve 12044 retransmission ambiguities. 12046 * The Session header text has been expanded with a explanation on 12047 keep alive and which methods to use. SET_PARAMETER is now 12048 recommended to use if only keep-alive within RTSP is desired. 12050 * It has been clarified how the Range header formats is used to 12051 indicate pause points in the PAUSE response. 12053 * Clarified that RTP-Info URIs that are relative, uses the 12054 Request-URI as base URI. Also clarified that used URI must be 12055 that one that was used in the SETUP request. They are now also 12056 required to be quoted. The header also expresses the SSRC for 12057 the provided RTP timestamp and sequence number values. 12059 * Added text that requires the Range to always be present in PLAY 12060 responses. Clarified what should be sent in case of live 12061 streams. 12063 * The headers table has been updated using a structured borrowed 12064 from SIP. Those tables carries much more information and 12065 should provide a good overview of the available headers. 12067 * It has been is clarified that any message with a message body 12068 is required to have a Content-Length header. This was the case 12069 in RFC 2326 but could be misinterpreted. 12071 * To resolve functionality around MTag. The MTag and If-None- 12072 Match header has been added from HTTP with necessary 12073 clarification in regards to RTSP operation. 12075 * Imported the Public header from HTTP RFC 2068 [RFC2068] since 12076 it has been removed from HTTP due to lack of use. Public is 12077 used quite frequently in RTSP. 12079 * Clarified rules for populating the Public header so that it is 12080 an intersection of the capabilities of all the RTSP agents in a 12081 chain. 12083 * Added the Media-Range header for listing the current 12084 availability of the media range. 12086 * Added the Notify-Reason header for giving the reason when 12087 sending PLAY_NOTIFY requests. 12089 o The Protocol Syntax has been changed in the following way: 12091 * All ABNF definitions are updated according to the rules defined 12092 in RFC 5234 [RFC5234] and has been gathered in a separate 12093 Section 20. 12095 * The ABNF for the User-Agent and Server headers has been 12096 corrected so now only the description is in the HTTP 12097 specification. 12099 * Some definitions in the introduction regarding the RTSP session 12100 has been changed. 12102 * The protocol has been made fully IPv6 capable. Certain of the 12103 functionality, like using explicit IPv6 addresses in fields 12104 requires that the protocol support this updated specification. 12106 * Added a fragment part to the RTSP URI. This seem to be 12107 indicated by the note below the definition however it was not 12108 part of the ABNF. 12110 * The CHAR rule has been changed to exclude NULL. 12112 o The Status codes has been changed in the following way: 12114 * The use of status code 303 "See Other" has been deprecated as 12115 it does not make sense to use in RTSP. 12117 * When sending response 451 and 458 the response body should 12118 contain the offending parameters. 12120 * Clarification on when a 3rr redirect status code can be 12121 received has been added. This includes receiving 3rr as a 12122 result of request within a established session. This provides 12123 clarification to a previous unspecified behavior. 12125 * Removed the 201 (Created) and 250 (Low On Storage Space) status 12126 codes as they are only relevant to recording, which is 12127 deprecated. 12129 o The following functionality has been deprecated from the protocol: 12131 * The use of Queued Play. 12133 * The use of PLAY method for keep-alive in play state. 12135 * The RECORD and ANNOUNCE methods and all related functionality. 12136 Some of the syntax has been removed. 12138 * The possibility to use timed execution of methods with the time 12139 parameter in the Range header. 12141 * The description on how rtspu works is not part of the core 12142 specification and will require external description. Only that 12143 it exist is defined here and some requirements for the 12144 transport is provided. 12146 o The following changes has been made in relation to methods: 12148 * The OPTIONS method has been clarified with regards to the use 12149 of the Public and Allow headers. 12151 * The RECORD and ANNOUNCE methods are removed as they are lacking 12152 implementation and not considered necessary in the core 12153 specification. Any work on these methods should be done as a 12154 extension document to RTSP. 12156 * Added text clarifying the usage of SET_PARAMETER for keep-alive 12157 and usage without any body. 12159 * PLAY method is now allowed to be pipelined with the pipelining 12160 of one or more SETUP requests following the initial that 12161 generates the session for aggregated control. 12163 * REDIRECT has been expanded and diversified for different 12164 situations. 12166 o Wrote a new section about how to setup different media transport 12167 alternatives and their profiles, and lower layer protocols. This 12168 resulted that the appendix on RTP interaction was moved there 12169 instead in the part describing RTP. The section also includes 12170 guidelines what to think of when writing usage guidelines for new 12171 protocols and profiles. 12173 o Setup and usage of independent TCP connections for transport of 12174 RTP has been specified. 12176 o Added a new section describing the available mechanisms to 12177 determine if functionality is supported, called "Capability 12178 Handling". Renamed option-tags to feature-tags. 12180 o Added a contributors section with people who have contributed 12181 actual text to the specification. 12183 o Added a section Use Cases that describes the major use cases for 12184 RTSP. 12186 o Clarified the usage of a=range and how to indicate live content 12187 that are not seekable with this header. 12189 o Text specifying the special behavior of PLAY for live content. 12191 o Added a new method PLAY_NOTIFY. This method is used by the RTSP 12192 server to asynchronously notify clients about session changes. 12194 Appendix K. Acknowledgements 12196 This memorandum defines RTSP version 2.0 which is a revision of the 12197 Proposed Standard RTSP version 1.0 which is defined in [RFC2326]. 12198 The authors of this RFC are Henning Schulzrinne, Anup Rao, and Robert 12199 Lanphier. 12201 Both RTSP version 1.0 and RTSP version 2.0 borrow format and 12202 descriptions from HTTP/1.1. 12204 This document has benefited greatly from the comments of all those 12205 participating in the MMUSIC-WG. In addition to those already 12206 mentioned, the following individuals have contributed to this 12207 specification: 12209 Rahul Agarwal, Jeff Ayars, Milko Boic, Torsten Braun, Brent Browning, 12210 Bruce Butterfield, Steve Casner, Francisco Cortes, Kelly Djahandari, 12211 Martin Dunsmuir, Eric Fleischman, Jay Geagan, Andy Grignon, V. 12212 Guruprasad, Peter Haight, Mark Handley, Brad Hefta-Gaub, Volker Hilt, 12213 John K. Ho, Go Hori, Philipp Hoschka, Anne Jones, Anders Klemets, 12214 Ruth Lang, Stephanie Leif, Jonathan Lennox, Eduardo F. Llach, Thomas 12215 Marshall, Rob McCool, David Oran, Joerg Ott, Maria Papadopouli, Sujal 12216 Patel, Ema Patki, Alagu Periyannan, Colin Perkins, Igor Plotnikov, 12217 Jonathan Sergent, Pinaki Shah, David Singer, Lior Sion, Jeff Smith, 12218 Alexander Sokolsky, Dale Stammen, John Francis Stracke, Maureen 12219 Chesire, David Walker, Geetha Srikantan, Stephan Wenger, Pekka Pessi, 12220 Jae-Hwan Kim, Holger Schmidt, Stephen Farrell, Xavier Marjou, Joe 12221 Pallas, Martti Mela, and Patrick Hoffman. 12223 K.1. Contributors 12225 The following people have made written contributions that were 12226 included in the specification: 12228 o Tom Marshall contributed text on the usage of 3rr status codes. 12230 o Thomas Zheng contributed text on the usage of the Range in PLAY 12231 responses and proposed an earlier version of the PLAY_NOTIFY 12232 method. 12234 o Sean Sheedy contributed text on the timeout behavior of RTSP 12235 messages and connections, the 463 status code, and proposed an 12236 earlier version of the PLAY_NOTIFY method. 12238 o Greg Sherwood proposed an earlier version of the PLAY_NOTIFY 12239 method. 12241 o Fredrik Lindholm contributed text about the RTSP security 12242 framework. 12244 o John Lazzaro contributed the text for RTP over Independent TCP. 12246 o Aravind Narasimhan contributed by rewriting Media Transport 12247 Alternatives (Appendix C) and editorial improvements on a number 12248 of places in the specification. 12250 Appendix L. RFC Editor Consideration 12252 Please replace RFC XXXX with the RFC number this specification 12253 receives. 12255 Authors' Addresses 12257 Henning Schulzrinne 12258 Columbia University 12259 1214 Amsterdam Avenue 12260 New York, NY 10027 12261 USA 12263 Email: schulzrinne@cs.columbia.edu 12265 Anup Rao 12266 Cisco 12267 USA 12269 Email: anrao@cisco.com 12271 Rob Lanphier 12272 Seattle, WA 12273 USA 12275 Email: robla@robla.net 12277 Magnus Westerlund 12278 Ericsson AB 12279 Faeroegatan 6 12280 STOCKHOLM, SE-164 80 12281 SWEDEN 12283 Email: magnus.westerlund@ericsson.com 12285 Martin Stiemerling 12286 NEC Laboratories Europe, NEC Europe Ltd. 12287 Kurfuersten-Anlage 36 12288 Heidelberg 69115 12289 Germany 12291 Phone: +49 (0) 6221 4342 113 12292 Email: stiemerling@nw.neclab.eu