What Is RTSP? How It Works?

Sep 21, 2022

Real Time Streaming Protocol (RTSP) is an application-level network communication system that transfers real-time data from multimedia to an endpoint device by communicating directly with the server streaming the data. RTSP provides the flexibility to integrate video from products manufactured by one company in to third party products. RTSP is a video streaming protocol that provides a video stream for use in third party software or recorders, or for use in live streaming applications.

What is RTSP?

Real Time Streaming Protocol or RTSP is a network protocol designed for use in entertainment and communications systems to control streaming media. The protocol was designed to create an easy way to access or manipulate a media stream. In CCTV and security camera systems the media is a video stream that can be with or without audio. The protocol packs complex transcoding and programming together behind the scenes to transfer video over a network or to the internet with an easy to use link.

RTSP has many uses outside of CCTV so there is a lot of information out on the web and it can get really technical. Since we’re only concerned about security cameras we’ll focus on how RTSP relates to the security cameras we sell. As we mentioned in the introduction RTSP is an included feature on all of our IP cameras, NVRs, and DVRs when connected to a network.

The RTSP stream from a surveillance system or IP security camera directly relates to the encoding settings that are set on the device itself. This means that anyone looking to stream to a 4K TV or monitor should purchase a 4K security camera or 4K NVR system.

Note: RTSP is a network protocol that requires a network connection. This means that Coaxial cameras, such as CVI or analog, cannot be used for projects with RTSP unless they are paired with a compatible DVR.

How RTSP works?

When a user or application attempts to stream video from a remote source, the client device sends an RTSP request to the server to determine the available options, such as pause, play and record. The server then returns a list of the types of requests it can accept through RTSP. Once the client knows how to make a request, it transmits a media description request to the streaming server, and the server responds with a description of the media. From there, the client sends a setup request, and the server responds with information about the transport mechanism. Once the setup process is complete, the client initiates the streaming process by telling the server to send the bitstream — a binary sequence — using the transport mechanism specified in the setup request.

When and why use an RTSP stream?

Alternate stream for increased ONVIF compatibility

The main purpose of RTSP when it comes to security cameras is to assist with ONVIF compatibility. While RTSP can only send video and audio it helps by providing another type of stream to try if ONVIF compatibility does not work in the devices you are trying to use. This relates to when someone attempts to use an IP camera with a third-party recorder. Most professional NVR or XVR systems provide alternate ways to add 3rd party manufactured cameras and one of those ways is to access the RTSP stream from a camera.

VLC Media Player

A great program to use RTSP streams with is VLC Media Player. VLC can be used to directly access the RTSP stream that a camera or system provides. The most common use of VLC is to watch a camera without logging into the web interface. Someone who is curious about how encoding settings affect their cameras can use VLC to view the RTSP stream to preview their changes and confirm there are no video artifacts. To finely tune encoding settings we recommend using a trial and error approach. Lower bitrates allow for more retention on recorder storage and less data usage when remote viewing. For more information on bitrates and how they effect remote viewing check out our article on watching security cameras with a slow internet connection.

Rebroadcasting the stream to live streaming services

Last but not least is streaming a security camera to a live stream website. Some common live streaming CCTV projects include: animal sanctuaries, national parks, zoos, beaches, and construction sites. Most live streaming websites require a RTMP (Real Time Messaging Protocol) stream so the stream can be rebroadcast over the internet. Pairing a RTSP stream with streaming software like the free Open Broadcasting Software(OBS) offers a way to convert a RTSP stream to RTMP. Other paid or freemium software options include: Xsplit, VMIX, and Wirecast.

Once the software is setup and configured there will be live video streaming to Youtube, Facebook Live, or Twitch depending on what the user chooses to stream to. To learn more about streaming to the web using OBS as a streaming software watch.