RTMP is designed to provide persistent, low-latency live streams. The protocol offers several options, which we’ll discuss in this article.

When the video streaming industry was in its infancy, RTMP was the only standard for transferring media data over the Internet. RTMP gained its popularity due to the Flash plugin that powered almost all browsers. 

Years later, broadcasters continue to use RTMP for streaming, although alternatives have emerged on the market. 

What is RTMP?

RTMP, or real-time messaging protocol, provides video, audio and data transmission between clients. RTMP maintains persistent, low-latency connections, less than one-two seconds, under good network conditions. 

In 2005, Adobe purchased Macromedia, the original developer of RTMP, and made the RTMP specification available to the public in 2012. With RTMP streaming, you can deliver content to popular content distribution networks, or CDNs, such as YouTube and Twitch.

There are several variations of RTMP for different purposes:

  • RTMPT is an RTMP version that is tunnelled over HTTP
  • RTMPS is sent over TLS/SSL for secure connections
  • RTMPE uses Adobe’s security mechanism to provide real-time cryptographic protection
  • RTMFP is a UDP-based protocol which ensures more efficient delivery, decreased latency, greater connection reliability and media data quality

How Does RTMP Work?

To avoid latency and save bandwidth, RTMP breaks the data stream into small packets called chunks. These packets are delivered using independent virtual channels. Within one channel, the packets can be interchanged and multiplexed.

RTMP uses TCP to transport data. At a high level, the data transfer is broken down into a three-step process:

  1. Handshake. The client’s Flash Player contacts the media server to open the RTMP connection between them
  2. Connection. The client sends a connection request for a specific video stream
  3. Stream. Once the server receives the request, it converts raw data to SWF, small web format. Then, the server sends the stream to destination endpoints over RTMP

The server can send the same stream to an unlimited number of Flash Player clients. This is possible when both sides have sufficient bandwidth. To increase capacity for large events, you can chain together several RTMP servers.

The key RTMP problem is the lack of support for the latest video codecs such as HEVC, VP9 and AV1. This means video quality may suffer when using the protocol. 

Another disadvantage is that RTMP was designed for Adobe Flash Player which is to be discontinued in 2020. Browsers are either reducing or completely blocking Flash Player support.

Is RTMP Dead?

For last-mile delivery between CDN and user – yes. But in general – no. RTMP can still be used for intermediate parts of live streams. 

Broadcasters can use the protocol to deliver data to CDN servers. Then, live streams are transcoded to HLS or DASH for delivery to web pages and mobile devices. In other words, RTMP streaming continues, but not for the end user.

Lots of content producers still use RTMP. For instance, YouTube continues to use RTMP, whilst Facebook supports RTMPS for broadcasting. The Wowza report shows that 33% of broadcasters prefer RTMP to other protocols.

How Does Voximplant Leverage RTMP?

With Voximplant, you can forward video calls over RTMP to CDNs that support the protocol. This is how it works:

  1. A video call initiated from the web, mobile or SIP device goes to the Voximplant cloud
  2. The Voximplant cloud forwards an RTMP data stream to a CDN
  3. A CDN provider transcodes and sends a data stream to end users using HLS or DASH

The Voximplant platform allows you to stream to YouTube, Twitch, Restream.io, or a generic RTMP CDN

If you want to add live streaming to your video calling app, check out this blog post. You’ll find a comprehensive overview of live streaming infrastructure, protocols, use cases and a brief guide to the development process.