skip to Main Content
What Is Hsl Protocol Explained

What Is HLS? – HLS Streaming Protocol Explained

If you want to enter the livestreaming industry as a content creator, a little bit of technical know-how about how it all works can go a long way. This includes knowledge about the background processes and technologies that makes livestreaming possible. HLS is one such technology.

HSL is a communications protocol responsible for seamless video playback during livestreaming.

Here is everything you need to know about HLS, and why it matters for livestreaming.

What is HLS?

HTTP Live Streaming (HLS) is an HTTP-based communications protocol, initially released by Apple back in 2009. It was developed to alleviate some of the issues present in older streaming protocols such as RTMP, the protocol behind the now-deprecated Adobe Flash content delivery platform.

HLS is the most widely used streaming protocol today, making it one of the core technologies behind modern livestreaming.

How Does HLS Work?

HLS sends audio and video for playback over HTTP from an ordinary web server to a wide range of devices, including PCs, phones, smart TVs, and any other device capable of using HTTP. HLS is designed for reliability, and it uses adaptive bitrate streaming to optimize playback based on the available speed and bandwidth of wired and wireless connections.

HLS-based streaming architecture contains three components:

  1. Server
  2. Distributor
  3. Client
hls streaming architecture

The task of the server is to prepare audio-visual data for streaming. It does so by running two utilities, the encoder and the segmenter. The encoder converts media data into a fragmented MP4 file (fMP4), a type of media file that supports segmentation into chunks that can be requested individually. The segmenter then divides the file into fragments of equal length and creates an M3U8 playlist file to index them.

The distributor accepts streaming requests from clients and delivers the required files (the segmented fMP4 and the M3U8 playlist).

The client requests and downloads streaming data and assembles it as a continuous video stream. The playlist file is downloaded first and is used as a reference to assemble the stream.

HLS Streaming Example

Let’s illustrate how all of this works with an example. Let’s assume you’re a game streamer using OBS to broadcast a Minecraft speedrun to Glimpse. Here is what’s happening in the background:

  1. OBS records audio-visual data from your webcam, your screen, and your microphone.
  2. OBS uses a video-utility called FFmpeg to encode and segment the data into an fMP4 file and M3U8 playlist.
  3. OBS sends the files to Glimpse.
  4. Glimpse receives a request from a user to view the livestream.
  5. Glimpse sends the requested files to the user’s PC, specifically an internet browser instance with an HTML5 video player.
  6. The HTML5 video player checks the M3U8 playlist file and decides which media segments to request based on bandwidth and other factors.
  7. The user starts watching the livestream.
  8. If there is a drop in bandwidth or some other network issue, the video player will reference the M3U8 playlist and request a different segment stream. This is adaptive bitrate streaming at work.
hls streaming example diagram

Check out more about streaming on Glimpse.


Glimpse offers full support for livestreaming with its Go Live Feature. Become a Glimpse creator by clicking Create Account and start monetizing your livestreams with the sponsorship levels system.


Browsers and Devices That Support HLS

HLS has extensive support on all major devices and platforms, including:

  • Windows 10 (Edge, Chrome/Chromium, Firefox, Media Player Classic, VLC, mpv)
  • macOS (iTunes, Safari, Chrome/Chromium, Firefox, VLC, mpv)
  • Android (Chrome/Chromium, Firefox)
  • Linux (Chrome/Chromium, Firefox, VLC, mpv)

Advantages and Disadvantages of HLS

HLS became the de-facto livestreaming standard thanks to a number of advantages. However, HLS is not the ideal solution in every use case due to a few disadvantages. Let’s briefly go over the pros and cons of HLS.

Advantages

HTTP-based – HLS allows content to be delivered from standard HTTP servers and delivered over HTTP-based content delivery networks, which makes HLS fairly easy to implement.

Adaptive Bitrate Streaming – HLS fully utilizes adaptive bitrate streaming to provide the best viewing experience to users based on their hardware specs and network connection quality.

Dynamic Ad Insertion – HLS supports dynamic ad insertion through specialized ad segments that work via ad media URIs – there’s no need to edit stream content.

Encryption Support – HLS supports HTTPS-based encryption, which can also be utilized as a simple DRM system for content protection.

Disadvantages

Latency – HLS prioritizes quality over low latency. This makes it challenging to host live streams with extensive social media interaction.

No Browser-based Publishing – HLS only supports playing livestreams from a browser, you can’t use it to publish.

HLS Vs. Other Adaptive Bitrate Streaming Protocols

HLS has a few alternatives in the field of adaptive bitrate streaming. The three with the most market share are Dynamic Adaptive Streaming over HTTP (MPEG-DASH), Adobe HTTP Dynamic Streaming (HDS), and Microsoft Smooth Streaming (MSS). Here is an overview of the differences between these protocols.

HLS Vs. MPEG-DASH

MPEG-DASH is the international standard for adaptive bitrate streaming. Unlike HLS, MPEG-DASH is codec-agnostic, which means it can utilize content encoded with any coding format, including H.265, H.264, VP9 and others. Its main disadvantage is that it isn’t natively supported on Apple devices, thus limiting its utility.

HLS Vs. HDS

HDS was designed for compatibility with Adobe’s Flash video browser plug-in. Like HLS, HDS divides media files into small chunks managed by a playlist file. HDS also provides advanced encryption and DRM features. It similarly uses a keyframe method to ensure that fragments align with one another, making for a smoother streaming experience.

HLS Vs. MSS

MSS was one of the first adaptive bitrate streaming protocols to enter the market. It is the default streaming platform on Xbox One. It has a feature that enables it to dynamically repackage MSS files into HLS, which makes it easy to stream to Apple devices without re-encoding.

Conclusion

This concludes our overview of HLS protocol. It is not an easy concept to grasp, but you don’t need to understand all the technical details to utilize its benefits. From a content creator’s perspective, HLS simply ensures your viewers get to experience livestream content across a whole range of platforms with undiminished quality.

So, if you’re looking for a CDN to host and distribute your content, make sure it provides HLS support.


Glimpse makes it easy for you to sell access to your Minecraft, Steam, Terraria, Rust, 7 Days to Die, Starbound, and most other gaming servers. Using our esports platform, you can connect your server directly to the platform and enable access to it within a sponsorship level.

  • Sell access to your server within sponsorships
  • Whitelist specific users for your gaming server
  • Use webhooks to connect your server in several simple clicks
  • Glimpse’s monetization system charges 0% commission so you get 100% of your earnings

Ilja Aradski

Ilja Aradski is a writer, tech enthusiast, gaming nerd, and Glimpse's go-to content guy. His goal is to make content creation accessible to everyone by writing about live streaming, video games, and the content industry at large. He thinks he is good at video games, but his friends know better.

Back To Top