![]() |
|
![]() |
![]() |
Examples of several messages:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HELLO |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Major | Minor | Sub Protocol | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ User Agent (Optional) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Major Version
Specifies the major RTSP version.
Minor Version
Specifies the minor RTSP version within the major version.
Sub Protocol
Specifies the sub-protocol spoken by the sender. For normal
client-server communication, this should be 0.
Reserved
For future use.
User Agent
Is an optional null-terminated character string sent by the
client to provide information like the client name, machine type,
OS etc.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| tag(ID) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| key type | (reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ authentication key /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Key type
Specifies the authentication key type. Authentication of
different strengths might be required in different
situations. This field allows a choice of authentication. It is
up to the client and server to negotiate what level of
authentication is used. Note that different services might be
available at different authentication levels.
Authentication key
Specifies the key that authenticates the sender. The standard key
types and proper responses will be specified in an extension to
this document.
ID_RESP
This message is sent in response to an ID message. The entity
issuing the ID message closes the TCP connection if the response
is not valid.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+-------------------------------+
| tag (FETCH) |
+-------------------------------+-------------------------------+
| Bandwidth (Bits per second) |
+-------------------------------+-------------------------------+
| Max Number of Hops | Request Flags |F|M|N|
+-------------------------------+-------------------------------+
| |
/ URL (null-terminated) /
| |
+-------------------------------+-------------------------------+
Bandwidth
Specifies the client's estimate of the bandwidth (in bits per
sec) it has available for a particular stream. The exact bit rate
of the stream is provided by the STREAM_HEADER message from the
server. If the server refuses the request based on insufficient
bandwidth, then the server sends the appropriate error message.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+-------------------------------+
| tag (STREAM_HEADER) |
+-------------------------------+-------------------------------+
| Generic Type (family) |
+-------------------------------+-------------------------------+
| Bit Rate (Bits per second) |
+-------------------------------+-------------------------------+
| Last Modification Time |
+-------------------------------+-------------------------------+
| Reserved |
+-------------------------------+-------------------------------+
| Length (milliseconds) |
+-------------------------------+-------------------------------+
| Max Packet size (bytes) |
+---------------+---------------+---------------+---------------+
| Flags x|L|C|H|A|U|M|
+---------------+---------------+---------------+---------------+
Generic type (family)
Specifies the type of family, such as RTSP_Audio, etc. Currently,
RTSP_Audio is defined in the appendix.
Bandwidth
Specifies the rate or bandwidth of the stream in bits per second.
It is set to 0 if non-realtime.
Last Modification Time
Specifies the last time the object was modified. The specified
time is seconds since Jan 01 1970(UTC).
Reserved
Reserved for future use.
Length
Specifies the stream length in miliseconds. It is 0 if the object
is live or if it is non-realtime.
Max Packet Size
Specifies the maximum packet size in bytes that the server
supports for the stream.
Flags
x: Unicast available
L: Live : if set, the stream is live and there is no
concept of position.
C: Copy : if set, means that the client can save it.
H: Cached : if set, the object is cached on a proxy.
A: if set, stream can be cached by the client
U: UDP Okay : if set, the stream can be sent via a
unreliable channel.
M: Stream is available via Multicast, and a
SET_TRANSPORT message follows providing this
information
SET_TRANSPORT
This message is sent to set the delivery mechanism for a stream.
The client uses this message to request the transport used for
the data transfer.
The server can use this message to inform the client about multicast
availability (this is the only instance the server sends this
message).
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| tag (SET_TRANSPORT) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C| | ChannelID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| synchronization source (SSRC) identifier |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
/ Transport specific fields /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C flag : This flag specifies the type of header/framing.
C = 0 : Standard RTP header
C = 1 : Compressed/Extensible RTP header
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| tag(SET_SPEED ) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| (reserved) |F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| speed |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Speed
Send speed as a ratio. The speed is relative to the normal
speed for the stream, as expressed as a ratio of speed
divided by 65536 (i.e. 2^16). For example, speed is 65536
for real-time delivery, 32768 (2^15) for half-speed
delivery, and 131072 (2^17) for double-speed delivery. A
speed of zero is invalid.
F
If F is set, sends the data as fast as possible. This feature
only works on a TCP data connection.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+-------------------------------+
| tag (PLAY_RANGE) |
+-------------------------------+-------------------------------+
| From (in ms) |
+-------------------------------+-------------------------------+
| To (in ms) |
+-------------------------------+-------------------------------+
Error is sent by the server to report an error to the client.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+-------------------------------+
| tag (ERROR) |
+-------------------------------+-------------------------------+
|F| error code |
+-------------------------------+-------------------------------+
| |
/ Error String (null-terminated) /
| |
+-------------------------------+-------------------------------+
F:(one bit) Fatal Error Flag
Is used to tell the client it must terminate the session.
error codes:
200 - Success
400 - FETCH failure; no such object exists
401 - FETCH failure; fetch refused
402 - SEND_RANGE out of bounds
403 - Incompatible protocol version
404 - SET_TRANSPORT failure; bad port specified
405 - Feed gone - live feed closed
406 - Can't do that on non-live feed
407 - Request not supported
408 - Request refused due to bandwidth mismatch
(e.g. Insufficient Client Bandwidth)
500 - Unspecified server-side problem
501 - Server running low on resources and cannot
satisfy request