Live streaming has transformed how we connect, communicate, and consume content. From virtual conferences to live sports and entertainment, the underlying technology has come a long way. Among the key players in this evolution are RTMP (Real-Time Messaging Protocol) and HLS (HTTP Live Streaming). While RTMP dominated the early days of live streaming, HLS has become the standard for playback across devices. This article explores the journey from RTMP to HLS, highlighting the strengths, limitations, and ongoing relevance of these technologies.
A Brief History of RTMP
RTMP was developed by Macromedia (later acquired by Adobe) as a protocol for streaming audio, video, and data over the internet. It gained popularity with the rise of Flash Player, which supported RTMP seamlessly. During its heyday, RTMP was the go-to solution for live streaming because of its low latency and real-time interaction capabilities.
One memorable anecdote involves a small wedding in Portugal where a videographer used RTMP via Red5 to stream the ceremony to distant relatives. The simplicity of RTMP allowed the setup to be completed in under an hour, ensuring the family could witness the joyous occasion in real time. However, as browsers phased out Flash Player, RTMP faced a major hurdle: its incompatibility with modern browsers.
The Transition to HLS
HLS was introduced by Apple to address the growing demand for adaptive streaming. Unlike RTMP, HLS works seamlessly across modern devices, including smartphones, tablets, and desktops. It achieves this by breaking the video into small chunks delivered via HTTP, making it highly scalable and reliable.
However, HLS comes with a trade-off: latency. The process of creating and buffering video segments introduces delays, which can range from 6 to 30 seconds. For most applications, such as live TV broadcasts or corporate events, this latency is acceptable. But for time-sensitive scenarios like live betting, HLS’s latency can be a dealbreaker.
RTMP’s Role in Today’s Streaming Workflows
Despite its limitations, RTMP has not disappeared. Instead, it’s found a new role in modern workflows. RTMP is often used as the input protocol for streaming servers like NGINX or Wowza, which then convert the feed into HLS for playback. This combination leverages RTMP’s low latency for ingestion and HLS’s compatibility for delivery.
A broadcaster in East Africa once shared their story of upgrading from a Red5-based RTMP setup to an NGINX server. The new system allowed them to stream local sports events with greater reliability, reaching a wider audience via HLS.
NGINX vs. Wowza: A Comparison
Both NGINX and Wowza are popular choices for handling RTMP to HLS workflows. Here’s how they compare:
Feature
Red5 RTMP
NGINX RTMP
Wowza RTMP
HLS
Cost
Free
Free
Paid
Free after setup
Scalability
Moderate
High
High
High
Latency
Low
Low
Low
High
Browser Support
No
No
No
Yes
NGINX is favored for its lightweight and open-source nature, making it ideal for cost-conscious users. Wowza, on the other hand, offers robust features and professional-grade support, which justify its premium pricing for enterprise users.
HLS: The Present and the Future
HLS has cemented its place as the standard for live streaming playback. Its adaptability to different network conditions and support for multiple devices make it indispensable. Innovations like low-latency HLS (LL-HLS) aim to address the delay issue, bringing it closer to real-time performance.
Why RTMP and HLS Work Well Together
The synergy between RTMP and HLS is what makes them invaluable in modern streaming workflows. RTMP’s low-latency ingestion ensures that live feeds reach the server promptly, while HLS’s adaptive delivery ensures seamless playback for viewers. For broadcasters, this combination strikes the perfect balance between performance and accessibility.
Final Thoughts
Live streaming continues to evolve, but the core principles of reliability, scalability, and user experience remain unchanged. While RTMP’s browser incompatibility limits its direct use, its role as an input protocol keeps it relevant. HLS, with its widespread compatibility, bridges the gap between content creators and audiences. Together, they form the backbone of modern broadcasting.
As we look ahead, advancements in low-latency technologies and protocol optimizations will further enhance live streaming’s potential. Whether you’re a broadcaster, a developer, or a viewer, understanding the evolution of these technologies provides valuable insights into the future of live streaming.
Given the growing popularity
and support of HTTP video streaming, it may be tempting to consider
Real Time Messaging Protocol (RTMP) streaming obsolete. But in many
cases, working with RTMP server
is still very meaningful. As soon as Macromedia first pronounced RTMP
with Flash Player 6 in 2002, the brand new Macromedia Flash
Communication Server MX (FCS) required to stream the evolving Flash
Video (FLV) format, stream was live or VOD.
However,
for FCS, licensing costs were high (up to $5,000 per server), and as
a result, CDN costs were high than other proprietary streaming
formats. Some manufacturers in the industry have called RTMP
streaming costs a “Flash tax”. But Flash Player has been a
ubiquitous introduction to desktop browsers for well over a decade,
much larger than other plug-ins. Though, streaming server technology
has traditionally been harder for web developers to implement, and
simpler HTTP delivery has mostly been easier and more cost-effective.
In 2003, Macromedia enabled Flash Player 7 to support HTTP delivery
of FLV files, allowing integrators to use standard web server
technology to deploy online video.
So
in many ways, RTMP as a VOD transport delivery has not been a
requirement for web video for more than a decade. As a video solution
architect, I think of business requirements as the leader in most
audio video decisions. And still, in 2014, RTMP is the de facto
standard for the following use cases:
Publishing
live streams from software/hardware encoders:
Almost all streaming devices support RTMP to publish to CDN providers
and streaming servers. Some native mobile applications also use RTMP
libraries to publish live video from their mobile camera.
Near-instant
search/playback:
One of the benefits of RTMP streaming is its enhanced search
capability. With real-time streaming, the player can search anywhere
in the video with less buffering than HTTP delivery. However, to
enjoy this feature, you need a Flash Player on your desktop and as
such, it is not possible in mobile browsers. HTML5 browsers use HTTP
domain requests to facilitate faster searching of VOD files.
Content
Protection: RTMP
Server
can facilitate different levels of content protection, from
obfuscation to true DRM. RTMP streams are not stored for playback on
a desktop browser.
Adaptive
Streaming: One of
the preferred uses of RTMP is adaptive streaming playback, where we
provide the video player with more bitrates and content resolutions,
providing the best resolution at the current network speed. Some HTTP
adaptive streaming technologies, such as HLS and MPEG-DASH, allow
similar delivery, but RTMP may be more responsive to switching one
bitrate to another. Unfortunately, there is no standard for HTTP
adaptive streaming between HTML5 video-enabled browsers. As such, the
Flash-based display of adaptive streaming is still a requirement for
adaptive streaming.
Live
Streaming Playback:
While live streams do not need to be adaptive, compressed video
segments apply the same principle to all live streaming playback. For
desktop playback within the browser, virtually every live streaming
event requires a video player that supports Flash-based rendering and
RTMP playback. Apple Safari on iOS natively supports HLS, and
luckily, all modern streaming servers, including the Wowza Streaming
Engine, support RTMP and HLS compression.
The requirement for a Live
Streaming Flash Player will only change if MPEG-DASH appears
everywhere as Flash currently. If Internet Explorer 8, 9 and 10
support is required to install live streaming, then RTMP streaming is
still required. Also, if you need a delay close to zero in a live
stream, then HTTP streaming will almost certainly not meet your needs
while RTMP is capable; HTTP mechanisms require that multiple packets
be collected on the server before being sent to the video player.
In
summary, if your video workflow involves live streaming or any kind
of packaged video installation, RTMP is the key to a successful video
experience. HTTP delivery has already replaced most Flash VOD
installs on video, but HTTP video can’t handle all RTMP video use
cases.
Another
important setup on Red5 Server is the Python Hosting offered to all
hosting customers, with python cpanel hosting the advantage is
cheaper and easier to install and run python scripts on a normal
hosting. With Python
Hosting and rtmp server the customer can really start a
webmasters and increase a number of usages to host python scripts or
even video chat or live streaming.
As
my university professor used to say the computers language for the
next 50 years will be python, fast, easier with multiple modules
which allow any developer to start an application running python is a
few short hours.
Android can not play RTMP directly using the default Chrome mobile browser, as Flash plugin is required to play RTMP in browser (available only on PC).
Transcode and deliver stream using a format that plays in Chrome mobile browser, like MPEG DASH or WebRTC.
RTMP is still used quite a bit by broadcasting application and hardware, such as Wirecast and OBS.
It’s not widely used for end delivery anymore, though. As viewing RTMP streams pretty much requires a flash plugin, and most modern browsers have (or are) dropping support for it, other solutions are the norm today.
HTTP live streaming is widely used because it uses existing CDN:s for delivery, and plays natively on smartphones – which is a huge selling point today. In 2018 52% of all web traffic was through mobile phones.
Transcoding and MPEG DASH, WebRTC delivery is possible with Broadcast Live Video solution.
RTMP stream can be published with an external encoder (including mobile apps like Wowza GoCoder) and played back over MPEG DASH or WebRTC in Android
Recent Comments