RTMP vs HLS vs DASH streaming protocols

Let’s look at RTMP vs HLS vs DASH. If you do anything with streaming you probably hear the acronyms RTMP, HLS and DASH. These protocols are de-facto standards for streaming audio and video over the Internet. RTMP, HLS and DASH evolved out of the growing need to broadcast high quality video on the Internet. Previous streaming protocols presented some problems. Specifically the older protocols are all UDP based and needed to allocate ports on the fly. As a result the older protocols forced network administrators to reduce their security posture by opening all sorts of holes in their firewalls.

RTMP, HLS and DASH all use TCP instead of UDP under the covers. Additionally they can all work over a single port and in some cases be encapsulated with HTTP. This makes the streaming traffic similar to web traffic. Hence reducing firewall headaches.

What is RTMP?

What is RTMP? Specifically RTMP stands for Real Time Messaging Protocol. Sounds more generic than streaming doesn’t it? RTMP is a creation of Macromedia and through Adobe’s acquisition of Macromedia it now belongs to Adobe. Remember all those flash videos and the flash player?

RTMP is a TCP based protocol designed for low latency. RTMP achieves this by breaking data into small packets often referred to as chunks. Additionally RTMP supports combining multiple streams into a single connection.

RTMP was built to support Flash based technology. But it has found a life of its own in streaming video production. Many video producers use RTMP for their publishing stream and then re-broadcast in HLS or DASH to clients. Why? RTMP is widely supported across streaming software and platforms.

Adobe is ending support for Flash. But that does mean RTMP is dead yet. It’s prevalent use as a publishing mechanism means it will probably be around for a while.

RTMP Key Points

What is HLS?

HLS is Apple’s streaming protocol. HLS stands for HTTP Live Streaming. Meaning it streams using the native protocol of the web, HTTP. Leveraging HTTP has many benefits. Internet infrastructure like firewalls and content delivery networks already handle HTTP. HLS works behind the scenes by storing the video stream in small chunks or files. There is a manifest that provides an index into all of these files. HLS’s design allows for adaptive streaming. Meaning you can adapt the stream bitrate or quality in the middle of a stream. If your Internet connection gets slow HLS can stream quality can be downgraded to a slower bitrate.

One of the key benefits of HLS is widespread support across many devices and platforms. Hence, if you want to reach the widest audience, HLS is a good choice. HLS only supports the H264 codec for video and AAC for audio.

Another key benefit of HLS is adaptive streaming. Adaptive streaming enables changing the quality of the video mid-stream. For example, if your internet connection starts slowing down the bit rate can adapt to ensure the stream stays viewable. Despite the degradation in bandwidth.

HLS Key Points

What is DASH?

MPEG-DASH is often referred to as just DASH. DASH stands for Dynamic Adaptive Streaming is an open standard and similar to HLS. It uses HTTP, small chunks and also supports adaptive streaming. A key difference between HLS and DASH is that DASH is codec agnostic. Hence you can use any codec you want. Another big difference, DASH is an open standard. This means the standard is created and updated in a public forum with input from major users. Contrast that to the HLS standard which is tightly controller by Apple.

RTMP vs HLS vs DASH – Which one should I use?

If you are producing live video content then you probably want to publish your stream to a streaming server via RTMP. It is possible to allow consumption of the stream via RTMP. But you probably don’t want to do that. HLS has widespread support on client devices that consume your video. Additionally you can leverage CDNs and not need to worry about firewalls. So you will want to broadcast with HLS.

Setting up a streaming server

Youtube, Vimeo and Livestream are popular cloud services used for streaming. However if you want to setup your own streaming server, stay tuned to Linuxhit.com because we are working on an in-depth tutorial for setting up an RTMP, HLS and DASH capable server using NGINX. With this solution you can control every aspect of the infrastructure, data and privacy.

Check out our other articles on streaming related topics here.

3 Responses

  1. Thanks for the info. Very informative ! Are you working on the tutorial for the streaming ? I would be grandly interested to see it.

  2. Hi Alex, thanks for the feedback. I have all the steps documented but need to finish the writing and editing. Will post soon.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.