Converting RTMP to HLS for Live Streaming to Mobile Devices

Converting RTMP to HLS

In this article, we’ll take a look at some of the media streaming protocols used by Dacast and other video streaming platforms. In particular, we’ll consider common inter-operability issues that arise when streaming live. Finally, we’ll explore how to effectively address potential issues in order to stream live video as successfully as possible.

This is a fairly technical topic, so we’ll do our best to make it simple and clear enough for even new broadcasters to understand. Overall, the topics we’ll address in this article include:

  • What is RTMP?
  • HLS (HTTP Live Streaming)
  • HDS (HTTP Dynamic Streaming), and
  • Converting RTMP to HLS or HDS.

Are you already skilled at streaming and looking for a more technical solution to converting RTMP to HLS? You may want to skip the first few paragraphs and head straight for the section on HLS live streaming.

What is RTMP?

hls live streamingWhen setting up a live stream, you need either live stream encoding software or a hardware encoder. The encoder connects to your video camera(s) and converts their digital video output to a format better suited for live streaming. Most often, the default format for your encoder will be RTMP.

RTMP (Real-Time Messaging Protocol) is a Macromedia (Adobe) standard created for streaming audio, video, and associated data over the internet in real-time. A variety of streaming encoders–that is used by both small operations and broadcast-level professionals, such as Wirecast, vMix and OBS Studio (free)–create this protocol.

RTMP is a robust, flexible standard. In the modern world, however, RTMP is not always sufficient. Why? RTMP depends on the availability of Flash Player on the client device. However, it is possible to convert RTMP, nearly on-the-fly, into to several different formats. This includes the HLS format, provided you have the right video streaming solution setup.

We’ll discuss this possibility of conversion–called transcoding–in more detail after we explain the basics of HLS below.

HLS Live Streaming (HTTP Live Streaming)

hls live streamingHLS live streaming (also called HTTP live streaming) is a different protocol for live video and audio streaming than RTMP. In fact, HLS live streaming was designed to address some of the issues with RTMP.

As mentioned above, RTMP relies on Flash Player, which has long been the standard for streaming video. Today, Flash is often retired in favor of other standards, primarily due to concerns about stability and security. Probably the most notable instance of this shift is on iOS; neither iPhones nor iPads can install Flash Player, which has driven the adoption of new technologies.

One of these technologies, pioneered by Apple itself, is HLS. HLS live streaming helps to bring advanced video streaming to iOS devices. The HLS protocol uses standard HTTP web delivery methods. However, it also features some changes to these methods to optimize media streaming. For example, HLS live streaming delivers audio and video files as small MPEG2-TS file downloads that are interpreted as a seamless stream.

HLS is sometimes referred to as an HTML5 video, but this is actually erroneous. HTML5 is a completely distinct standard that we generally do not use for live streaming. HLS video is preferred on Android mobile devices, as well as with iOS.

HDS (HTTP Dynamic Streaming)

hls live streamingAre you delivering video streams to flash capable mobile devices, computers, and other devices that do have Flash Player available? If so, the preferred method is HDS or HTTP Dynamic Streaming. This protocol is an Adobe format that delivers fragmented MPEG-4 video files (also known as fMP4).

The HDS format is slightly more flexible than HLS live streaming. Since HDS has a smaller “packet size” and uses adaptive bitrate delivery, it can provide slightly smoother video streaming. HDS is optimized for use with larger media libraries. It also provides advanced DRM (Digital Rights Management) and encryption features to help counteract piracy.

HDS has another advantage in the realm of segment alignment. With HDS, Fragmented MPEG-4 files are referenced to one another based on shared keyframes. This, in turn, requires simultaneous encoding of various bitrates to guarantee they match up correctly. This method, therefore, reduces bandwidth requirements and can increase the battery life on the user device when compared to HLS live streaming.

For all of these reasons, HDS is the preferred streaming protocol at Dacast, as long as Flash Player is available. However, all Dacast encodes all its streams in both HLS and HDS. You can learn more about HDS on the Adobe website.

Converting RTMP to HLS or HDS

hls live streamingWhile both HLS and HDS are based on HTTP, the two formats exist for different types of devices. If you’d like to reach the largest possible audience with your live video stream, you need to encode your stream as both HLS and HDS. That way, the client device can access whichever of these streams it is best equipped to handle.

With the right video streaming host, you can convert a single RTMP feed from your encoder to HLS and HDS automatically on the server end. Here at Dacast, we use Akamai’s Stream Packaging for Universal Streaming service for this process. Akamai’s Stream Packaging first ingests an RTMP stream from your encoder. Then, Akamai automatically transcodes the stream to both HLS and HDS in near real-time, preparing the stream for any device format. NOTE: This process does result in a minimal (30-45 second) delay on the feed.

Once the service transcodes the content, Akamai’s live streaming CDN (content delivery network) distributes the content via over 216,000 servers worldwide. This world-class server network ensures that live streams are delivered quickly and seamlessly to anywhere on the planet. Akamai also helps to ensure reliability. If a server goes down, or if a million viewers suddenly show up for your broadcast, your content will continue to flow smoothly.

All of this also means that any device can view your content seamlessly. Akamai automatically selects and delivers the best protocol automatically. The use of a global CDN reduces costs by ensuring that you only need one encoder. In short, you can reach a global audience with a single setting and a single encoder.


hls live streamingIn this article, we’ve walked you through the basics on RTMP, HDS and HLS live streaming and the conversion process.

If you’re looking for an easy way to convert your RTMP stream to HLS, consider signing up for a Dacast live streaming account. Once you sign up for our 30-day free trial (no payment required), you can point your encoder to the Dacast servers and provide your login credentials. At that point, you’re ready to test out our streaming solutions for yourself!

Note: You can also access these full instructions on how to start live streaming with Dacast. When you do go live, your content is automatically available in whatever format is best for your viewers.


When you do go live, your content is automatically available in whatever format is best for your viewers.

Want to stream live video on your website and maintain control of your content? We’ve got you covered! Plan to do regular, business-related broadcasts? We’ll help you make sure you reach all your viewers with the best quality stream possible. If you need additional help figuring out how to convert RTMP to HLS and HDS, or other support with live streaming, you can contact our technical support department from within your Dacast account.

Did you find this article helpful? Do you have questions or comments, or ideas for other topics you’d like us to cover in our articles? Let us know in the comment section below, and thanks for reading! For regular live streaming tips and exclusive offers, you can also join our LinkedIn group.

By Max Wilbert.

2 thoughts on “Converting RTMP to HLS for Live Streaming to Mobile Devices

  1. Pingback: Streaming Media 3rd Party Players - DaCast

Leave a Reply

Your email address will not be published. Required fields are marked *