Real Time Streaming Protocol definition
Real Time Streaming Protocol (RTSP) is a network protocol used to control streaming media servers. It allows a client to play, pause, rewind, fast forward, or stop the stream, much like a remote control works with a VCR.
How Real Time Streaming Protocol works
RTSP operates on a client-server model. The client (like a media player) sends control requests, and the server (where the media is stored) responds and streams the media. RTSP uses the Real-Time Transport Protocol (RTP) for the actual streaming, while RTSP itself manages the control sequence.
- The client initiates a session by sending a SETUP request to the server. This request specifies the media stream to be controlled.
- The server responds with session details, such as a session identifier.
- The client can then send control commands such as:
- PLAY to start the stream
- PAUSE to pause it
- TEARDOWN to end the session
- RECORD (in some applications) to record the stream
- Other commands for seeking, fast-forwarding, or rewinding within the media stream
- Upon receiving a control command, the server responds accordingly. For a PLAY command, for example, the server starts streaming media to the client using RTP.
- Throughout the session, the client and server maintain communication. The server sends media data as per client requests, and the client may send further control commands as needed.
- When the media playback is complete or the user ends it, the client sends a TEARDOWN command to close the session.
Uses of Real Time Streaming Protocol
- Streaming applications. RTSP is used for live video and audio streaming in applications like video conferencing and live broadcasts.
- Media player control. Media players and clients used it for controlling playback with actions such as play, pause, and seek.
- Surveillance systems. Security systems use RTSP for live streaming from cameras and other surveillance equipment.