HLS vs DASH vs MP4 vs MPEG-TS Linear vs RTMP for Streaming

By Steven Tripsas on January 06, 2021

Recent surveys suggest that by 2021, mobile video streaming traffic will reach 42,734 petabytes per month. Globally, internet video traffic is forecasted to reach 282.3 exabytes per month by 2022.

These demands put a strain on internet service providers and those who have metered internet connections, which is still common in many parts of the world.

If you want to provide streamable content for your viewers, it's vital to choose the right streaming protocol and meet end-user demand for high-quality streaming. Choose the wrong solution, and viewers may face laggy, low-quality streams, poor audio, and constant buffering, a recipe for churn and abandonment. Unless intentional, you also want to prevent the ability for copies to be made and stored.  

Some of the most popular solutions are HLS, DASH, MPEG-TS Linear, and RTMP. We're here to help you understand what they are, how they work, and which best suits your needs.

What is HLS in Streaming?

HLS stands for HTTP Live Streaming. It is a streaming media protocol created by Apple that has been available since 2009 to solve the streaming media issues that had plagued the first and second generations of iPhones.

In many respects, HLS could be seen as replacing Quicktime, Apple's previous streaming solution. Quicktime was a useful streaming system in some respects, but it used nonstandard ports, so many firewalls were configured to block it, making it unreliable for mainstream use.

The Benefits of HLS

The main benefit of HLS is how well it is supported. The protocol works well on desktops (Windows, Mac OS, and Linux), browsers (Chrome, Safari, Firefox, Edge), connected TV, and mobile devices. 

Also, it is rarely blocked by firewalls or routers since it uses HTTP and HTTPS for communication. HLS breaks up a large video file or ongoing stream into many 'chunks' (segments) and can provide multiple versions of the stream at different bitrates (ABR - Adaptive Bitrate), making it possible to adapt to changing network conditions dynamically. 

This means if the servers are under heavy load or the user client goes from a higher bandwidth connection to a lower one, or vice versa, the stream can continue uninterrupted. 

HLS prioritizes quality over low latency. The trade-off is that there's a lot of latency (6+ seconds), making it challenging for live streams where there may be extensive social media interaction. This may be less of a concern for corporate training, town halls, or a sales/marketing presentation. 

Apple has updated the HLS protocol to create 'low latency HLS', which somewhat improves the latency to be on par with broadcast television.

What is DASH in Streaming?

DASH stands for Dynamic Adaptive Streaming over HTTP. DASH was developed by  MPEG  (Moving Pictures Expert Group), the preeminent international authority for media compression.  

The protocol is a newer standard and is open-source. Just as with HLS, content is sent in small segments and supports adaptive streaming. It is the only streaming solution certified by ISO (International Organization for Standardization). 

The Benefits of DASH

DASH is codec-agnostic, which allows flexibility in the choice of codec for playback of streams. DASH Supports h.264/MPEG-4 Part 10, h.265, VP9, and AV1 codecs. Because DASH is open-source, there is more significant input into the standard than other options.  

DASH supports Encrypted Media Extensions (EME) and Media Source Extension (MSE). EME and MSE are standards-based APIs for creating DRM schemes within the browser.

Like HLS,  DASH breaks up a large video file or ongoing stream into many 'chunks,' and can provide multiple versions of the stream at different bitrates and dynamically adapt to changing network conditions.

What is MP4 in Streaming?

MP4, or MPEG-4, is a video container format that has been popular for offline use for many years, but the codec by itself doesn't lend itself to HTTP streaming. Most modern browsers can understand H265/AAC files that are packed as MP4s, but all that happens when a file is requested and sent is that the browser sends a request to the server, which reads the file from the disc and sends it out. There's none of the support for changing bandwidth conditions or fixing lag-related issues that other protocols offer.

The Benefits of MP4

MP4 has some benefits in that it's widely supported and easy to use, but it doesn't work well for live streams. Fortunately, it can be used as a starting point for other formats streaming protocols such as DASH and MPEG-TS Linear.

What is MPEG-TS Linear in Streaming?

MPEG-TS is a digital container format that allows for the transmission of audio and video. The format supports error correction and synchronization, which can offer a good viewer experience even on unreliable connections. Each stream is divided into sections no bigger than 188 bytes. The small packet size allows streams to be interleaved with minimal latency, reducing audio delay and other lag-related issues.

The Benefits of MPEG-TS Linear

MPEG-TS is popular for video conferencing and live streams, where it's essential to avoid latency. MPEG-TS Linear is so-called because the stream uses a rolling offset, which means the user can skip through a portion of the stream (usually around 30 minutes) but cannot rewind further than that.

This design is an interesting balance between saving resources for the streamer while still offering a good experience for the viewer.

What is RTMP in Streaming?

RTMP is one of the older streaming formats and is still in use today. It started life as the foundation of Adobe Flash, resulting in its mass adoption. Even now, YouTube, Facebook, and Twitch can work with RTMP, but it has fallen out of favor because of technical challenges with some modern devices.

The Benefits of RTMP

RTMP is suitable for reliable and reasonably low latency stream delivery and is fast enough to stream live sporting events. It is mainly used with dedicated streaming servers, which can ensure excellent delivery speed. 

This, combined with its widespread support on desktop devices, means that there are people who still choose to use it. The lack of adaptive bitrate support and the fact it uses TCP rather than HTTP, creating firewall issues, means the other protocols listed here are better for mobile devices.

HLS vs DASH vs MP4 vs MPEG-TS Linear vs RTMP

Protocol Pros: A Comparison

  • HLS
    Widely adopted
    Good for mobile devices and connected TVs
    Uses HTTP and HTTPS, so no firewall issues
    Adapts to network degradation
  • DASH
    Open-source; great input from industry 
    Uses HTTP and HTTPS, so no firewall issues
    Adapts to network degradation
  • MP4
    Widely supported
    High compression reduces bandwidth requirements
    Small packet size means very low latency
    Adaptive bitrate
    Users can rewind portions of the stream
  • RTMP
    Supported by many popular social media platforms
    Moderately low latency

Protocol Cons: A Comparison

  • HLS
    Latency can be an issue
  • DASH
    Not all mobile devices support DASH
  • MP4
    Audio may drift out of sync from video
    The container itself cannot support adaptive bitrates
    Rolling offset means the user can only rewind a limited portion of the video
  • RTMP
    Uses TCP rather than HTTP, which can cause firewall issues
    No adaptive bitrate
    Does not support HEVC/h.265 encoded streams
    Has fallen out of favor with major CDNs

Which Streaming Protocol Should You Choose?

Your choice of protocol will depend on what the stream is for. Here are some questions to ask to help you determine the best option(s) for you:

  • Will the stream live inside of your direct-to-consumer apps, or will it be distributed to a third-party distributor such as virtual multichannel video programming distributors (vMPVDs) or free ad-supported TV service (FASTS)? 
  • How many people will be watching it, and where are they located? 

These questions will help you make a fair comparison between, say, HLS or DASH streaming.

For encoding live performances, consider HLS or DASH streaming thanks to their adaptive bitrate, high quality, easy firewall traversal, and device support. HLS has the most widespread device support, however.

RTMP is an excellent choice for streams on social media, including Facebook and platforms such as Twitch, and Playout makes it easy to get started with RTMP linear streaming.

If you're unsure how to configure streams or manage these different protocols, Zype’s selection of streaming and content delivery suites could help you. We offer an extensive network of CDNs to ensure smooth video delivery to viewers worldwide and transcoding support to provide content using different formats for live streaming, VOD, and downloadable videos.

Zype makes it easy for you to provide your visitors with reliable, high-quality, and low-latency streams. All you have to do is choose the formats and let our software do the work. If you'd like to see our tools in action, contact us to request a demo today.

Harness the power of Zype's video infrastructure