[Library] Everything About RTSP: Real-Time Streaming Protocol [MiniTool Wiki]
What Is RTSP?
RTSP, Real-time Streaming Protocol, is a network control protocol. It is designed to be used in communication and entertainment systems to control streaming media servers. RTSP is applied to establish and control media sessions between endpoints.
RTSP was developed by RealNetworks, Columbia University, and Netscape. The three submitted the first RTSP draft to IEFT (Internet Engineering Task Force) IN 1996. Real time streaming protocol was standardized and published as RFC 2326 later in 1998 by the Multiparty Multimedia Session Control Working Group (MMUSIC WG) of the IETF.
Later in 2016, the RTSP 2.0 replaced RTSP 1.0 and was released as RFC 7826. The 2.0 version is based on the 1.0 edition but isn’t backward compatible with the latter other than in the basic version negotiation mechanism.
What to do if you receive error 1067: the process terminated unexpectedly when starting a service-based operation? Here are 3 simple solutions for you.
How Does RTSP Work?
Media server clients issue VHS commands like record, pause, and play to facilitate real-time control of the media streaming from the server to a client (video-on-demand) or from a client to the server (voice-recording).
Streaming data transferring itself does not use RTSP and most RTSP servers make use of RTP (Real-time Transport Protocol) together with RTCP (Real-time Control Protocol) to deliver streaming data. Yet, some vendors adopt proprietary transport protocols like NealNetworks’s proprietary RDT (Real Data Transport).
RTSP Protocol Directives
Similar in some ways to the HTTP (Hypertext Transfer Protocol), RTSP defines control sequences useful in controlling multimedia playback. RTSP also uses TCP (Transmission Control Protocol) to maintain an end-to-end connection. Most RTSP control messages are sent from the clients to the server, and fewer messages travel the other way around.
RTSP has below basic requests. Some typical HTTP requests, such as the OPTIONS request, are also available for RTSP. The default transport layer port number of RTSP is 554 for both UDP (User Datagram Protocol) and TCP with the former rarely being used for the control requests.
- OPTIONS: OPTIONS requests return the request types the server will accept.
- DESCRIBE: A DESCRIBE request contains an RTSP URL (rtsp://…) and the type of reply data that can be deal with. The reply to the DESCRIBE request contains the presentation description that is typical of the SDP (Session Description Protocol) format.
- RECORD: A RECORD request initiates recording a range of media data according to the presentation description.
- PLAY: PLAY requests will cause one or all media streams to be played.
- PAUSE: A PAUSE request will halt one or all media streams temporarily. Those streams can be resumed with a PLAY request later.
- TEARDOWN: A TEARDOWN request is used to terminate the session. It will stop all media streams and frees all sessions related data on the server.
- SETUP: The SETUP request defines how a single stream must be transported.
- ANNOUNCE: The ANNOUNCE request sent from the client to the server posts the description of a presentation or media object identified by the request URL to a server. And, the ANNOUNCE request sent from server to client will update the session description in real-time.
- GET_PARAMETER: This method request retrieves the value of a parameter of a presentation or stream specified in the URL.
- SET_PARAMETER: The SET_PARAMETER request sets the value of a parameter for a presentation or stream specified by the URL.
- REDIRECT: A REDIRECT request informs the client that it must connect to another server location.
- Embedded (Interleaved) Binary Data: Embedded binary data should only be used if RTSP is carried over TCP when certain firewall designs and other circumstances may force a server to interleave RTSP methods and stream data. Since this kind of interleaving complicates client and server operation and imposes an additional overhead, it should be avoided unless necessary.
Learn how to reset TCP/IP stack Windows 10 by using Netshell utility. Check the Netsh commands to reset TCP/IP, reset IP address, renew TCP/IP settings.
RTSP Servers and RTSP Clients
There are many streaming servers and Clients that adopt the RTSP protocol. Below only list some popular ones respectively.
RTSP Streaming Servers
- Windows Media Services
- Darwin Streaming Server
- LIVE555 liveMedia / openRTSP
- Nimble Streamer
- QuickTime Streaming Server
- Wowza Streaming Engine
RTSP Streaming Clients
- VLC media player
- Windows Media Player
- LIVE555 liveMedia / openRTSP
- Media Player Classic
RTSP vs RTMP
RTMP, Real-time Messaging Protocol, is a proprietary protocol developed by Macromedia for streaming video, audio, and data over the Internet, between a Flash player and a server. Therefore, RTSP focuses on control while RTMP focuses on data streaming/transmission.