rfc-2326

Real Time Streaming Protocol (RTSP)

H. Schulzrinne, A. Rao, R. Lanphier
date1998-04 streamIETF areaart wgmmusic statusPROPOSED STANDARD pages92 canonicalhttps://www.rfc-editor.org/rfc/rfc2326 doi10.17487/RFC2326 errataview
The Real Time Streaming Protocol, or RTSP, is an application-level protocol for control over the delivery of data with real-time properties. RTSP provides an extensible framework to enable controlled, on-demand delivery of real-time data, such as audio and video. [STANDARDS-TRACK]

obsoleted by

Extracted elements (33)

design-rationale §10.4

Including all transport initialization in SETUP (rather than deriving it from DESCRIBE) spares firewalls and intermediate devices the complex task of parsing DESCRIBE responses. This design makes RTSP 'firewall friendly' by concentrating transport parameters in a single method.

realtime, security

design-rationale §4.4

RTSP does not support HTTP chunked transfer encoding and requires Content-Length when a body is present. Since presentation descriptions are moderate in size and can be determined dynamically, chunked encoding is unnecessary and its absence simplifies implementation.

realtime, http

design-rationale §4

RTSP is text-based (UTF-8) rather than binary because text protocols are easier to extend with optional self-describing parameters, allow easy prototyping in scripting languages, and the low frequency of commands makes processing efficiency a non-issue.

realtime

design-rationale §6.2

RTSP requires the absolute URI (including scheme, host, and port) in every request line rather than just the absolute path as in HTTP. This simplifies virtual hosting and avoids HTTP's backward-compatibility requirement for the separate Host header, which does not apply to RTSP.

realtime, http

interoperability-note §1.1

RTSP is intentionally similar in syntax to HTTP/1.1 but differs fundamentally: the server maintains state by default, both client and server can issue requests, data is carried out-of-band by a separate protocol, and RTSP uses UTF-8 (ISO 10646) rather than ISO 8859-1.

realtime, http

interoperability-note §1.8

While most real-time media will use RTP as a transport protocol, RTSP operation does not depend on RTP. RTSP data MAY be interleaved with RTP and RTCP packets on the same TCP connection using the embedded binary data mechanism.

realtime, rtp

normative-requirement §10.5 MUST

A client MUST NOT issue a PLAY request until any outstanding SETUP requests have been acknowledged as successful. The server MUST queue PLAY requests to be executed in order, delaying any PLAY request that arrives while a previous one is still active.

realtime, rtp

normative-requirement §3.3 MUST

A conference identifier MUST be globally unique. For H.323, the conferenceID value is to be used.

realtime

normative-requirement §9.1 MUST

A server MUST send its responses to pipelined requests in the same order that the requests were received.

realtime

normative-requirement §3.4 MUST

A session identifier MUST be chosen randomly and MUST be at least eight octets long to make guessing it more difficult.

security, realtime

normative-requirement §10.9 MUST

A SET_PARAMETER request SHOULD only contain a single parameter to allow the client to determine why a particular request failed. If the request contains several parameters, the server MUST only act if all parameters can be set successfully.

realtime

normative-requirement §10.6 MUST

After resuming playback or recording following a PAUSE, synchronization of the tracks MUST be maintained. A PAUSE request discards all queued PLAY requests, but the pause point in the media stream MUST be maintained.

realtime

normative-requirement §9 MUST

An RTSP message MUST contain a Content-Length header whenever that message contains a payload. RTSP does not support HTTP/1.1 chunked transfer coding and requires Content-Length.

realtime, http

normative-requirement §9.2 MUST NOT

If a reliable transport protocol is used to carry RTSP, requests MUST NOT be retransmitted; the RTSP application MUST instead rely on the underlying transport to provide reliability. Double retransmission at both layers would exacerbate congestion.

realtime, tcp, congestion

normative-requirement §9.2 MUST

If a request is repeated because of lack of acknowledgement, the request MUST carry the original CSeq sequence number (i.e., the sequence number is not incremented).

realtime

normative-requirement §10 MUST

If a server does not support a particular method, it MUST return '501 Not Implemented' and a client SHOULD not try that method again for this server.

realtime

normative-requirement §10.4 MUST

If a SETUP request to a server includes a session identifier, the server MUST bundle this setup request into the existing session or return error '459 Aggregate Operation Not Allowed'.

realtime

normative-requirement §7.1.1 MUST

RTSP applications MUST understand the class of any status code (indicated by the first digit) and treat any unrecognized response as equivalent to the x00 status code of that class. An unrecognized response MUST NOT be cached.

realtime, http

normative-requirement §9.2 MUST

Systems implementing RTSP MUST support carrying RTSP over TCP and MAY support UDP. The default port for the RTSP server is 554 for both UDP and TCP.

realtime, tcp, udp

normative-requirement §10.2 MUST

The DESCRIBE response MUST contain all media initialization information for the resource(s) it describes. Servers SHOULD NOT use the DESCRIBE response as a means of media indirection.

realtime

normative-requirement §10.9 MUST

Transport parameters for the media stream MUST only be set with the SETUP command, not SET_PARAMETER. This restriction exists for the benefit of firewalls.

realtime, security

protocol-element §10

RTSP defines eleven methods: DESCRIBE, ANNOUNCE, GET_PARAMETER, OPTIONS, PAUSE, PLAY, RECORD, REDIRECT, SETUP, SET_PARAMETER, and TEARDOWN. PLAY, SETUP, TEARDOWN, and OPTIONS are required; DESCRIBE and PAUSE are recommended; others are optional.

realtime

protocol-element §12.17

The CSeq header field carries a sequence number for each distinct RTSP request-response pair. Every request must carry a CSeq, and every response must echo the CSeq of the corresponding request.

realtime

protocol-element §12.29

The Range header supports three timestamp formats: NPT (Normal Play Time, relative to presentation start), SMPTE relative timestamps (hours:minutes:seconds:frames for frame-level accuracy), and absolute UTC clock time. Media servers supporting playback MUST support NPT.

realtime

protocol-element §12.37

The Session header identifies an RTSP session across multiple requests. The server generates session identifiers in response to SETUP requests; all state-modifying methods use this header to identify the session being manipulated.

realtime

protocol-element §12.39

The Transport header in SETUP specifies transport parameters for data transmission including protocol (RTP/AVP), unicast/multicast, client and server ports, and TTL. The client proposes acceptable parameters; the server response contains the selected parameters.

realtime, rtp

registry §3.8.1

IANA maintains a registry of RTSP option tags used in Require and Proxy-Require headers. Registrants must provide the option name (no spaces, control characters, or periods; SHOULD be ≤20 characters), change control information, a reference to a description, and contact info for proprietary options.

realtime, registry

security-consideration §1.6

For unicast delivery, the client provides the destination address, which provides a degree of access control. For multicast, the server chooses the address for live/near-on-demand use, while client-specified multicast addresses are used only when joining a pre-established conference.

security, realtime, multicast

security-consideration §16

Session identifiers must be chosen randomly and be at least 8 octets to prevent session hijacking by guessing. RTSP reuses HTTP authentication mechanisms (Basic and Digest) for access control, and may also employ transport or network layer security.

security, realtime

state-machine §A

RTSP defines three server-side states: INIT (no session resources), READY (resources allocated via SETUP but not streaming), and PLAYING/RECORDING (active data delivery). Transitions: INIT→READY on SETUP success; READY→PLAYING on PLAY/RECORD; PLAYING→READY on PAUSE; any→INIT on TEARDOWN.

realtime

wire-format §6.1

An RTSP request begins with a Request-Line of the form: Method SP Request-URI SP RTSP-Version CRLF. Unlike HTTP, the Request-URI is always the absolute URL including scheme, host, and port.

realtime

wire-format §10.12

Embedded (interleaved) binary data is encapsulated in the RTSP stream with a '$' magic byte (decimal 36), followed by a 1-byte channel identifier, and a 2-byte big-endian length field, followed by the binary data (e.g., RTP or RTCP packets).

realtime, rtp

wire-format §4

RTSP is a text-based protocol using ISO 10646 (UTF-8) encoding. Lines are terminated by CRLF, but receivers SHOULD be prepared to interpret bare CR or LF as line terminators. Messages can be carried over any 8-bit-clean transport.

realtime