3 Protocol Parameters
3 Protocol Parameters
3.1 RTSP Version
[H3.1] applies, with HTTP replaced by RTSP.
3.2 RTSP URL
The "rtsp" and "rtspu" schemes are used to refer to network resources via the RTSP protocol. This section defines the scheme-specific syntax and semantics for RTSP URLs.
rtsp_URL = ( "rtsp:" | "rtspu:" ) "//" 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 \cite{rfc1123}> port = *DIGIT
abs_path is defined in [H3.2.1].
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 rtsp requires that commands are issued via a reliable protocol (within the Internet, TCP), while the scheme rtspu identifies an unreliable protocol (within the Internet, UDP).
If the port is empty or not given, port 554 is assumed. The semantics are that the identified resource can be controlled by RTSP at the server listening for TCP (scheme "rtsp") connections or UDP (scheme "rtspu") packets on that port of host, and the Request-URI for the resource is rtsp_URL.
The use of IP addresses in URLs SHOULD be avoided whenever possible (see RFC 1924 [19]).
A presentation or a stream is identified by a textual media identifier, using the character set and escape conventions [H3.2] of URLs (RFC 1738 [20]). URLs may refer to a stream or an aggregate of streams, i.e., a presentation. Accordingly, requests described in Section 10 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: rtsp://media.example.com:554/twister/audiotrack
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 media.example.com.
Also, the RTSP URL: rtsp://media.example.com:554/twister
identifies the presentation "twister", which may be composed of audio and video streams.
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.
This decoupling also allows presentation descriptions to be used with non-RTSP media control protocols simply by replacing the scheme in the URL.
3.3 Conference Identifiers
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.
conference-id = 1*xchar
Conference identifiers are used 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 [13] or SIP [12]. 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.
3.4 Session Identifiers
Session identifiers are opaque strings of arbitrary length. Linear white space must be URL-escaped. A session identifier MUST be chosen randomly and MUST be at least eight octets long to make guessing it more difficult. (See Section 16.)
session-id = 1*( ALPHA | DIGIT | safe )
3.5 SMPTE Relative Timestamps
A SMPTE relative timestamp 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 hours:minutes:seconds:frames.subframes, with the origin at the start of the clip. The default smpte format is "SMPTE 30 drop" format, with frame rate is 29.97 frames per second. Other SMPTE codes MAY be supported (such as "SMPTE 25") through the use of alternative use of "smpte time". For 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.
smpte-range = smpte-type "=" smpte-time "-" [ smpte-time ] smpte-type = "smpte" | "smpte-30-drop" | "smpte-25" ; other timecodes may be added smpte-time = 12DIGIT ":" 12DIGIT ":" 12DIGIT [ ":" 12DIGIT ] [ "." 1*2DIGIT ]
Examples: smpte=10:12:33:20- smpte=10:07:33- smpte=10:07:00-10:07:33:05.01 smpte-25=10:07:00-10:07:33:05.01
3.6 Normal Play Time
Normal play time (NPT) indicates the stream absolute position relative to the beginning of the presentation. The timestamp consists of 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 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." [5]
npt-range = ( npt-time "-" [ npt-time ] ) | ( "-" npt-time ) npt-time = "now" | npt-sec | npt-hhmmss npt-sec = 1DIGIT [ "." DIGIT ] npt-hhmmss = npt-hh ":" npt-mm ":" npt-ss [ "." DIGIT ] npt-hh = 1DIGIT ; any positive number npt-mm = 12DIGIT ; 0-59 npt-ss = 12DIGIT ; 0-59
Examples: npt=123.45-125 npt=12:05:35.3- npt=now-
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.
3.7 Absolute Time
Absolute time is expressed as ISO 8601 timestamps, using UTC (GMT). Fractions of a second may be indicated.
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 >
Example for November 8, 1996 at 14h37 and 20 and a quarter seconds UTC:
19961108T143720.25Z
3.8 Option Tags
Option tags are unique identifiers used to designate new options in RTSP. These tags are used in Require (Section 12.32) and Proxy- Require (Section 12.27) header fields.
Syntax:
option-tag = 1*xchar
The creator of a new RTSP option should either prefix the option with a reverse domain name (e.g., "com.foo.mynewfeature" is an apt name for a feature whose inventor can be reached at "foo.com"), or register the new option with the Internet Assigned Numbers Authority (IANA).
3.8.1 Registering New Option Tags with IANA
When registering a new RTSP option, the following information should be provided:
-
Name and description of option. The name may be of any length, but SHOULD be no more than twenty characters long. The name MUST not contain any spaces, control characters or periods. * Indication of who has change control over the option (for example, IETF, ISO, ITU-T, other international standardization bodies, a consortium or a particular company or group of companies);
-
A reference to a further description, if available, for example (in order of preference) an RFC, a published paper, a patent filing, a technical report, documented source code or a computer manual; * For proprietary options, contact information (postal and email address);