A triplet of communication protocols have been setup to allow streaming of nearly any type of content to one or multiple recipients.
These protocols are:
RTSP: the Real-Time Streaming Protocol
RTP: the Real-time Transport Protocol
RTCP: the RTP Control Protocol
RTSP describes a TCP-based streaming mod. RTSP is mandated to manage
the streaming session.
This is the protocol that allows to PLAY, PAUSE, STOP : just what you generally
expect from a remote control. Stream descriptions exchanged using RTSP are done
using stream description language called SDP (session description protocol).
Although RTSP name contains " streaming ", it is not RTSP that "streams" the data to
the customer. RTP is the protocol used to transport the multimedia stream to the client.
Because multimedia is inherently real-time and in real-time systems after-time
is no more the time, RTP is build upon UDP.
Using UDP, RTP send a packet to the network but cannot warrant that the packet
will reach its destination, so RTP adds information in front of the content it
encapsulates so that the recipient can check whereas a packet have been lost or
have been transmitted in the wrong order. The multimedia content transported by a RTP
packet is called the payload.
Some payloads format are well known and as such have been allocated
a legacy (static) payload identifier. This includes audio payloads such
as G.721, G.722, GSM or video payloads such as JPEG or H.261. These legacy
formats doesn’t require a complex description in SDP.
Other A/V formats fall into the case of dynamic payload identifier and
require a more complex description in the SDP packet.
The last protocol, RTCP is used to monitor the session. It is mainly
used to feed the streaming server with reception statistics from the client.
The server may then decide to use these statistics (such as the numbers of
lost packets, the delay from reception, …) to adapt its strategy.
The diagram below shows an overview of the relations between protocols:
RTSP session control is interleaved with
RTP data packets and RTCP control packets.
Tunneling RTSP and RTP via HTTP can be used to pass a firewall located between the camera/video server and the client.
QuickTime supports streaming over RTP and HTTP. The main advantages of streaming over RTP are:
RTP can be used for live transmission and multicast.
Real-time streaming allows the user to view long movies or continuous transmissions without having to store more than a few seconds of data locally.
Using RTP transmission under RTSP control, a user can skip to any point in a movie on a server without downloading the intervening material.
You can stream a single track over RTP, whereas HTTP streams only whole movies. RTP streams can be incorporated in a movie using streaming tracks. A streaming track is a track in a QuickTime movie that contains the URL of the streaming content.
A QuickTime movie that contains streaming tracks can also include non-streaming tracks whose media exist on the client’s computer. This allows a live transmission, or data stored on the Internet, to be incorporated into a movie along with material stored on the client’s hard drive or distributed over CD-ROM.
RTP uses UDP/IP protocol, which doesn't attempt to retransmit lost packets. This allows multicasts as well as live streams, both cases where retransmission would not be practical.
The main advantages of streaming over HTTP are:
HTTP uses TCP/IP protocol to ensure that all movie packets are delivered, retransmitting if necessary.
HTTP does not attempt to stream in real time. To stream in real time, the bandwidth of the network must be greater than the data rate of the movie. If there is not enough bandwidth to transmit the movie in real time, streaming by HTTP allows the client to store the data locally and play the movie after enough has arrived.
Most firewalls and network configuration schemes will pass HTTP without modification.
Any QuickTime movie can be streamed using HTTP. QuickTime supports RTP streaming of video, audio, text, and MIDI. To stream a movie with other media types, such as sprites, you should use HTTP.
RTSP, the Real-Time Streaming Protocol, is a client-server multimedia protocol.
This protocol can control the stream data delivered over IP networks and allows
to PLAY, PAUSE, STOP : just what you generally expect from a remote control.
RTSP is a protocol of application layer. Some RTSP servers use RTP RTP as
the transport protocol for the actual audio/video data.
RTSP properties
- Extendibility
-
RTSP can be easily extended to support new methods or new header fields.
- Secure
- Web security mechanisms, such as Transport Layer Security (TLS)
can be used with RTSP.
- HTTP security mechanisms can be reused
- Transport independent
-
RTSP can run over reliable or unreliable transport protocols, as
it implements itself reliability mechanisms
- Multi-server capable
-
During multimedia presentations, all the different media do not
need to reside in the same server, but can be retrieved by RTSP
in different servers.
- Control of recording devices
-
RTSP can perform its control functions in both playback and
record directions
- Separation of stream control and conference invitation
-
Establishment of conference session can be done by other
protocols and RTSP can be used to control the exchange of
media in the conference
- Presentation description neutral
-
RTSP can carry session description independently from the
format chosen for the description
- Proxy and firewall friendly
-
RTSP can overcome some limitations that firewall can impose
- Allows specifying communications ports
- Allows transport of in-band encapsulated media files data
RTSP is intentionally similar in structure and syntax to HTTP 1.1,
epsecially on delivering streaming data.
However, it differs in a number of important aspects from HTTP:
RTSP introduces a number of new methods and has a different
protocol identifier unlike HTTP, for example streaming control.
An RTSP server needs to maintain state by default in almost
all cases, as opposed to the stateless nature of HTTP.
- Both an RTSP server and client can issue requests but in HTTP,
an asymmetrical protocol, only client side can request.
RTSP messages are sent out-of band, and media stream (data)
whose packet structure is defined RTP is sent in-band.
RTSP message and media stream is sent on different channel
but HTTP uses same channel to send control message and data.
RTSP channel is in many ways similar to FTP’s control channel.
RTSP is defined to use ISO 10646 (UTF-8) rather than ISO 8859-1,
consistent with current HTML internationalization efforts.
- The Request-URI always contains the absolute URI.
Because of backward compatibility with a historical
blunder, HTTP 1.1 carries only the absolute path in the request
and puts the host name in a separate header field.
雖然大多數實時媒体采用RTP作為傳輸協議,但RTSP并不綁定定RTP。
重用HTTP的功能至少在??方面有好?:安全和代理。由于要求非常接近,因此在?存、代理和授?上
采用HTTP功能是有价值的。