home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_j_p / draft-ietf-mmusic-rtsp-04.txt < prev    next >
Text File  |  1997-09-18  |  163KB  |  4,752 lines

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