home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 3 / rfc2326.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  190.4 KB  |  5,156 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                     H. Schulzrinne
  8. Request for Comments: 2326                                   Columbia U.
  9. Category: Standards Track                                         A. Rao
  10.                                                                 Netscape
  11.                                                              R. Lanphier
  12.                                                             RealNetworks
  13.                                                               April 1998
  14.  
  15.  
  16.                   Real Time Streaming Protocol (RTSP)
  17.  
  18. Status of this Memo
  19.  
  20.    This document specifies an Internet standards track protocol for the
  21.    Internet community, and requests discussion and suggestions for
  22.    improvements.  Please refer to the current edition of the "Internet
  23.    Official Protocol Standards" (STD 1) for the standardization state
  24.    and status of this protocol.  Distribution of this memo is unlimited.
  25.  
  26. Copyright Notice
  27.  
  28.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  29.  
  30. Abstract
  31.  
  32.    The Real Time Streaming Protocol, or RTSP, is an application-level
  33.    protocol for control over the delivery of data with real-time
  34.    properties. RTSP provides an extensible framework to enable
  35.    controlled, on-demand delivery of real-time data, such as audio and
  36.    video. Sources of data can include both live data feeds and stored
  37.    clips. This protocol is intended to control multiple data delivery
  38.    sessions, provide a means for choosing delivery channels such as UDP,
  39.    multicast UDP and TCP, and provide a means for choosing delivery
  40.    mechanisms based upon RTP (RFC 1889).
  41.  
  42. Table of Contents
  43.  
  44.    * 1 Introduction .................................................  5
  45.         + 1.1 Purpose ...............................................  5
  46.         + 1.2 Requirements ..........................................  6
  47.         + 1.3 Terminology ...........................................  6
  48.         + 1.4 Protocol Properties ...................................  9
  49.         + 1.5 Extending RTSP ........................................ 11
  50.         + 1.6 Overall Operation ..................................... 11
  51.         + 1.7 RTSP States ........................................... 12
  52.         + 1.8 Relationship with Other Protocols ..................... 13
  53.    * 2 Notational Conventions ....................................... 14
  54.    * 3 Protocol Parameters .......................................... 14
  55.  
  56.  
  57.  
  58. Schulzrinne, et. al.        Standards Track                     [Page 1]
  59.  
  60. RFC 2326              Real Time Streaming Protocol            April 1998
  61.  
  62.  
  63.         + 3.1 RTSP Version .......................................... 14
  64.         + 3.2 RTSP URL .............................................. 14
  65.         + 3.3 Conference Identifiers ................................ 16
  66.         + 3.4 Session Identifiers ................................... 16
  67.         + 3.5 SMPTE Relative Timestamps ............................. 16
  68.         + 3.6 Normal Play Time ...................................... 17
  69.         + 3.7 Absolute Time ......................................... 18
  70.         + 3.8 Option Tags ........................................... 18
  71.              o 3.8.1 Registering New Option Tags with IANA .......... 18
  72.    * 4 RTSP Message ................................................. 19
  73.         + 4.1 Message Types ......................................... 19
  74.         + 4.2 Message Headers ....................................... 19
  75.         + 4.3 Message Body .......................................... 19
  76.         + 4.4 Message Length ........................................ 20
  77.    * 5 General Header Fields ........................................ 20
  78.    * 6 Request ...................................................... 20
  79.         + 6.1 Request Line .......................................... 21
  80.         + 6.2 Request Header Fields ................................. 21
  81.    * 7 Response ..................................................... 22
  82.         + 7.1 Status-Line ........................................... 22
  83.              o 7.1.1 Status Code and Reason Phrase .................. 22
  84.              o 7.1.2 Response Header Fields ......................... 26
  85.    * 8 Entity ....................................................... 27
  86.         + 8.1 Entity Header Fields .................................. 27
  87.         + 8.2 Entity Body ........................................... 28
  88.    * 9 Connections .................................................. 28
  89.         + 9.1 Pipelining ............................................ 28
  90.         + 9.2 Reliability and Acknowledgements ...................... 28
  91.    * 10 Method Definitions .......................................... 29
  92.         + 10.1 OPTIONS .............................................. 30
  93.         + 10.2 DESCRIBE ............................................. 31
  94.         + 10.3 ANNOUNCE ............................................. 32
  95.         + 10.4 SETUP ................................................ 33
  96.         + 10.5 PLAY ................................................. 34
  97.         + 10.6 PAUSE ................................................ 36
  98.         + 10.7 TEARDOWN ............................................. 37
  99.         + 10.8 GET_PARAMETER ........................................ 37
  100.         + 10.9 SET_PARAMETER ........................................ 38
  101.         + 10.10 REDIRECT ............................................ 39
  102.         + 10.11 RECORD .............................................. 39
  103.         + 10.12 Embedded (Interleaved) Binary Data .................. 40
  104.    * 11 Status Code Definitions ..................................... 41
  105.         + 11.1 Success 2xx .......................................... 41
  106.              o 11.1.1 250 Low on Storage Space ...................... 41
  107.         + 11.2 Redirection 3xx ...................................... 41
  108.         + 11.3 Client Error 4xx ..................................... 42
  109.              o 11.3.1 405 Method Not Allowed ........................ 42
  110.              o 11.3.2 451 Parameter Not Understood .................. 42
  111.  
  112.  
  113.  
  114. Schulzrinne, et. al.        Standards Track                     [Page 2]
  115.  
  116. RFC 2326              Real Time Streaming Protocol            April 1998
  117.  
  118.  
  119.              o 11.3.3 452 Conference Not Found ...................... 42
  120.              o 11.3.4 453 Not Enough Bandwidth ...................... 42
  121.              o 11.3.5 454 Session Not Found ......................... 42
  122.              o 11.3.6 455 Method Not Valid in This State ............ 42
  123.              o 11.3.7 456 Header Field Not Valid for Resource ....... 42
  124.              o 11.3.8 457 Invalid Range ............................. 43
  125.              o 11.3.9 458 Parameter Is Read-Only .................... 43
  126.              o 11.3.10 459 Aggregate Operation Not Allowed .......... 43
  127.              o 11.3.11 460 Only Aggregate Operation Allowed ......... 43
  128.              o 11.3.12 461 Unsupported Transport .................... 43
  129.              o 11.3.13 462 Destination Unreachable .................. 43
  130.              o 11.3.14 551 Option not supported ..................... 43
  131.    * 12 Header Field Definitions .................................... 44
  132.         + 12.1 Accept ............................................... 46
  133.         + 12.2 Accept-Encoding ...................................... 46
  134.         + 12.3 Accept-Language ...................................... 46
  135.         + 12.4 Allow ................................................ 46
  136.         + 12.5 Authorization ........................................ 46
  137.         + 12.6 Bandwidth ............................................ 46
  138.         + 12.7 Blocksize ............................................ 47
  139.         + 12.8 Cache-Control ........................................ 47
  140.         + 12.9 Conference ........................................... 49
  141.         + 12.10 Connection .......................................... 49
  142.         + 12.11 Content-Base ........................................ 49
  143.         + 12.12 Content-Encoding .................................... 49
  144.         + 12.13 Content-Language .................................... 50
  145.         + 12.14 Content-Length ...................................... 50
  146.         + 12.15 Content-Location .................................... 50
  147.         + 12.16 Content-Type ........................................ 50
  148.         + 12.17 CSeq ................................................ 50
  149.         + 12.18 Date ................................................ 50
  150.         + 12.19 Expires ............................................. 50
  151.         + 12.20 From ................................................ 51
  152.         + 12.21 Host ................................................ 51
  153.         + 12.22 If-Match ............................................ 51
  154.         + 12.23 If-Modified-Since ................................... 52
  155.         + 12.24 Last-Modified........................................ 52
  156.         + 12.25 Location ............................................ 52
  157.         + 12.26 Proxy-Authenticate .................................. 52
  158.         + 12.27 Proxy-Require ....................................... 52
  159.         + 12.28 Public .............................................. 53
  160.         + 12.29 Range ............................................... 53
  161.         + 12.30 Referer ............................................. 54
  162.         + 12.31 Retry-After ......................................... 54
  163.         + 12.32 Require ............................................. 54
  164.         + 12.33 RTP-Info ............................................ 55
  165.         + 12.34 Scale ............................................... 56
  166.         + 12.35 Speed ............................................... 57
  167.  
  168.  
  169.  
  170. Schulzrinne, et. al.        Standards Track                     [Page 3]
  171.  
  172. RFC 2326              Real Time Streaming Protocol            April 1998
  173.  
  174.  
  175.         + 12.36 Server .............................................. 57
  176.         + 12.37 Session ............................................. 57
  177.         + 12.38 Timestamp ........................................... 58
  178.         + 12.39 Transport ........................................... 58
  179.         + 12.40 Unsupported ......................................... 62
  180.         + 12.41 User-Agent .......................................... 62
  181.         + 12.42 Vary ................................................ 62
  182.         + 12.43 Via ................................................. 62
  183.         + 12.44 WWW-Authenticate .................................... 62
  184.    * 13 Caching ..................................................... 62
  185.    * 14 Examples .................................................... 63
  186.         + 14.1 Media on Demand (Unicast) ............................ 63
  187.         + 14.2 Streaming of a Container file ........................ 65
  188.         + 14.3 Single Stream Container Files ........................ 67
  189.         + 14.4 Live Media Presentation Using Multicast .............. 69
  190.         + 14.5 Playing media into an existing session ............... 70
  191.         + 14.6 Recording ............................................ 71
  192.    * 15 Syntax ...................................................... 72
  193.         + 15.1 Base Syntax .......................................... 72
  194.    * 16 Security Considerations ..................................... 73
  195.    * A RTSP Protocol State Machines ................................. 76
  196.         + A.1 Client State Machine .................................. 76
  197.         + A.2 Server State Machine .................................. 77
  198.    * B Interaction with RTP ......................................... 79
  199.    * C Use of SDP for RTSP Session Descriptions ..................... 80
  200.         + C.1 Definitions ........................................... 80
  201.              o C.1.1 Control URL .................................... 80
  202.              o C.1.2 Media streams .................................. 81
  203.              o C.1.3 Payload type(s) ................................ 81
  204.              o C.1.4 Format-specific parameters ..................... 81
  205.              o C.1.5 Range of presentation .......................... 82
  206.              o C.1.6 Time of availability ........................... 82
  207.              o C.1.7 Connection Information ......................... 82
  208.              o C.1.8 Entity Tag ..................................... 82
  209.         + C.2 Aggregate Control Not Available ....................... 83
  210.         + C.3 Aggregate Control Available ........................... 83
  211.    * D Minimal RTSP implementation .................................. 85
  212.         + D.1 Client ................................................ 85
  213.              o D.1.1 Basic Playback ................................. 86
  214.              o D.1.2 Authentication-enabled ......................... 86
  215.         + D.2 Server ................................................ 86
  216.              o D.2.1 Basic Playback ................................. 87
  217.              o D.2.2 Authentication-enabled ......................... 87
  218.    * E Authors' Addresses ........................................... 88
  219.    * F Acknowledgements ............................................. 89
  220.    * References ..................................................... 90
  221.    * Full Copyright Statement ....................................... 92
  222.  
  223.  
  224.  
  225.  
  226. Schulzrinne, et. al.        Standards Track                     [Page 4]
  227.  
  228. RFC 2326              Real Time Streaming Protocol            April 1998
  229.  
  230.  
  231. 1 Introduction
  232.  
  233. 1.1 Purpose
  234.  
  235.    The Real-Time Streaming Protocol (RTSP) establishes and controls
  236.    either a single or several time-synchronized streams of continuous
  237.    media such as audio and video. It does not typically deliver the
  238.    continuous streams itself, although interleaving of the continuous
  239.    media stream with the control stream is possible (see Section 10.12).
  240.    In other words, RTSP acts as a "network remote control" for
  241.    multimedia servers.
  242.  
  243.    The set of streams to be controlled is defined by a presentation
  244.    description. This memorandum does not define a format for a
  245.    presentation description.
  246.  
  247.    There is no notion of an RTSP connection; instead, a server maintains
  248.    a session labeled by an identifier. An RTSP session is in no way tied
  249.    to a transport-level connection such as a TCP connection. During an
  250.    RTSP session, an RTSP client may open and close many reliable
  251.    transport connections to the server to issue RTSP requests.
  252.    Alternatively, it may use a connectionless transport protocol such as
  253.    UDP.
  254.  
  255.    The streams controlled by RTSP may use RTP [1], but the operation of
  256.    RTSP does not depend on the transport mechanism used to carry
  257.    continuous media.  The protocol is intentionally similar in syntax
  258.    and operation to HTTP/1.1 [2] so that extension mechanisms to HTTP
  259.    can in most cases also be added to RTSP. However, RTSP differs in a
  260.    number of important aspects from HTTP:
  261.  
  262.      * RTSP introduces a number of new methods and has a different
  263.        protocol identifier.
  264.      * An RTSP server needs to maintain state by default in almost all
  265.        cases, as opposed to the stateless nature of HTTP.
  266.      * Both an RTSP server and client can issue requests.
  267.      * Data is carried out-of-band by a different protocol. (There is an
  268.        exception to this.)
  269.      * RTSP is defined to use ISO 10646 (UTF-8) rather than ISO 8859-1,
  270.        consistent with current HTML internationalization efforts [3].
  271.      * The Request-URI always contains the absolute URI. Because of
  272.        backward compatibility with a historical blunder, HTTP/1.1 [2]
  273.        carries only the absolute path in the request and puts the host
  274.        name in a separate header field.
  275.  
  276.      This makes "virtual hosting" easier, where a single host with one
  277.      IP address hosts several document trees.
  278.  
  279.  
  280.  
  281.  
  282. Schulzrinne, et. al.        Standards Track                     [Page 5]
  283.  
  284. RFC 2326              Real Time Streaming Protocol            April 1998
  285.  
  286.  
  287.    The protocol supports the following operations:
  288.  
  289.    Retrieval of media from media server:
  290.           The client can request a presentation description via HTTP or
  291.           some other method. If the presentation is being multicast, the
  292.           presentation description contains the multicast addresses and
  293.           ports to be used for the continuous media. If the presentation
  294.           is to be sent only to the client via unicast, the client
  295.           provides the destination for security reasons.
  296.  
  297.    Invitation of a media server to a conference:
  298.           A media server can be "invited" to join an existing
  299.           conference, either to play back media into the presentation or
  300.           to record all or a subset of the media in a presentation. This
  301.           mode is useful for distributed teaching applications. Several
  302.           parties in the conference may take turns "pushing the remote
  303.           control buttons."
  304.  
  305.    Addition of media to an existing presentation:
  306.           Particularly for live presentations, it is useful if the
  307.           server can tell the client about additional media becoming
  308.           available.
  309.  
  310.    RTSP requests may be handled by proxies, tunnels and caches as in
  311.    HTTP/1.1 [2].
  312.  
  313. 1.2 Requirements
  314.  
  315.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  316.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  317.    document are to be interpreted as described in RFC 2119 [4].
  318.  
  319. 1.3 Terminology
  320.  
  321.    Some of the terminology has been adopted from HTTP/1.1 [2]. Terms not
  322.    listed here are defined as in HTTP/1.1.
  323.  
  324.    Aggregate control:
  325.           The control of the multiple streams using a single timeline by
  326.           the server. For audio/video feeds, this means that the client
  327.           may issue a single play or pause message to control both the
  328.           audio and video feeds.
  329.  
  330.    Conference:
  331.           a multiparty, multimedia presentation, where "multi" implies
  332.           greater than or equal to one.
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Schulzrinne, et. al.        Standards Track                     [Page 6]
  339.  
  340. RFC 2326              Real Time Streaming Protocol            April 1998
  341.  
  342.  
  343.    Client:
  344.           The client requests continuous media data from the media
  345.           server.
  346.  
  347.    Connection:
  348.           A transport layer virtual circuit established between two
  349.           programs for the purpose of communication.
  350.  
  351.    Container file:
  352.           A file which may contain multiple media streams which often
  353.           comprise a presentation when played together. RTSP servers may
  354.           offer aggregate control on these files, though the concept of
  355.           a container file is not embedded in the protocol.
  356.  
  357.    Continuous media:
  358.           Data where there is a timing relationship between source and
  359.           sink; that is, the sink must reproduce the timing relationship
  360.           that existed at the source. The most common examples of
  361.           continuous media are audio and motion video. Continuous media
  362.           can be real-time (interactive), where there is a "tight"
  363.           timing relationship between source and sink, or streaming
  364.           (playback), where the relationship is less strict.
  365.  
  366.    Entity:
  367.           The information transferred as the payload of a request or
  368.           response. An entity consists of metainformation in the form of
  369.           entity-header fields and content in the form of an entity-
  370.           body, as described in Section 8.
  371.  
  372.    Media initialization:
  373.           Datatype/codec specific initialization. This includes such
  374.           things as clockrates, color tables, etc. Any transport-
  375.           independent information which is required by a client for
  376.           playback of a media stream occurs in the media initialization
  377.           phase of stream setup.
  378.  
  379.    Media parameter:
  380.           Parameter specific to a media type that may be changed before
  381.           or during stream playback.
  382.  
  383.    Media server:
  384.           The server providing playback or recording services for one or
  385.           more media streams. Different media streams within a
  386.           presentation may originate from different media servers. A
  387.           media server may reside on the same or a different host as the
  388.           web server the presentation is invoked from.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Schulzrinne, et. al.        Standards Track                     [Page 7]
  395.  
  396. RFC 2326              Real Time Streaming Protocol            April 1998
  397.  
  398.  
  399.    Media server indirection:
  400.           Redirection of a media client to a different media server.
  401.  
  402.    (Media) stream:
  403.           A single media instance, e.g., an audio stream or a video
  404.           stream as well as a single whiteboard or shared application
  405.           group. When using RTP, a stream consists of all RTP and RTCP
  406.           packets created by a source within an RTP session. This is
  407.           equivalent to the definition of a DSM-CC stream([5]).
  408.  
  409.    Message:
  410.           The basic unit of RTSP communication, consisting of a
  411.           structured sequence of octets matching the syntax defined in
  412.           Section 15 and transmitted via a connection or a
  413.           connectionless protocol.
  414.  
  415.    Participant:
  416.           Member of a conference. A participant may be a machine, e.g.,
  417.           a media record or playback server.
  418.  
  419.    Presentation:
  420.           A set of one or more streams presented to the client as a
  421.           complete media feed, using a presentation description as
  422.           defined below. In most cases in the RTSP context, this implies
  423.           aggregate control of those streams, but does not have to.
  424.  
  425.    Presentation description:
  426.           A presentation description contains information about one or
  427.           more media streams within a presentation, such as the set of
  428.           encodings, network addresses and information about the
  429.           content.  Other IETF protocols such as SDP (RFC XXXX [6]) use
  430.           the term "session" for a live presentation. The presentation
  431.           description may take several different formats, including but
  432.           not limited to the session description format SDP.
  433.  
  434.    Response:
  435.           An RTSP response. If an HTTP response is meant, that is
  436.           indicated explicitly.
  437.  
  438.    Request:
  439.           An RTSP request. If an HTTP request is meant, that is
  440.           indicated explicitly.
  441.  
  442.    RTSP session:
  443.           A complete RTSP "transaction", e.g., the viewing of a movie.
  444.           A session typically consists of a client setting up a
  445.           transport mechanism for the continuous media stream (SETUP),
  446.           starting the stream with PLAY or RECORD, and closing the
  447.  
  448.  
  449.  
  450. Schulzrinne, et. al.        Standards Track                     [Page 8]
  451.  
  452. RFC 2326              Real Time Streaming Protocol            April 1998
  453.  
  454.  
  455.           stream with TEARDOWN.
  456.  
  457.    Transport initialization:
  458.           The negotiation of transport information (e.g., port numbers,
  459.           transport protocols) between the client and the server.
  460.  
  461. 1.4 Protocol Properties
  462.  
  463.    RTSP has the following properties:
  464.  
  465.    Extendable:
  466.           New methods and parameters can be easily added to RTSP.
  467.  
  468.    Easy to parse:
  469.           RTSP can be parsed by standard HTTP or MIME parsers.
  470.  
  471.    Secure:
  472.           RTSP re-uses web security mechanisms. All HTTP authentication
  473.           mechanisms such as basic (RFC 2068 [2, Section 11.1]) and
  474.           digest authentication (RFC 2069 [8]) are directly applicable.
  475.           One may also reuse transport or network layer security
  476.           mechanisms.
  477.  
  478.    Transport-independent:
  479.           RTSP may use either an unreliable datagram protocol (UDP) (RFC
  480.           768 [9]), a reliable datagram protocol (RDP, RFC 1151, not
  481.           widely used [10]) or a reliable stream protocol such as TCP
  482.           (RFC 793 [11]) as it implements application-level reliability.
  483.  
  484.    Multi-server capable:
  485.           Each media stream within a presentation can reside on a
  486.           different server. The client automatically establishes several
  487.           concurrent control sessions with the different media servers.
  488.           Media synchronization is performed at the transport level.
  489.  
  490.    Control of recording devices:
  491.           The protocol can control both recording and playback devices,
  492.           as well as devices that can alternate between the two modes
  493.           ("VCR").
  494.  
  495.    Separation of stream control and conference initiation:
  496.           Stream control is divorced from inviting a media server to a
  497.           conference. The only requirement is that the conference
  498.           initiation protocol either provides or can be used to create a
  499.           unique conference identifier. In particular, SIP [12] or H.323
  500.           [13] may be used to invite a server to a conference.
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Schulzrinne, et. al.        Standards Track                     [Page 9]
  507.  
  508. RFC 2326              Real Time Streaming Protocol            April 1998
  509.  
  510.  
  511.    Suitable for professional applications:
  512.           RTSP supports frame-level accuracy through SMPTE time stamps
  513.           to allow remote digital editing.
  514.  
  515.    Presentation description neutral:
  516.           The protocol does not impose a particular presentation
  517.           description or metafile format and can convey the type of
  518.           format to be used. However, the presentation description must
  519.           contain at least one RTSP URI.
  520.  
  521.    Proxy and firewall friendly:
  522.           The protocol should be readily handled by both application and
  523.           transport-layer (SOCKS [14]) firewalls. A firewall may need to
  524.           understand the SETUP method to open a "hole" for the UDP media
  525.           stream.
  526.  
  527.    HTTP-friendly:
  528.           Where sensible, RTSP reuses HTTP concepts, so that the
  529.           existing infrastructure can be reused. This infrastructure
  530.           includes PICS (Platform for Internet Content Selection
  531.           [15,16]) for associating labels with content. However, RTSP
  532.           does not just add methods to HTTP since the controlling
  533.           continuous media requires server state in most cases.
  534.  
  535.    Appropriate server control:
  536.           If a client can start a stream, it must be able to stop a
  537.           stream. Servers should not start streaming to clients in such
  538.           a way that clients cannot stop the stream.
  539.  
  540.    Transport negotiation:
  541.           The client can negotiate the transport method prior to
  542.           actually needing to process a continuous media stream.
  543.  
  544.    Capability negotiation:
  545.           If basic features are disabled, there must be some clean
  546.           mechanism for the client to determine which methods are not
  547.           going to be implemented. This allows clients to present the
  548.           appropriate user interface. For example, if seeking is not
  549.           allowed, the user interface must be able to disallow moving a
  550.           sliding position indicator.
  551.  
  552.      An earlier requirement in RTSP was multi-client capability.
  553.      However, it was determined that a better approach was to make sure
  554.      that the protocol is easily extensible to the multi-client
  555.      scenario. Stream identifiers can be used by several control
  556.      streams, so that "passing the remote" would be possible. The
  557.      protocol would not address how several clients negotiate access;
  558.      this is left to either a "social protocol" or some other floor
  559.  
  560.  
  561.  
  562. Schulzrinne, et. al.        Standards Track                    [Page 10]
  563.  
  564. RFC 2326              Real Time Streaming Protocol            April 1998
  565.  
  566.  
  567.      control mechanism.
  568.  
  569. 1.5 Extending RTSP
  570.  
  571.    Since not all media servers have the same functionality, media
  572.    servers by necessity will support different sets of requests. For
  573.    example:
  574.  
  575.      * A server may only be capable of playback thus has no need to
  576.        support the RECORD request.
  577.      * A server may not be capable of seeking (absolute positioning) if
  578.        it is to support live events only.
  579.      * Some servers may not support setting stream parameters and thus
  580.        not support GET_PARAMETER and SET_PARAMETER.
  581.  
  582.    A server SHOULD implement all header fields described in Section 12.
  583.  
  584.    It is up to the creators of presentation descriptions not to ask the
  585.    impossible of a server. This situation is similar in HTTP/1.1 [2],
  586.    where the methods described in [H19.6] are not likely to be supported
  587.    across all servers.
  588.  
  589.    RTSP can be extended in three ways, listed here in order of the
  590.    magnitude of changes supported:
  591.  
  592.      * Existing methods can be extended with new parameters, as long as
  593.        these parameters can be safely ignored by the recipient. (This is
  594.        equivalent to adding new parameters to an HTML tag.) If the
  595.        client needs negative acknowledgement when a method extension is
  596.        not supported, a tag corresponding to the extension may be added
  597.        in the Require: field (see Section 12.32).
  598.      * New methods can be added. If the recipient of the message does
  599.        not understand the request, it responds with error code 501 (Not
  600.        implemented) and the sender should not attempt to use this method
  601.        again. A client may also use the OPTIONS method to inquire about
  602.        methods supported by the server. The server SHOULD list the
  603.        methods it supports using the Public response header.
  604.      * A new version of the protocol can be defined, allowing almost all
  605.        aspects (except the position of the protocol version number) to
  606.        change.
  607.  
  608. 1.6 Overall Operation
  609.  
  610.    Each presentation and media stream may be identified by an RTSP URL.
  611.    The overall presentation and the properties of the media the
  612.    presentation is made up of are defined by a presentation description
  613.    file, the format of which is outside the scope of this specification.
  614.    The presentation description file may be obtained by the client using
  615.  
  616.  
  617.  
  618. Schulzrinne, et. al.        Standards Track                    [Page 11]
  619.  
  620. RFC 2326              Real Time Streaming Protocol            April 1998
  621.  
  622.  
  623.    HTTP or other means such as email and may not necessarily be stored
  624.    on the media server.
  625.  
  626.    For the purposes of this specification, a presentation description is
  627.    assumed to describe one or more presentations, each of which
  628.    maintains a common time axis. For simplicity of exposition and
  629.    without loss of generality, it is assumed that the presentation
  630.    description contains exactly one such presentation. A presentation
  631.    may contain several media streams.
  632.  
  633.    The presentation description file contains a description of the media
  634.    streams making up the presentation, including their encodings,
  635.    language, and other parameters that enable the client to choose the
  636.    most appropriate combination of media. In this presentation
  637.    description, each media stream that is individually controllable by
  638.    RTSP is identified by an RTSP URL, which points to the media server
  639.    handling that particular media stream and names the stream stored on
  640.    that server. Several media streams can be located on different
  641.    servers; for example, audio and video streams can be split across
  642.    servers for load sharing. The description also enumerates which
  643.    transport methods the server is capable of.
  644.  
  645.    Besides the media parameters, the network destination address and
  646.    port need to be determined. Several modes of operation can be
  647.    distinguished:
  648.  
  649.    Unicast:
  650.           The media is transmitted to the source of the RTSP request,
  651.           with the port number chosen by the client. Alternatively, the
  652.           media is transmitted on the same reliable stream as RTSP.
  653.  
  654.    Multicast, server chooses address:
  655.           The media server picks the multicast address and port. This is
  656.           the typical case for a live or near-media-on-demand
  657.           transmission.
  658.  
  659.    Multicast, client chooses address:
  660.           If the server is to participate in an existing multicast
  661.           conference, the multicast address, port and encryption key are
  662.           given by the conference description, established by means
  663.           outside the scope of this specification.
  664.  
  665. 1.7 RTSP States
  666.  
  667.    RTSP controls a stream which may be sent via a separate protocol,
  668.    independent of the control channel. For example, RTSP control may
  669.    occur on a TCP connection while the data flows via UDP. Thus, data
  670.    delivery continues even if no RTSP requests are received by the media
  671.  
  672.  
  673.  
  674. Schulzrinne, et. al.        Standards Track                    [Page 12]
  675.  
  676. RFC 2326              Real Time Streaming Protocol            April 1998
  677.  
  678.  
  679.    server. Also, during its lifetime, a single media stream may be
  680.    controlled by RTSP requests issued sequentially on different TCP
  681.    connections. Therefore, the server needs to maintain "session state"
  682.    to be able to correlate RTSP requests with a stream. The state
  683.    transitions are described in Section A.
  684.  
  685.    Many methods in RTSP do not contribute to state. However, the
  686.    following play a central role in defining the allocation and usage of
  687.    stream resources on the server: SETUP, PLAY, RECORD, PAUSE, and
  688.    TEARDOWN.
  689.  
  690.    SETUP:
  691.           Causes the server to allocate resources for a stream and start
  692.           an RTSP session.
  693.  
  694.    PLAY and RECORD:
  695.           Starts data transmission on a stream allocated via SETUP.
  696.  
  697.    PAUSE:
  698.           Temporarily halts a stream without freeing server resources.
  699.  
  700.    TEARDOWN:
  701.           Frees resources associated with the stream. The RTSP session
  702.           ceases to exist on the server.
  703.  
  704.           RTSP methods that contribute to state use the Session header
  705.           field (Section 12.37) to identify the RTSP session whose state
  706.           is being manipulated. The server generates session identifiers
  707.           in response to SETUP requests (Section 10.4).
  708.  
  709. 1.8 Relationship with Other Protocols
  710.  
  711.    RTSP has some overlap in functionality with HTTP. It also may
  712.    interact with HTTP in that the initial contact with streaming content
  713.    is often to be made through a web page. The current protocol
  714.    specification aims to allow different hand-off points between a web
  715.    server and the media server implementing RTSP. For example, the
  716.    presentation description can be retrieved using HTTP or RTSP, which
  717.    reduces roundtrips in web-browser-based scenarios, yet also allows
  718.    for standalone RTSP servers and clients which do not rely on HTTP at
  719.    all.
  720.  
  721.    However, RTSP differs fundamentally from HTTP in that data delivery
  722.    takes place out-of-band in a different protocol. HTTP is an
  723.    asymmetric protocol where the client issues requests and the server
  724.    responds. In RTSP, both the media client and media server can issue
  725.    requests. RTSP requests are also not stateless; they may set
  726.    parameters and continue to control a media stream long after the
  727.  
  728.  
  729.  
  730. Schulzrinne, et. al.        Standards Track                    [Page 13]
  731.  
  732. RFC 2326              Real Time Streaming Protocol            April 1998
  733.  
  734.  
  735.    request has been acknowledged.
  736.  
  737.      Re-using HTTP functionality has advantages in at least two areas,
  738.      namely security and proxies. The requirements are very similar, so
  739.      having the ability to adopt HTTP work on caches, proxies and
  740.      authentication is valuable.
  741.  
  742.    While most real-time media will use RTP as a transport protocol, RTSP
  743.    is not tied to RTP.
  744.  
  745.    RTSP assumes the existence of a presentation description format that
  746.    can express both static and temporal properties of a presentation
  747.    containing several media streams.
  748.  
  749. 2 Notational Conventions
  750.  
  751.    Since many of the definitions and syntax are identical to HTTP/1.1,
  752.    this specification only points to the section where they are defined
  753.    rather than copying it. For brevity, [HX.Y] is to be taken to refer
  754.    to Section X.Y of the current HTTP/1.1 specification (RFC 2068 [2]).
  755.  
  756.    All the mechanisms specified in this document are described in both
  757.    prose and an augmented Backus-Naur form (BNF) similar to that used in
  758.    [H2.1]. It is described in detail in RFC 2234 [17], with the
  759.    difference that this RTSP specification maintains the "1#" notation
  760.    for comma-separated lists.
  761.  
  762.    In this memo, we use indented and smaller-type paragraphs to provide
  763.    background and motivation. This is intended to give readers who were
  764.    not involved with the formulation of the specification an
  765.    understanding of why things are the way that they are in RTSP.
  766.  
  767. 3 Protocol Parameters
  768.  
  769. 3.1 RTSP Version
  770.  
  771.    [H3.1] applies, with HTTP replaced by RTSP.
  772.  
  773. 3.2 RTSP URL
  774.  
  775.    The "rtsp" and "rtspu" schemes are used to refer to network resources
  776.    via the RTSP protocol. This section defines the scheme-specific
  777.    syntax and semantics for RTSP URLs.
  778.  
  779.    rtsp_URL  =   ( "rtsp:" | "rtspu:" )
  780.                  "//" host [ ":" port ] [ abs_path ]
  781.    host      =   <A legal Internet host domain name of IP address
  782.                  (in dotted decimal form), as defined by Section 2.1
  783.  
  784.  
  785.  
  786. Schulzrinne, et. al.        Standards Track                    [Page 14]
  787.  
  788. RFC 2326              Real Time Streaming Protocol            April 1998
  789.  
  790.  
  791.                  of RFC 1123 \cite{rfc1123}>
  792.    port      =   *DIGIT
  793.  
  794.    abs_path is defined in [H3.2.1].
  795.  
  796.      Note that fragment and query identifiers do not have a well-defined
  797.      meaning at this time, with the interpretation left to the RTSP
  798.      server.
  799.  
  800.    The scheme rtsp requires that commands are issued via a reliable
  801.    protocol (within the Internet, TCP), while the scheme rtspu identifies
  802.    an unreliable protocol (within the Internet, UDP).
  803.  
  804.    If the port is empty or not given, port 554 is assumed. The semantics
  805.    are that the identified resource can be controlled by RTSP at the
  806.    server listening for TCP (scheme "rtsp") connections or UDP (scheme
  807.    "rtspu") packets on that port of host, and the Request-URI for the
  808.    resource is rtsp_URL.
  809.  
  810.    The use of IP addresses in URLs SHOULD be avoided whenever possible
  811.    (see RFC 1924 [19]).
  812.  
  813.    A presentation or a stream is identified by a textual media
  814.    identifier, using the character set and escape conventions [H3.2] of
  815.    URLs (RFC 1738 [20]). URLs may refer to a stream or an aggregate of
  816.    streams, i.e., a presentation. Accordingly, requests described in
  817.    Section 10 can apply to either the whole presentation or an individual
  818.    stream within the presentation. Note that some request methods can
  819.    only be applied to streams, not presentations and vice versa.
  820.  
  821.    For example, the RTSP URL:
  822.      rtsp://media.example.com:554/twister/audiotrack
  823.  
  824.    identifies the audio stream within the presentation "twister", which
  825.    can be controlled via RTSP requests issued over a TCP connection to
  826.    port 554 of host media.example.com.
  827.  
  828.    Also, the RTSP URL:
  829.      rtsp://media.example.com:554/twister
  830.  
  831.    identifies the presentation "twister", which may be composed of
  832.    audio and video streams.
  833.  
  834.    This does not imply a standard way to reference streams in URLs.
  835.    The presentation description defines the hierarchical relationships
  836.    in the presentation and the URLs for the individual streams. A
  837.    presentation description may name a stream "a.mov" and the whole
  838.    presentation "b.mov".
  839.  
  840.  
  841.  
  842. Schulzrinne, et. al.        Standards Track                    [Page 15]
  843.  
  844. RFC 2326              Real Time Streaming Protocol            April 1998
  845.  
  846.  
  847.    The path components of the RTSP URL are opaque to the client and do
  848.    not imply any particular file system structure for the server.
  849.  
  850.      This decoupling also allows presentation descriptions to be used
  851.      with non-RTSP media control protocols simply by replacing the
  852.      scheme in the URL.
  853.  
  854. 3.3 Conference Identifiers
  855.  
  856.    Conference identifiers are opaque to RTSP and are encoded using
  857.    standard URI encoding methods (i.e., LWS is escaped with %). They can
  858.    contain any octet value. The conference identifier MUST be globally
  859.    unique. For H.323, the conferenceID value is to be used.
  860.  
  861.  conference-id =   1*xchar
  862.  
  863.      Conference identifiers are used to allow RTSP sessions to obtain
  864.      parameters from multimedia conferences the media server is
  865.      participating in. These conferences are created by protocols
  866.      outside the scope of this specification, e.g., H.323 [13] or SIP
  867.      [12]. Instead of the RTSP client explicitly providing transport
  868.      information, for example, it asks the media server to use the
  869.      values in the conference description instead.
  870.  
  871. 3.4 Session Identifiers
  872.  
  873.    Session identifiers are opaque strings of arbitrary length. Linear
  874.    white space must be URL-escaped. A session identifier MUST be chosen
  875.    randomly and MUST be at least eight octets long to make guessing it
  876.    more difficult. (See Section 16.)
  877.  
  878.      session-id   =   1*( ALPHA | DIGIT | safe )
  879.  
  880. 3.5 SMPTE Relative Timestamps
  881.  
  882.    A SMPTE relative timestamp expresses time relative to the start of
  883.    the clip. Relative timestamps are expressed as SMPTE time codes for
  884.    frame-level access accuracy. The time code has the format
  885.    hours:minutes:seconds:frames.subframes, with the origin at the start
  886.    of the clip. The default smpte format is "SMPTE 30 drop" format, with
  887.    frame rate is 29.97 frames per second. Other SMPTE codes MAY be
  888.    supported (such as "SMPTE 25") through the use of alternative use of
  889.    "smpte time". For the "frames" field in the time value can assume
  890.    the values 0 through 29. The difference between 30 and 29.97 frames
  891.    per second is handled by dropping the first two frame indices (values
  892.    00 and 01) of every minute, except every tenth minute. If the frame
  893.    value is zero, it may be omitted. Subframes are measured in
  894.    one-hundredth of a frame.
  895.  
  896.  
  897.  
  898. Schulzrinne, et. al.        Standards Track                    [Page 16]
  899.  
  900. RFC 2326              Real Time Streaming Protocol            April 1998
  901.  
  902.  
  903.    smpte-range  =   smpte-type "=" smpte-time "-" [ smpte-time ]
  904.    smpte-type   =   "smpte" | "smpte-30-drop" | "smpte-25"
  905.                                    ; other timecodes may be added
  906.    smpte-time   =   1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT [ ":" 1*2DIGIT ]
  907.                        [ "." 1*2DIGIT ]
  908.  
  909.    Examples:
  910.      smpte=10:12:33:20-
  911.      smpte=10:07:33-
  912.      smpte=10:07:00-10:07:33:05.01
  913.      smpte-25=10:07:00-10:07:33:05.01
  914.  
  915. 3.6 Normal Play Time
  916.  
  917.    Normal play time (NPT) indicates the stream absolute position
  918.    relative to the beginning of the presentation. The timestamp consists
  919.    of a decimal fraction. The part left of the decimal may be expressed
  920.    in either seconds or hours, minutes, and seconds. The part right of
  921.    the decimal point measures fractions of a second.
  922.  
  923.    The beginning of a presentation corresponds to 0.0 seconds. Negative
  924.    values are not defined. The special constant now is defined as the
  925.    current instant of a live event. It may be used only for live events.
  926.  
  927.    NPT is defined as in DSM-CC: "Intuitively, NPT is the clock the
  928.    viewer associates with a program. It is often digitally displayed on
  929.    a VCR. NPT advances normally when in normal play mode (scale = 1),
  930.    advances at a faster rate when in fast scan forward (high positive
  931.    scale ratio), decrements when in scan reverse (high negative scale
  932.    ratio) and is fixed in pause mode. NPT is (logically) equivalent to
  933.    SMPTE time codes." [5]
  934.  
  935.    npt-range    =   ( npt-time "-" [ npt-time ] ) | ( "-" npt-time )
  936.    npt-time     =   "now" | npt-sec | npt-hhmmss
  937.    npt-sec      =   1*DIGIT [ "." *DIGIT ]
  938.    npt-hhmmss   =   npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ]
  939.    npt-hh       =   1*DIGIT     ; any positive number
  940.    npt-mm       =   1*2DIGIT    ; 0-59
  941.    npt-ss       =   1*2DIGIT    ; 0-59
  942.  
  943.    Examples:
  944.      npt=123.45-125
  945.      npt=12:05:35.3-
  946.      npt=now-
  947.  
  948.      The syntax conforms to ISO 8601. The npt-sec notation is optimized
  949.      for automatic generation, the ntp-hhmmss notation for consumption
  950.      by human readers. The "now" constant allows clients to request to
  951.  
  952.  
  953.  
  954. Schulzrinne, et. al.        Standards Track                    [Page 17]
  955.  
  956. RFC 2326              Real Time Streaming Protocol            April 1998
  957.  
  958.  
  959.      receive the live feed rather than the stored or time-delayed
  960.      version. This is needed since neither absolute time nor zero time
  961.      are appropriate for this case.
  962.  
  963. 3.7 Absolute Time
  964.  
  965.      Absolute time is expressed as ISO 8601 timestamps, using UTC (GMT).
  966.      Fractions of a second may be indicated.
  967.  
  968.      utc-range    =   "clock" "=" utc-time "-" [ utc-time ]
  969.      utc-time     =   utc-date "T" utc-time "Z"
  970.      utc-date     =   8DIGIT                    ; < YYYYMMDD >
  971.      utc-time     =   6DIGIT [ "." fraction ]   ; < HHMMSS.fraction >
  972.  
  973.      Example for November 8, 1996 at 14h37 and 20 and a quarter seconds
  974.      UTC:
  975.  
  976.      19961108T143720.25Z
  977.  
  978. 3.8 Option Tags
  979.  
  980.    Option tags are unique identifiers used to designate new options in
  981.    RTSP. These tags are used in Require (Section 12.32) and Proxy-
  982.    Require (Section 12.27) header fields.
  983.  
  984.    Syntax:
  985.  
  986.      option-tag   =   1*xchar
  987.  
  988.    The creator of a new RTSP option should either prefix the option with
  989.    a reverse domain name (e.g., "com.foo.mynewfeature" is an apt name
  990.    for a feature whose inventor can be reached at "foo.com"), or
  991.    register the new option with the Internet Assigned Numbers Authority
  992.    (IANA).
  993.  
  994. 3.8.1 Registering New Option Tags with IANA
  995.  
  996.    When registering a new RTSP option, the following information should
  997.    be provided:
  998.  
  999.      * Name and description of option. The name may be of any length,
  1000.        but SHOULD be no more than twenty characters long. The name MUST
  1001.        not contain any spaces, control characters or periods.
  1002.      * Indication of who has change control over the option (for
  1003.        example, IETF, ISO, ITU-T, other international standardization
  1004.        bodies, a consortium or a particular company or group of
  1005.        companies);
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Schulzrinne, et. al.        Standards Track                    [Page 18]
  1011.  
  1012. RFC 2326              Real Time Streaming Protocol            April 1998
  1013.  
  1014.  
  1015.      * A reference to a further description, if available, for example
  1016.        (in order of preference) an RFC, a published paper, a patent
  1017.        filing, a technical report, documented source code or a computer
  1018.        manual;
  1019.      * For proprietary options, contact information (postal and email
  1020.        address);
  1021.  
  1022. 4 RTSP Message
  1023.  
  1024.    RTSP is a text-based protocol and uses the ISO 10646 character set in
  1025.    UTF-8 encoding (RFC 2279 [21]). Lines are terminated by CRLF, but
  1026.    receivers should be prepared to also interpret CR and LF by
  1027.    themselves as line terminators.
  1028.  
  1029.      Text-based protocols make it easier to add optional parameters in a
  1030.      self-describing manner. Since the number of parameters and the
  1031.      frequency of commands is low, processing efficiency is not a
  1032.      concern. Text-based protocols, if done carefully, also allow easy
  1033.      implementation of research prototypes in scripting languages such
  1034.      as Tcl, Visual Basic and Perl.
  1035.  
  1036.      The 10646 character set avoids tricky character set switching, but
  1037.      is invisible to the application as long as US-ASCII is being used.
  1038.      This is also the encoding used for RTCP. ISO 8859-1 translates
  1039.      directly into Unicode with a high-order octet of zero. ISO 8859-1
  1040.      characters with the most-significant bit set are represented as
  1041.      1100001x 10xxxxxx. (See RFC 2279 [21])
  1042.  
  1043.    RTSP messages can be carried over any lower-layer transport protocol
  1044.    that is 8-bit clean.
  1045.  
  1046.    Requests contain methods, the object the method is operating upon and
  1047.    parameters to further describe the method. Methods are idempotent,
  1048.    unless otherwise noted. Methods are also designed to require little
  1049.    or no state maintenance at the media server.
  1050.  
  1051. 4.1 Message Types
  1052.  
  1053.    See [H4.1]
  1054.  
  1055. 4.2 Message Headers
  1056.  
  1057.    See [H4.2]
  1058.  
  1059. 4.3 Message Body
  1060.  
  1061.    See [H4.3]
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Schulzrinne, et. al.        Standards Track                    [Page 19]
  1067.  
  1068. RFC 2326              Real Time Streaming Protocol            April 1998
  1069.  
  1070.  
  1071. 4.4 Message Length
  1072.  
  1073.    When a message body is included with a message, the length of that
  1074.    body is determined by one of the following (in order of precedence):
  1075.  
  1076.    1.     Any response message which MUST NOT include a message body
  1077.           (such as the 1xx, 204, and 304 responses) is always terminated
  1078.           by the first empty line after the header fields, regardless of
  1079.           the entity-header fields present in the message. (Note: An
  1080.           empty line consists of only CRLF.)
  1081.  
  1082.    2.     If a Content-Length header field (section 12.14) is present,
  1083.           its value in bytes represents the length of the message-body.
  1084.           If this header field is not present, a value of zero is
  1085.           assumed.
  1086.  
  1087.    3.     By the server closing the connection. (Closing the connection
  1088.           cannot be used to indicate the end of a request body, since
  1089.           that would leave no possibility for the server to send back a
  1090.           response.)
  1091.  
  1092.    Note that RTSP does not (at present) support the HTTP/1.1 "chunked"
  1093.    transfer coding(see [H3.6]) and requires the presence of the
  1094.    Content-Length header field.
  1095.  
  1096.      Given the moderate length of presentation descriptions returned,
  1097.      the server should always be able to determine its length, even if
  1098.      it is generated dynamically, making the chunked transfer encoding
  1099.      unnecessary. Even though Content-Length must be present if there is
  1100.      any entity body, the rules ensure reasonable behavior even if the
  1101.      length is not given explicitly.
  1102.  
  1103. 5 General Header Fields
  1104.  
  1105.    See [H4.5], except that Pragma, Transfer-Encoding and Upgrade headers
  1106.    are not defined:
  1107.  
  1108.       general-header     =     Cache-Control     ; Section 12.8
  1109.                          |     Connection        ; Section 12.10
  1110.                          |     Date              ; Section 12.18
  1111.                          |     Via               ; Section 12.43
  1112.  
  1113. 6 Request
  1114.  
  1115.    A request message from a client to a server or vice versa includes,
  1116.    within the first line of that message, the method to be applied to
  1117.    the resource, the identifier of the resource, and the protocol
  1118.    version in use.
  1119.  
  1120.  
  1121.  
  1122. Schulzrinne, et. al.        Standards Track                    [Page 20]
  1123.  
  1124. RFC 2326              Real Time Streaming Protocol            April 1998
  1125.  
  1126.  
  1127.        Request      =       Request-Line          ; Section 6.1
  1128.                     *(      general-header        ; Section 5
  1129.                     |       request-header        ; Section 6.2
  1130.                     |       entity-header )       ; Section 8.1
  1131.                             CRLF
  1132.                             [ message-body ]      ; Section 4.3
  1133.  
  1134. 6.1 Request Line
  1135.  
  1136.   Request-Line = Method SP Request-URI SP RTSP-Version CRLF
  1137.  
  1138.    Method         =         "DESCRIBE"              ; Section 10.2
  1139.                   |         "ANNOUNCE"              ; Section 10.3
  1140.                   |         "GET_PARAMETER"         ; Section 10.8
  1141.                   |         "OPTIONS"               ; Section 10.1
  1142.                   |         "PAUSE"                 ; Section 10.6
  1143.                   |         "PLAY"                  ; Section 10.5
  1144.                   |         "RECORD"                ; Section 10.11
  1145.                   |         "REDIRECT"              ; Section 10.10
  1146.                   |         "SETUP"                 ; Section 10.4
  1147.                   |         "SET_PARAMETER"         ; Section 10.9
  1148.                   |         "TEARDOWN"              ; Section 10.7
  1149.                   |         extension-method
  1150.  
  1151.   extension-method = token
  1152.  
  1153.   Request-URI = "*" | absolute_URI
  1154.  
  1155.   RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT
  1156.  
  1157. 6.2 Request Header Fields
  1158.  
  1159.   request-header  =          Accept                   ; Section 12.1
  1160.                   |          Accept-Encoding          ; Section 12.2
  1161.                   |          Accept-Language          ; Section 12.3
  1162.                   |          Authorization            ; Section 12.5
  1163.                   |          From                     ; Section 12.20
  1164.                   |          If-Modified-Since        ; Section 12.23
  1165.                   |          Range                    ; Section 12.29
  1166.                   |          Referer                  ; Section 12.30
  1167.                   |          User-Agent               ; Section 12.41
  1168.  
  1169.    Note that in contrast to HTTP/1.1 [2], RTSP requests always contain
  1170.    the absolute URL (that is, including the scheme, host and port)
  1171.    rather than just the absolute path.
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Schulzrinne, et. al.        Standards Track                    [Page 21]
  1179.  
  1180. RFC 2326              Real Time Streaming Protocol            April 1998
  1181.  
  1182.  
  1183.      HTTP/1.1 requires servers to understand the absolute URL, but
  1184.      clients are supposed to use the Host request header. This is purely
  1185.      needed for backward-compatibility with HTTP/1.0 servers, a
  1186.      consideration that does not apply to RTSP.
  1187.  
  1188.    The asterisk "*" in the Request-URI means that the request does not
  1189.    apply to a particular resource, but to the server itself, and is only
  1190.    allowed when the method used does not necessarily apply to a
  1191.    resource.  One example would be:
  1192.  
  1193.      OPTIONS * RTSP/1.0
  1194.  
  1195. 7 Response
  1196.  
  1197.    [H6] applies except that HTTP-Version is replaced by RTSP-Version.
  1198.    Also, RTSP defines additional status codes and does not define some
  1199.    HTTP codes. The valid response codes and the methods they can be used
  1200.    with are defined in Table 1.
  1201.  
  1202.    After receiving and interpreting a request message, the recipient
  1203.    responds with an RTSP response message.
  1204.  
  1205.      Response    =     Status-Line         ; Section 7.1
  1206.                  *(    general-header      ; Section 5
  1207.                  |     response-header     ; Section 7.1.2
  1208.                  |     entity-header )     ; Section 8.1
  1209.                        CRLF
  1210.                        [ message-body ]    ; Section 4.3
  1211.  
  1212. 7.1 Status-Line
  1213.  
  1214.    The first line of a Response message is the Status-Line, consisting
  1215.    of the protocol version followed by a numeric status code, and the
  1216.    textual phrase associated with the status code, with each element
  1217.    separated by SP characters. No CR or LF is allowed except in the
  1218.    final CRLF sequence.
  1219.  
  1220.    Status-Line =   RTSP-Version SP Status-Code SP Reason-Phrase CRLF
  1221.  
  1222. 7.1.1 Status Code and Reason Phrase
  1223.  
  1224.    The Status-Code element is a 3-digit integer result code of the
  1225.    attempt to understand and satisfy the request. These codes are fully
  1226.    defined in Section 11. The Reason-Phrase is intended to give a short
  1227.    textual description of the Status-Code. The Status-Code is intended
  1228.    for use by automata and the Reason-Phrase is intended for the human
  1229.    user. The client is not required to examine or display the Reason-
  1230.    Phrase.
  1231.  
  1232.  
  1233.  
  1234. Schulzrinne, et. al.        Standards Track                    [Page 22]
  1235.  
  1236. RFC 2326              Real Time Streaming Protocol            April 1998
  1237.  
  1238.  
  1239.    The first digit of the Status-Code defines the class of response. The
  1240.    last two digits do not have any categorization role. There are 5
  1241.    values for the first digit:
  1242.  
  1243.      * 1xx: Informational - Request received, continuing process
  1244.      * 2xx: Success - The action was successfully received, understood,
  1245.        and accepted
  1246.      * 3xx: Redirection - Further action must be taken in order to
  1247.        complete the request
  1248.      * 4xx: Client Error - The request contains bad syntax or cannot be
  1249.        fulfilled
  1250.      * 5xx: Server Error - The server failed to fulfill an apparently
  1251.        valid request
  1252.  
  1253.    The individual values of the numeric status codes defined for
  1254.    RTSP/1.0, and an example set of corresponding Reason-Phrase's, are
  1255.    presented below. The reason phrases listed here are only recommended
  1256.    - they may be replaced by local equivalents without affecting the
  1257.    protocol. Note that RTSP adopts most HTTP/1.1 [2] status codes and
  1258.    adds RTSP-specific status codes starting at x50 to avoid conflicts
  1259.    with newly defined HTTP status codes.
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Schulzrinne, et. al.        Standards Track                    [Page 23]
  1291.  
  1292. RFC 2326              Real Time Streaming Protocol            April 1998
  1293.  
  1294.  
  1295.    Status-Code  =     "100"      ; Continue
  1296.                 |     "200"      ; OK
  1297.                 |     "201"      ; Created
  1298.                 |     "250"      ; Low on Storage Space
  1299.                 |     "300"      ; Multiple Choices
  1300.                 |     "301"      ; Moved Permanently
  1301.                 |     "302"      ; Moved Temporarily
  1302.                 |     "303"      ; See Other
  1303.                 |     "304"      ; Not Modified
  1304.                 |     "305"      ; Use Proxy
  1305.                 |     "400"      ; Bad Request
  1306.                 |     "401"      ; Unauthorized
  1307.                 |     "402"      ; Payment Required
  1308.                 |     "403"      ; Forbidden
  1309.                 |     "404"      ; Not Found
  1310.                 |     "405"      ; Method Not Allowed
  1311.                 |     "406"      ; Not Acceptable
  1312.                 |     "407"      ; Proxy Authentication Required
  1313.                 |     "408"      ; Request Time-out
  1314.                 |     "410"      ; Gone
  1315.                 |     "411"      ; Length Required
  1316.                 |     "412"      ; Precondition Failed
  1317.                 |     "413"      ; Request Entity Too Large
  1318.                 |     "414"      ; Request-URI Too Large
  1319.                 |     "415"      ; Unsupported Media Type
  1320.                 |     "451"      ; Parameter Not Understood
  1321.                 |     "452"      ; Conference Not Found
  1322.                 |     "453"      ; Not Enough Bandwidth
  1323.                 |     "454"      ; Session Not Found
  1324.                 |     "455"      ; Method Not Valid in This State
  1325.                 |     "456"      ; Header Field Not Valid for Resource
  1326.                 |     "457"      ; Invalid Range
  1327.                 |     "458"      ; Parameter Is Read-Only
  1328.                 |     "459"      ; Aggregate operation not allowed
  1329.                 |     "460"      ; Only aggregate operation allowed
  1330.                 |     "461"      ; Unsupported transport
  1331.                 |     "462"      ; Destination unreachable
  1332.                 |     "500"      ; Internal Server Error
  1333.                 |     "501"      ; Not Implemented
  1334.                 |     "502"      ; Bad Gateway
  1335.                 |     "503"      ; Service Unavailable
  1336.                 |     "504"      ; Gateway Time-out
  1337.                 |     "505"      ; RTSP Version not supported
  1338.                 |     "551"      ; Option not supported
  1339.                 |     extension-code
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Schulzrinne, et. al.        Standards Track                    [Page 24]
  1347.  
  1348. RFC 2326              Real Time Streaming Protocol            April 1998
  1349.  
  1350.  
  1351.    extension-code  =     3DIGIT
  1352.  
  1353.    Reason-Phrase  =     *<TEXT, excluding CR, LF>
  1354.  
  1355.    RTSP status codes are extensible. RTSP applications are not required
  1356.    to understand the meaning of all registered status codes, though such
  1357.    understanding is obviously desirable. However, applications MUST
  1358.    understand the class of any status code, as indicated by the first
  1359.    digit, and treat any unrecognized response as being equivalent to the
  1360.    x00 status code of that class, with the exception that an
  1361.    unrecognized response MUST NOT be cached. For example, if an
  1362.    unrecognized status code of 431 is received by the client, it can
  1363.    safely assume that there was something wrong with its request and
  1364.    treat the response as if it had received a 400 status code. In such
  1365.    cases, user agents SHOULD present to the user the entity returned
  1366.    with the response, since that entity is likely to include human-
  1367.    readable information which will explain the unusual status.
  1368.  
  1369.    Code           reason
  1370.  
  1371.    100            Continue                         all
  1372.  
  1373.    200            OK                               all
  1374.    201            Created                          RECORD
  1375.    250            Low on Storage Space             RECORD
  1376.  
  1377.    300            Multiple Choices                 all
  1378.    301            Moved Permanently                all
  1379.    302            Moved Temporarily                all
  1380.    303            See Other                        all
  1381.    305            Use Proxy                        all
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Schulzrinne, et. al.        Standards Track                    [Page 25]
  1403.  
  1404. RFC 2326              Real Time Streaming Protocol            April 1998
  1405.  
  1406.  
  1407.    400            Bad Request                      all
  1408.    401            Unauthorized                     all
  1409.    402            Payment Required                 all
  1410.    403            Forbidden                        all
  1411.    404            Not Found                        all
  1412.    405            Method Not Allowed               all
  1413.    406            Not Acceptable                   all
  1414.    407            Proxy Authentication Required    all
  1415.    408            Request Timeout                  all
  1416.    410            Gone                             all
  1417.    411            Length Required                  all
  1418.    412            Precondition Failed              DESCRIBE, SETUP
  1419.    413            Request Entity Too Large         all
  1420.    414            Request-URI Too Long             all
  1421.    415            Unsupported Media Type           all
  1422.    451            Invalid parameter                SETUP
  1423.    452            Illegal Conference Identifier    SETUP
  1424.    453            Not Enough Bandwidth             SETUP
  1425.    454            Session Not Found                all
  1426.    455            Method Not Valid In This State   all
  1427.    456            Header Field Not Valid           all
  1428.    457            Invalid Range                    PLAY
  1429.    458            Parameter Is Read-Only           SET_PARAMETER
  1430.    459            Aggregate Operation Not Allowed  all
  1431.    460            Only Aggregate Operation Allowed all
  1432.    461            Unsupported Transport            all
  1433.    462            Destination Unreachable          all
  1434.  
  1435.    500            Internal Server Error            all
  1436.    501            Not Implemented                  all
  1437.    502            Bad Gateway                      all
  1438.    503            Service Unavailable              all
  1439.    504            Gateway Timeout                  all
  1440.    505            RTSP Version Not Supported       all
  1441.    551            Option not support               all
  1442.  
  1443.  
  1444.       Table 1: Status codes and their usage with RTSP methods
  1445.  
  1446. 7.1.2 Response Header Fields
  1447.  
  1448.    The response-header fields allow the request recipient to pass
  1449.    additional information about the response which cannot be placed in
  1450.    the Status-Line. These header fields give information about the
  1451.    server and about further access to the resource identified by the
  1452.    Request-URI.
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Schulzrinne, et. al.        Standards Track                    [Page 26]
  1459.  
  1460. RFC 2326              Real Time Streaming Protocol            April 1998
  1461.  
  1462.  
  1463.    response-header  =     Location             ; Section 12.25
  1464.                     |     Proxy-Authenticate   ; Section 12.26
  1465.                     |     Public               ; Section 12.28
  1466.                     |     Retry-After          ; Section 12.31
  1467.                     |     Server               ; Section 12.36
  1468.                     |     Vary                 ; Section 12.42
  1469.                     |     WWW-Authenticate     ; Section 12.44
  1470.  
  1471.    Response-header field names can be extended reliably only in
  1472.    combination with a change in the protocol version. However, new or
  1473.    experimental header fields MAY be given the semantics of response-
  1474.    header fields if all parties in the communication recognize them to
  1475.    be response-header fields. Unrecognized header fields are treated as
  1476.    entity-header fields.
  1477.  
  1478. 8 Entity
  1479.  
  1480.    Request and Response messages MAY transfer an entity if not otherwise
  1481.    restricted by the request method or response status code. An entity
  1482.    consists of entity-header fields and an entity-body, although some
  1483.    responses will only include the entity-headers.
  1484.  
  1485.    In this section, both sender and recipient refer to either the client
  1486.    or the server, depending on who sends and who receives the entity.
  1487.  
  1488. 8.1 Entity Header Fields
  1489.  
  1490.    Entity-header fields define optional metainformation about the
  1491.    entity-body or, if no body is present, about the resource identified
  1492.    by the request.
  1493.  
  1494.      entity-header       =    Allow               ; Section 12.4
  1495.                          |    Content-Base        ; Section 12.11
  1496.                          |    Content-Encoding    ; Section 12.12
  1497.                          |    Content-Language    ; Section 12.13
  1498.                          |    Content-Length      ; Section 12.14
  1499.                          |    Content-Location    ; Section 12.15
  1500.                          |    Content-Type        ; Section 12.16
  1501.                          |    Expires             ; Section 12.19
  1502.                          |    Last-Modified       ; Section 12.24
  1503.                          |    extension-header
  1504.      extension-header    =    message-header
  1505.  
  1506.    The extension-header mechanism allows additional entity-header fields
  1507.    to be defined without changing the protocol, but these fields cannot
  1508.    be assumed to be recognizable by the recipient. Unrecognized header
  1509.    fields SHOULD be ignored by the recipient and forwarded by proxies.
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Schulzrinne, et. al.        Standards Track                    [Page 27]
  1515.  
  1516. RFC 2326              Real Time Streaming Protocol            April 1998
  1517.  
  1518.  
  1519. 8.2 Entity Body
  1520.  
  1521.    See [H7.2]
  1522.  
  1523. 9 Connections
  1524.  
  1525.    RTSP requests can be transmitted in several different ways:
  1526.  
  1527.      * persistent transport connections used for several
  1528.        request-response transactions;
  1529.      * one connection per request/response transaction;
  1530.      * connectionless mode.
  1531.  
  1532.    The type of transport connection is defined by the RTSP URI (Section
  1533.    3.2). For the scheme "rtsp", a persistent connection is assumed,
  1534.    while the scheme "rtspu" calls for RTSP requests to be sent without
  1535.    setting up a connection.
  1536.  
  1537.    Unlike HTTP, RTSP allows the media server to send requests to the
  1538.    media client. However, this is only supported for persistent
  1539.    connections, as the media server otherwise has no reliable way of
  1540.    reaching the client. Also, this is the only way that requests from
  1541.    media server to client are likely to traverse firewalls.
  1542.  
  1543. 9.1 Pipelining
  1544.  
  1545.    A client that supports persistent connections or connectionless mode
  1546.    MAY "pipeline" its requests (i.e., send multiple requests without
  1547.    waiting for each response). A server MUST send its responses to those
  1548.    requests in the same order that the requests were received.
  1549.  
  1550. 9.2 Reliability and Acknowledgements
  1551.  
  1552.    Requests are acknowledged by the receiver unless they are sent to a
  1553.    multicast group. If there is no acknowledgement, the sender may
  1554.    resend the same message after a timeout of one round-trip time (RTT).
  1555.    The round-trip time is estimated as in TCP (RFC 1123) [18], with an
  1556.    initial round-trip value of 500 ms. An implementation MAY cache the
  1557.    last RTT measurement as the initial value for future connections.
  1558.  
  1559.    If a reliable transport protocol is used to carry RTSP, requests MUST
  1560.    NOT be retransmitted; the RTSP application MUST instead rely on the
  1561.    underlying transport to provide reliability.
  1562.  
  1563.      If both the underlying reliable transport such as TCP and the RTSP
  1564.      application retransmit requests, it is possible that each packet
  1565.      loss results in two retransmissions. The receiver cannot typically
  1566.      take advantage of the application-layer retransmission since the
  1567.  
  1568.  
  1569.  
  1570. Schulzrinne, et. al.        Standards Track                    [Page 28]
  1571.  
  1572. RFC 2326              Real Time Streaming Protocol            April 1998
  1573.  
  1574.  
  1575.      transport stack will not deliver the application-layer
  1576.      retransmission before the first attempt has reached the receiver.
  1577.      If the packet loss is caused by congestion, multiple
  1578.      retransmissions at different layers will exacerbate the congestion.
  1579.  
  1580.      If RTSP is used over a small-RTT LAN, standard procedures for
  1581.      optimizing initial TCP round trip estimates, such as those used in
  1582.      T/TCP (RFC 1644) [22], can be beneficial.
  1583.  
  1584.    The Timestamp header (Section 12.38) is used to avoid the
  1585.    retransmission ambiguity problem [23, p. 301] and obviates the need
  1586.    for Karn's algorithm.
  1587.  
  1588.    Each request carries a sequence number in the CSeq header (Section
  1589.    12.17), which is incremented by one for each distinct request
  1590.    transmitted. If a request is repeated because of lack of
  1591.    acknowledgement, the request MUST carry the original sequence number
  1592.    (i.e., the sequence number is not incremented).
  1593.  
  1594.    Systems implementing RTSP MUST support carrying RTSP over TCP and MAY
  1595.    support UDP. The default port for the RTSP server is 554 for both UDP
  1596.    and TCP.
  1597.  
  1598.    A number of RTSP packets destined for the same control end point may
  1599.    be packed into a single lower-layer PDU or encapsulated into a TCP
  1600.    stream. RTSP data MAY be interleaved with RTP and RTCP packets.
  1601.    Unlike HTTP, an RTSP message MUST contain a Content-Length header
  1602.    whenever that message contains a payload. Otherwise, an RTSP packet
  1603.    is terminated with an empty line immediately following the last
  1604.    message header.
  1605.  
  1606. 10 Method Definitions
  1607.  
  1608.    The method token indicates the method to be performed on the resource
  1609.    identified by the Request-URI. The method is case-sensitive.  New
  1610.    methods may be defined in the future. Method names may not start with
  1611.    a $ character (decimal 24) and must be a token. Methods are
  1612.    summarized in Table 2.
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Schulzrinne, et. al.        Standards Track                    [Page 29]
  1627.  
  1628. RFC 2326              Real Time Streaming Protocol            April 1998
  1629.  
  1630.  
  1631.       method            direction        object     requirement
  1632.       DESCRIBE          C->S             P,S        recommended
  1633.       ANNOUNCE          C->S, S->C       P,S        optional
  1634.       GET_PARAMETER     C->S, S->C       P,S        optional
  1635.       OPTIONS           C->S, S->C       P,S        required
  1636.                                                     (S->C: optional)
  1637.       PAUSE             C->S             P,S        recommended
  1638.       PLAY              C->S             P,S        required
  1639.       RECORD            C->S             P,S        optional
  1640.       REDIRECT          S->C             P,S        optional
  1641.       SETUP             C->S             S          required
  1642.       SET_PARAMETER     C->S, S->C       P,S        optional
  1643.       TEARDOWN          C->S             P,S        required
  1644.  
  1645.       Table 2: Overview of RTSP methods, their direction, and what
  1646.       objects (P: presentation, S: stream) they operate on
  1647.  
  1648.    Notes on Table 2: PAUSE is recommended, but not required in that a
  1649.    fully functional server can be built that does not support this
  1650.    method, for example, for live feeds. If a server does not support a
  1651.    particular method, it MUST return "501 Not Implemented" and a client
  1652.    SHOULD not try this method again for this server.
  1653.  
  1654. 10.1 OPTIONS
  1655.  
  1656.    The behavior is equivalent to that described in [H9.2]. An OPTIONS
  1657.    request may be issued at any time, e.g., if the client is about to
  1658.    try a nonstandard request. It does not influence server state.
  1659.  
  1660.    Example:
  1661.  
  1662.      C->S:  OPTIONS * RTSP/1.0
  1663.             CSeq: 1
  1664.             Require: implicit-play
  1665.             Proxy-Require: gzipped-messages
  1666.  
  1667.      S->C:  RTSP/1.0 200 OK
  1668.             CSeq: 1
  1669.             Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
  1670.  
  1671.    Note that these are necessarily fictional features (one would hope
  1672.    that we would not purposefully overlook a truly useful feature just
  1673.    so that we could have a strong example in this section).
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Schulzrinne, et. al.        Standards Track                    [Page 30]
  1683.  
  1684. RFC 2326              Real Time Streaming Protocol            April 1998
  1685.  
  1686.  
  1687. 10.2 DESCRIBE
  1688.  
  1689.    The DESCRIBE method retrieves the description of a presentation or
  1690.    media object identified by the request URL from a server. It may use
  1691.    the Accept header to specify the description formats that the client
  1692.    understands. The server responds with a description of the requested
  1693.    resource. The DESCRIBE reply-response pair constitutes the media
  1694.    initialization phase of RTSP.
  1695.  
  1696.    Example:
  1697.  
  1698.      C->S: DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0
  1699.            CSeq: 312
  1700.            Accept: application/sdp, application/rtsl, application/mheg
  1701.  
  1702.      S->C: RTSP/1.0 200 OK
  1703.            CSeq: 312
  1704.            Date: 23 Jan 1997 15:35:06 GMT
  1705.            Content-Type: application/sdp
  1706.            Content-Length: 376
  1707.  
  1708.            v=0
  1709.            o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
  1710.            s=SDP Seminar
  1711.            i=A Seminar on the session description protocol
  1712.            u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
  1713.            e=mjh@isi.edu (Mark Handley)
  1714.            c=IN IP4 224.2.17.12/127
  1715.            t=2873397496 2873404696
  1716.            a=recvonly
  1717.            m=audio 3456 RTP/AVP 0
  1718.            m=video 2232 RTP/AVP 31
  1719.            m=whiteboard 32416 UDP WB
  1720.            a=orient:portrait
  1721.  
  1722.    The DESCRIBE response MUST contain all media initialization
  1723.    information for the resource(s) that it describes. If a media client
  1724.    obtains a presentation description from a source other than DESCRIBE
  1725.    and that description contains a complete set of media initialization
  1726.    parameters, the client SHOULD use those parameters and not then
  1727.    request a description for the same media via RTSP.
  1728.  
  1729.    Additionally, servers SHOULD NOT use the DESCRIBE response as a means
  1730.    of media indirection.
  1731.  
  1732.      Clear ground rules need to be established so that clients have an
  1733.      unambiguous means of knowing when to request media initialization
  1734.      information via DESCRIBE, and when not to. By forcing a DESCRIBE
  1735.  
  1736.  
  1737.  
  1738. Schulzrinne, et. al.        Standards Track                    [Page 31]
  1739.  
  1740. RFC 2326              Real Time Streaming Protocol            April 1998
  1741.  
  1742.  
  1743.      response to contain all media initialization for the set of streams
  1744.      that it describes, and discouraging use of DESCRIBE for media
  1745.      indirection, we avoid looping problems that might result from other
  1746.      approaches.
  1747.  
  1748.      Media initialization is a requirement for any RTSP-based system,
  1749.      but the RTSP specification does not dictate that this must be done
  1750.      via the DESCRIBE method. There are three ways that an RTSP client
  1751.      may receive initialization information:
  1752.  
  1753.      * via RTSP's DESCRIBE method;
  1754.      * via some other protocol (HTTP, email attachment, etc.);
  1755.      * via the command line or standard input (thus working as a browser
  1756.        helper application launched with an SDP file or other media
  1757.        initialization format).
  1758.  
  1759.      In the interest of practical interoperability, it is highly
  1760.      recommended that minimal servers support the DESCRIBE method, and
  1761.      highly recommended that minimal clients support the ability to act
  1762.      as a "helper application" that accepts a media initialization file
  1763.      from standard input, command line, and/or other means that are
  1764.      appropriate to the operating environment of the client.
  1765.  
  1766. 10.3 ANNOUNCE
  1767.  
  1768.    The ANNOUNCE method serves two purposes:
  1769.  
  1770.    When sent from client to server, ANNOUNCE posts the description of a
  1771.    presentation or media object identified by the request URL to a
  1772.    server. When sent from server to client, ANNOUNCE updates the session
  1773.    description in real-time.
  1774.  
  1775.    If a new media stream is added to a presentation (e.g., during a live
  1776.    presentation), the whole presentation description should be sent
  1777.    again, rather than just the additional components, so that components
  1778.    can be deleted.
  1779.  
  1780.    Example:
  1781.  
  1782.      C->S: ANNOUNCE rtsp://server.example.com/fizzle/foo RTSP/1.0
  1783.            CSeq: 312
  1784.            Date: 23 Jan 1997 15:35:06 GMT
  1785.            Session: 47112344
  1786.            Content-Type: application/sdp
  1787.            Content-Length: 332
  1788.  
  1789.            v=0
  1790.            o=mhandley 2890844526 2890845468 IN IP4 126.16.64.4
  1791.  
  1792.  
  1793.  
  1794. Schulzrinne, et. al.        Standards Track                    [Page 32]
  1795.  
  1796. RFC 2326              Real Time Streaming Protocol            April 1998
  1797.  
  1798.  
  1799.            s=SDP Seminar
  1800.            i=A Seminar on the session description protocol
  1801.            u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
  1802.            e=mjh@isi.edu (Mark Handley)
  1803.            c=IN IP4 224.2.17.12/127
  1804.            t=2873397496 2873404696
  1805.            a=recvonly
  1806.            m=audio 3456 RTP/AVP 0
  1807.            m=video 2232 RTP/AVP 31
  1808.  
  1809.      S->C: RTSP/1.0 200 OK
  1810.            CSeq: 312
  1811.  
  1812. 10.4 SETUP
  1813.  
  1814.    The SETUP request for a URI specifies the transport mechanism to be
  1815.    used for the streamed media. A client can issue a SETUP request for a
  1816.    stream that is already playing to change transport parameters, which
  1817.    a server MAY allow. If it does not allow this, it MUST respond with
  1818.    error "455 Method Not Valid In This State". For the benefit of any
  1819.    intervening firewalls, a client must indicate the transport
  1820.    parameters even if it has no influence over these parameters, for
  1821.    example, where the server advertises a fixed multicast address.
  1822.  
  1823.      Since SETUP includes all transport initialization information,
  1824.      firewalls and other intermediate network devices (which need this
  1825.      information) are spared the more arduous task of parsing the
  1826.      DESCRIBE response, which has been reserved for media
  1827.      initialization.
  1828.  
  1829.    The Transport header specifies the transport parameters acceptable to
  1830.    the client for data transmission; the response will contain the
  1831.    transport parameters selected by the server.
  1832.  
  1833.     C->S: SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0
  1834.           CSeq: 302
  1835.           Transport: RTP/AVP;unicast;client_port=4588-4589
  1836.  
  1837.     S->C: RTSP/1.0 200 OK
  1838.           CSeq: 302
  1839.           Date: 23 Jan 1997 15:35:06 GMT
  1840.           Session: 47112344
  1841.           Transport: RTP/AVP;unicast;
  1842.             client_port=4588-4589;server_port=6256-6257
  1843.  
  1844.    The server generates session identifiers in response to SETUP
  1845.    requests. If a SETUP request to a server includes a session
  1846.    identifier, the server MUST bundle this setup request into the
  1847.  
  1848.  
  1849.  
  1850. Schulzrinne, et. al.        Standards Track                    [Page 33]
  1851.  
  1852. RFC 2326              Real Time Streaming Protocol            April 1998
  1853.  
  1854.  
  1855.    existing session or return error "459 Aggregate Operation Not
  1856.    Allowed" (see Section 11.3.10).
  1857.  
  1858. 10.5 PLAY
  1859.  
  1860.    The PLAY method tells the server to start sending data via the
  1861.    mechanism specified in SETUP. A client MUST NOT issue a PLAY request
  1862.    until any outstanding SETUP requests have been acknowledged as
  1863.    successful.
  1864.  
  1865.    The PLAY request positions the normal play time to the beginning of
  1866.    the range specified and delivers stream data until the end of the
  1867.    range is reached. PLAY requests may be pipelined (queued); a server
  1868.    MUST queue PLAY requests to be executed in order. That is, a PLAY
  1869.    request arriving while a previous PLAY request is still active is
  1870.    delayed until the first has been completed.
  1871.  
  1872.      This allows precise editing.
  1873.  
  1874.    For example, regardless of how closely spaced the two PLAY requests
  1875.    in the example below arrive, the server will first play seconds 10
  1876.    through 15, then, immediately following, seconds 20 to 25, and
  1877.    finally seconds 30 through the end.
  1878.  
  1879.      C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0
  1880.            CSeq: 835
  1881.            Session: 12345678
  1882.            Range: npt=10-15
  1883.  
  1884.      C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0
  1885.            CSeq: 836
  1886.            Session: 12345678
  1887.            Range: npt=20-25
  1888.  
  1889.      C->S: PLAY rtsp://audio.example.com/audio RTSP/1.0
  1890.            CSeq: 837
  1891.            Session: 12345678
  1892.            Range: npt=30-
  1893.  
  1894.    See the description of the PAUSE request for further examples.
  1895.  
  1896.    A PLAY request without a Range header is legal. It starts playing a
  1897.    stream from the beginning unless the stream has been paused. If a
  1898.    stream has been paused via PAUSE, stream delivery resumes at the
  1899.    pause point. If a stream is playing, such a PLAY request causes no
  1900.    further action and can be used by the client to test server liveness.
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Schulzrinne, et. al.        Standards Track                    [Page 34]
  1907.  
  1908. RFC 2326              Real Time Streaming Protocol            April 1998
  1909.  
  1910.  
  1911.    The Range header may also contain a time parameter. This parameter
  1912.    specifies a time in UTC at which the playback should start. If the
  1913.    message is received after the specified time, playback is started
  1914.    immediately. The time parameter may be used to aid in synchronization
  1915.    of streams obtained from different sources.
  1916.  
  1917.    For a on-demand stream, the server replies with the actual range that
  1918.    will be played back. This may differ from the requested range if
  1919.    alignment of the requested range to valid frame boundaries is
  1920.    required for the media source. If no range is specified in the
  1921.    request, the current position is returned in the reply. The unit of
  1922.    the range in the reply is the same as that in the request.
  1923.  
  1924.    After playing the desired range, the presentation is automatically
  1925.    paused, as if a PAUSE request had been issued.
  1926.  
  1927.    The following example plays the whole presentation starting at SMPTE
  1928.    time code 0:10:20 until the end of the clip. The playback is to start
  1929.    at 15:36 on 23 Jan 1997.
  1930.  
  1931.      C->S: PLAY rtsp://audio.example.com/twister.en RTSP/1.0
  1932.            CSeq: 833
  1933.            Session: 12345678
  1934.            Range: smpte=0:10:20-;time=19970123T153600Z
  1935.  
  1936.      S->C: RTSP/1.0 200 OK
  1937.            CSeq: 833
  1938.            Date: 23 Jan 1997 15:35:06 GMT
  1939.            Range: smpte=0:10:22-;time=19970123T153600Z
  1940.  
  1941.    For playing back a recording of a live presentation, it may be
  1942.    desirable to use clock units:
  1943.  
  1944.      C->S: PLAY rtsp://audio.example.com/meeting.en RTSP/1.0
  1945.            CSeq: 835
  1946.            Session: 12345678
  1947.            Range: clock=19961108T142300Z-19961108T143520Z
  1948.  
  1949.      S->C: RTSP/1.0 200 OK
  1950.            CSeq: 835
  1951.            Date: 23 Jan 1997 15:35:06 GMT
  1952.  
  1953.    A media server only supporting playback MUST support the npt format
  1954.    and MAY support the clock and smpte formats.
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Schulzrinne, et. al.        Standards Track                    [Page 35]
  1963.  
  1964. RFC 2326              Real Time Streaming Protocol            April 1998
  1965.  
  1966.  
  1967. 10.6 PAUSE
  1968.  
  1969.    The PAUSE request causes the stream delivery to be interrupted
  1970.    (halted) temporarily. If the request URL names a stream, only
  1971.    playback and recording of that stream is halted. For example, for
  1972.    audio, this is equivalent to muting. If the request URL names a
  1973.    presentation or group of streams, delivery of all currently active
  1974.    streams within the presentation or group is halted. After resuming
  1975.    playback or recording, synchronization of the tracks MUST be
  1976.    maintained. Any server resources are kept, though servers MAY close
  1977.    the session and free resources after being paused for the duration
  1978.    specified with the timeout parameter of the Session header in the
  1979.    SETUP message.
  1980.  
  1981.    Example:
  1982.  
  1983.      C->S: PAUSE rtsp://example.com/fizzle/foo RTSP/1.0
  1984.            CSeq: 834
  1985.            Session: 12345678
  1986.  
  1987.      S->C: RTSP/1.0 200 OK
  1988.            CSeq: 834
  1989.            Date: 23 Jan 1997 15:35:06 GMT
  1990.  
  1991.    The PAUSE request may contain a Range header specifying when the
  1992.    stream or presentation is to be halted. We refer to this point as the
  1993.    "pause point". The header must contain exactly one value rather than
  1994.    a time range. The normal play time for the stream is set to the pause
  1995.    point. The pause request becomes effective the first time the server
  1996.    is encountering the time point specified in any of the currently
  1997.    pending PLAY requests. If the Range header specifies a time outside
  1998.    any currently pending PLAY requests, the error "457 Invalid Range" is
  1999.    returned. If a media unit (such as an audio or video frame) starts
  2000.    presentation at exactly the pause point, it is not played or
  2001.    recorded.  If the Range header is missing, stream delivery is
  2002.    interrupted immediately on receipt of the message and the pause point
  2003.    is set to the current normal play time.
  2004.  
  2005.    A PAUSE request discards all queued PLAY requests. However, the pause
  2006.    point in the media stream MUST be maintained. A subsequent PLAY
  2007.    request without Range header resumes from the pause point.
  2008.  
  2009.    For example, if the server has play requests for ranges 10 to 15 and
  2010.    20 to 29 pending and then receives a pause request for NPT 21, it
  2011.    would start playing the second range and stop at NPT 21. If the pause
  2012.    request is for NPT 12 and the server is playing at NPT 13 serving the
  2013.    first play request, the server stops immediately. If the pause
  2014.    request is for NPT 16, the server stops after completing the first
  2015.  
  2016.  
  2017.  
  2018. Schulzrinne, et. al.        Standards Track                    [Page 36]
  2019.  
  2020. RFC 2326              Real Time Streaming Protocol            April 1998
  2021.  
  2022.  
  2023.    play request and discards the second play request.
  2024.  
  2025.    As another example, if a server has received requests to play ranges
  2026.    10 to 15 and then 13 to 20 (that is, overlapping ranges), the PAUSE
  2027.    request for NPT=14 would take effect while the server plays the first
  2028.    range, with the second PLAY request effectively being ignored,
  2029.    assuming the PAUSE request arrives before the server has started
  2030.    playing the second, overlapping range. Regardless of when the PAUSE
  2031.    request arrives, it sets the NPT to 14.
  2032.  
  2033.    If the server has already sent data beyond the time specified in the
  2034.    Range header, a PLAY would still resume at that point in time, as it
  2035.    is assumed that the client has discarded data after that point. This
  2036.    ensures continuous pause/play cycling without gaps.
  2037.  
  2038. 10.7 TEARDOWN
  2039.  
  2040.    The TEARDOWN request stops the stream delivery for the given URI,
  2041.    freeing the resources associated with it. If the URI is the
  2042.    presentation URI for this presentation, any RTSP session identifier
  2043.    associated with the session is no longer valid. Unless all transport
  2044.    parameters are defined by the session description, a SETUP request
  2045.    has to be issued before the session can be played again.
  2046.  
  2047.    Example:
  2048.      C->S: TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0
  2049.            CSeq: 892
  2050.            Session: 12345678
  2051.      S->C: RTSP/1.0 200 OK
  2052.            CSeq: 892
  2053.  
  2054. 10.8 GET_PARAMETER
  2055.  
  2056.    The GET_PARAMETER request retrieves the value of a parameter of a
  2057.    presentation or stream specified in the URI. The content of the reply
  2058.    and response is left to the implementation. GET_PARAMETER with no
  2059.    entity body may be used to test client or server liveness ("ping").
  2060.  
  2061.    Example:
  2062.  
  2063.      S->C: GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0
  2064.            CSeq: 431
  2065.            Content-Type: text/parameters
  2066.            Session: 12345678
  2067.            Content-Length: 15
  2068.  
  2069.            packets_received
  2070.            jitter
  2071.  
  2072.  
  2073.  
  2074. Schulzrinne, et. al.        Standards Track                    [Page 37]
  2075.  
  2076. RFC 2326              Real Time Streaming Protocol            April 1998
  2077.  
  2078.  
  2079.      C->S: RTSP/1.0 200 OK
  2080.            CSeq: 431
  2081.            Content-Length: 46
  2082.            Content-Type: text/parameters
  2083.  
  2084.            packets_received: 10
  2085.            jitter: 0.3838
  2086.  
  2087.      The "text/parameters" section is only an example type for
  2088.      parameter. This method is intentionally loosely defined with the
  2089.      intention that the reply content and response content will be
  2090.      defined after further experimentation.
  2091.  
  2092. 10.9 SET_PARAMETER
  2093.  
  2094.      This method requests to set the value of a parameter for a
  2095.      presentation or stream specified by the URI.
  2096.  
  2097.      A request SHOULD only contain a single parameter to allow the client
  2098.      to determine why a particular request failed. If the request contains
  2099.      several parameters, the server MUST only act on the request if all of
  2100.      the parameters can be set successfully. A server MUST allow a
  2101.      parameter to be set repeatedly to the same value, but it MAY disallow
  2102.      changing parameter values.
  2103.  
  2104.      Note: transport parameters for the media stream MUST only be set with
  2105.      the SETUP command.
  2106.  
  2107.      Restricting setting transport parameters to SETUP is for the
  2108.      benefit of firewalls.
  2109.  
  2110.      The parameters are split in a fine-grained fashion so that there
  2111.      can be more meaningful error indications. However, it may make
  2112.      sense to allow the setting of several parameters if an atomic
  2113.      setting is desirable. Imagine device control where the client does
  2114.      not want the camera to pan unless it can also tilt to the right
  2115.      angle at the same time.
  2116.  
  2117.    Example:
  2118.  
  2119.      C->S: SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0
  2120.            CSeq: 421
  2121.            Content-length: 20
  2122.            Content-type: text/parameters
  2123.  
  2124.            barparam: barstuff
  2125.  
  2126.      S->C: RTSP/1.0 451 Invalid Parameter
  2127.  
  2128.  
  2129.  
  2130. Schulzrinne, et. al.        Standards Track                    [Page 38]
  2131.  
  2132. RFC 2326              Real Time Streaming Protocol            April 1998
  2133.  
  2134.  
  2135.            CSeq: 421
  2136.            Content-length: 10
  2137.            Content-type: text/parameters
  2138.  
  2139.            barparam
  2140.  
  2141.      The "text/parameters" section is only an example type for
  2142.      parameter. This method is intentionally loosely defined with the
  2143.      intention that the reply content and response content will be
  2144.      defined after further experimentation.
  2145.  
  2146. 10.10 REDIRECT
  2147.  
  2148.    A redirect request informs the client that it must connect to another
  2149.    server location. It contains the mandatory header Location, which
  2150.    indicates that the client should issue requests for that URL. It may
  2151.    contain the parameter Range, which indicates when the redirection
  2152.    takes effect. If the client wants to continue to send or receive
  2153.    media for this URI, the client MUST issue a TEARDOWN request for the
  2154.    current session and a SETUP for the new session at the designated
  2155.    host.
  2156.  
  2157.    This example request redirects traffic for this URI to the new server
  2158.    at the given play time:
  2159.  
  2160.      S->C: REDIRECT rtsp://example.com/fizzle/foo RTSP/1.0
  2161.            CSeq: 732
  2162.            Location: rtsp://bigserver.com:8001
  2163.            Range: clock=19960213T143205Z-
  2164.  
  2165. 10.11 RECORD
  2166.  
  2167.    This method initiates recording a range of media data according to
  2168.    the presentation description. The timestamp reflects start and end
  2169.    time (UTC). If no time range is given, use the start or end time
  2170.    provided in the presentation description. If the session has already
  2171.    started, commence recording immediately.
  2172.  
  2173.    The server decides whether to store the recorded data under the
  2174.    request-URI or another URI. If the server does not use the request-
  2175.    URI, the response SHOULD be 201 (Created) and contain an entity which
  2176.    describes the status of the request and refers to the new resource,
  2177.    and a Location header.
  2178.  
  2179.    A media server supporting recording of live presentations MUST
  2180.    support the clock range format; the smpte format does not make sense.
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Schulzrinne, et. al.        Standards Track                    [Page 39]
  2187.  
  2188. RFC 2326              Real Time Streaming Protocol            April 1998
  2189.  
  2190.  
  2191.    In this example, the media server was previously invited to the
  2192.    conference indicated.
  2193.  
  2194.      C->S: RECORD rtsp://example.com/meeting/audio.en RTSP/1.0
  2195.            CSeq: 954
  2196.            Session: 12345678
  2197.            Conference: 128.16.64.19/32492374
  2198.  
  2199. 10.12 Embedded (Interleaved) Binary Data
  2200.  
  2201.    Certain firewall designs and other circumstances may force a server
  2202.    to interleave RTSP methods and stream data. This interleaving should
  2203.    generally be avoided unless necessary since it complicates client and
  2204.    server operation and imposes additional overhead. Interleaved binary
  2205.    data SHOULD only be used if RTSP is carried over TCP.
  2206.  
  2207.    Stream data such as RTP packets is encapsulated by an ASCII dollar
  2208.    sign (24 hexadecimal), followed by a one-byte channel identifier,
  2209.    followed by the length of the encapsulated binary data as a binary,
  2210.    two-byte integer in network byte order. The stream data follows
  2211.    immediately afterwards, without a CRLF, but including the upper-layer
  2212.    protocol headers. Each $ block contains exactly one upper-layer
  2213.    protocol data unit, e.g., one RTP packet.
  2214.  
  2215.    The channel identifier is defined in the Transport header with the
  2216.    interleaved parameter(Section 12.39).
  2217.  
  2218.    When the transport choice is RTP, RTCP messages are also interleaved
  2219.    by the server over the TCP connection. As a default, RTCP packets are
  2220.    sent on the first available channel higher than the RTP channel. The
  2221.    client MAY explicitly request RTCP packets on another channel. This
  2222.    is done by specifying two channels in the interleaved parameter of
  2223.    the Transport header(Section 12.39).
  2224.  
  2225.      RTCP is needed for synchronization when two or more streams are
  2226.      interleaved in such a fashion. Also, this provides a convenient way
  2227.      to tunnel RTP/RTCP packets through the TCP control connection when
  2228.      required by the network configuration and transfer them onto UDP
  2229.      when possible.
  2230.  
  2231.      C->S: SETUP rtsp://foo.com/bar.file RTSP/1.0
  2232.            CSeq: 2
  2233.            Transport: RTP/AVP/TCP;interleaved=0-1
  2234.  
  2235.      S->C: RTSP/1.0 200 OK
  2236.            CSeq: 2
  2237.            Date: 05 Jun 1997 18:57:18 GMT
  2238.            Transport: RTP/AVP/TCP;interleaved=0-1
  2239.  
  2240.  
  2241.  
  2242. Schulzrinne, et. al.        Standards Track                    [Page 40]
  2243.  
  2244. RFC 2326              Real Time Streaming Protocol            April 1998
  2245.  
  2246.  
  2247.            Session: 12345678
  2248.  
  2249.      C->S: PLAY rtsp://foo.com/bar.file RTSP/1.0
  2250.            CSeq: 3
  2251.            Session: 12345678
  2252.  
  2253.      S->C: RTSP/1.0 200 OK
  2254.            CSeq: 3
  2255.            Session: 12345678
  2256.            Date: 05 Jun 1997 18:59:15 GMT
  2257.            RTP-Info: url=rtsp://foo.com/bar.file;
  2258.              seq=232433;rtptime=972948234
  2259.  
  2260.      S->C: $\000{2 byte length}{"length" bytes data, w/RTP header}
  2261.      S->C: $\000{2 byte length}{"length" bytes data, w/RTP header}
  2262.      S->C: $\001{2 byte length}{"length" bytes  RTCP packet}
  2263.  
  2264. 11 Status Code Definitions
  2265.  
  2266.    Where applicable, HTTP status [H10] codes are reused. Status codes
  2267.    that have the same meaning are not repeated here. See Table 1 for a
  2268.    listing of which status codes may be returned by which requests.
  2269.  
  2270. 11.1 Success 2xx
  2271.  
  2272. 11.1.1 250 Low on Storage Space
  2273.  
  2274.    The server returns this warning after receiving a RECORD request that
  2275.    it may not be able to fulfill completely due to insufficient storage
  2276.    space. If possible, the server should use the Range header to
  2277.    indicate what time period it may still be able to record. Since other
  2278.    processes on the server may be consuming storage space
  2279.    simultaneously, a client should take this only as an estimate.
  2280.  
  2281. 11.2 Redirection 3xx
  2282.  
  2283.    See [H10.3].
  2284.  
  2285.    Within RTSP, redirection may be used for load balancing or
  2286.    redirecting stream requests to a server topologically closer to the
  2287.    client.  Mechanisms to determine topological proximity are beyond the
  2288.    scope of this specification.
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Schulzrinne, et. al.        Standards Track                    [Page 41]
  2299.  
  2300. RFC 2326              Real Time Streaming Protocol            April 1998
  2301.  
  2302.  
  2303. 11.3 Client Error 4xx
  2304.  
  2305. 11.3.1 405 Method Not Allowed
  2306.  
  2307.    The method specified in the request is not allowed for the resource
  2308.    identified by the request URI. The response MUST include an Allow
  2309.    header containing a list of valid methods for the requested resource.
  2310.    This status code is also to be used if a request attempts to use a
  2311.    method not indicated during SETUP, e.g., if a RECORD request is
  2312.    issued even though the mode parameter in the Transport header only
  2313.    specified PLAY.
  2314.  
  2315. 11.3.2 451 Parameter Not Understood
  2316.  
  2317.    The recipient of the request does not support one or more parameters
  2318.    contained in the request.
  2319.  
  2320. 11.3.3 452 Conference Not Found
  2321.  
  2322.    The conference indicated by a Conference header field is unknown to
  2323.    the media server.
  2324.  
  2325. 11.3.4 453 Not Enough Bandwidth
  2326.  
  2327.    The request was refused because there was insufficient bandwidth.
  2328.    This may, for example, be the result of a resource reservation
  2329.    failure.
  2330.  
  2331. 11.3.5 454 Session Not Found
  2332.  
  2333.    The RTSP session identifier in the Session header is missing,
  2334.    invalid, or has timed out.
  2335.  
  2336. 11.3.6 455 Method Not Valid in This State
  2337.  
  2338.    The client or server cannot process this request in its current
  2339.    state.  The response SHOULD contain an Allow header to make error
  2340.    recovery easier.
  2341.  
  2342. 11.3.7 456 Header Field Not Valid for Resource
  2343.  
  2344.    The server could not act on a required request header. For example,
  2345.    if PLAY contains the Range header field but the stream does not allow
  2346.    seeking.
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354. Schulzrinne, et. al.        Standards Track                    [Page 42]
  2355.  
  2356. RFC 2326              Real Time Streaming Protocol            April 1998
  2357.  
  2358.  
  2359. 11.3.8 457 Invalid Range
  2360.  
  2361.    The Range value given is out of bounds, e.g., beyond the end of the
  2362.    presentation.
  2363.  
  2364. 11.3.9 458 Parameter Is Read-Only
  2365.  
  2366.    The parameter to be set by SET_PARAMETER can be read but not
  2367.    modified.
  2368.  
  2369. 11.3.10 459 Aggregate Operation Not Allowed
  2370.  
  2371.    The requested method may not be applied on the URL in question since
  2372.    it is an aggregate (presentation) URL. The method may be applied on a
  2373.    stream URL.
  2374.  
  2375. 11.3.11 460 Only Aggregate Operation Allowed
  2376.  
  2377.    The requested method may not be applied on the URL in question since
  2378.    it is not an aggregate (presentation) URL. The method may be applied
  2379.    on the presentation URL.
  2380.  
  2381. 11.3.12 461 Unsupported Transport
  2382.  
  2383.    The Transport field did not contain a supported transport
  2384.    specification.
  2385.  
  2386. 11.3.13 462 Destination Unreachable
  2387.  
  2388.    The data transmission channel could not be established because the
  2389.    client address could not be reached. This error will most likely be
  2390.    the result of a client attempt to place an invalid Destination
  2391.    parameter in the Transport field.
  2392.  
  2393. 11.3.14 551 Option not supported
  2394.  
  2395.    An option given in the Require or the Proxy-Require fields was not
  2396.    supported. The Unsupported header should be returned stating the
  2397.    option for which there is no support.
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410. Schulzrinne, et. al.        Standards Track                    [Page 43]
  2411.  
  2412. RFC 2326              Real Time Streaming Protocol            April 1998
  2413.  
  2414.  
  2415. 12 Header Field Definitions
  2416.  
  2417.    HTTP/1.1 [2] or other, non-standard header fields not listed here
  2418.    currently have no well-defined meaning and SHOULD be ignored by the
  2419.    recipient.
  2420.  
  2421.    Table 3 summarizes the header fields used by RTSP. Type "g"
  2422.    designates general request headers to be found in both requests and
  2423.    responses, type "R" designates request headers, type "r" designates
  2424.    response headers, and type "e" designates entity header fields.
  2425.    Fields marked with "req." in the column labeled "support" MUST be
  2426.    implemented by the recipient for a particular method, while fields
  2427.    marked "opt." are optional. Note that not all fields marked "req."
  2428.    will be sent in every request of this type. The "req." means only
  2429.    that client (for response headers) and server (for request headers)
  2430.    MUST implement the fields. The last column lists the method for which
  2431.    this header field is meaningful; the designation "entity" refers to
  2432.    all methods that return a message body. Within this specification,
  2433.    DESCRIBE and GET_PARAMETER fall into this class.
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Schulzrinne, et. al.        Standards Track                    [Page 44]
  2467.  
  2468. RFC 2326              Real Time Streaming Protocol            April 1998
  2469.  
  2470.  
  2471.    Header               type   support   methods
  2472.    Accept               R      opt.      entity
  2473.    Accept-Encoding      R      opt.      entity
  2474.    Accept-Language      R      opt.      all
  2475.    Allow                r      opt.      all
  2476.    Authorization        R      opt.      all
  2477.    Bandwidth            R      opt.      all
  2478.    Blocksize            R      opt.      all but OPTIONS, TEARDOWN
  2479.    Cache-Control        g      opt.      SETUP
  2480.    Conference           R      opt.      SETUP
  2481.    Connection           g      req.      all
  2482.    Content-Base         e      opt.      entity
  2483.    Content-Encoding     e      req.      SET_PARAMETER
  2484.    Content-Encoding     e      req.      DESCRIBE, ANNOUNCE
  2485.    Content-Language     e      req.      DESCRIBE, ANNOUNCE
  2486.    Content-Length       e      req.      SET_PARAMETER, ANNOUNCE
  2487.    Content-Length       e      req.      entity
  2488.    Content-Location     e      opt.      entity
  2489.    Content-Type         e      req.      SET_PARAMETER, ANNOUNCE
  2490.    Content-Type         r      req.      entity
  2491.    CSeq                 g      req.      all
  2492.    Date                 g      opt.      all
  2493.    Expires              e      opt.      DESCRIBE, ANNOUNCE
  2494.    From                 R      opt.      all
  2495.    If-Modified-Since    R      opt.      DESCRIBE, SETUP
  2496.    Last-Modified        e      opt.      entity
  2497.    Proxy-Authenticate
  2498.    Proxy-Require        R      req.      all
  2499.    Public               r      opt.      all
  2500.    Range                R      opt.      PLAY, PAUSE, RECORD
  2501.    Range                r      opt.      PLAY, PAUSE, RECORD
  2502.    Referer              R      opt.      all
  2503.    Require              R      req.      all
  2504.    Retry-After          r      opt.      all
  2505.    RTP-Info             r      req.      PLAY
  2506.    Scale                Rr     opt.      PLAY, RECORD
  2507.    Session              Rr     req.      all but SETUP, OPTIONS
  2508.    Server               r      opt.      all
  2509.    Speed                Rr     opt.      PLAY
  2510.    Transport            Rr     req.      SETUP
  2511.    Unsupported          r      req.      all
  2512.    User-Agent           R      opt.      all
  2513.    Via                  g      opt.      all
  2514.    WWW-Authenticate     r      opt.      all
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522. Schulzrinne, et. al.        Standards Track                    [Page 45]
  2523.  
  2524. RFC 2326              Real Time Streaming Protocol            April 1998
  2525.  
  2526.  
  2527.    Overview of RTSP header fields
  2528.  
  2529. 12.1 Accept
  2530.  
  2531.    The Accept request-header field can be used to specify certain
  2532.    presentation description content types which are acceptable for the
  2533.    response.
  2534.  
  2535.      The "level" parameter for presentation descriptions is properly
  2536.      defined as part of the MIME type registration, not here.
  2537.  
  2538.    See [H14.1] for syntax.
  2539.  
  2540.    Example of use:
  2541.      Accept: application/rtsl, application/sdp;level=2
  2542.  
  2543. 12.2 Accept-Encoding
  2544.  
  2545.      See [H14.3]
  2546.  
  2547. 12.3 Accept-Language
  2548.  
  2549.    See [H14.4]. Note that the language specified applies to the
  2550.    presentation description and any reason phrases, not the media
  2551.    content.
  2552.  
  2553. 12.4 Allow
  2554.  
  2555.    The Allow response header field lists the methods supported by the
  2556.    resource identified by the request-URI. The purpose of this field is
  2557.    to strictly inform the recipient of valid methods associated with the
  2558.    resource. An Allow header field must be present in a 405 (Method not
  2559.    allowed) response.
  2560.  
  2561.    Example of use:
  2562.      Allow: SETUP, PLAY, RECORD, SET_PARAMETER
  2563.  
  2564. 12.5 Authorization
  2565.  
  2566.      See [H14.8]
  2567.  
  2568. 12.6 Bandwidth
  2569.  
  2570.    The Bandwidth request header field describes the estimated bandwidth
  2571.    available to the client, expressed as a positive integer and measured
  2572.    in bits per second. The bandwidth available to the client may change
  2573.    during an RTSP session, e.g., due to modem retraining.
  2574.  
  2575.  
  2576.  
  2577.  
  2578. Schulzrinne, et. al.        Standards Track                    [Page 46]
  2579.  
  2580. RFC 2326              Real Time Streaming Protocol            April 1998
  2581.  
  2582.  
  2583.    Bandwidth = "Bandwidth" ":" 1*DIGIT
  2584.  
  2585.    Example:
  2586.      Bandwidth: 4000
  2587.  
  2588. 12.7 Blocksize
  2589.  
  2590.    This request header field is sent from the client to the media server
  2591.    asking the server for a particular media packet size. This packet
  2592.    size does not include lower-layer headers such as IP, UDP, or RTP.
  2593.    The server is free to use a blocksize which is lower than the one
  2594.    requested. The server MAY truncate this packet size to the closest
  2595.    multiple of the minimum, media-specific block size, or override it
  2596.    with the media-specific size if necessary. The block size MUST be a
  2597.    positive decimal number, measured in octets. The server only returns
  2598.    an error (416) if the value is syntactically invalid.
  2599.  
  2600. 12.8 Cache-Control
  2601.  
  2602.    The Cache-Control general header field is used to specify directives
  2603.    that MUST be obeyed by all caching mechanisms along the
  2604.    request/response chain.
  2605.  
  2606.    Cache directives must be passed through by a proxy or gateway
  2607.    application, regardless of their significance to that application,
  2608.    since the directives may be applicable to all recipients along the
  2609.    request/response chain. It is not possible to specify a cache-
  2610.    directive for a specific cache.
  2611.  
  2612.    Cache-Control should only be specified in a SETUP request and its
  2613.    response. Note: Cache-Control does not govern the caching of
  2614.    responses as for HTTP, but rather of the stream identified by the
  2615.    SETUP request.  Responses to RTSP requests are not cacheable, except
  2616.    for responses to DESCRIBE.
  2617.  
  2618.    Cache-Control            =   "Cache-Control" ":" 1#cache-directive
  2619.    cache-directive          =   cache-request-directive
  2620.                             |   cache-response-directive
  2621.    cache-request-directive  =   "no-cache"
  2622.                             |   "max-stale"
  2623.                             |   "min-fresh"
  2624.                             |   "only-if-cached"
  2625.                             |   cache-extension
  2626.    cache-response-directive =   "public"
  2627.                             |   "private"
  2628.                             |   "no-cache"
  2629.                             |   "no-transform"
  2630.                             |   "must-revalidate"
  2631.  
  2632.  
  2633.  
  2634. Schulzrinne, et. al.        Standards Track                    [Page 47]
  2635.  
  2636. RFC 2326              Real Time Streaming Protocol            April 1998
  2637.  
  2638.  
  2639.                             |   "proxy-revalidate"
  2640.                             |   "max-age" "=" delta-seconds
  2641.                             |   cache-extension
  2642.    cache-extension          =   token [ "=" ( token | quoted-string ) ]
  2643.  
  2644.    no-cache:
  2645.           Indicates that the media stream MUST NOT be cached anywhere.
  2646.           This allows an origin server to prevent caching even by caches
  2647.           that have been configured to return stale responses to client
  2648.           requests.
  2649.  
  2650.    public:
  2651.           Indicates that the media stream is cacheable by any cache.
  2652.  
  2653.    private:
  2654.           Indicates that the media stream is intended for a single user
  2655.           and MUST NOT be cached by a shared cache. A private (non-
  2656.           shared) cache may cache the media stream.
  2657.  
  2658.    no-transform:
  2659.           An intermediate cache (proxy) may find it useful to convert
  2660.           the media type of a certain stream. A proxy might, for
  2661.           example, convert between video formats to save cache space or
  2662.           to reduce the amount of traffic on a slow link. Serious
  2663.           operational problems may occur, however, when these
  2664.           transformations have been applied to streams intended for
  2665.           certain kinds of applications. For example, applications for
  2666.           medical imaging, scientific data analysis and those using
  2667.           end-to-end authentication all depend on receiving a stream
  2668.           that is bit-for-bit identical to the original entity-body.
  2669.           Therefore, if a response includes the no-transform directive,
  2670.           an intermediate cache or proxy MUST NOT change the encoding of
  2671.           the stream. Unlike HTTP, RTSP does not provide for partial
  2672.           transformation at this point, e.g., allowing translation into
  2673.           a different language.
  2674.  
  2675.    only-if-cached:
  2676.           In some cases, such as times of extremely poor network
  2677.           connectivity, a client may want a cache to return only those
  2678.           media streams that it currently has stored, and not to receive
  2679.           these from the origin server. To do this, the client may
  2680.           include the only-if-cached directive in a request. If it
  2681.           receives this directive, a cache SHOULD either respond using a
  2682.           cached media stream that is consistent with the other
  2683.           constraints of the request, or respond with a 504 (Gateway
  2684.           Timeout) status. However, if a group of caches is being
  2685.           operated as a unified system with good internal connectivity,
  2686.           such a request MAY be forwarded within that group of caches.
  2687.  
  2688.  
  2689.  
  2690. Schulzrinne, et. al.        Standards Track                    [Page 48]
  2691.  
  2692. RFC 2326              Real Time Streaming Protocol            April 1998
  2693.  
  2694.  
  2695.    max-stale:
  2696.           Indicates that the client is willing to accept a media stream
  2697.           that has exceeded its expiration time. If max-stale is
  2698.           assigned a value, then the client is willing to accept a
  2699.           response that has exceeded its expiration time by no more than
  2700.           the specified number of seconds. If no value is assigned to
  2701.           max-stale, then the client is willing to accept a stale
  2702.           response of any age.
  2703.  
  2704.    min-fresh:
  2705.           Indicates that the client is willing to accept a media stream
  2706.           whose freshness lifetime is no less than its current age plus
  2707.           the specified time in seconds. That is, the client wants a
  2708.           response that will still be fresh for at least the specified
  2709.           number of seconds.
  2710.  
  2711.    must-revalidate:
  2712.           When the must-revalidate directive is present in a SETUP
  2713.           response received by a cache, that cache MUST NOT use the
  2714.           entry after it becomes stale to respond to a subsequent
  2715.           request without first revalidating it with the origin server.
  2716.           That is, the cache must do an end-to-end revalidation every
  2717.           time, if, based solely on the origin server's Expires, the
  2718.           cached response is stale.)
  2719.  
  2720. 12.9 Conference
  2721.  
  2722.    This request header field establishes a logical connection between a
  2723.    pre-established conference and an RTSP stream. The conference-id must
  2724.    not be changed for the same RTSP session.
  2725.  
  2726.    Conference = "Conference" ":" conference-id Example:
  2727.      Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
  2728.  
  2729.    A response code of 452 (452 Conference Not Found) is returned if the
  2730.    conference-id is not valid.
  2731.  
  2732. 12.10 Connection
  2733.  
  2734.    See [H14.10]
  2735.  
  2736. 12.11 Content-Base
  2737.  
  2738.    See [H14.11]
  2739.  
  2740. 12.12 Content-Encoding
  2741.  
  2742.    See [H14.12]
  2743.  
  2744.  
  2745.  
  2746. Schulzrinne, et. al.        Standards Track                    [Page 49]
  2747.  
  2748. RFC 2326              Real Time Streaming Protocol            April 1998
  2749.  
  2750.  
  2751. 12.13 Content-Language
  2752.  
  2753.    See [H14.13]
  2754.  
  2755. 12.14 Content-Length
  2756.  
  2757.    This field contains the length of the content of the method (i.e.
  2758.    after the double CRLF following the last header). Unlike HTTP, it
  2759.    MUST be included in all messages that carry content beyond the header
  2760.    portion of the message. If it is missing, a default value of zero is
  2761.    assumed. It is interpreted according to [H14.14].
  2762.  
  2763. 12.15 Content-Location
  2764.  
  2765.    See [H14.15]
  2766.  
  2767. 12.16 Content-Type
  2768.  
  2769.    See [H14.18]. Note that the content types suitable for RTSP are
  2770.    likely to be restricted in practice to presentation descriptions and
  2771.    parameter-value types.
  2772.  
  2773. 12.17 CSeq
  2774.  
  2775.    The CSeq field specifies the sequence number for an RTSP request-
  2776.    response pair. This field MUST be present in all requests and
  2777.    responses. For every RTSP request containing the given sequence
  2778.    number, there will be a corresponding response having the same
  2779.    number.  Any retransmitted request must contain the same sequence
  2780.    number as the original (i.e. the sequence number is not incremented
  2781.    for retransmissions of the same request).
  2782.  
  2783. 12.18 Date
  2784.  
  2785.    See [H14.19].
  2786.  
  2787. 12.19 Expires
  2788.  
  2789.    The Expires entity-header field gives a date and time after which the
  2790.    description or media-stream should be considered stale. The
  2791.    interpretation depends on the method:
  2792.  
  2793.    DESCRIBE response:
  2794.           The Expires header indicates a date and time after which the
  2795.           description should be considered stale.
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802. Schulzrinne, et. al.        Standards Track                    [Page 50]
  2803.  
  2804. RFC 2326              Real Time Streaming Protocol            April 1998
  2805.  
  2806.  
  2807.    A stale cache entry may not normally be returned by a cache (either a
  2808.    proxy cache or an user agent cache) unless it is first validated with
  2809.    the origin server (or with an intermediate cache that has a fresh
  2810.    copy of the entity). See section 13 for further discussion of the
  2811.    expiration model.
  2812.  
  2813.    The presence of an Expires field does not imply that the original
  2814.    resource will change or cease to exist at, before, or after that
  2815.    time.
  2816.  
  2817.    The format is an absolute date and time as defined by HTTP-date in
  2818.    [H3.3]; it MUST be in RFC1123-date format:
  2819.  
  2820.    Expires = "Expires" ":" HTTP-date
  2821.  
  2822.    An example of its use is
  2823.  
  2824.      Expires: Thu, 01 Dec 1994 16:00:00 GMT
  2825.  
  2826.    RTSP/1.0 clients and caches MUST treat other invalid date formats,
  2827.    especially including the value "0", as having occurred in the past
  2828.    (i.e., "already expired").
  2829.  
  2830.    To mark a response as "already expired," an origin server should use
  2831.    an Expires date that is equal to the Date header value. To mark a
  2832.    response as "never expires," an origin server should use an Expires
  2833.    date approximately one year from the time the response is sent.
  2834.    RTSP/1.0 servers should not send Expires dates more than one year in
  2835.    the future.
  2836.  
  2837.    The presence of an Expires header field with a date value of some
  2838.    time in the future on a media stream that otherwise would by default
  2839.    be non-cacheable indicates that the media stream is cacheable, unless
  2840.    indicated otherwise by a Cache-Control header field (Section 12.8).
  2841.  
  2842. 12.20 From
  2843.  
  2844.    See [H14.22].
  2845.  
  2846. 12.21 Host
  2847.  
  2848.    This HTTP request header field is not needed for RTSP. It should be
  2849.    silently ignored if sent.
  2850.  
  2851. 12.22 If-Match
  2852.  
  2853.    See [H14.25].
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Schulzrinne, et. al.        Standards Track                    [Page 51]
  2859.  
  2860. RFC 2326              Real Time Streaming Protocol            April 1998
  2861.  
  2862.  
  2863.    This field is especially useful for ensuring the integrity of the
  2864.    presentation description, in both the case where it is fetched via
  2865.    means external to RTSP (such as HTTP), or in the case where the
  2866.    server implementation is guaranteeing the integrity of the
  2867.    description between the time of the DESCRIBE message and the SETUP
  2868.    message.
  2869.  
  2870.    The identifier is an opaque identifier, and thus is not specific to
  2871.    any particular session description language.
  2872.  
  2873. 12.23 If-Modified-Since
  2874.  
  2875.    The If-Modified-Since request-header field is used with the DESCRIBE
  2876.    and SETUP methods to make them conditional. If the requested variant
  2877.    has not been modified since the time specified in this field, a
  2878.    description will not be returned from the server (DESCRIBE) or a
  2879.    stream will not be set up (SETUP). Instead, a 304 (not modified)
  2880.    response will be returned without any message-body.
  2881.  
  2882.    If-Modified-Since = "If-Modified-Since" ":" HTTP-date
  2883.  
  2884.    An example of the field is:
  2885.  
  2886.      If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
  2887.  
  2888. 12.24 Last-Modified
  2889.  
  2890.    The Last-Modified entity-header field indicates the date and time at
  2891.    which the origin server believes the presentation description or
  2892.    media stream was last modified. See [H14.29]. For the methods
  2893.    DESCRIBE or ANNOUNCE, the header field indicates the last
  2894.    modification date and time of the description, for SETUP that of the
  2895.    media stream.
  2896.  
  2897. 12.25 Location
  2898.  
  2899.    See [H14.30].
  2900.  
  2901. 12.26 Proxy-Authenticate
  2902.  
  2903.    See [H14.33].
  2904.  
  2905. 12.27 Proxy-Require
  2906.  
  2907.    The Proxy-Require header is used to indicate proxy-sensitive features
  2908.    that MUST be supported by the proxy. Any Proxy-Require header
  2909.    features that are not supported by the proxy MUST be negatively
  2910.    acknowledged by the proxy to the client if not supported. Servers
  2911.  
  2912.  
  2913.  
  2914. Schulzrinne, et. al.        Standards Track                    [Page 52]
  2915.  
  2916. RFC 2326              Real Time Streaming Protocol            April 1998
  2917.  
  2918.  
  2919.    should treat this field identically to the Require field.
  2920.  
  2921.    See Section 12.32 for more details on the mechanics of this message
  2922.    and a usage example.
  2923.  
  2924. 12.28 Public
  2925.  
  2926.    See [H14.35].
  2927.  
  2928. 12.29 Range
  2929.  
  2930.    This request and response header field specifies a range of time.
  2931.    The range can be specified in a number of units. This specification
  2932.    defines the smpte (Section 3.5), npt (Section 3.6), and clock
  2933.    (Section 3.7) range units. Within RTSP, byte ranges [H14.36.1] are
  2934.    not meaningful and MUST NOT be used. The header may also contain a
  2935.    time parameter in UTC, specifying the time at which the operation is
  2936.    to be made effective. Servers supporting the Range header MUST
  2937.    understand the NPT range format and SHOULD understand the SMPTE range
  2938.    format. The Range response header indicates what range of time is
  2939.    actually being played or recorded. If the Range header is given in a
  2940.    time format that is not understood, the recipient should return "501
  2941.    Not Implemented".
  2942.  
  2943.    Ranges are half-open intervals, including the lower point, but
  2944.    excluding the upper point. In other words, a range of a-b starts
  2945.    exactly at time a, but stops just before b. Only the start time of a
  2946.    media unit such as a video or audio frame is relevant. As an example,
  2947.    assume that video frames are generated every 40 ms. A range of 10.0-
  2948.    10.1 would include a video frame starting at 10.0 or later time and
  2949.    would include a video frame starting at 10.08, even though it lasted
  2950.    beyond the interval. A range of 10.0-10.08, on the other hand, would
  2951.    exclude the frame at 10.08.
  2952.  
  2953.    Range            = "Range" ":" 1\#ranges-specifier
  2954.                           [ ";" "time" "=" utc-time ]
  2955.    ranges-specifier = npt-range | utc-range | smpte-range
  2956.  
  2957.    Example:
  2958.      Range: clock=19960213T143205Z-;time=19970123T143720Z
  2959.  
  2960.      The notation is similar to that used for the HTTP/1.1 [2] byte-
  2961.      range header. It allows clients to select an excerpt from the media
  2962.      object, and to play from a given point to the end as well as from
  2963.      the current location to a given point. The start of playback can be
  2964.      scheduled for any time in the future, although a server may refuse
  2965.      to keep server resources for extended idle periods.
  2966.  
  2967.  
  2968.  
  2969.  
  2970. Schulzrinne, et. al.        Standards Track                    [Page 53]
  2971.  
  2972. RFC 2326              Real Time Streaming Protocol            April 1998
  2973.  
  2974.  
  2975. 12.30 Referer
  2976.  
  2977.    See [H14.37]. The URL refers to that of the presentation description,
  2978.    typically retrieved via HTTP.
  2979.  
  2980. 12.31 Retry-After
  2981.  
  2982.    See [H14.38].
  2983.  
  2984. 12.32 Require
  2985.  
  2986.    The Require header is used by clients to query the server about
  2987.    options that it may or may not support. The server MUST respond to
  2988.    this header by using the Unsupported header to negatively acknowledge
  2989.    those options which are NOT supported.
  2990.  
  2991.      This is to make sure that the client-server interaction will
  2992.      proceed without delay when all options are understood by both
  2993.      sides, and only slow down if options are not understood (as in the
  2994.      case above). For a well-matched client-server pair, the interaction
  2995.      proceeds quickly, saving a round-trip often required by negotiation
  2996.      mechanisms. In addition, it also removes state ambiguity when the
  2997.      client requires features that the server does not understand.
  2998.  
  2999.    Require =   "Require" ":"  1#option-tag
  3000.  
  3001.    Example:
  3002.      C->S:   SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0
  3003.              CSeq: 302
  3004.              Require: funky-feature
  3005.              Funky-Parameter: funkystuff
  3006.  
  3007.      S->C:   RTSP/1.0 551 Option not supported
  3008.              CSeq: 302
  3009.              Unsupported: funky-feature
  3010.  
  3011.      C->S:   SETUP rtsp://server.com/foo/bar/baz.rm RTSP/1.0
  3012.              CSeq: 303
  3013.  
  3014.      S->C:   RTSP/1.0 200 OK
  3015.              CSeq: 303
  3016.  
  3017.    In this example, "funky-feature" is the feature tag which indicates
  3018.    to the client that the fictional Funky-Parameter field is required.
  3019.    The relationship between "funky-feature" and Funky-Parameter is not
  3020.    communicated via the RTSP exchange, since that relationship is an
  3021.    immutable property of "funky-feature" and thus should not be
  3022.    transmitted with every exchange.
  3023.  
  3024.  
  3025.  
  3026. Schulzrinne, et. al.        Standards Track                    [Page 54]
  3027.  
  3028. RFC 2326              Real Time Streaming Protocol            April 1998
  3029.  
  3030.  
  3031.    Proxies and other intermediary devices SHOULD ignore features that
  3032.    are not understood in this field. If a particular extension requires
  3033.    that intermediate devices support it, the extension should be tagged
  3034.    in the Proxy-Require field instead (see Section 12.27).
  3035.  
  3036. 12.33 RTP-Info
  3037.  
  3038.    This field is used to set RTP-specific parameters in the PLAY
  3039.    response.
  3040.  
  3041.    url:
  3042.           Indicates the stream URL which for which the following RTP
  3043.           parameters correspond.
  3044.  
  3045.    seq:
  3046.           Indicates the sequence number of the first packet of the
  3047.           stream. This allows clients to gracefully deal with packets
  3048.           when seeking. The client uses this value to differentiate
  3049.           packets that originated before the seek from packets that
  3050.           originated after the seek.
  3051.  
  3052.    rtptime:
  3053.           Indicates the RTP timestamp corresponding to the time value in
  3054.           the Range response header. (Note: For aggregate control, a
  3055.           particular stream may not actually generate a packet for the
  3056.           Range time value returned or implied. Thus, there is no
  3057.           guarantee that the packet with the sequence number indicated
  3058.           by seq actually has the timestamp indicated by rtptime.) The
  3059.           client uses this value to calculate the mapping of RTP time to
  3060.           NPT.
  3061.  
  3062.      A mapping from RTP timestamps to NTP timestamps (wall clock) is
  3063.      available via RTCP. However, this information is not sufficient to
  3064.      generate a mapping from RTP timestamps to NPT. Furthermore, in
  3065.      order to ensure that this information is available at the necessary
  3066.      time (immediately at startup or after a seek), and that it is
  3067.      delivered reliably, this mapping is placed in the RTSP control
  3068.      channel.
  3069.  
  3070.      In order to compensate for drift for long, uninterrupted
  3071.      presentations, RTSP clients should additionally map NPT to NTP,
  3072.      using initial RTCP sender reports to do the mapping, and later
  3073.      reports to check drift against the mapping.
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082. Schulzrinne, et. al.        Standards Track                    [Page 55]
  3083.  
  3084. RFC 2326              Real Time Streaming Protocol            April 1998
  3085.  
  3086.  
  3087.    Syntax:
  3088.  
  3089.    RTP-Info        = "RTP-Info" ":" 1#stream-url 1*parameter
  3090.    stream-url      = "url" "=" url
  3091.    parameter       = ";" "seq" "=" 1*DIGIT
  3092.                    | ";" "rtptime" "=" 1*DIGIT
  3093.  
  3094.    Example:
  3095.  
  3096.      RTP-Info: url=rtsp://foo.com/bar.avi/streamid=0;seq=45102,
  3097.                url=rtsp://foo.com/bar.avi/streamid=1;seq=30211
  3098.  
  3099. 12.34 Scale
  3100.  
  3101.    A scale value of 1 indicates normal play or record at the normal
  3102.    forward viewing rate. If not 1, the value corresponds to the rate
  3103.    with respect to normal viewing rate. For example, a ratio of 2
  3104.    indicates twice the normal viewing rate ("fast forward") and a ratio
  3105.    of 0.5 indicates half the normal viewing rate. In other words, a
  3106.    ratio of 2 has normal play time increase at twice the wallclock rate.
  3107.    For every second of elapsed (wallclock) time, 2 seconds of content
  3108.    will be delivered. A negative value indicates reverse direction.
  3109.  
  3110.    Unless requested otherwise by the Speed parameter, the data rate
  3111.    SHOULD not be changed. Implementation of scale changes depends on the
  3112.    server and media type. For video, a server may, for example, deliver
  3113.    only key frames or selected key frames. For audio, it may time-scale
  3114.    the audio while preserving pitch or, less desirably, deliver
  3115.    fragments of audio.
  3116.  
  3117.    The server should try to approximate the viewing rate, but may
  3118.    restrict the range of scale values that it supports. The response
  3119.    MUST contain the actual scale value chosen by the server.
  3120.  
  3121.    If the request contains a Range parameter, the new scale value will
  3122.    take effect at that time.
  3123.  
  3124.    Scale = "Scale" ":" [ "-" ] 1*DIGIT [ "." *DIGIT ]
  3125.  
  3126.    Example of playing in reverse at 3.5 times normal rate:
  3127.  
  3128.      Scale: -3.5
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138. Schulzrinne, et. al.        Standards Track                    [Page 56]
  3139.  
  3140. RFC 2326              Real Time Streaming Protocol            April 1998
  3141.  
  3142.  
  3143. 12.35 Speed
  3144.  
  3145.    This request header fields parameter requests the server to deliver
  3146.    data to the client at a particular speed, contingent on the server's
  3147.    ability and desire to serve the media stream at the given speed.
  3148.    Implementation by the server is OPTIONAL. The default is the bit rate
  3149.    of the stream.
  3150.  
  3151.    The parameter value is expressed as a decimal ratio, e.g., a value of
  3152.    2.0 indicates that data is to be delivered twice as fast as normal. A
  3153.    speed of zero is invalid. If the request contains a Range parameter,
  3154.    the new speed value will take effect at that time.
  3155.  
  3156.    Speed = "Speed" ":" 1*DIGIT [ "." *DIGIT ]
  3157.  
  3158.    Example:
  3159.      Speed: 2.5
  3160.  
  3161.    Use of this field changes the bandwidth used for data delivery. It is
  3162.    meant for use in specific circumstances where preview of the
  3163.    presentation at a higher or lower rate is necessary. Implementors
  3164.    should keep in mind that bandwidth for the session may be negotiated
  3165.    beforehand (by means other than RTSP), and therefore re-negotiation
  3166.    may be necessary. When data is delivered over UDP, it is highly
  3167.    recommended that means such as RTCP be used to track packet loss
  3168.    rates.
  3169.  
  3170. 12.36 Server
  3171.  
  3172.    See [H14.39]
  3173.  
  3174. 12.37 Session
  3175.  
  3176.    This request and response header field identifies an RTSP session
  3177.    started by the media server in a SETUP response and concluded by
  3178.    TEARDOWN on the presentation URL. The session identifier is chosen by
  3179.    the media server (see Section 3.4). Once a client receives a Session
  3180.    identifier, it MUST return it for any request related to that
  3181.    session.  A server does not have to set up a session identifier if it
  3182.    has other means of identifying a session, such as dynamically
  3183.    generated URLs.
  3184.  
  3185.  Session  = "Session" ":" session-id [ ";" "timeout" "=" delta-seconds ]
  3186.  
  3187.    The timeout parameter is only allowed in a response header. The
  3188.    server uses it to indicate to the client how long the server is
  3189.    prepared to wait between RTSP commands before closing the session due
  3190.    to lack of activity (see Section A). The timeout is measured in
  3191.  
  3192.  
  3193.  
  3194. Schulzrinne, et. al.        Standards Track                    [Page 57]
  3195.  
  3196. RFC 2326              Real Time Streaming Protocol            April 1998
  3197.  
  3198.  
  3199.    seconds, with a default of 60 seconds (1 minute).
  3200.  
  3201.    Note that a session identifier identifies a RTSP session across
  3202.    transport sessions or connections. Control messages for more than one
  3203.    RTSP URL may be sent within a single RTSP session. Hence, it is
  3204.    possible that clients use the same session for controlling many
  3205.    streams constituting a presentation, as long as all the streams come
  3206.    from the same server. (See example in Section 14). However, multiple
  3207.    "user" sessions for the same URL from the same client MUST use
  3208.    different session identifiers.
  3209.  
  3210.      The session identifier is needed to distinguish several delivery
  3211.      requests for the same URL coming from the same client.
  3212.  
  3213.    The response 454 (Session Not Found) is returned if the session
  3214.    identifier is invalid.
  3215.  
  3216. 12.38 Timestamp
  3217.  
  3218.    The timestamp general header describes when the client sent the
  3219.    request to the server. The value of the timestamp is of significance
  3220.    only to the client and may use any timescale. The server MUST echo
  3221.    the exact same value and MAY, if it has accurate information about
  3222.    this, add a floating point number indicating the number of seconds
  3223.    that has elapsed since it has received the request. The timestamp is
  3224.    used by the client to compute the round-trip time to the server so
  3225.    that it can adjust the timeout value for retransmissions.
  3226.  
  3227.    Timestamp  = "Timestamp" ":" *(DIGIT) [ "." *(DIGIT) ] [ delay ]
  3228.    delay      =  *(DIGIT) [ "." *(DIGIT) ]
  3229.  
  3230. 12.39 Transport
  3231.  
  3232.    This request header indicates which transport protocol is to be used
  3233.    and configures its parameters such as destination address,
  3234.    compression, multicast time-to-live and destination port for a single
  3235.    stream. It sets those values not already determined by a presentation
  3236.    description.
  3237.  
  3238.    Transports are comma separated, listed in order of preference.
  3239.    Parameters may be added to each transport, separated by a semicolon.
  3240.  
  3241.    The Transport header MAY also be used to change certain transport
  3242.    parameters. A server MAY refuse to change parameters of an existing
  3243.    stream.
  3244.  
  3245.    The server MAY return a Transport response header in the response to
  3246.    indicate the values actually chosen.
  3247.  
  3248.  
  3249.  
  3250. Schulzrinne, et. al.        Standards Track                    [Page 58]
  3251.  
  3252. RFC 2326              Real Time Streaming Protocol            April 1998
  3253.  
  3254.  
  3255.    A Transport request header field may contain a list of transport
  3256.    options acceptable to the client. In that case, the server MUST
  3257.    return a single option which was actually chosen.
  3258.  
  3259.    The syntax for the transport specifier is
  3260.  
  3261.        transport/profile/lower-transport.
  3262.  
  3263.    The default value for the "lower-transport" parameters is specific to
  3264.    the profile. For RTP/AVP, the default is UDP.
  3265.  
  3266.    Below are the configuration parameters associated with transport:
  3267.  
  3268.    General parameters:
  3269.  
  3270.    unicast | multicast:
  3271.           mutually exclusive indication of whether unicast or multicast
  3272.           delivery will be attempted. Default value is multicast.
  3273.           Clients that are capable of handling both unicast and
  3274.           multicast transmission MUST indicate such capability by
  3275.           including two full transport-specs with separate parameters
  3276.           for each.
  3277.  
  3278.    destination:
  3279.           The address to which a stream will be sent. The client may
  3280.           specify the multicast address with the destination parameter.
  3281.           To avoid becoming the unwitting perpetrator of a remote-
  3282.           controlled denial-of-service attack, a server SHOULD
  3283.           authenticate the client and SHOULD log such attempts before
  3284.           allowing the client to direct a media stream to an address not
  3285.           chosen by the server. This is particularly important if RTSP
  3286.           commands are issued via UDP, but implementations cannot rely
  3287.           on TCP as reliable means of client identification by itself. A
  3288.           server SHOULD not allow a client to direct media streams to an
  3289.           address that differs from the address commands are coming
  3290.           from.
  3291.  
  3292.    source:
  3293.           If the source address for the stream is different than can be
  3294.           derived from the RTSP endpoint address (the server in playback
  3295.           or the client in recording), the source MAY be specified.
  3296.  
  3297.      This information may also be available through SDP. However, since
  3298.      this is more a feature of transport than media initialization, the
  3299.      authoritative source for this information should be in the SETUP
  3300.      response.
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306. Schulzrinne, et. al.        Standards Track                    [Page 59]
  3307.  
  3308. RFC 2326              Real Time Streaming Protocol            April 1998
  3309.  
  3310.  
  3311.    layers:
  3312.           The number of multicast layers to be used for this media
  3313.           stream. The layers are sent to consecutive addresses starting
  3314.           at the destination address.
  3315.  
  3316.    mode:
  3317.           The mode parameter indicates the methods to be supported for
  3318.           this session. Valid values are PLAY and RECORD. If not
  3319.           provided, the default is PLAY.
  3320.  
  3321.    append:
  3322.           If the mode parameter includes RECORD, the append parameter
  3323.           indicates that the media data should append to the existing
  3324.           resource rather than overwrite it. If appending is requested
  3325.           and the server does not support this, it MUST refuse the
  3326.           request rather than overwrite the resource identified by the
  3327.           URI. The append parameter is ignored if the mode parameter
  3328.           does not contain RECORD.
  3329.  
  3330.    interleaved:
  3331.           The interleaved parameter implies mixing the media stream with
  3332.           the control stream in whatever protocol is being used by the
  3333.           control stream, using the mechanism defined in Section 10.12.
  3334.           The argument provides the channel number to be used in the $
  3335.           statement. This parameter may be specified as a range, e.g.,
  3336.           interleaved=4-5 in cases where the transport choice for the
  3337.           media stream requires it.
  3338.  
  3339.      This allows RTP/RTCP to be handled similarly to the way that it is
  3340.      done with UDP, i.e., one channel for RTP and the other for RTCP.
  3341.  
  3342.    Multicast specific:
  3343.  
  3344.    ttl:
  3345.           multicast time-to-live
  3346.  
  3347.    RTP Specific:
  3348.  
  3349.    port:
  3350.           This parameter provides the RTP/RTCP port pair for a multicast
  3351.           session. It is specified as a range, e.g., port=3456-3457.
  3352.  
  3353.    client_port:
  3354.           This parameter provides the unicast RTP/RTCP port pair on
  3355.           which the client has chosen to receive media data and control
  3356.           information.  It is specified as a range, e.g.,
  3357.           client_port=3456-3457.
  3358.  
  3359.  
  3360.  
  3361.  
  3362. Schulzrinne, et. al.        Standards Track                    [Page 60]
  3363.  
  3364. RFC 2326              Real Time Streaming Protocol            April 1998
  3365.  
  3366.  
  3367.    server_port:
  3368.           This parameter provides the unicast RTP/RTCP port pair on
  3369.           which the server has chosen to receive media data and control
  3370.           information.  It is specified as a range, e.g.,
  3371.           server_port=3456-3457.
  3372.  
  3373.    ssrc:
  3374.           The ssrc parameter indicates the RTP SSRC [24, Sec. 3] value
  3375.           that should be (request) or will be (response) used by the
  3376.           media server. This parameter is only valid for unicast
  3377.           transmission. It identifies the synchronization source to be
  3378.           associated with the media stream.
  3379.  
  3380.    Transport           =    "Transport" ":"
  3381.                             1\#transport-spec
  3382.    transport-spec      =    transport-protocol/profile[/lower-transport]
  3383.                             *parameter
  3384.    transport-protocol  =    "RTP"
  3385.    profile             =    "AVP"
  3386.    lower-transport     =    "TCP" | "UDP"
  3387.    parameter           =    ( "unicast" | "multicast" )
  3388.                        |    ";" "destination" [ "=" address ]
  3389.                        |    ";" "interleaved" "=" channel [ "-" channel ]
  3390.                        |    ";" "append"
  3391.                        |    ";" "ttl" "=" ttl
  3392.                        |    ";" "layers" "=" 1*DIGIT
  3393.                        |    ";" "port" "=" port [ "-" port ]
  3394.                        |    ";" "client_port" "=" port [ "-" port ]
  3395.                        |    ";" "server_port" "=" port [ "-" port ]
  3396.                        |    ";" "ssrc" "=" ssrc
  3397.                        |    ";" "mode" = <"> 1\#mode <">
  3398.    ttl                 =    1*3(DIGIT)
  3399.    port                =    1*5(DIGIT)
  3400.    ssrc                =    8*8(HEX)
  3401.    channel             =    1*3(DIGIT)
  3402.    address             =    host
  3403.    mode                =    <"> *Method <"> | Method
  3404.  
  3405.  
  3406.    Example:
  3407.      Transport: RTP/AVP;multicast;ttl=127;mode="PLAY",
  3408.                 RTP/AVP;unicast;client_port=3456-3457;mode="PLAY"
  3409.  
  3410.      The Transport header is restricted to describing a single RTP
  3411.      stream. (RTSP can also control multiple streams as a single
  3412.      entity.) Making it part of RTSP rather than relying on a multitude
  3413.      of session description formats greatly simplifies designs of
  3414.      firewalls.
  3415.  
  3416.  
  3417.  
  3418. Schulzrinne, et. al.        Standards Track                    [Page 61]
  3419.  
  3420. RFC 2326              Real Time Streaming Protocol            April 1998
  3421.  
  3422.  
  3423. 12.40 Unsupported
  3424.  
  3425.    The Unsupported response header lists the features not supported by
  3426.    the server. In the case where the feature was specified via the
  3427.    Proxy-Require field (Section 12.32), if there is a proxy on the path
  3428.    between the client and the server, the proxy MUST insert a message
  3429.    reply with an error message "551 Option Not Supported".
  3430.  
  3431.    See Section 12.32 for a usage example.
  3432.  
  3433. 12.41 User-Agent
  3434.  
  3435.    See [H14.42]
  3436.  
  3437. 12.42 Vary
  3438.  
  3439.    See [H14.43]
  3440.  
  3441. 12.43 Via
  3442.  
  3443.    See [H14.44].
  3444.  
  3445. 12.44 WWW-Authentica
  3446.  
  3447.    See [H14.46].
  3448.  
  3449. 13 Caching
  3450.  
  3451.    In HTTP, response-request pairs are cached. RTSP differs
  3452.    significantly in that respect. Responses are not cacheable, with the
  3453.    exception of the presentation description returned by DESCRIBE or
  3454.    included with ANNOUNCE. (Since the responses for anything but
  3455.    DESCRIBE and GET_PARAMETER do not return any data, caching is not
  3456.    really an issue for these requests.) However, it is desirable for the
  3457.    continuous media data, typically delivered out-of-band with respect
  3458.    to RTSP, to be cached, as well as the session description.
  3459.  
  3460.    On receiving a SETUP or PLAY request, a proxy ascertains whether it
  3461.    has an up-to-date copy of the continuous media content and its
  3462.    description. It can determine whether the copy is up-to-date by
  3463.    issuing a SETUP or DESCRIBE request, respectively, and comparing the
  3464.    Last-Modified header with that of the cached copy. If the copy is not
  3465.    up-to-date, it modifies the SETUP transport parameters as appropriate
  3466.    and forwards the request to the origin server. Subsequent control
  3467.    commands such as PLAY or PAUSE then pass the proxy unmodified. The
  3468.    proxy delivers the continuous media data to the client, while
  3469.    possibly making a local copy for later reuse. The exact behavior
  3470.    allowed to the cache is given by the cache-response directives
  3471.  
  3472.  
  3473.  
  3474. Schulzrinne, et. al.        Standards Track                    [Page 62]
  3475.  
  3476. RFC 2326              Real Time Streaming Protocol            April 1998
  3477.  
  3478.  
  3479.    described in Section 12.8. A cache MUST answer any DESCRIBE requests
  3480.    if it is currently serving the stream to the requestor, as it is
  3481.    possible that low-level details of the stream description may have
  3482.    changed on the origin-server.
  3483.  
  3484.    Note that an RTSP cache, unlike the HTTP cache, is of the "cut-
  3485.    through" variety. Rather than retrieving the whole resource from the
  3486.    origin server, the cache simply copies the streaming data as it
  3487.    passes by on its way to the client. Thus, it does not introduce
  3488.    additional latency.
  3489.  
  3490.    To the client, an RTSP proxy cache appears like a regular media
  3491.    server, to the media origin server like a client. Just as an HTTP
  3492.    cache has to store the content type, content language, and so on for
  3493.    the objects it caches, a media cache has to store the presentation
  3494.    description. Typically, a cache eliminates all transport-references
  3495.    (that is, multicast information) from the presentation description,
  3496.    since these are independent of the data delivery from the cache to
  3497.    the client. Information on the encodings remains the same. If the
  3498.    cache is able to translate the cached media data, it would create a
  3499.    new presentation description with all the encoding possibilities it
  3500.    can offer.
  3501.  
  3502. 14 Examples
  3503.  
  3504.    The following examples refer to stream description formats that are
  3505.    not standards, such as RTSL. The following examples are not to be
  3506.    used as a reference for those formats.
  3507.  
  3508. 14.1 Media on Demand (Unicast)
  3509.  
  3510.    Client C requests a movie from media servers A ( audio.example.com)
  3511.    and V (video.example.com). The media description is stored on a web
  3512.    server W . The media description contains descriptions of the
  3513.    presentation and all its streams, including the codecs that are
  3514.    available, dynamic RTP payload types, the protocol stack, and content
  3515.    information such as language or copyright restrictions. It may also
  3516.    give an indication about the timeline of the movie.
  3517.  
  3518.    In this example, the client is only interested in the last part of
  3519.    the movie.
  3520.  
  3521.      C->W: GET /twister.sdp HTTP/1.1
  3522.            Host: www.example.com
  3523.            Accept: application/sdp
  3524.  
  3525.      W->C: HTTP/1.0 200 OK
  3526.            Content-Type: application/sdp
  3527.  
  3528.  
  3529.  
  3530. Schulzrinne, et. al.        Standards Track                    [Page 63]
  3531.  
  3532. RFC 2326              Real Time Streaming Protocol            April 1998
  3533.  
  3534.  
  3535.            v=0
  3536.            o=- 2890844526 2890842807 IN IP4 192.16.24.202
  3537.            s=RTSP Session
  3538.            m=audio 0 RTP/AVP 0
  3539.            a=control:rtsp://audio.example.com/twister/audio.en
  3540.            m=video 0 RTP/AVP 31
  3541.            a=control:rtsp://video.example.com/twister/video
  3542.  
  3543.      C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0
  3544.            CSeq: 1
  3545.            Transport: RTP/AVP/UDP;unicast;client_port=3056-3057
  3546.  
  3547.      A->C: RTSP/1.0 200 OK
  3548.            CSeq: 1
  3549.            Session: 12345678
  3550.            Transport: RTP/AVP/UDP;unicast;client_port=3056-3057;
  3551.                       server_port=5000-5001
  3552.  
  3553.      C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0
  3554.            CSeq: 1
  3555.            Transport: RTP/AVP/UDP;unicast;client_port=3058-3059
  3556.  
  3557.      V->C: RTSP/1.0 200 OK
  3558.            CSeq: 1
  3559.            Session: 23456789
  3560.            Transport: RTP/AVP/UDP;unicast;client_port=3058-3059;
  3561.                       server_port=5002-5003
  3562.  
  3563.      C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0
  3564.            CSeq: 2
  3565.            Session: 23456789
  3566.            Range: smpte=0:10:00-
  3567.  
  3568.      V->C: RTSP/1.0 200 OK
  3569.            CSeq: 2
  3570.            Session: 23456789
  3571.            Range: smpte=0:10:00-0:20:00
  3572.            RTP-Info: url=rtsp://video.example.com/twister/video;
  3573.              seq=12312232;rtptime=78712811
  3574.  
  3575.      C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0
  3576.            CSeq: 2
  3577.            Session: 12345678
  3578.            Range: smpte=0:10:00-
  3579.  
  3580.      A->C: RTSP/1.0 200 OK
  3581.            CSeq: 2
  3582.            Session: 12345678
  3583.  
  3584.  
  3585.  
  3586. Schulzrinne, et. al.        Standards Track                    [Page 64]
  3587.  
  3588. RFC 2326              Real Time Streaming Protocol            April 1998
  3589.  
  3590.  
  3591.            Range: smpte=0:10:00-0:20:00
  3592.            RTP-Info: url=rtsp://audio.example.com/twister/audio.en;
  3593.              seq=876655;rtptime=1032181
  3594.  
  3595.      C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0
  3596.            CSeq: 3
  3597.            Session: 12345678
  3598.  
  3599.      A->C: RTSP/1.0 200 OK
  3600.            CSeq: 3
  3601.  
  3602.      C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0
  3603.            CSeq: 3
  3604.            Session: 23456789
  3605.  
  3606.      V->C: RTSP/1.0 200 OK
  3607.            CSeq: 3
  3608.  
  3609.    Even though the audio and video track are on two different servers,
  3610.    and may start at slightly different times and may drift with respect
  3611.    to each other, the client can synchronize the two using standard RTP
  3612.    methods, in particular the time scale contained in the RTCP sender
  3613.    reports.
  3614.  
  3615. 14.2 Streaming of a Container file
  3616.  
  3617.    For purposes of this example, a container file is a storage entity in
  3618.    which multiple continuous media types pertaining to the same end-user
  3619.    presentation are present. In effect, the container file represents an
  3620.    RTSP presentation, with each of its components being RTSP streams.
  3621.    Container files are a widely used means to store such presentations.
  3622.    While the components are transported as independent streams, it is
  3623.    desirable to maintain a common context for those streams at the
  3624.    server end.
  3625.  
  3626.      This enables the server to keep a single storage handle open
  3627.      easily. It also allows treating all the streams equally in case of
  3628.      any prioritization of streams by the server.
  3629.  
  3630.    It is also possible that the presentation author may wish to prevent
  3631.    selective retrieval of the streams by the client in order to preserve
  3632.    the artistic effect of the combined media presentation. Similarly, in
  3633.    such a tightly bound presentation, it is desirable to be able to
  3634.    control all the streams via a single control message using an
  3635.    aggregate URL.
  3636.  
  3637.    The following is an example of using a single RTSP session to control
  3638.    multiple streams. It also illustrates the use of aggregate URLs.
  3639.  
  3640.  
  3641.  
  3642. Schulzrinne, et. al.        Standards Track                    [Page 65]
  3643.  
  3644. RFC 2326              Real Time Streaming Protocol            April 1998
  3645.  
  3646.  
  3647.    Client C requests a presentation from media server M . The movie is
  3648.    stored in a container file. The client has obtained an RTSP URL to
  3649.    the container file.
  3650.  
  3651.      C->M: DESCRIBE rtsp://foo/twister RTSP/1.0
  3652.            CSeq: 1
  3653.  
  3654.      M->C: RTSP/1.0 200 OK
  3655.            CSeq: 1
  3656.            Content-Type: application/sdp
  3657.            Content-Length: 164
  3658.  
  3659.            v=0
  3660.            o=- 2890844256 2890842807 IN IP4 172.16.2.93
  3661.            s=RTSP Session
  3662.            i=An Example of RTSP Session Usage
  3663.            a=control:rtsp://foo/twister
  3664.            t=0 0
  3665.            m=audio 0 RTP/AVP 0
  3666.            a=control:rtsp://foo/twister/audio
  3667.            m=video 0 RTP/AVP 26
  3668.            a=control:rtsp://foo/twister/video
  3669.  
  3670.      C->M: SETUP rtsp://foo/twister/audio RTSP/1.0
  3671.            CSeq: 2
  3672.            Transport: RTP/AVP;unicast;client_port=8000-8001
  3673.  
  3674.      M->C: RTSP/1.0 200 OK
  3675.            CSeq: 2
  3676.            Transport: RTP/AVP;unicast;client_port=8000-8001;
  3677.                       server_port=9000-9001
  3678.            Session: 12345678
  3679.  
  3680.      C->M: SETUP rtsp://foo/twister/video RTSP/1.0
  3681.            CSeq: 3
  3682.            Transport: RTP/AVP;unicast;client_port=8002-8003
  3683.            Session: 12345678
  3684.  
  3685.      M->C: RTSP/1.0 200 OK
  3686.            CSeq: 3
  3687.            Transport: RTP/AVP;unicast;client_port=8002-8003;
  3688.                       server_port=9004-9005
  3689.            Session: 12345678
  3690.  
  3691.      C->M: PLAY rtsp://foo/twister RTSP/1.0
  3692.            CSeq: 4
  3693.            Range: npt=0-
  3694.            Session: 12345678
  3695.  
  3696.  
  3697.  
  3698. Schulzrinne, et. al.        Standards Track                    [Page 66]
  3699.  
  3700. RFC 2326              Real Time Streaming Protocol            April 1998
  3701.  
  3702.  
  3703.      M->C: RTSP/1.0 200 OK
  3704.            CSeq: 4
  3705.            Session: 12345678
  3706.            RTP-Info: url=rtsp://foo/twister/video;
  3707.              seq=9810092;rtptime=3450012
  3708.  
  3709.      C->M: PAUSE rtsp://foo/twister/video RTSP/1.0
  3710.            CSeq: 5
  3711.            Session: 12345678
  3712.  
  3713.      M->C: RTSP/1.0 460 Only aggregate operation allowed
  3714.            CSeq: 5
  3715.  
  3716.      C->M: PAUSE rtsp://foo/twister RTSP/1.0
  3717.            CSeq: 6
  3718.            Session: 12345678
  3719.  
  3720.      M->C: RTSP/1.0 200 OK
  3721.            CSeq: 6
  3722.            Session: 12345678
  3723.  
  3724.      C->M: SETUP rtsp://foo/twister RTSP/1.0
  3725.            CSeq: 7
  3726.            Transport: RTP/AVP;unicast;client_port=10000
  3727.  
  3728.      M->C: RTSP/1.0 459 Aggregate operation not allowed
  3729.            CSeq: 7
  3730.  
  3731.  
  3732.    In the first instance of failure, the client tries to pause one
  3733.    stream (in this case video) of the presentation. This is disallowed
  3734.    for that presentation by the server. In the second instance, the
  3735.    aggregate URL may not be used for SETUP and one control message is
  3736.    required per stream to set up transport parameters.
  3737.  
  3738.      This keeps the syntax of the Transport header simple and allows
  3739.      easy parsing of transport information by firewalls.
  3740.  
  3741. 14.3 Single Stream Container Files
  3742.  
  3743.    Some RTSP servers may treat all files as though they are "container
  3744.    files", yet other servers may not support such a concept. Because of
  3745.    this, clients SHOULD use the rules set forth in the session
  3746.    description for request URLs, rather than assuming that a consistent
  3747.    URL may always be used throughout. Here's an example of how a multi-
  3748.    stream server might expect a single-stream file to be served:
  3749.  
  3750.           Accept: application/x-rtsp-mh, application/sdp
  3751.  
  3752.  
  3753.  
  3754. Schulzrinne, et. al.        Standards Track                    [Page 67]
  3755.  
  3756. RFC 2326              Real Time Streaming Protocol            April 1998
  3757.  
  3758.  
  3759.           CSeq: 1
  3760.  
  3761.     S->C  RTSP/1.0 200 OK
  3762.           CSeq: 1
  3763.           Content-base: rtsp://foo.com/test.wav/
  3764.           Content-type: application/sdp
  3765.           Content-length: 48
  3766.  
  3767.           v=0
  3768.           o=- 872653257 872653257 IN IP4 172.16.2.187
  3769.           s=mu-law wave file
  3770.           i=audio test
  3771.           t=0 0
  3772.           m=audio 0 RTP/AVP 0
  3773.           a=control:streamid=0
  3774.  
  3775.     C->S  SETUP rtsp://foo.com/test.wav/streamid=0 RTSP/1.0
  3776.           Transport: RTP/AVP/UDP;unicast;
  3777.                      client_port=6970-6971;mode=play
  3778.           CSeq: 2
  3779.  
  3780.     S->C  RTSP/1.0 200 OK
  3781.           Transport: RTP/AVP/UDP;unicast;client_port=6970-6971;
  3782.                      server_port=6970-6971;mode=play
  3783.           CSeq: 2
  3784.           Session: 2034820394
  3785.  
  3786.     C->S  PLAY rtsp://foo.com/test.wav RTSP/1.0
  3787.           CSeq: 3
  3788.           Session: 2034820394
  3789.  
  3790.     S->C  RTSP/1.0 200 OK
  3791.           CSeq: 3
  3792.           Session: 2034820394
  3793.           RTP-Info: url=rtsp://foo.com/test.wav/streamid=0;
  3794.             seq=981888;rtptime=3781123
  3795.  
  3796.    Note the different URL in the SETUP command, and then the switch back
  3797.    to the aggregate URL in the PLAY command. This makes complete sense
  3798.    when there are multiple streams with aggregate control, but is less
  3799.    than intuitive in the special case where the number of streams is
  3800.    one.
  3801.  
  3802.    In this special case, it is recommended that servers be forgiving of
  3803.    implementations that send:
  3804.  
  3805.     C->S  PLAY rtsp://foo.com/test.wav/streamid=0 RTSP/1.0
  3806.           CSeq: 3
  3807.  
  3808.  
  3809.  
  3810. Schulzrinne, et. al.        Standards Track                    [Page 68]
  3811.  
  3812. RFC 2326              Real Time Streaming Protocol            April 1998
  3813.  
  3814.  
  3815.    In the worst case, servers should send back:
  3816.  
  3817.     S->C  RTSP/1.0 460 Only aggregate operation allowed
  3818.           CSeq: 3
  3819.  
  3820.    One would also hope that server implementations are also forgiving of
  3821.    the following:
  3822.  
  3823.     C->S  SETUP rtsp://foo.com/test.wav RTSP/1.0
  3824.           Transport: rtp/avp/udp;client_port=6970-6971;mode=play
  3825.           CSeq: 2
  3826.  
  3827.    Since there is only a single stream in this file, it's not ambiguous
  3828.    what this means.
  3829.  
  3830. 14.4 Live Media Presentation Using Multicast
  3831.  
  3832.    The media server M chooses the multicast address and port. Here, we
  3833.    assume that the web server only contains a pointer to the full
  3834.    description, while the media server M maintains the full description.
  3835.  
  3836.      C->W: GET /concert.sdp HTTP/1.1
  3837.            Host: www.example.com
  3838.  
  3839.      W->C: HTTP/1.1 200 OK
  3840.            Content-Type: application/x-rtsl
  3841.  
  3842.            <session>
  3843.              <track src="rtsp://live.example.com/concert/audio">
  3844.            </session>
  3845.  
  3846.      C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/1.0
  3847.            CSeq: 1
  3848.  
  3849.      M->C: RTSP/1.0 200 OK
  3850.            CSeq: 1
  3851.            Content-Type: application/sdp
  3852.            Content-Length: 44
  3853.  
  3854.            v=0
  3855.            o=- 2890844526 2890842807 IN IP4 192.16.24.202
  3856.            s=RTSP Session
  3857.            m=audio 3456 RTP/AVP 0
  3858.            a=control:rtsp://live.example.com/concert/audio
  3859.            c=IN IP4 224.2.0.1/16
  3860.  
  3861.      C->M: SETUP rtsp://live.example.com/concert/audio RTSP/1.0
  3862.            CSeq: 2
  3863.  
  3864.  
  3865.  
  3866. Schulzrinne, et. al.        Standards Track                    [Page 69]
  3867.  
  3868. RFC 2326              Real Time Streaming Protocol            April 1998
  3869.  
  3870.  
  3871.            Transport: RTP/AVP;multicast
  3872.  
  3873.      M->C: RTSP/1.0 200 OK
  3874.            CSeq: 2
  3875.            Transport: RTP/AVP;multicast;destination=224.2.0.1;
  3876.                       port=3456-3457;ttl=16
  3877.            Session: 0456804596
  3878.  
  3879.      C->M: PLAY rtsp://live.example.com/concert/audio RTSP/1.0
  3880.            CSeq: 3
  3881.            Session: 0456804596
  3882.  
  3883.      M->C: RTSP/1.0 200 OK
  3884.            CSeq: 3
  3885.            Session: 0456804596
  3886.  
  3887. 14.5 Playing media into an existing session
  3888.  
  3889.    A conference participant C wants to have the media server M play back
  3890.    a demo tape into an existing conference. C indicates to the media
  3891.    server that the network addresses and encryption keys are already
  3892.    given by the conference, so they should not be chosen by the server.
  3893.    The example omits the simple ACK responses.
  3894.  
  3895.      C->M: DESCRIBE rtsp://server.example.com/demo/548/sound RTSP/1.0
  3896.            CSeq: 1
  3897.            Accept: application/sdp
  3898.  
  3899.      M->C: RTSP/1.0 200 1 OK
  3900.            Content-type: application/sdp
  3901.            Content-Length: 44
  3902.  
  3903.            v=0
  3904.            o=- 2890844526 2890842807 IN IP4 192.16.24.202
  3905.            s=RTSP Session
  3906.            i=See above
  3907.            t=0 0
  3908.            m=audio 0 RTP/AVP 0
  3909.  
  3910.      C->M: SETUP rtsp://server.example.com/demo/548/sound RTSP/1.0
  3911.            CSeq: 2
  3912.            Transport: RTP/AVP;multicast;destination=225.219.201.15;
  3913.                       port=7000-7001;ttl=127
  3914.            Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
  3915.  
  3916.      M->C: RTSP/1.0 200 OK
  3917.            CSeq: 2
  3918.            Transport: RTP/AVP;multicast;destination=225.219.201.15;
  3919.  
  3920.  
  3921.  
  3922. Schulzrinne, et. al.        Standards Track                    [Page 70]
  3923.  
  3924. RFC 2326              Real Time Streaming Protocol            April 1998
  3925.  
  3926.  
  3927.                       port=7000-7001;ttl=127
  3928.            Session: 91389234234
  3929.            Conference: 199702170042.SAA08642@obiwan.arl.wustl.edu%20Starr
  3930.  
  3931.      C->M: PLAY rtsp://server.example.com/demo/548/sound RTSP/1.0
  3932.            CSeq: 3
  3933.            Session: 91389234234
  3934.  
  3935.      M->C: RTSP/1.0 200 OK
  3936.            CSeq: 3
  3937.  
  3938. 14.6 Recording
  3939.  
  3940.    The conference participant client C asks the media server M to record
  3941.    the audio and video portions of a meeting. The client uses the
  3942.    ANNOUNCE method to provide meta-information about the recorded
  3943.    session to the server.
  3944.  
  3945.      C->M: ANNOUNCE rtsp://server.example.com/meeting RTSP/1.0
  3946.            CSeq: 90
  3947.            Content-Type: application/sdp
  3948.            Content-Length: 121
  3949.  
  3950.            v=0
  3951.            o=camera1 3080117314 3080118787 IN IP4 195.27.192.36
  3952.            s=IETF Meeting, Munich - 1
  3953.            i=The thirty-ninth IETF meeting will be held in Munich, Germany
  3954.            u=http://www.ietf.org/meetings/Munich.html
  3955.            e=IETF Channel 1 <ietf39-mbone@uni-koeln.de>
  3956.            p=IETF Channel 1 +49-172-2312 451
  3957.            c=IN IP4 224.0.1.11/127
  3958.            t=3080271600 3080703600
  3959.            a=tool:sdr v2.4a6
  3960.            a=type:test
  3961.            m=audio 21010 RTP/AVP 5
  3962.            c=IN IP4 224.0.1.11/127
  3963.            a=ptime:40
  3964.            m=video 61010 RTP/AVP 31
  3965.            c=IN IP4 224.0.1.12/127
  3966.  
  3967.      M->C: RTSP/1.0 200 OK
  3968.            CSeq: 90
  3969.  
  3970.      C->M: SETUP rtsp://server.example.com/meeting/audiotrack RTSP/1.0
  3971.            CSeq: 91
  3972.            Transport: RTP/AVP;multicast;destination=224.0.1.11;
  3973.                       port=21010-21011;mode=record;ttl=127
  3974.  
  3975.  
  3976.  
  3977.  
  3978. Schulzrinne, et. al.        Standards Track                    [Page 71]
  3979.  
  3980. RFC 2326              Real Time Streaming Protocol            April 1998
  3981.  
  3982.  
  3983.      M->C: RTSP/1.0 200 OK
  3984.            CSeq: 91
  3985.            Session: 50887676
  3986.            Transport: RTP/AVP;multicast;destination=224.0.1.11;
  3987.                       port=21010-21011;mode=record;ttl=127
  3988.  
  3989.      C->M: SETUP rtsp://server.example.com/meeting/videotrack RTSP/1.0
  3990.            CSeq: 92
  3991.            Session: 50887676
  3992.            Transport: RTP/AVP;multicast;destination=224.0.1.12;
  3993.                       port=61010-61011;mode=record;ttl=127
  3994.  
  3995.      M->C: RTSP/1.0 200 OK
  3996.            CSeq: 92
  3997.            Transport: RTP/AVP;multicast;destination=224.0.1.12;
  3998.                       port=61010-61011;mode=record;ttl=127
  3999.  
  4000.      C->M: RECORD rtsp://server.example.com/meeting RTSP/1.0
  4001.            CSeq: 93
  4002.            Session: 50887676
  4003.            Range: clock=19961110T1925-19961110T2015
  4004.  
  4005.      M->C: RTSP/1.0 200 OK
  4006.            CSeq: 93
  4007.  
  4008. 15 Syntax
  4009.  
  4010.    The RTSP syntax is described in an augmented Backus-Naur form (BNF)
  4011.    as used in RFC 2068 [2].
  4012.  
  4013. 15.1 Base Syntax
  4014.  
  4015.    OCTET              =      <any 8-bit sequence of data>
  4016.    CHAR               =      <any US-ASCII character (octets 0 - 127)>
  4017.    UPALPHA            =      <any US-ASCII uppercase letter "A".."Z">
  4018.    LOALPHA            =      <any US-ASCII lowercase letter "a".."z">
  4019.    ALPHA              =      UPALPHA | LOALPHA
  4020.  
  4021.    DIGIT              =      <any US-ASCII digit "0".."9">
  4022.    CTL                =      <any US-ASCII control character
  4023.                               (octets 0 - 31) and DEL (127)>
  4024.    CR                 =      <US-ASCII CR, carriage return (13)>
  4025.    LF                 =      <US-ASCII LF, linefeed (10)>
  4026.  
  4027.    SP                 =      <US-ASCII SP, space (32)>
  4028.    HT                 =      <US-ASCII HT, horizontal-tab (9)>
  4029.    <">                =      <US-ASCII double-quote mark (34)>
  4030.    CRLF               =      CR LF
  4031.  
  4032.  
  4033.  
  4034. Schulzrinne, et. al.        Standards Track                    [Page 72]
  4035.  
  4036. RFC 2326              Real Time Streaming Protocol            April 1998
  4037.  
  4038.  
  4039.    LWS                =      [CRLF] 1*( SP | HT )
  4040.    TEXT               =      <any OCTET except CTLs>
  4041.    tspecials          =      "(" | ")" | "<" | ">" | "@"
  4042.                       |       "," | ";" | ":" | "\" | <">
  4043.                       |       "/" | "[" | "]" | "?" | "="
  4044.                       |       "{" | "}" | SP | HT
  4045.  
  4046.    token              =      1*<any CHAR except CTLs or tspecials>
  4047.    quoted-string      =      ( <"> *(qdtext) <"> )
  4048.    qdtext             =      <any TEXT except <">>
  4049.    quoted-pair        =      "\" CHAR
  4050.  
  4051.    message-header     =      field-name ":" [ field-value ] CRLF
  4052.    field-name         =      token
  4053.    field-value        =      *( field-content | LWS )
  4054.    field-content      =      <the OCTETs making up the field-value and
  4055.                               consisting of either *TEXT or
  4056.                               combinations of token, tspecials, and
  4057.                               quoted-string>
  4058.  
  4059.    safe               =  "\$" | "-" | "_" | "." | "+"
  4060.    extra              =  "!" | "*" | "$'$" | "(" | ")" | ","
  4061.  
  4062.    hex                =  DIGIT | "A" | "B" | "C" | "D" | "E" | "F" |
  4063.                         "a" | "b" | "c" | "d" | "e" | "f"
  4064.    escape             =  "\%" hex hex
  4065.    reserved           =  ";" | "/" | "?" | ":" | "@" | "&" | "="
  4066.  
  4067.    unreserved         =  alpha | digit | safe | extra
  4068.    xchar              =  unreserved | reserved | escape
  4069.  
  4070. 16 Security Considerations
  4071.  
  4072.    Because of the similarity in syntax and usage between RTSP servers
  4073.    and HTTP servers, the security considerations outlined in [H15]
  4074.    apply.  Specifically, please note the following:
  4075.  
  4076.    Authentication Mechanisms:
  4077.           RTSP and HTTP share common authentication schemes, and thus
  4078.           should follow the same prescriptions with regards to
  4079.           authentication. See [H15.1] for client authentication issues,
  4080.           and [H15.2] for issues regarding support for multiple
  4081.           authentication mechanisms.
  4082.  
  4083.    Abuse of Server Log Information:
  4084.           RTSP and HTTP servers will presumably have similar logging
  4085.           mechanisms, and thus should be equally guarded in protecting
  4086.           the contents of those logs, thus protecting the privacy of the
  4087.  
  4088.  
  4089.  
  4090. Schulzrinne, et. al.        Standards Track                    [Page 73]
  4091.  
  4092. RFC 2326              Real Time Streaming Protocol            April 1998
  4093.  
  4094.  
  4095.           users of the servers. See [H15.3] for HTTP server
  4096.           recommendations regarding server logs.
  4097.  
  4098.    Transfer of Sensitive Information:
  4099.           There is no reason to believe that information transferred via
  4100.           RTSP may be any less sensitive than that normally transmitted
  4101.           via HTTP. Therefore, all of the precautions regarding the
  4102.           protection of data privacy and user privacy apply to
  4103.           implementors of RTSP clients, servers, and proxies. See
  4104.           [H15.4] for further details.
  4105.  
  4106.    Attacks Based On File and Path Names:
  4107.           Though RTSP URLs are opaque handles that do not necessarily
  4108.           have file system semantics, it is anticipated that many
  4109.           implementations will translate portions of the request URLs
  4110.           directly to file system calls. In such cases, file systems
  4111.           SHOULD follow the precautions outlined in [H15.5], such as
  4112.           checking for ".." in path components.
  4113.  
  4114.    Personal Information:
  4115.           RTSP clients are often privy to the same information that HTTP
  4116.           clients are (user name, location, etc.) and thus should be
  4117.           equally. See [H15.6] for further recommendations.
  4118.  
  4119.    Privacy Issues Connected to Accept Headers:
  4120.           Since may of the same "Accept" headers exist in RTSP as in
  4121.           HTTP, the same caveats outlined in [H15.7] with regards to
  4122.           their use should be followed.
  4123.  
  4124.    DNS Spoofing:
  4125.           Presumably, given the longer connection times typically
  4126.           associated to RTSP sessions relative to HTTP sessions, RTSP
  4127.           client DNS optimizations should be less prevalent.
  4128.           Nonetheless, the recommendations provided in [H15.8] are still
  4129.           relevant to any implementation which attempts to rely on a
  4130.           DNS-to-IP mapping to hold beyond a single use of the mapping.
  4131.  
  4132.    Location Headers and Spoofing:
  4133.           If a single server supports multiple organizations that do not
  4134.           trust one another, then it must check the values of Location
  4135.           and Content-Location headers in responses that are generated
  4136.           under control of said organizations to make sure that they do
  4137.           not attempt to invalidate resources over which they have no
  4138.           authority. ([H15.9])
  4139.  
  4140.    In addition to the recommendations in the current HTTP specification
  4141.    (RFC 2068 [2], as of this writing), future HTTP specifications may
  4142.    provide additional guidance on security issues.
  4143.  
  4144.  
  4145.  
  4146. Schulzrinne, et. al.        Standards Track                    [Page 74]
  4147.  
  4148. RFC 2326              Real Time Streaming Protocol            April 1998
  4149.  
  4150.  
  4151.    The following are added considerations for RTSP implementations.
  4152.  
  4153.    Concentrated denial-of-service attack:
  4154.           The protocol offers the opportunity for a remote-controlled
  4155.           denial-of-service attack. The attacker may initiate traffic
  4156.           flows to one or more IP addresses by specifying them as the
  4157.           destination in SETUP requests. While the attacker's IP address
  4158.           may be known in this case, this is not always useful in
  4159.           prevention of more attacks or ascertaining the attackers
  4160.           identity. Thus, an RTSP server SHOULD only allow client-
  4161.           specified destinations for RTSP-initiated traffic flows if the
  4162.           server has verified the client's identity, either against a
  4163.           database of known users using RTSP authentication mechanisms
  4164.           (preferably digest authentication or stronger), or other
  4165.           secure means.
  4166.  
  4167.    Session hijacking:
  4168.           Since there is no relation between a transport layer
  4169.           connection and an RTSP session, it is possible for a malicious
  4170.           client to issue requests with random session identifiers which
  4171.           would affect unsuspecting clients. The server SHOULD use a
  4172.           large, random and non-sequential session identifier to
  4173.           minimize the possibility of this kind of attack.
  4174.  
  4175.    Authentication:
  4176.           Servers SHOULD implement both basic and digest [8]
  4177.           authentication. In environments requiring tighter security for
  4178.           the control messages, the RTSP control stream may be
  4179.           encrypted.
  4180.  
  4181.    Stream issues:
  4182.           RTSP only provides for stream control. Stream delivery issues
  4183.           are not covered in this section, nor in the rest of this memo.
  4184.           RTSP implementations will most likely rely on other protocols
  4185.           such as RTP, IP multicast, RSVP and IGMP, and should address
  4186.           security considerations brought up in those and other
  4187.           applicable specifications.
  4188.  
  4189.    Persistently suspicious behavior:
  4190.           RTSP servers SHOULD return error code 403 (Forbidden) upon
  4191.           receiving a single instance of behavior which is deemed a
  4192.           security risk. RTSP servers SHOULD also be aware of attempts
  4193.           to probe the server for weaknesses and entry points and MAY
  4194.           arbitrarily disconnect and ignore further requests clients
  4195.           which are deemed to be in violation of local security policy.
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202. Schulzrinne, et. al.        Standards Track                    [Page 75]
  4203.  
  4204. RFC 2326              Real Time Streaming Protocol            April 1998
  4205.  
  4206.  
  4207. Appendix A: RTSP Protocol State Machines
  4208.  
  4209.    The RTSP client and server state machines describe the behavior of
  4210.    the protocol from RTSP session initialization through RTSP session
  4211.    termination.
  4212.  
  4213.    State is defined on a per object basis. An object is uniquely
  4214.    identified by the stream URL and the RTSP session identifier. Any
  4215.    request/reply using aggregate URLs denoting RTSP presentations
  4216.    composed of multiple streams will have an effect on the individual
  4217.    states of all the streams. For example, if the presentation /movie
  4218.    contains two streams, /movie/audio and /movie/video, then the
  4219.    following command:
  4220.  
  4221.      PLAY rtsp://foo.com/movie RTSP/1.0
  4222.      CSeq: 559
  4223.      Session: 12345678
  4224.  
  4225.    will have an effect on the states of movie/audio and movie/video.
  4226.  
  4227.      This example does not imply a standard way to represent streams in
  4228.      URLs or a relation to the filesystem. See Section 3.2.
  4229.  
  4230.    The requests OPTIONS, ANNOUNCE, DESCRIBE, GET_PARAMETER,
  4231.    SET_PARAMETER do not have any effect on client or server state and
  4232.    are therefore not listed in the state tables.
  4233.  
  4234. A.1 Client State Machine
  4235.  
  4236.    The client can assume the following states:
  4237.  
  4238.    Init:
  4239.           SETUP has been sent, waiting for reply.
  4240.  
  4241.    Ready:
  4242.           SETUP reply received or PAUSE reply received while in Playing
  4243.           state.
  4244.  
  4245.    Playing:
  4246.           PLAY reply received
  4247.  
  4248.    Recording:
  4249.           RECORD reply received
  4250.  
  4251.    In general, the client changes state on receipt of replies to
  4252.    requests. Note that some requests are effective at a future time or
  4253.    position (such as a PAUSE), and state also changes accordingly. If no
  4254.    explicit SETUP is required for the object (for example, it is
  4255.  
  4256.  
  4257.  
  4258. Schulzrinne, et. al.        Standards Track                    [Page 76]
  4259.  
  4260. RFC 2326              Real Time Streaming Protocol            April 1998
  4261.  
  4262.  
  4263.    available via a multicast group), state begins at Ready. In this
  4264.    case, there are only two states, Ready and Playing. The client also
  4265.    changes state from Playing/Recording to Ready when the end of the
  4266.    requested range is reached.
  4267.  
  4268.    The "next state" column indicates the state assumed after receiving a
  4269.    success response (2xx). If a request yields a status code of 3xx, the
  4270.    state becomes Init, and a status code of 4xx yields no change in
  4271.    state. Messages not listed for each state MUST NOT be issued by the
  4272.    client in that state, with the exception of messages not affecting
  4273.    state, as listed above. Receiving a REDIRECT from the server is
  4274.    equivalent to receiving a 3xx redirect status from the server.
  4275.  
  4276.  
  4277.    state       message sent     next state after response
  4278.    Init        SETUP            Ready
  4279.                TEARDOWN         Init
  4280.    Ready       PLAY             Playing
  4281.                RECORD           Recording
  4282.                TEARDOWN         Init
  4283.                SETUP            Ready
  4284.    Playing     PAUSE            Ready
  4285.                TEARDOWN         Init
  4286.                PLAY             Playing
  4287.                SETUP            Playing (changed transport)
  4288.    Recording   PAUSE            Ready
  4289.                TEARDOWN         Init
  4290.                RECORD           Recording
  4291.                SETUP            Recording (changed transport)
  4292.  
  4293. A.2 Server State Machine
  4294.  
  4295.    The server can assume the following states:
  4296.  
  4297.    Init:
  4298.           The initial state, no valid SETUP has been received yet.
  4299.  
  4300.    Ready:
  4301.           Last SETUP received was successful, reply sent or after
  4302.           playing, last PAUSE received was successful, reply sent.
  4303.  
  4304.    Playing:
  4305.           Last PLAY received was successful, reply sent. Data is being
  4306.           sent.
  4307.  
  4308.    Recording:
  4309.           The server is recording media data.
  4310.  
  4311.  
  4312.  
  4313.  
  4314. Schulzrinne, et. al.        Standards Track                    [Page 77]
  4315.  
  4316. RFC 2326              Real Time Streaming Protocol            April 1998
  4317.  
  4318.  
  4319.    In general, the server changes state on receiving requests. If the
  4320.    server is in state Playing or Recording and in unicast mode, it MAY
  4321.    revert to Init and tear down the RTSP session if it has not received
  4322.    "wellness" information, such as RTCP reports or RTSP commands, from
  4323.    the client for a defined interval, with a default of one minute. The
  4324.    server can declare another timeout value in the Session response
  4325.    header (Section 12.37). If the server is in state Ready, it MAY
  4326.    revert to Init if it does not receive an RTSP request for an interval
  4327.    of more than one minute. Note that some requests (such as PAUSE) may
  4328.    be effective at a future time or position, and server state changes
  4329.    at the appropriate time. The server reverts from state Playing or
  4330.    Recording to state Ready at the end of the range requested by the
  4331.    client.
  4332.  
  4333.    The REDIRECT message, when sent, is effective immediately unless it
  4334.    has a Range header specifying when the redirect is effective. In such
  4335.    a case, server state will also change at the appropriate time.
  4336.  
  4337.    If no explicit SETUP is required for the object, the state starts at
  4338.    Ready and there are only two states, Ready and Playing.
  4339.  
  4340.    The "next state" column indicates the state assumed after sending a
  4341.    success response (2xx). If a request results in a status code of 3xx,
  4342.    the state becomes Init. A status code of 4xx results in no change.
  4343.  
  4344.      state           message received  next state
  4345.      Init            SETUP             Ready
  4346.                      TEARDOWN          Init
  4347.      Ready           PLAY              Playing
  4348.                      SETUP             Ready
  4349.                      TEARDOWN          Init
  4350.                      RECORD            Recording
  4351.      Playing         PLAY              Playing
  4352.                      PAUSE             Ready
  4353.                      TEARDOWN          Init
  4354.                      SETUP             Playing
  4355.      Recording       RECORD            Recording
  4356.                      PAUSE             Ready
  4357.                      TEARDOWN          Init
  4358.                      SETUP             Recording
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370. Schulzrinne, et. al.        Standards Track                    [Page 78]
  4371.  
  4372. RFC 2326              Real Time Streaming Protocol            April 1998
  4373.  
  4374.  
  4375. Appendix B: Interaction with RTP
  4376.  
  4377.    RTSP allows media clients to control selected, non-contiguous
  4378.    sections of media presentations, rendering those streams with an RTP
  4379.    media layer[24]. The media layer rendering the RTP stream should not
  4380.    be affected by jumps in NPT. Thus, both RTP sequence numbers and RTP
  4381.    timestamps MUST be continuous and monotonic across jumps of NPT.
  4382.  
  4383.    As an example, assume a clock frequency of 8000 Hz, a packetization
  4384.    interval of 100 ms and an initial sequence number and timestamp of
  4385.    zero. First we play NPT 10 through 15, then skip ahead and play NPT
  4386.    18 through 20. The first segment is presented as RTP packets with
  4387.    sequence numbers 0 through 49 and timestamp 0 through 39,200. The
  4388.    second segment consists of RTP packets with sequence number 50
  4389.    through 69, with timestamps 40,000 through 55,200.
  4390.  
  4391.      We cannot assume that the RTSP client can communicate with the RTP
  4392.      media agent, as the two may be independent processes. If the RTP
  4393.      timestamp shows the same gap as the NPT, the media agent will
  4394.      assume that there is a pause in the presentation. If the jump in
  4395.      NPT is large enough, the RTP timestamp may roll over and the media
  4396.      agent may believe later packets to be duplicates of packets just
  4397.      played out.
  4398.  
  4399.      For certain datatypes, tight integration between the RTSP layer and
  4400.      the RTP layer will be necessary. This by no means precludes the
  4401.      above restriction. Combined RTSP/RTP media clients should use the
  4402.      RTP-Info field to determine whether incoming RTP packets were sent
  4403.      before or after a seek.
  4404.  
  4405.    For continuous audio, the server SHOULD set the RTP marker bit at the
  4406.    beginning of serving a new PLAY request. This allows the client to
  4407.    perform playout delay adaptation.
  4408.  
  4409.    For scaling (see Section 12.34), RTP timestamps should correspond to
  4410.    the playback timing. For example, when playing video recorded at 30
  4411.    frames/second at a scale of two and speed (Section 12.35) of one, the
  4412.    server would drop every second frame to maintain and deliver video
  4413.    packets with the normal timestamp spacing of 3,000 per frame, but NPT
  4414.    would increase by 1/15 second for each video frame.
  4415.  
  4416.    The client can maintain a correct display of NPT by noting the RTP
  4417.    timestamp value of the first packet arriving after repositioning. The
  4418.    sequence parameter of the RTP-Info (Section 12.33) header provides
  4419.    the first sequence number of the next segment.
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426. Schulzrinne, et. al.        Standards Track                    [Page 79]
  4427.  
  4428. RFC 2326              Real Time Streaming Protocol            April 1998
  4429.  
  4430.  
  4431. Appendix C: Use of SDP for RTSP Session Descriptions
  4432.  
  4433.    The Session Description Protocol (SDP, RFC XXXX [6]) may be used to
  4434.    describe streams or presentations in RTSP. Such usage is limited to
  4435.    specifying means of access and encoding(s) for:
  4436.  
  4437.    aggregate control:
  4438.           A presentation composed of streams from one or more servers
  4439.           that are not available for aggregate control. Such a
  4440.           description is typically retrieved by HTTP or other non-RTSP
  4441.           means. However, they may be received with ANNOUNCE methods.
  4442.  
  4443.    non-aggregate control:
  4444.           A presentation composed of multiple streams from a single
  4445.           server that are available for aggregate control. Such a
  4446.           description is typically returned in reply to a DESCRIBE
  4447.           request on a URL, or received in an ANNOUNCE method.
  4448.  
  4449.    This appendix describes how an SDP file, retrieved, for example,
  4450.    through HTTP, determines the operation of an RTSP session. It also
  4451.    describes how a client should interpret SDP content returned in reply
  4452.    to a DESCRIBE request. SDP provides no mechanism by which a client
  4453.    can distinguish, without human guidance, between several media
  4454.    streams to be rendered simultaneously and a set of alternatives
  4455.    (e.g., two audio streams spoken in different languages).
  4456.  
  4457. C.1 Definitions
  4458.  
  4459.    The terms "session-level", "media-level" and other key/attribute
  4460.    names and values used in this appendix are to be used as defined in
  4461.    SDP (RFC XXXX [6]):
  4462.  
  4463. C.1.1 Control URL
  4464.  
  4465.    The "a=control:" attribute is used to convey the control URL. This
  4466.    attribute is used both for the session and media descriptions. If
  4467.    used for individual media, it indicates the URL to be used for
  4468.    controlling that particular media stream. If found at the session
  4469.    level, the attribute indicates the URL for aggregate control.
  4470.  
  4471.    Example:
  4472.      a=control:rtsp://example.com/foo
  4473.  
  4474.    This attribute may contain either relative and absolute URLs,
  4475.    following the rules and conventions set out in RFC 1808 [25].
  4476.    Implementations should look for a base URL in the following order:
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482. Schulzrinne, et. al.        Standards Track                    [Page 80]
  4483.  
  4484. RFC 2326              Real Time Streaming Protocol            April 1998
  4485.  
  4486.  
  4487.    1.     The RTSP Content-Base field
  4488.    2.     The RTSP Content-Location field
  4489.    3.     The RTSP request URL
  4490.  
  4491.    If this attribute contains only an asterisk (*), then the URL is
  4492.    treated as if it were an empty embedded URL, and thus inherits the
  4493.    entire base URL.
  4494.  
  4495. C.1.2 Media streams
  4496.  
  4497.    The "m=" field is used to enumerate the streams. It is expected that
  4498.    all the specified streams will be rendered with appropriate
  4499.    synchronization. If the session is unicast, the port number serves as
  4500.    a recommendation from the server to the client; the client still has
  4501.    to include it in its SETUP request and may ignore this
  4502.    recommendation.  If the server has no preference, it SHOULD set the
  4503.    port number value to zero.
  4504.  
  4505.    Example:
  4506.      m=audio 0 RTP/AVP 31
  4507.  
  4508. C.1.3 Payload type(s)
  4509.  
  4510.    The payload type(s) are specified in the "m=" field. In case the
  4511.    payload type is a static payload type from RFC 1890 [1], no other
  4512.    information is required. In case it is a dynamic payload type, the
  4513.    media attribute "rtpmap" is used to specify what the media is. The
  4514.    "encoding name" within the "rtpmap" attribute may be one of those
  4515.    specified in RFC 1890 (Sections 5 and 6), or an experimental encoding
  4516.    with a "X-" prefix as specified in SDP (RFC XXXX [6]).  Codec-
  4517.    specific parameters are not specified in this field, but rather in
  4518.    the "fmtp" attribute described below. Implementors seeking to
  4519.    register new encodings should follow the procedure in RFC 1890 [1].
  4520.    If the media type is not suited to the RTP AV profile, then it is
  4521.    recommended that a new profile be created and the appropriate profile
  4522.    name be used in lieu of "RTP/AVP" in the "m=" field.
  4523.  
  4524. C.1.4 Format-specific parameters
  4525.  
  4526.    Format-specific parameters are conveyed using the "fmtp" media
  4527.    attribute. The syntax of the "fmtp" attribute is specific to the
  4528.    encoding(s) that the attribute refers to. Note that the packetization
  4529.    interval is conveyed using the "ptime" attribute.
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538. Schulzrinne, et. al.        Standards Track                    [Page 81]
  4539.  
  4540. RFC 2326              Real Time Streaming Protocol            April 1998
  4541.  
  4542.  
  4543. C.1.5 Range of presentation
  4544.  
  4545.    The "a=range" attribute defines the total time range of the stored
  4546.    session. (The length of live sessions can be deduced from the "t" and
  4547.    "r" parameters.) Unless the presentation contains media streams of
  4548.    different durations, the range attribute is a session-level
  4549.    attribute. The unit is specified first, followed by the value range.
  4550.    The units and their values are as defined in Section 3.5, 3.6 and
  4551.    3.7.
  4552.  
  4553.    Examples:
  4554.      a=range:npt=0-34.4368
  4555.      a=range:clock=19971113T2115-19971113T2203
  4556.  
  4557. C.1.6 Time of availability
  4558.  
  4559.    The "t=" field MUST contain suitable values for the start and stop
  4560.    times for both aggregate and non-aggregate stream control. With
  4561.    aggregate control, the server SHOULD indicate a stop time value for
  4562.    which it guarantees the description to be valid, and a start time
  4563.    that is equal to or before the time at which the DESCRIBE request was
  4564.    received. It MAY also indicate start and stop times of 0, meaning
  4565.    that the session is always available. With non-aggregate control, the
  4566.    values should reflect the actual period for which the session is
  4567.    available in keeping with SDP semantics, and not depend on other
  4568.    means (such as the life of the web page containing the description)
  4569.    for this purpose.
  4570.  
  4571. C.1.7 Connection Information
  4572.  
  4573.    In SDP, the "c=" field contains the destination address for the media
  4574.    stream. However, for on-demand unicast streams and some multicast
  4575.    streams, the destination address is specified by the client via the
  4576.    SETUP request. Unless the media content has a fixed destination
  4577.    address, the "c=" field is to be set to a suitable null value. For
  4578.    addresses of type "IP4", this value is "0.0.0.0".
  4579.  
  4580.   C.1.8 Entity Tag
  4581.  
  4582.    The optional "a=etag" attribute identifies a version of the session
  4583.    description. It is opaque to the client. SETUP requests may include
  4584.    this identifier in the If-Match field (see section 12.22) to only
  4585.    allow session establishment if this attribute value still corresponds
  4586.    to that of the current description. The attribute value is opaque and
  4587.    may contain any character allowed within SDP attribute values.
  4588.  
  4589.    Example:
  4590.      a=etag:158bb3e7c7fd62ce67f12b533f06b83a
  4591.  
  4592.  
  4593.  
  4594. Schulzrinne, et. al.        Standards Track                    [Page 82]
  4595.  
  4596. RFC 2326              Real Time Streaming Protocol            April 1998
  4597.  
  4598.  
  4599.      One could argue that the "o=" field provides identical
  4600.      functionality. However, it does so in a manner that would put
  4601.      constraints on servers that need to support multiple session
  4602.      description types other than SDP for the same piece of media
  4603.      content.
  4604.  
  4605. C.2 Aggregate Control Not Available
  4606.  
  4607.    If a presentation does not support aggregate control and multiple
  4608.    media sections are specified, each section MUST have the control URL
  4609.    specified via the "a=control:" attribute.
  4610.  
  4611.    Example:
  4612.      v=0
  4613.      o=- 2890844256 2890842807 IN IP4 204.34.34.32
  4614.      s=I came from a web page
  4615.      t=0 0
  4616.      c=IN IP4 0.0.0.0
  4617.      m=video 8002 RTP/AVP 31
  4618.      a=control:rtsp://audio.com/movie.aud
  4619.      m=audio 8004 RTP/AVP 3
  4620.      a=control:rtsp://video.com/movie.vid
  4621.  
  4622.    Note that the position of the control URL in the description implies
  4623.    that the client establishes separate RTSP control sessions to the
  4624.    servers audio.com and video.com.
  4625.  
  4626.    It is recommended that an SDP file contains the complete media
  4627.    initialization information even if it is delivered to the media
  4628.    client through non-RTSP means. This is necessary as there is no
  4629.    mechanism to indicate that the client should request more detailed
  4630.    media stream information via DESCRIBE.
  4631.  
  4632. C.3 Aggregate Control Available
  4633.  
  4634.    In this scenario, the server has multiple streams that can be
  4635.    controlled as a whole. In this case, there are both media-level
  4636.    "a=control:" attributes, which are used to specify the stream URLs,
  4637.    and a session-level "a=control:" attribute which is used as the
  4638.    request URL for aggregate control. If the media-level URL is
  4639.    relative, it is resolved to absolute URLs according to Section C.1.1
  4640.    above.
  4641.  
  4642.    If the presentation comprises only a single stream, the media-level
  4643.    "a=control:" attribute may be omitted altogether. However, if the
  4644.    presentation contains more than one stream, each media stream section
  4645.    MUST contain its own "a=control" attribute.
  4646.  
  4647.  
  4648.  
  4649.  
  4650. Schulzrinne, et. al.        Standards Track                    [Page 83]
  4651.  
  4652. RFC 2326              Real Time Streaming Protocol            April 1998
  4653.  
  4654.  
  4655.    Example:
  4656.      v=0
  4657.      o=- 2890844256 2890842807 IN IP4 204.34.34.32
  4658.      s=I contain
  4659.      i=<more info>
  4660.      t=0 0
  4661.      c=IN IP4 0.0.0.0
  4662.      a=control:rtsp://example.com/movie/
  4663.      m=video 8002 RTP/AVP 31
  4664.      a=control:trackID=1
  4665.      m=audio 8004 RTP/AVP 3
  4666.      a=control:trackID=2
  4667.  
  4668.    In this example, the client is required to establish a single RTSP
  4669.    session to the server, and uses the URLs
  4670.    rtsp://example.com/movie/trackID=1 and
  4671.    rtsp://example.com/movie/trackID=2 to set up the video and audio
  4672.    streams, respectively. The URL rtsp://example.com/movie/ controls the
  4673.    whole movie.
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706. Schulzrinne, et. al.        Standards Track                    [Page 84]
  4707.  
  4708. RFC 2326              Real Time Streaming Protocol            April 1998
  4709.  
  4710.  
  4711. Appendix D: Minimal RTSP implementation
  4712.  
  4713. D.1 Client
  4714.  
  4715.    A client implementation MUST be able to do the following :
  4716.  
  4717.      * Generate the following requests: SETUP, TEARDOWN, and one of PLAY
  4718.        (i.e., a minimal playback client) or RECORD (i.e., a minimal
  4719.        recording client). If RECORD is implemented, ANNOUNCE must be
  4720.        implemented as well.
  4721.      * Include the following headers in requests: CSeq, Connection,
  4722.        Session, Transport. If ANNOUNCE is implemented, the capability to
  4723.        include headers Content-Language, Content-Encoding, Content-
  4724.        Length, and Content-Type should be as well.
  4725.      * Parse and understand the following headers in responses: CSeq,
  4726.        Connection, Session, Transport, Content-Language, Content-
  4727.        Encoding, Content-Length, Content-Type. If RECORD is implemented,
  4728.        the Location header must be understood as well.  RTP-compliant
  4729.        implementations should also implement RTP-Info.
  4730.      * Understand the class of each error code received and notify the
  4731.        end-user, if one is present, of error codes in classes 4xx and
  4732.        5xx. The notification requirement may be relaxed if the end-user
  4733.        explicitly does not want it for one or all status codes.
  4734.      * Expect and respond to asynchronous requests from the server, such
  4735.        as ANNOUNCE. This does not necessarily mean that it should
  4736.        implement the ANNOUNCE method, merely that it MUST respond
  4737.        positively or negatively to any request received from the server.
  4738.  
  4739.    Though not required, the following are highly recommended at the time
  4740.    of publication for practical interoperability with initial
  4741.    implementations and/or to be a "good citizen".
  4742.  
  4743.      * Implement RTP/AVP/UDP as a valid transport.
  4744.      * Inclusion of the User-Agent header.
  4745.      * Understand SDP session descriptions as defined in Appendix C
  4746.      * Accept media initialization formats (such as SDP) from standard
  4747.        input, command line, or other means appropriate to the operating
  4748.        environment to act as a "helper application" for other
  4749.        applications (such as web browsers).
  4750.  
  4751.      There may be RTSP applications different from those initially
  4752.      envisioned by the contributors to the RTSP specification for which
  4753.      the requirements above do not make sense. Therefore, the
  4754.      recommendations above serve only as guidelines instead of strict
  4755.      requirements.
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762. Schulzrinne, et. al.        Standards Track                    [Page 85]
  4763.  
  4764. RFC 2326              Real Time Streaming Protocol            April 1998
  4765.  
  4766.  
  4767. D.1.1 Basic Playback
  4768.  
  4769.    To support on-demand playback of media streams, the client MUST
  4770.    additionally be able to do the following:
  4771.      * generate the PAUSE request;
  4772.      * implement the REDIRECT method, and the Location header.
  4773.  
  4774. D.1.2 Authentication-enabled
  4775.  
  4776.    In order to access media presentations from RTSP servers that require
  4777.    authentication, the client MUST additionally be able to do the
  4778.    following:
  4779.      * recognize the 401 status code;
  4780.      * parse and include the WWW-Authenticate header;
  4781.      * implement Basic Authentication and Digest Authentication.
  4782.  
  4783. D.2 Server
  4784.  
  4785.    A minimal server implementation MUST be able to do the following:
  4786.  
  4787.      * Implement the following methods: SETUP, TEARDOWN, OPTIONS and
  4788.        either PLAY (for a minimal playback server) or RECORD (for a
  4789.        minimal recording server).  If RECORD is implemented, ANNOUNCE
  4790.        should be implemented as well.
  4791.      * Include the following headers in responses: Connection,
  4792.        Content-Length, Content-Type, Content-Language, Content-Encoding,
  4793.        Transport, Public. The capability to include the Location header
  4794.        should be implemented if the RECORD method is. RTP-compliant
  4795.        implementations should also implement the RTP-Info field.
  4796.      * Parse and respond appropriately to the following headers in
  4797.        requests: Connection, Session, Transport, Require.
  4798.  
  4799.    Though not required, the following are highly recommended at the time
  4800.    of publication for practical interoperability with initial
  4801.    implementations and/or to be a "good citizen".
  4802.  
  4803.      * Implement RTP/AVP/UDP as a valid transport.
  4804.      * Inclusion of the Server header.
  4805.      * Implement the DESCRIBE method.
  4806.      * Generate SDP session descriptions as defined in Appendix C
  4807.  
  4808.      There may be RTSP applications different from those initially
  4809.      envisioned by the contributors to the RTSP specification for which
  4810.      the requirements above do not make sense. Therefore, the
  4811.      recommendations above serve only as guidelines instead of strict
  4812.      requirements.
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818. Schulzrinne, et. al.        Standards Track                    [Page 86]
  4819.  
  4820. RFC 2326              Real Time Streaming Protocol            April 1998
  4821.  
  4822.  
  4823. D.2.1 Basic Playback
  4824.  
  4825.    To support on-demand playback of media streams, the server MUST
  4826.    additionally be able to do the following:
  4827.  
  4828.      * Recognize the Range header, and return an error if seeking is not
  4829.        supported.
  4830.      * Implement the PAUSE method.
  4831.  
  4832.    In addition, in order to support commonly-accepted user interface
  4833.    features, the following are highly recommended for on-demand media
  4834.    servers:
  4835.  
  4836.      * Include and parse the Range header, with NPT units.
  4837.        Implementation of SMPTE units is recommended.
  4838.      * Include the length of the media presentation in the media
  4839.        initialization information.
  4840.      * Include mappings from data-specific timestamps to NPT. When RTP
  4841.        is used, the rtptime portion of the RTP-Info field may be used to
  4842.        map RTP timestamps to NPT.
  4843.  
  4844.      Client implementations may use the presence of length information
  4845.      to determine if the clip is seekable, and visibly disable seeking
  4846.      features for clips for which the length information is unavailable.
  4847.      A common use of the presentation length is to implement a "slider
  4848.      bar" which serves as both a progress indicator and a timeline
  4849.      positioning tool.
  4850.  
  4851.      Mappings from RTP timestamps to NPT are necessary to ensure correct
  4852.      positioning of the slider bar.
  4853.  
  4854. D.2.2 Authentication-enabled
  4855.  
  4856.    In order to correctly handle client authentication, the server MUST
  4857.    additionally be able to do the following:
  4858.  
  4859.      * Generate the 401 status code when authentication is required for
  4860.        the resource.
  4861.      * Parse and include the WWW-Authenticate header
  4862.      * Implement Basic Authentication and Digest Authentication
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874. Schulzrinne, et. al.        Standards Track                    [Page 87]
  4875.  
  4876. RFC 2326              Real Time Streaming Protocol            April 1998
  4877.  
  4878.  
  4879. Appendix E: Authors' Addresses
  4880.  
  4881.    Henning Schulzrinne
  4882.    Dept. of Computer Science
  4883.    Columbia University
  4884.    1214 Amsterdam Avenue
  4885.    New York, NY 10027
  4886.    USA
  4887.  
  4888.    EMail: schulzrinne@cs.columbia.edu
  4889.  
  4890.  
  4891.    Anup Rao
  4892.    Netscape Communications Corp.
  4893.    501 E. Middlefield Road
  4894.    Mountain View, CA 94043
  4895.    USA
  4896.  
  4897.    EMail: anup@netscape.com
  4898.  
  4899.  
  4900.    Robert Lanphier
  4901.    RealNetworks
  4902.    1111 Third Avenue Suite 2900
  4903.    Seattle, WA 98101
  4904.    USA
  4905.  
  4906.    EMail: robla@real.com
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930. Schulzrinne, et. al.        Standards Track                    [Page 88]
  4931.  
  4932. RFC 2326              Real Time Streaming Protocol            April 1998
  4933.  
  4934.  
  4935. Appendix F: Acknowledgements
  4936.  
  4937.    This memo is based on the functionality of the original RTSP document
  4938.    submitted in October 96. It also borrows format and descriptions from
  4939.    HTTP/1.1.
  4940.  
  4941.    This document has benefited greatly from the comments of all those
  4942.    participating in the MMUSIC-WG. In addition to those already
  4943.    mentioned, the following individuals have contributed to this
  4944.    specification:
  4945.  
  4946.    Rahul Agarwal, Torsten Braun, Brent Browning, Bruce Butterfield,
  4947.    Steve Casner, Francisco Cortes, Kelly Djahandari, Martin Dunsmuir,
  4948.    Eric Fleischman, Jay Geagan, Andy Grignon, V. Guruprasad, Peter
  4949.    Haight, Mark Handley, Brad Hefta-Gaub, John K. Ho, Philipp Hoschka,
  4950.    Anne Jones, Anders Klemets, Ruth Lang, Stephanie Leif, Jonathan
  4951.    Lennox, Eduardo F. Llach, Rob McCool, David Oran, Maria Papadopouli,
  4952.    Sujal Patel, Ema Patki, Alagu Periyannan, Igor Plotnikov, Pinaki
  4953.    Shah, David Singer, Jeff Smith, Alexander Sokolsky, Dale Stammen, and
  4954.    John Francis Stracke.
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986. Schulzrinne, et. al.        Standards Track                    [Page 89]
  4987.  
  4988. RFC 2326              Real Time Streaming Protocol            April 1998
  4989.  
  4990.  
  4991. References
  4992.  
  4993.    1      Schulzrinne, H., "RTP profile for audio and video conferences
  4994.           with minimal control", RFC 1890, January 1996.
  4995.  
  4996.    2      Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T.
  4997.           Berners-Lee, "Hypertext transfer protocol - HTTP/1.1", RFC
  4998.           2068, January 1997.
  4999.  
  5000.    3      Yergeau, F., Nicol, G., Adams, G., and M. Duerst,
  5001.           "Internationalization of the hypertext markup language", RFC
  5002.           2070, January 1997.
  5003.  
  5004.    4      Bradner, S., "Key words for use in RFCs to indicate
  5005.           requirement levels", BCP 14, RFC 2119, March 1997.
  5006.  
  5007.    5      ISO/IEC, "Information technology - generic coding of moving
  5008.           pictures and associated audio information - part 6: extension
  5009.           for digital storage media and control," Draft International
  5010.           Standard ISO 13818-6, International Organization for
  5011.           Standardization ISO/IEC JTC1/SC29/WG11, Geneva, Switzerland,
  5012.           Nov. 1995.
  5013.  
  5014.    6      Handley, M., and V. Jacobson, "SDP: Session Description
  5015.           Protocol", RFC 2327, April 1998.
  5016.  
  5017.    7      Franks, J., Hallam-Baker, P., and J. Hostetler, "An extension to
  5018.           HTTP: digest access authentication", RFC 2069, January 1997.
  5019.  
  5020.    8      Postel, J., "User Datagram Protocol", STD 6, RFC 768, August
  5021.           1980.
  5022.  
  5023.    9      Hinden, B. and C. Partridge, "Version 2 of the reliable data
  5024.           protocol (RDP)", RFC 1151, April 1990.
  5025.  
  5026.    10     Postel, J., "Transmission control protocol", STD 7, RFC 793,
  5027.           September 1981.
  5028.  
  5029.    11     H. Schulzrinne, "A comprehensive multimedia control
  5030.           architecture for the Internet," in Proc. International
  5031.           Workshop on Network and Operating System Support for Digital
  5032.           Audio and Video (NOSSDAV), (St. Louis, Missouri), May 1997.
  5033.  
  5034.    12     International Telecommunication Union, "Visual telephone
  5035.           systems and equipment for local area networks which provide a
  5036.           non-guaranteed quality of service," Recommendation H.323,
  5037.           Telecommunication Standardization Sector of ITU, Geneva,
  5038.           Switzerland, May 1996.
  5039.  
  5040.  
  5041.  
  5042. Schulzrinne, et. al.        Standards Track                    [Page 90]
  5043.  
  5044. RFC 2326              Real Time Streaming Protocol            April 1998
  5045.  
  5046.  
  5047.    13     McMahon, P., "GSS-API authentication method for SOCKS version
  5048.           5", RFC 1961, June 1996.
  5049.  
  5050.    14     J. Miller, P. Resnick, and D. Singer, "Rating services and
  5051.           rating systems (and their machine readable descriptions),"
  5052.           Recommendation REC-PICS-services-961031, W3C (World Wide Web
  5053.           Consortium), Boston, Massachusetts, Oct. 1996.
  5054.  
  5055.    15     J. Miller, T. Krauskopf, P. Resnick, and W. Treese, "PICS
  5056.           label distribution label syntax and communication protocols,"
  5057.           Recommendation REC-PICS-labels-961031, W3C (World Wide Web
  5058.           Consortium), Boston, Massachusetts, Oct. 1996.
  5059.  
  5060.    16     Crocker, D. and P. Overell, "Augmented BNF for syntax
  5061.           specifications: ABNF", RFC 2234, November 1997.
  5062.  
  5063.    17     Braden, B., "Requirements for internet hosts - application and
  5064.           support", STD 3, RFC 1123, October 1989.
  5065.  
  5066.    18     Elz, R., "A compact representation of IPv6 addresses", RFC
  5067.           1924, April 1996.
  5068.  
  5069.    19     Berners-Lee, T., Masinter, L. and M. McCahill, "Uniform
  5070.           resource locators (URL)", RFC 1738, December 1994.
  5071.  
  5072.    20     Yergeau, F., "UTF-8, a transformation format of ISO 10646",
  5073.           RFC 2279, January 1998.
  5074.  
  5075.    22     Braden, B., "T/TCP - TCP extensions for transactions
  5076.           functional specification", RFC 1644, July 1994.
  5077.  
  5078.    22     W. R. Stevens, TCP/IP illustrated: the implementation, vol. 2.
  5079.           Reading, Massachusetts: Addison-Wesley, 1994.
  5080.  
  5081.    23     Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson,
  5082.           "RTP: a transport protocol for real-time applications", RFC
  5083.           1889, January 1996.
  5084.  
  5085.    24     Fielding, R., "Relative uniform resource locators", RFC 1808,
  5086.           June 1995.
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098. Schulzrinne, et. al.        Standards Track                    [Page 91]
  5099.  
  5100. RFC 2326              Real Time Streaming Protocol            April 1998
  5101.  
  5102.  
  5103. Full Copyright Statement
  5104.  
  5105.    Copyright (C) The Internet Society (1998). All Rights Reserved.
  5106.  
  5107.    This document and translations of it may be copied and furnished to
  5108.    others, and derivative works that comment on or otherwise explain it
  5109.    or assist in its implementation may be prepared, copied, published
  5110.    and distributed, in whole or in part, without restriction of any
  5111.    kind, provided that the above copyright notice and this paragraph are
  5112.    included on all such copies and derivative works. However, this
  5113.    document itself may not be modified in any way, such as by removing
  5114.    the copyright notice or references to the Internet Society or other
  5115.    Internet organizations, except as needed for the purpose of
  5116.    developing Internet standards in which case the procedures for
  5117.    copyrights defined in the Internet Standards process must be
  5118.    followed, or as required to translate it into languages other than
  5119.    English.
  5120.  
  5121.    The limited permissions granted above are perpetual and will not be
  5122.    revoked by the Internet Society or its successors or assigns.
  5123.  
  5124.    This document and the information contained herein is provided on an
  5125.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  5126.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  5127.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  5128.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  5129.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154. Schulzrinne, et. al.        Standards Track                    [Page 92]
  5155.  
  5156.