What is HLS Streaming and How it works?

Whenever you stream an online video, data is transferred from the system or server that stores the video to the ultimate viewer, i.e., you. This data transfer is done via a streaming protocol.

Lately, HLS or HTTP Live Streaming has emerged as the leading online streaming protocol worldwide. Apple developed HLS in 2009 as a sophisticated upgrade to the extremely popular flash player. Nearly all of the streaming platforms use HLS these days and have moved on from the days of the flash.

5centsCDN by default support HLS streaming with HTTPS! Start creating your first live stream here?

Why HLS over flash?

Flash was the preferred choice of all the streaming platforms until very recently but is virtually extinct from the online streaming scene. During its time, the flash was at the pinnacle of technology but now has become obsolete in front of the cutting edge HLS technology. 

Many of you might still remember the flash, and it worked very well. However, there were some disadvantages to it, here are some of the most prominent ones.

  • Users must install the flash extension for it to work.
  • Not compatible with iOS devices.
  • It was famous for hogging the bandwidth and RAM.
  • It required a sizeable amount of expertise and financial resources.

HLS eliminates all of these issues as it is compatible with all devices, regardless of the operating system or browser. It is also highly secure and very easy to use as a developer and is designed to minimize RAM and bandwidth usage.

Adaptive Bitrate Streaming

HLS uses a mechanism known as Adaptive Bitrate Streaming to deliver high-performance videos to all devices. It sounds fancy, but the principle here is very basic. At 5centsCDN you can enable ABR using our live transcoding services, here how you can enable ABR on the live stream?

During the flash days, a single video file was stored on the servers, and the same video was played to every viewer irrespective of the device or the browser he is using. This might not sound like a minor hiccup but is the primary reason for endless buffering.

Imagine a 1080p video is uploaded to an online server. Now, a viewer wants to watch this on his phone that has a screen resolution of less than 1080p. Flash player would play the original video without modifying it and thus causing it to buffer. 

A similar problem would occur when a video with a smaller resolution is played on a high-resolution screen. In this case, the video will pixelate and result in poor viewing quality and experience. 

Adaptive Bitrate Streaming is an elegant solution to all these problems. It splits the original video into 10-second segments and creates several versions of each piece. Then it plays the video according to the viewer’s preferences, internet speed, and the device used.

For instance, it will play a low-quality video to a viewer with a smaller screen and slow internet but will play the same video in high-resolution to a viewer with a large screen and fast internet. 

Furthermore, Adaptive Bitrate Streaming enables automatic quality change in real-time as the viewer is watching the video. If internet speed suddenly drops, it will automatically decrease the quality of the video. The goal here is to provide a seamless and uninterrupted viewing experience to the viewer. 

HLS is extremely helpful for users who often face fluctuating internet speeds and desire a smooth video quality. Moreover, HLS also allows for closed captions embedded in the video.

HLS in Real Life

Today, most online video streaming platforms use HLS and Adaptive Bitrate Streaming to provide a better experience to their audience. As most of us remain on the move and occasionally watch something while traveling, HLS can be a real lifesaver. 

Consider yourself traveling on a bus with a 4G connection. You are watching your favorite TV show on a streaming service without any interruptions. Then suddenly, the bus goes into an area with poor reception, and before you know it, HLS is there to save you. As soon as your internet connection fumbles, HLS makes the necessary adjustments and decreases the video quality to give you a stutter-free experience.

Then consider you have 4G back again, HLS will do the magic once again and improve the video quality. Now if you step into a place with a high-speed fiber connection, then HLS will get to work once again to provide you with the best possible video quality available.

Issues

As perfect as it sounds, HLS does have a minute issue called video latency that is generally not a cause for concern. Video latency is the delay faced by the information receiver from the sender. This is primarily due to the fact that most streaming platforms are comfortable with slight video latency issues. Usually, HLS will lead to a video latency of up to 30 seconds. 

Video latency can be a complication if you want to stream live videos and cannot afford a delay of even 30 seconds. For instance, if you’re watching a live telecast of your favorite sport using an HLS based streaming, then you might not be seeing it live but the events that took place 30 seconds ago. 5centsCDN HLS video latency is 20 to 30 seconds, we can definitely help you to reduce this by applying custom segmentation on your CDN configuration. Check how to reduce HLS video latency here?

If you’re interested in streaming HLS based video content, you must read some documentation from apple and the best practices.


Try our CDN today, to get a free account. 7-day demo account with no obligation and credit card!

Leave a Reply

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

Scroll to Top