HTTP Live Streaming (HLS) Format – The Pros, Cons and How it Works

http live streaming

This blog focuses on HLS, or HTTP live streaming, which is one of the most popular protocols used to stream video today. HLS format is an adaptive bitrate live streaming video protocol. Originally developed by Apple for use on iOS, Mac OS, and Apple TV devices, HLS streaming has become the most widely used live video protocol.

This article is going to take a look at the pros and cons of HTTP live streaming. We’ll compare it to a few alternative formats as well. We’ll also look at the history of the HLS format, and ask where it came from, and why.

Table of Contents:

  • How HTTP Live Streaming (HLS) works
  • Pros of Using the HLS Protocol
  • Cons of Using the HTTP Live Streaming Protocol
  • Solutions to the Latency Problem
  • HLS vs. Other Streaming Protocols
  • What is Low-Latency HLS?
  • How Does Dacast’s Direct HLS Low Latency Streaming Solution Work?
  • Conclusion

How HTTP Live Streaming (HLS) Works

How HTTP Live Streaming works
Dacast’s HTML5 All Device Video Player with White Label Customization runs on HTTP Live Streaming technology.

HLS video is delivered via the HTML5 web communication protocol, the latest online standard for web content. HTML5 video players support online video delivered via a variety of protocols. These include HTTP Live Streaming (HLS) and MPEG-DASH.

You can think of the streaming protocol as the method that defines what format the video uses, how it’s compressed, the size of the chunks sent, and so on.

HLS was developed to provide an alternative to Flash video. Technically speaking, uses H.264 video compression, AAC, or MP3 for audio compression, and transmits streams using the MPEG-TS container format.

Video streaming via HLS works by chopping an MP4 video stream into short, ~10-second video chunks. Streams are described using M3U8 playlists that are created by the HTTP server. This playlist also called a manifest file, indexes the video chunks.

Pros of Using the HLS Protocol

Over the past few years, the HLS format has become a standard protocol for web video, and with good reason. HLS ingest is pretty simple to set up, it’s free to use, and it’s supported on a wide range of devices. Let’s take a look at some of the pros of using the HLMS protocol for video streaming.

1. All-Device Delivery

HTML5 video player
By using HTML5, developers no longer worry about which browser or which extension their visitors use.

First, HTTP Live Streaming supports video on just about every device. Although it was originally created for use on Safari and iOS devices, the HLS format is now supported on every modern web browser—mobile, desktop, tablet, etc.

Whether you and your viewers are accessing content on a smartphone, tablet, desktop, or laptop, smart TV, set-top box, or any other device, HLS video will play. A majority of web browsers also support the leading alternative—MPEG-DASH—but iOS and Safari don’t. That’s a major advantage. For this reason, HLS remains the de facto standard.

2. Excellent Quality

hls format
ABR is a method where broadcasters offer multiple streams with different bitrates to users, resulting in an ideal HLS video format.

The HLS video format uses a method called Adaptive Bitrate Streaming. This method measures the internet speed available to each viewer of a given video. Then, the video quality they are being served is adjusted dynamically.

For example, you may begin watching a video at home, where you have a fast Wi-Fi connection. Then, you may leave home and get in a car with a friend, and continue watching the video with a mobile connection. This internet may be slower. You may also pass through areas of limited bandwidth availability. Even a dedicated home or work internet connection can have a significant variation in internet speeds.

Video delivered using the HLS format, if configured properly, will dynamically provide you with the best possible video quality while minimizing buffering and lagging. This approach leads to a superior user experience. The video will attempt to continue playing as much as possible. Quality will scale up as long as your internet is fast enough to handle the load.

3. Cost-Efficient

Another major advantage of the HLS format is its lower cost. As we’ve said, the format is supported by just about every device via HTML5 and Media Source Extensions. There’s no need to use a specific device to watch the content. Standard web servers can handle HLS delivery with no problem (depending on load and other factors).

4. Privacy and Security

The final benefit of HLS that we’ll highlight here is privacy and security. Compared to Flash, HLS simply provides a more secure browser for your viewers—both when they’re watching your content, as well as afterward.

Cons of Using the HTTP Live Streaming Protocol

No protocol or technology is perfect, and HTTP Live Streaming is no different. There are a few cons to using the HLS format. Let’s take a look at one of the most prevalent issues: latency.

1. Latency

Latency refers to the elapsed time between when an event occurs in the real world, and when viewers can see it. Essentially, it’s the time that it takes for a video to be recorded by a camera, processed by an HLS encoder, transmitted across the internet, distributed to “edge” servers, and decoded for viewing.

Note that video latency doesn’t account for slowdowns due to internet speed and bottlenecks; these are largely separate issues.

2. Internet Speed

HLS was designed to maximize quality, not to minimize absolute latency. Its keyframe interval, packet size, and playback buffer requirement simply aren’t suitable for super-rapid live streaming. Therefore, it usually adds a delay of 20-60 seconds to your stream. These live streaming software platforms offer integrated low latency solutions, and those are the ones to consider.

Slow internet speeds are only a problem for a small subset of live streamers—notably, video gamers and sports fans. In these situations, speed is important. However, most users can easily ignore the small latency of hosting an HLS stream as it will have no impact on viewer satisfaction or experience. For almost all viewers, a high-quality video that is watchable anytime, on any device, is more important than latency.

Solutions to the Latency Problem

Flash video provided low latency live streaming. But with the decline of Flash, internet video is in a transition period. There aren’t any fantastic solutions to the HLS latency issue yet. But many different businesses are working on it, including top-tier CDN provider Akamai. Replacements for HLS are in the works (such as fragmented MP4), but devices aren’t yet ready to play them. That next shift may still be a few years out.

Here at Dacast, we’re offering a low-latency HLS streaming solution for our Premium plans and above. This solution lowers latency to the range of 10 seconds or less. It meets modern browser security standards via HTTPS delivery and still allows you to reach all mobile devices.

HLS vs. Other Streaming Protocols

So you can better understand the pros of HLS, let’s take a closer look at HLS vs. other streaming protocols—notably RTMP and MPEG-DASH.

Before Flash was discontinued, RTMP and HLS were popular picks for delivering streaming video to viewers. Now that Flash is gone, MPEG-DASH is arguably HLS’s biggest competitor. MPEG-DASH is the newer kid on the block and has positively pushed HLS to improve and address past shortcomings like lower video quality.

With that said, let’s dive deeper into both comparisons.

HLS vs RTMP: The Fall of Flash

RTMP as a delivery protocol is mainly phased out, but RTMP is not dead. Let me explain.

Macromedia developed RTMP to work with Adobe Flash player early when the internet became widely used. The merging of Adobe and Macromedia in 2005 gave RTMP a huge reach. Consider that at its peak, about 99% of desktop browsers in the West had the Adobe Flash Player plug-in installed.

RTMP and Flash worked very closely together, so many people confused the two as the same thing, but they’re not. In other words, although Flash is dead, RTMP is not.

So what caused the downfall of Flash (and RTMP as the top delivery protocol)? 

Steve Jobs addressed most of Flash’s shortcomings in a letter called Thoughts on Flash. In the letter, Jobs explained why Flash would not be allowed on Apple devices. In the letter, Jobs explained why Flash would not be allowed on Apple devices. In his letter, Steve Jobs talked about how Flash was a closed system and how it had a lot of issues. That’s why you may have heard people joking that Steve Jobs killed Flash, and there’s some truth to it.

Ultimately, Flash’s death resulted from being unable to fix its performance, battery, and security issues in line with competition like HTML5.

So technically speaking, it no longer makes much sense to compare HLS and RTMP as a delivery protocol, and this will become even more true as time passes. But, let’s pretend we’re back in the days of Flash for a second. As you might recall, RTMP was powerful because it achieved very low latency. Even after Flash’s end-of-life on December 31, 2020 (RIP), the world is still working on a solid low-latency replacement for RTMP.

Because RTMP is powerful, it still lives on, just not how it used to.

HLS Ingest vs. RTMP Ingest

With most browsers dropping support of RTMP delivery after Flash’s end-of-life announcement, anything to do with RTMP delivery/streaming (or Flash delivery/streaming) is practically nonexistent. However, RTMP largely lives on through RTMP Ingest, which actually works with HLS quite well.

For that reason, nowadays, it’s more appropriate to compare RTMP Ingest vs. HLS Ingest rather than RTMP vs. HLS for delivery/streaming.

If you need a refresher, ingest is the technology in charge of transmitting video files from the live stream encoder to the streaming platform. Basically, to use RTMP Ingest, you need an RTMP encoder, and to use HLS ingest, you need an HLS encoder, which leads us to our first benefit for RTMP Ingest.

At the moment, RTMP encoders are far more common than HLS encoders. However, this isn’t really a problem if you’re intentional about looking for HLS-compatible encoders since there are plenty of options out there. Another thing to note is that popular social media sites like Facebook support RTMP ingest and not HLS Ingest yet.

Compared to HLS, RTMP is optimized for latency, which is a top reason RTMP Ingest is still very popular compared to HLS Ingest. However, HLS ingest is capable of providing higher quality video and scalability. It’s likely HLS will come out on top in time, but for now, RTMP is going strong.

HLS vs MPEG-DASH: The Newer Open-Source Alternative

As far as delivery/streaming, HLS vs MPEG-DASH is more of a modern comparison compared to HLS vs. RTMP, so let’s dive in.

HLS is Apple’s proprietary solution and about a decade ago, most of its competition also consisted of other proprietary streaming protocols. For that reason, an alternative adaptive bitrate streaming protocol started to get worked on. MPEG-Dash is an open-source standard developed as a coordinated effort between more than 50 organizations, including giants like Apple and Microsoft.

So, one top thing you should know about MPEG-DASH compared to HLS is that it’s an international standard. But, MPEG-DASH’s major downfall is that the mobile Safari browser doesn’t support it, and if you’ve ever owned an iPhone or iPad, you know that Safari is the default browser. Considering there are about 1.8 billion active Apple devices globally, this is certainly a huge con for DASH.

Other comparisons between the two have changed over time. For example, DASH arguably delivered better quality in the recent past, but not anymore.

For a more detailed comparison, review our blog post comparing MPEG-DASH versus HLS streaming protocols.

What is Low-Latency HLS?

Originally, Apple developed HLS streaming to favor reliability over latency. As you now know, an advantage of RTMP over HLS is its lower latency.

To address this shortcoming, Apple announced low-latency HLS, which enables low-latency video streaming and is an extension of the HLS protocol. When it was first announced in 2019, low-latency HLS was an entirely separate protocol from HLS, but now Apple has merged both, and it’s become one protocol.

One goal of merging the two protocols was to speed up adoption. Since it’s relatively new, vendor support across the video delivery ecosystem has been lacking. The technology is super promising though.

Low-latency HLS can reach 2 seconds or less of latency, which is amazing. To put that in perspective for you, latency for HLS live streams generally tends to be between 15-30 seconds.

How Does Dacast’s Direct HLS Low Latency Streaming Solution Work?

We were the first online video platform to offer a low latency HLS live stream encoder for free. This encoder is based on the open-source encoder OBS Studio meaning it includes all the benefits that make OBS Studio so popular.

It’s compatible with Mac and Windows. Something you should know is that unlike many other encoders, it only requires a small amount of CPU processing power and memory.

When we compared HLS vs. RTMP, we mentioned RTMP-Ingest is still popular. However, that doesn’t mean it’ll be popular forever. Dacast’s Direct HLS Low Latency Streaming Solution uses HLS Ingest instead, although RTMP Ingest is still the default.

By using HLS ingest, Dacast’s Direct HLS Low Latency Streaming Solution is HLS end-to-end. So instead of HLS streaming starting with RTMP Ingest and then converting to HLS, it starts and ends with HLS. This gives viewers much lower latency, and we’re talking 10 seconds or less of latency. It also meets modern browser security standards, which means it can still reach all mobile devices.

Conclusion

hls live streaming video format
To ensure the highest video quality possible, broadcasters will want to choose the right streaming protocol as well.

HLS is a powerful technology that’s become one of the industry standards. Hopefully, this article has educated you on the basics of this live streaming technology, how it works, and what its upsides and downsides are.

Any questions about the HLS format? You can do your first live stream today with the Dacast HLS video streaming software. If you’re ready to try it today, you can take advantage of our free 14-day trial. No credit card is required.

Get Started For Free

For exclusive offers and regular live streaming tips, you’re also invited to join our LinkedIn group.

Finally, do you have further questions, thoughts, or feedback about this article? We’d love to hear from you in the comments below, and we will get back to you.

Thanks for tuning in, and good luck with your live streams!

Max Wilbert

Max Wilbert is a passionate writer, live streaming practitioner, and has strong expertise in the video streaming industry.