\section{Protocol Parameters}
\label{sec:parameters}

\subsection{RTSP Version}

[H3.1] applies, with HTTP replaced by RTSP.

\subsection{RTSP URL}
\label{sec:url}

The ``rtsp'', ``rtspu'' and ``rtsps'' schemes are used to refer to
network resources via the RTSP protocol.  This section defines the
scheme-specific syntax and semantics for RTSP URLs.

\begin{verbatim}
  rtsp_URL = ( "rtsp:" | "rtspu:" | "rtsps:" ) 
                "//" host [ ":" port ] [abs_path]
  host     = <A legal Internet host domain name of IP address 
             (in dotted decimal form), as defined by Section 2.1
             of RFC 1123>
  port     = *DIGIT
\end{verbatim}

{\tt abs\_path} is defined in [H3.2.1].

\motivation{Note that fragment and query identifiers do not have a
well-defined meaning at this time, with the interpretation left to the
RTSP server.}

The scheme {\sf rtsp} requires that commands are issued via a reliable
protocol (within the Internet, TCP), while the scheme {\sf rtspu}
identifies an unreliable protocol (within the Internet, UDP). The scheme
{\sf rtsps} indicates that a TCP connection secured by TLS \cite{Frei9612:TLS} must
be used.

If the {\tt port} is empty or not given, port 554 is assumed.  The
semantics are that the identified resource can be controlled be RTSP at
the server listening for TCP (scheme ``rtsp'') connections or UDP
(scheme ``rtspu'') packets on that {\tt port} of {\tt host}, and the
{\tt Request-URI} for the resource is {\tt rtsp\_URL}.

The use of IP addresses in URLs SHOULD be avoided whenever possible (see
RFC 1924 \cite{rfc1924}).

A presentation or a stream is identified by an textual media identifier,
using the character set and escape conventions [H3.2] of URLs
\cite{rfc1738}. URLs may refer to a stream or an aggregate of streams ie. a
presentation. Accordingly, requests described in Section~\ref{sec:methods} can
apply  to either the whole presentation or an individual stream within
the presentation.  Note that some request methods  can only be applied to
streams, not presentations and vice versa.

For example, the RTSP URL
\begin{verbatim}
  rtsp://media.example.com:554/twister/audiotrack
\end{verbatim}
identifies the audio stream within the presentation ``twister'', which
can be controlled via RTSP requests issued over a TCP connection to port
554 of host {\tt media.example.com}.

Also, the RTSP URL
\begin{verbatim}
  rtsp://media.example.com:554/twister
\end{verbatim}
identifies the presentation ``twister'', which may be composed of audio and 
video streams.

\motivation {This does not imply a standard way to reference streams in
URLs.  The presentation description defines the hierarchical
relationships in the presentation and the URLs for the individual
streams.  A presentation description may name a stream 'a.mov' and the
whole presentation 'b.mov'.}

The path components of the RTSP URL are opaque to the client and do not
imply any particular file system structure for the server.

\motivation{This decoupling also allows presentation descriptions to be
used with non-RTSP media control protocols, simply by replacing the
scheme in the URL.}

\subsection{Conference Identifiers}
\label{sec:confid}

Conference identifiers are opaque to RTSP and are encoded using
standard URI encoding methods (i.e., LWS is escaped with \%).  They can
contain any octet value. The conference identifier MUST be globally
unique. For H.323, the conferenceID value is to be used.

\begin{verbatim}
  conference-id = 1*OCTET  ; LWS must be URL-escaped
\end{verbatim}

\motivation{Conference identifiers are used to allow to allow RTSP
sessions to obtain parameters from multimedia conferences the media
server is participating in.  These conferences are created by protocols
outside the scope of this specification, e.g., H.323
\cite{ITUT9605:H.323} or SIP \cite{Hand9612:SIP}.  Instead of the RTSP
client explicitly providing transport information, for example, it asks
the media server to use the values in the conference description
instead.  If the conference participant inviting the media server would
only supply a conference identifier which is unique for that inviting
party, the media server could add an internal identifier for that party,
e.g., its Internet address.  However, this would prevent that the
conference participant and the initiator of the RTSP commands are two
different entities.}

\subsection{Session Identifiers}
\label{sec:session-id}

Session identifiers are opaque strings of arbitrary length.  Linear
white space must be URL-escaped.  A session identifier SHOULD be chosen
randomly and SHOULD be at least eight octets long to make guessing it
more difficult. (See Section~\ref{sec:security}).

\begin{verbatim}
  session-id = 1*OCTET      ; LWS must be URL-escaped
\end{verbatim}

\subsection{SMPTE Relative Timestamps}
\label{sec:smpte}

A SMPTE relative time-stamp expresses time relative to the start of the
clip.  Relative timestamps are expressed as SMPTE time codes for
frame-level access accuracy.  The time code has the format
\begin{center}
  {\it hours:minutes:seconds:frames.subframes},
\end{center}
with the origin at the start of the clip.  RTSP uses the ``SMPTE 30
drop'' format.  The frame rate is 29.97 frames per second.  The
``frames'' field in the time value can assume the values 0 through 29. 
The difference between 30 and 29.97 frames per second is handled by
dropping the first two frame indices (values 00 and 01) of every minute,
except every tenth minute.  If the frame value is zero, it may be
omitted.  Subframes are measured in one-hundredth of a frame.

\begin{verbatim}
  smpte-range = "smpte" "=" smpte-time "-" [ smpte-time ]
  smpte-time = 2DIGIT ":" 2DIGIT ":" 2DIGIT [ ":" 2DIGIT ] [ "." 2DIGIT]
\end{verbatim}

Examples:
\begin{verbatim}
  smpte=10:12:33:20-
  smpte=10:07:33-
  smpte=10:07:00-10:07:33:05.01
\end{verbatim}

\subsection{Normal Play Time}

Normal play time (NPT) indicates the stream absolute position relative
to the beginning of the presentation.  The timestamp consists is a
decimal fraction.  The part left of the decimal may be expressed in
either seconds or hours, minutes and seconds.  The part right of the
decimal point measures fractions of a second.

The beginning of a presentation corresponds to 0.0 seconds.  Negative
values are not defined. The special constant {\sf now} is defined as the
current instant of a live event. It may be used only for live events.

NPT is defined as in DSM-CC:  ``Intuitively, NPT is the clock the viewer
associates with a program.  It is often digitally displayed on a VCR. 
NPT advances normally when in normal play mode (scale = 1), advances at
a faster rate when in fast scan forward (high positive scale ratio),
decrements when in scan reverse (high negative scale ratio) and is fixed
in pause mode.  NPT is (logically) equivalent to SMPTE time codes.''
\cite{ISO9511:13818-6}

\begin{verbatim}
  npt-time   = "now" | npt-sec | npt-hhmmss
  npt-sec    = 1*DIGIT [ "." *DIGIT ]
  npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT]
  npt-hh     = 1*DIGIT ; any positive number
  npt-mm     = 2DIGIT  ; 00-59
  npt-ss     = 2DIGIT  ; 00-59
\end{verbatim}

Examples:
\begin{verbatim}
  npt=123.45-125
  npt=12:05:35.3
  npt=now
\end{verbatim}

\motivation{The syntax conforms to ISO 8601.  The npt-sec notation is
optimized for automatic generation, the ntp-hhmmss notation for
consumption by human readers.  The ``now'' constant allows clients to
request to receive the live feed rather than the stored or time-delayed
version. This is needed since neither absolute time, nor zero time are
appropriate for this case.}

\subsection{Absolute Time}
\label{sec:clock}

Absolute time is expressed as ISO 8601 timestamps, using UTC (GMT).
Fractions of a second may be indicated.

\begin{verbatim}
  utc-range = "clock" "=" utc-time "-" [ utc-time ]
  utc-time = utc-date "T" utc-time "Z"
  utc-date = 8DIGIT                  ; < YYYYMMDD >
  utc-time = 6DIGIT [ "." fraction ] ; < HHMMSS.fraction > 
\end{verbatim}

Example for November 8, 1996 at 14h37 and 20 and a quarter seconds UTC:
\begin{verbatim}
  19961108T143720.25Z
\end{verbatim}
Example 
