With the announcement that Adobe will stop supporting Flash, people started looking for an alternative solution to RTMP. With the shrinkage of time, the question of moving to which solution from RTMP has gained importance. We strongly recommend you RTMP to WebRTC migration as an answer. We will explain why in the following section.

Table of Contents

  • Flash And RTMP are Dying
  • RTMP 
  • WebRTC
  • Reasons for RTMP to WebRTC Migration
  • RTMP vs WebRTC
    • Latency
    • Scalability
    • Encoder/Player and Browser Support
    • API supports
    • WebRTC Data Channels

Flash And RTMP are Dying

Adobe Communications Team made an announcement in 2017

“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 

So, we are at the end of 2020. That means this is the death time of Flash Player and also RTMP. Adobe will stop updating and distributing the Flash Player. 

 

rtmp to webrtc migrationMany industries and businesses have been built around Flash technology. Such as gaming, education and video… The video part concerns us.  Flash Player and RTMP were the dominant delivery mechanisms for live streaming for many years. But HTML5 video streaming, open standards, and adaptive bitrate delivery stopped the popularity of RTMP streaming out when it came to last-mile delivery. When Flash and RTMP are used together, these technologies support “fast” video delivery with around five seconds of latency. 

For a while, many Flash video streaming applications have been replaced by HTML5 solutions such as HTTP Live Streaming (HLS) and DASH (most of them only in the last 5 years when HTML5 browsers have finally offered media source and encrypted media extensions). But during this time, WebRTC was and still is the only option for ultra-low latency streaming. Even only this makes it a great alternative to RTMP.

As an HTML5-based solution, WebRTC does not require any browser plug-ins for playback and can utilize mapping techniques to transfer data between connected sessions. Moreover, WebRTC offers the quickest method for transporting live video across the internet. 

If you’re using Flash for low-latency/real-time streaming, you have a really short time for RTMP to WebRTC migration.  

Let’s remember RTMP 

RTMP 

rtmp and flash are dying

RTMP is a protocol, created by Macromedia and now owned by Adobe, that provides high-performance transmission of video, audio and data between dedicated streaming servers and Adobe Flash Player across the internet. 

Definition of RTMP by Adobe: 

“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 is created for high-performance transmission of media such as audio and video data. 

Let’s see WebRTC 

WebRTC 

ant media server webrtc streamingWebRTC(Web Real-Time Communication protocol) is an open-source standard for real-time communication supported by almost every modern browser, including Safari, Google Chrome, Firefox, Opera and others.  That support ensures that the WebRTC standard remains up to date and functional for the foreseeable future.  WebRTC supports Opus audio codec as well as high-quality VP8 and VP9. In the near future, the protocol will gain support for a brand new AV1 video codec. The protocol is expected to be used in a much wider area. 

One of the biggest advantages of WebRTC is that it converts millions of browsers into streaming terminals without the need to install any additional plugins. What’s more, WebRTC supports sub-second latency, which means no more delay! Finally, the protocol uses an adaptive bitrate technology that allows it to automatically adjust video quality and avoid any interruptions. Sounds good right?

Reasons for RTMP to WebRTC Migration

We have briefly mentioned RTMP and WebRTC protocols. Now, we can look at the reasons for RTMP to WebRTC migration.

rtmp to webrtc migration with ant media server

RTMP vs WebRTC 

With the death of the flash player, you have to consider the new options. And there is one option for ultra-low latency streaming. This is WebRTC. We will compare these two protocols step by step. So, you will understand why you need RTMP to WebRTC migration.

Here are the reasons! 

Latency 

RTMP is based on Transmission Control Protocol (TCP), and it allows data transmission in a given sequence and order with a delivery guarantee. Even it uses a more reliable network connection, latency is often 5 seconds or more dependent on network settings. On the other hand, WebRTC is based on UDP, and it offers near real-time latency with ~0.5 seconds. WebRTC is arguably better for two-way conferencing or real-time device control. Latency is one of the most important reasons for RTMP to WebRTC migration.

Scalability 

In terms of scalability, RTMP can be scaled to provide live streaming to thousands or even millions of audiences. Likewise, WebRTC can scale to millions. 

Encoder/Player and Browser Support 

Due to the wide adoption of RTMP, it is supported by most encoder software and video players. However, due to the end of life of the Flash player, RTMP starts to lose support by most modern browsers. On the other hand, WebRTC has better support by modern browsers with built-in API support in HTML5 and can be played within most modern browsers without installing any software or plugins. In terms of encoder or video player support, lots of software vendors started to recognize the popularity of WebRTC and started to add WebRTC into their support list. 

API Support 

When it comes to development, API support is a key factor in choosing your technology. WebRTC is taking the lead for API support, as most modern browsers have native API integrated with WebRTC, and can be called directly using Javascript. On the other hand, to work with RTMP, we need to leverage open source libraries or use pre-existing software solutions. 

WebRTC Data Channels

Sending data between two browsers for communication, gaming, or file transfer can be a rather involved process. It requires setting up and paying for a server to relay data and perhaps scaling this to multiple data centers. In this scenario, there is potential for high latency, and it’s difficult to keep data private.

These problems can be alleviated by using WebRTC’s RTCDataChannel API to transfer data directly from one peer to another. 

We tried to explain the reasons for Rtmp to Webrtc migration. We are always with you for RTMP to WebRTC migration on your projects. You can ask any questions via contact@antmedia.io

Useful Links

You can try Ant Media Server for free with all features!

You can download native Android and iOS WebRTC SDKs and integrate them into your applications for free!

Ant Media Server Github Wiki

You would want to check Future of Ultra-Low Latency Streaming Market, Linear Live Streaming 101, An Overview of WebRTC Statistics.