HTTP Live Streaming (HLS): What is it and Why Use It

HTTP Live Streaming (HLS): What is it and Why Use It

Have you heard about HTTP streaming but don’t understand how HLS stream works? 

Are you looking for more information about various streaming protocols? Do you want to discover how this particular audio and video data transfer technique works?

Well, you’re in the right place. In this guide, you’ll learn everything about HTTP live streaming and discover how to use it to deliver live, real-time, linear TV and on-demand TV channels.

But let’s begin at the beginning.

What is HTTP Streaming? Definition

HTTP streaming is one of the most widely used streaming protocols. It has been developed by Apple and released in 2009. HTTP streaming is a push-style based streaming protocol that allows for a web server to continuously send data to a client over the HTTP connection.

Although, for the majority of video professionals, HTTP streaming is associated with live streaming (hence the protocol is also often referred to as HTTP live streaming,) it can be used to deliver both, live, real-time broadcasts and on-demand streaming.

But let’s look at its two elements more closely.

What is HTTP?

HTTP is an application layer protocol for sending information between devices on a specific network. That’s why you see the HTTP before every website address. It facilitates the data transfer between the server and the browser via the Internet.

What is Streaming?

Streaming is a way to deliver audio and video streams to users over the Internet. HTTP streaming happens seamlessly because the protocol sends the media file to a user a little bit at a time, rather than trying to deliver it all at once.

This stands in direct opposite of downloading, which relies on the user to pull down the entire media file from the web server before being able to consume it. With downloading, the entire file must be saved on the user’s hard drive before they can open and play it.

Streaming, on the other hand, allows them to start consuming it right away, without waiting. The browser plays it without actually having to save it first, pulling the data directly from the server in real-time, as the file plays.

How HTTP Live Streaming Works

When delivering media content, HTTP streaming breaks down the file into smaller, downloadable files and delivers them to the user via an HTTP protocol. The user’s device, on the other hand, loads those videos as they arrive and plays them as the required media stream.

Think of it this way, the original file is stored somewhere on a server (in the case of an on-demand channel) or created on the go (in a case of live streaming.) We refer to this as the streaming server.

When streaming, that file is cup up into segments, typically each only a seconds long. Apart from segmenting the file, the HTTP live streaming protocol creates an index file that lists all those segments in the right order.

When a user requests access to the stream, those small, few seconds-long segments are then pushed to their device over the Internet. Typically, companies broadcasting with HTTP live stream would use a content delivery network to ensure that segments take as little to load as possible.

The user’s device receives those segments, and using the index file, puts them in order and plays in a media player of the person’s choice.

In short, HTTP streaming is the simplest method to deliver live and on-demand content to users.

Why Use the HTTP Streaming Protocol

Well, for one, because it allows delivering the content to users in real-time without forcing them to download a large file beforehand.

Because of that, HTTP live streaming can also be used to broadcast live events as they happen. The process is exactly the same as the one we described above, however, in this case, the original file is created live from streaming sources.

Another benefit of this streaming protocol is that thanks to the adaptive bitrate streaming, the protocol can adjust video quality during the stream to compensate for any potential network conditions.

As a side note, that is precisely why, at times, you might notice the video quality of YouTube videos dropping. This is the result of the protocol dynamically adapting for a lower bitrate your network supports at the moment.

Other Streaming Protocols

HTTP live streaming isn’t the only protocol used for streaming, although it is by far the most popular. Other HTTP protocols that you could use include MPEG-DASH, HDS, and RTMP which runs on Flash.

Does Viloud Support HTTP Streaming?

Yes, absolutely. When creating live or on-demand channels, you can create the M3U8 link for HLS output. Viloud will create an index file listing all the segments that you’ll be able to use in either our player or to stream content to Smart TV apps like Roku or Apple or mobile apps.

Interested to use it? Sign up for a free account and test it out.

Joan is one of the founders of Viloud. He has worked in tech for over 15 years and is passionate about product design and development.