Try Live Demo

In the early days of streaming,  RTMP(Real-Time Messaging Protocol) streaming protocol was the de facto standard for transporting video over the internet (or in ordinary terms for streaming). RTMP is a TCP-based protocol designed to maintain persistent, low-latency connections and seamless streaming experiences with extensions.

Since this Flash plugin supported 98% of internet browsers in its golden age, RTMP streaming was used everywhere. However, at the end of 2020, Adobe ended RTMP support. This decision marks the end of the legendary protocol RTMP.

In this article, we’ll take a look at what is RTMP and details of RTMP streaming, and why you should switch to other protocols and alternative protocols to RTMP streaming protocol.

RTMP Streaming and streaming basics

rtmp

Before explaining RTMP streaming, let’s start a little more basic.

What is latency?

live streaming latency

Streaming latency is basically the delay between the camera capturing an event and the event being displayed on viewers’ devices. It takes time to transfer the content from the source to the viewers’ devices. The time of this period depending on the type of live streaming directly affects the success of the live broadcast.

What is a streaming protocol?

Before answering the question of what is RTMP streaming protocol we should learn what is a streaming protocol. A streaming protocol is a standardized method of transmitting video or audio content between devices over the internet.

A video streaming protocol sends “chunks” of video or audio content from one device to another device. The method of converting these “chunks” into replayable content on the player device is called the “reassembling” method.

For a successful process, the end device must support the protocol used by the sender. Otherwise, it will not be possible to play the broadcast.

What is Adaptive Bitrate Streaming?

Adaptive Bitrate Streaming(ABR) provides the best video quality and viewer experience possible regardless of connection, device, or software. It is a technique for dynamically adjusting the compression level and video quality of a stream to match bandwidth availability.

What is the RTMP streaming protocol?

rtmp streaming protocol
So, So, what is RTMP? RTMP streaming protocol, Transmission Control Protocol-based technology, was developed by Macromedia for streaming audio, video, and data over the Internet, between a Flash player and a server. Macromedia was purchased by its rival Adobe Inc. on December 3, 2005. RTMP stands for Real-Time Messaging Protocol and it was once the most popular live streaming protocol.

Adobe explains RTMP as follows,

Adobe’s Real-Time Messaging Protocol (RTMP) provides a bidirectional
message multiplex service over a reliable stream transport, such as
TCP [RFC0793], intended to carry parallel streams of video, audio,
and data messages, with associated timing information, between a pair
of communicating peers.

RTMP streaming protocol features

  • Audio Codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex
  • Video Codecs: H.264, VP8, VP6, Sorenson Spark®, Screen Video v1 & v2
  • Playback Compatibility: Not widely supported anymore
    • Limited to Flash Player, Adobe AIR, RTMP-compatible players
    • No longer accepted by iOS, Android, most browsers, and most embeddable players
  • Benefits: Low latency and minimal buffering
  • Drawbacks: Not optimized for quality of experience or scalability
  • Latency: 5 seconds
  • Variant Formats: RTMPT (tunneled through HTTP), RTMPE (encrypted), RTMPTE (tunneled and encrypted), RTMPS (encrypted over SSL), RTMFP (layered over UDP instead of TCP)

How does RTMP work?

RTMP streaming provides a stable connection between the player client and the server, allowing the protocol to act as a channel and quickly move video data to the viewer’s device.

Since RTMP uses the Transmission Control Protocol (TCP), it uses a three-way handshake when moving data. Here’s the method: the initiator asks the server to start a connection (first handshake). When the server responds (second handshake), the initiator acknowledges it (third handshake) and a reliable connection is established.

It has two use cases:

1. First-mile delivery

It is the part where an RTMP stream is used to send video between an encoder and a server.

2. Last-mile delivery

In this part, the RTMP live streaming protocol is used to send data from a server to a video device using a Flash player.

As video streaming with RTMP is no longer supported by all devices, RTMP streaming is not used for last-mile delivery and has been replaced by HTML5 streaming protocols. It is now used for first-mile delivery only. However, the most efficient way is to use HTML5 streaming protocols for both cases.

In the following part of the blog post, we will talk about the alternative protocols to RTMP streaming.

Why is the RTMP streaming protocol dead?

Adobe Communications Team made an announcement in 2017

“Adobe has long played a leadership role in advancing interactivity and creative content – from video to games and more – on the web. Where we’ve seen a need to push content and interactivity forward, we’ve innovated to meet those needs. Where a format didn’t exist, we invented one – such as with Flash and Shockwave. And over time, as the web evolved, these new formats were adopted by the community, in some cases formed the basis for open standards, and became an essential part of the web.

But as open standards like HTML5, WebGL, and WebAssembly have matured over the past several years, most now provide many of the capabilities and functionalities that plugins pioneered and have become a viable alternative for content on the web. Over time, we’ve seen helper apps evolve to become plugins, and more recently, have seen many of these plugin capabilities get incorporated into open web standards. Today, most browser vendors are integrating capabilities once provided by plugins directly into browsers and deprecating plugins.

Given this progress, and in collaboration with several of our technology partners – including Apple, Facebook, Google, Microsoft, and Mozilla – Adobe is planning to end-of-life Flash. Specifically, we will stop updating and distributing the Flash Player at the end of 2020 and encourage content creators to migrate any existing Flash content to these new open formats.”  

Adobe Communications Team 

July 25, 2017 

As you can see in the explanation above, Adobe unplugged the flash player. This ended the use of RTMP on Last-mile delivery (RTMP play). It is still in use in the first-mile delivery(RTMP ingest), but HTML5-based protocols have already begun replacing it in the first-mile delivery and these protocols are more supported. Let’s look at what you need to consider when looking for an alternative to RTMP.

Things to consider when changing the RTMP protocol

When choosing the best alternative protocol to RTMP live streaming infrastructure, you should consider your needs. We recommend that you pay attention to the following key capabilities when comparing protocols.

  • Scalability
  • Latency
  • Quality of experience (adaptive bitrate etc.)
  • Usage scenario (first-mile delivery vs. last-mile delivery)
  • Playback support
  • Proprietary vs. open source
  • Codec requirements

Best RTMP alternatives

We learned enough about the RTMP streaming protocol. Let’s look at protocols that can be an alternative to RTMP.

HLS streaming protocol

hls streaming

HLS stands for HTTP Live Streaming. HLS is an adaptive HTTP-based protocol used for transporting video and audio data from media servers to the end user’s device.

HLS was created by Apple in 2009. Apple announced the HLS at about the same time as the legendary device iPhone 3. Earlier generations of iPhone 3 had live streaming playback problems, and Apple wanted to fix this problem with HLS.

HLS is the most used protocol of recent years. Its features make it a good alternative to the RTMP streaming protocol.

Features of HLS video streaming protocol

  • Closed captions
  • Fast forward and rewind
  • Alternate audio and video
  • Fallback alternatives
  • Timed metadata
  • Ad insertion
  • Content protection

HLS technical specifications

  • Audio Codecs: AAC-LC, HE-AAC+ v1 & v2, xHE-AAC, Apple Lossless, FLAC
  • Video Codecs: H.265, H.264
  • Playback Compatibility: It was created for iOS devices. But now all Google Chrome browsers; Android, Linux, Microsoft, and macOS devices; several set-top boxes, smart TVs, and other players support HLS. It is now a universal protocol.
  • Benefits: Supports adaptive bitrate, reliable, and widely supported.
  • Drawbacks: Video quality and viewer experience are prioritized over latency.
  • Latency: HLS allows us to have 5-20 seconds latency, but the Low-Latency HLS extension has now been incorporated as a feature set of HLS, promising to deliver sub-2-second latency.

CMAF

CMAF 1

Common Media Application Format (CMAF) is a new format to simplify the delivery of HTTP-based streaming media. It is an emerging standard to help reduce cost, and complexity and provide a latency of around 3-5 secs in streaming.

As a result of the declining status of RTMP, other HTTP-based (Hypertext Transfer Protocol) technologies for adaptive bitrate streaming have emerged. However, different streaming standards require different file containers. Such as while MPEG-DASH uses .mp4 containers, HLS streams are delivered in .ts format.  

Therefore, every broadcaster who wants to reach a wider audience must encode and store the same video file twice, because encryption creates completely different groups of files. 

These two versions of the same video stream should be made either in advance or instantly. Both of these procedures require additional storage and processing costs. 

Apple and Microsoft suggested Moving Pictures Expert Group create a new uniform standard called Common Media Application Format (CMAF) to reduce complexity when transmitting video online.

In short, CMAF helps us with single-approach encoding, packaging, and storage. So, Common Media Application Format makes the video streaming process much cheaper and less complicated.

CMAF is one of the best alternatives to RTMP streaming protocol for low latency streaming.

Advantages of CMAF streaming

CMAF streaming technology is one of the easiest ways to reduce streaming latency and complexity of streaming. CMAF streaming helps us with;

  • Cutting costs 
  • Minimizing workflow complexity 
  • Reducing latency 

WebRTC

WebRTC Logo

WebRTC stands for web real-time communicationsWebRTC is a very exciting, powerful, and highly disruptive cutting-edge technology and streaming protocol.

WebRTC is HTML5 compatible and you can use it to add real-time media communications directly between browser and devices. And you can do that without the need for any prerequisite of plugins to be installed in the browser. And Webrtc is progressively becoming supported by all major modern browser vendors including Safari, Google Chrome, Firefox, Opera, and others. 

Thanks to WebRTC video streaming technology, you can embed the real-time video directly into your browser-based solution to create an engaging and interactive streaming experience for your audience without worrying about delay. 

Advantages of WebRTC video streaming

  • Ultra-Low Latency Streaming – Latency is 0.5 seconds
  • Platform and device independence
  • Advanced voice and video quality
  • Secure voice and video
  • Easy to scale
  • Adaptive to network conditions
  • WebRTC Data Channels

In fact, when it comes to ultra-low latency we only think of WebRTC. It is the only way to achieve ultra-low latency rather than an alternative to the RTMP streaming protocol.

Conclusion

We focused on what RTMP is, its features, and its alternatives in general. As we mentioned above, the RTMP streaming protocol has dominated the video streaming industry for years. However, developing technologies and changing needs in recent years reduced the need for RTMP live streaming protocol and emerged new protocols. HLS, CMAF, and WebRTC are the most popular of these protocols. And by streaming with Ant Media Server, you’re able to select the best formats for highly scalable, adaptive, and multi-device streaming for your streaming platform.


Ahmet Oguz Mermerkaya

Oguz is the co-founder of Ant Media. His tech stack includes VxWorks, UML, Rhapsody in C++. Java, OSGi, Swing, JSF, Web, PHP, FFmpeg API, Native WebRTC, Java EE, Hibernate, Spring, MongoDB, MySQL, Angular, JavaScript, HTML5, Android (Native) and iOS (Native). Oguz is one of the writers of "Merhaba Android", one of the first books published in Turkey about Android app programming. His second book is about HTML5 & CSS3. He has attended several conferences and universities talking about Android, business life and technical issues. He is a member of the GDG Community and also the founder of GDG Ankara.

chatsimple