Tips & Tricks

RTMP vs. RTSP: What are the Differences?6 min read

October 13, 2020 5 min read
RTMP vs RTSP

RTMP vs. RTSP: What are the Differences?6 min read

Reading Time: 5 minutes

What are Streaming Protocols?

RTMP and RTSP are both protocols for livestreaming. A protocol sets out the rules for data transmission from one communication medium to another. Streaming protocols define the method of delivering video, audio, and other data to the viewer’s endpoint.

The quality of the stream usually depends on the protocol that applies to it. The majority of video files today don’t support streaming purposes, hence the protocols. The protocols help make videos streamable by breaking it into small chunks of data and rearrange the chunks sequentially for playback. 

Different protocols aim to varying aspects of the stream. Some are adaptive bitrate protocols to reduce lags and buffers for the video stream. Meanwhile, other protocols are efficient in reducing latency, delivering almost real-time stream for the viewers. 

Real-Time Messaging Protocol (RTMP) and Real-Time Streaming Protocol (RTSP) are the two protocols that support streaming with low latency.

What is RTMP?

RTMP, or Real-Time Messaging Protocol, is a standard protocol for transferring multimedia data over the Internet. RTMP is originally designed to be the connection between a server and a Flash player. This protocol is among the best protocols for low latency, on-demand video streaming, helping it stay relevant despite the emergence of new protocols.

RTMP runs on top of TCP, meaning that the smaller bits of data are sent in a static order until it reaches the receiving point. With Flash Player’s coming death, RTMP is mostly used to ingest the data for streaming and then transcode it into HLS for multi-device support. 

Many large streaming platforms, including Facebook, YouTube, and Periscope, are still leveraging RTMP for its low latency support and stable connection.

Should You Use RTMP? Its Advantages and Disadvantages

RTMP offers many distinct advantages for live video streaming. An obvious benefit is that it provides streaming with low latency. If your stream is using RTMP, it is secured with a stable connection to the server—even if the Internet connection shows flakiness. 

Another notable advantage of RTMP is that it provides multicast streaming. The protocol is capable of transmitting in a host of different formats—from MP3 to AAC audio to MP4, FLV, and F4V videos. RTMP is extensively flexible compared to other streaming protocols based on HTTP.

The disadvantages of RTMP

Right off the bat, RTMP is not compatible with many last-mile delivery devices since it only works with Flash technology. In today’s streaming environment, HTML5 is the go-to option for video players. HTML5 players have long been optimized and slowly becoming the standard for streaming, which put RTMP out of the main picture for live streaming. 

RTMP streams usually have low bandwidth. This can be the issue that causes interruptions, affecting the viewing experience significantly. 

The RTMP protocol is not compatible with the HTTP connection, which is why RTMP is not the optimal choice for video distribution. The best solution for streaming with RTMP is to combine it with the HLS protocol for the last-mile delivery.

get castr free trial

What is RTSP?

RTSP, or real-time streaming protocol, is developed by RealNetworks, the rival of Adobe. This protocol is made mainly for controlling the streaming server’s entertainment and communication systems. 

The real-time streaming protocol is an application-layer protocol for issuing VHS-style commands. The RTSP server handles commands such as “play”, “record”, and “pause”, making it the best fit for streaming live media data. 

RTSP is most commonly used for streaming Internet Protocol (IP) cameras because it can produce real-time streaming. Similarly to RTMP, RTSP is applied mostly for video contribution or ingesting than lát-mile delivery. To stream CCTV or IP cameras, broadcasters need a streaming software or service to make the stream viewable on all devices.

Should You Use RTSP? Its Advantages and Disadvantages

Unlike the HTTP protocols, RTSP does not store the steam data on the hard disk while ensuring the continuous delivery of the stream. This helps make the “real-time” feature possible by remotely controlling the demand between both sides. 

The real-time streaming protocol combines many protocols: TCP (connection-based protocol), UDP (connectionless protocol), and RTP to enable customization for more functions while ensuring the connection between the server and client for the stream. 

In other words, the two most significant pros of RTST is that it is both extendable and segment enabled. With the real-time streaming protocol, you can add new features, parameters, methods, or other protocols’ features while coding easily. 

The disadvantages of RTSP

RTSP is not a familiar term to most broadcasters. Plus, RTSP is mainly used to livestreaming IP cameras; it does not support end-to-end streaming to Android or iOS devices. Therefore, if you or your business is looking into streaming with RTSP, it can be a complicated process.

Most streaming services have not supported RTSP as one of the streaming protocols yet, besides a few dedicated platforms like Castr

Comparing RTMP and RTSP: The Specifications

RTMP

  • Audio codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex, Opus, Vorbis
  • Video codecs: H.264, VP8, VP6, Sorenson Spark®, Screen Video v1 & v2
  • Playback compatibility: Flash Player, Adobe AIR, RTMP-compatible players
  • Benefits: 
    • Low-latency
    • Low buffering
    • Stability
  • Drawbacks: 
    • Not compatible with HTML5
    • Not compatible with HTTP
    • Not optimized for viewing experience and scalability
    • Bandwidth vulnerability
  • Latency: 3-30 seconds
  • Variant formats: RTMPT (tunneled through HTTP), RTMPE (encrypted), RTMPTE (tunneled and encrypted), RTMPS (encrypted over SSL), RTMFP (travels over UDP instead of TCP)

RTSP

  • Audio codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex, Opus, Vorbis
  • Video codecs: H.265 (preview), H.264, VP9, VP8
  • Playback compatibility: Quicktime Player, RTSP/RTP-compliant players, VideoLAN VLC media player, 3Gpp-compatible mobile devices)
  • Benefits: 
    • Low-latency
    • Supported by most IP cameras
    • Segmented streaming
    • Customization
  • Drawbacks: 
    • Not compatible with HTTP
    • Not popular to the majority
  • Latency: 2 seconds
  • Variant formats: The entire stack of RTP, RTCP (Real-Time Control Protocol), and RTSP is often referred to as RTSP

Read more about video codecs and how to advance livestreaming in this blog.

Considerations When Choosing Between RTMP and RTSP

Choosing between RTMP and RTSP boils down to the use case and the streaming device. 

On the one hand, RTMP offers compatibility with different ingest devices and stability in low latency streaming. However, you need a particular Flash Media Server to distribute your content with RTMP. This is a major limitation in today’s age, where the end-devices’ choice is now more comprehensive than ever.

Meanwhile, RTSP is best for IP cameras and localized streams. The real-time streaming protocol has successfully stayed relevant even though more advanced protocols have been developed in recent years.

Each protocol has its pros and cons, but that doesn’t mean you have to trouble yourself with choosing one over the other. With Castr video streaming solution, you can stream with RTMP and RTSP without any hassle of setting up. Castr also supports your stream with adaptive streaming bitrate, helping you to deliver the highest quality along with viewing experience possible.

Join 200,000+ streamers worldwide

With Castr, you can easily livestream videos on any platform in no time.

No Castr Branding

No Castr Branding

We do not include our branding on your videos.

No Commitment

No Commitment

No contracts. Cancel or change your plans anytime.

24/7 Support

24/7 Support

Highly skilled in-house engineers ready to help.

Related articles