If you are watching a live YouTube video on your mobile device or viewing on-demand content on your desktop (e.g. Disney+), you can do so because of an adaptive streaming communication protocol called HLS.
Also known as HTTP Live Streaming, it was developed by Apple Inc in 2009 to be only used on Apple devices. Today, both audio and visual data are transferred via the HLS protocol from the media servers to any number of electronic devices a consumer may have.
As of today, HLS is widely supported by prominent vendors such as Microsoft, Adobe, Wowza, and RealNetworks. Besides, it supports real-time transmuting processes in distribution platforms such as Akamai.
The technology enables the receiver (also known as the consumer, client, or viewer) to adapt the media bitrate to their current internet network conditions to maintain sustained playback with good quality.
Live streams are then split into smaller fragments of HTTP-based file downloads. Each file download comprises one portion of the entire stream. When the file is being played, the receiver may choose a single stream from an array of different alternative ones containing the content encoded at varying data rates.
HLS does not require a streaming server, and the entire switching logic resides on the player. The HLS protocol is capable of distributing both live video files and on-demand video files, and it allows the consumers to stream media from a regular web server rather than a specialized streaming server.
Technical overview of HLS streaming
The HLS technology utilizes ordinary web servers and delivery networks to deploy content via the HTTP protocol. It can travel through any firewall or proxy server that allows standard HTTP traffic to traverse, unlike other UDP-based protocols.
Although most HTTP-based protocols use ISO Base Media File Format, HLS uses the MPEG-2 Transport Stream container, which is defined as the generic coding of moving pictures and associated audio information. MPEG-2 is used in DVDs and Digital Video Broadcast.
Simply put, HLS streams are delivered in a .ts format (transport stream), and these .ts files contain H.264 (encoded video) and AAC (encoded audio).
HLS comprises three components, namely, the distributor, the server, and the client software.
Because HTTP streaming is mainly client-oriented, most of the adaptation logic will reside at the client-side. This eliminates the need for constant connections between the client and the server. Besides, maintaining session state information on each client is not required to be carried out by the server, thus, increasing the scalability.
Key benefits of HLS
HLS provides a reliable, cost-effective means of transmitting continuous media content over the internet. Naturally, this streaming technology has abundant benefits, including:
The HLS protocol is extraordinarily compatible and primarily supported by all client software such as a variety of web browsers (Google Chrome, Safari, Firefox, Microsoft Edge), and Android, and iOS devices such as smartphones, tablets, laptops, and PCs.
2. High quality
The HLS protocol supports adaptive bitrate for both live and on-demand video, thus detecting the client’s bandwidth capacity and adjusting the quality of the video stream between multiple bitrates, and or resolutions.
The HLS protocol enables the client to switch to any bitrate version at any given time, thus allowing them to consume media content seamlessly. That means, they always receive the best quality stream for their internet connection at any given moment.
For instance, you may have noticed the change in video quality on Netflix changes between good to better depending on your internet connectivity and speed.
3. No buffering or stuttering
A video delivered using the HLS is capable of dynamically configuring itself to provide you with the best video quality possible for your internet connection without any lagging or buffering. The quality of the video increases with the increase in internet speed and its ability to handle the load, which, in turn, ensures a seamless experience for the client.
One of the essential benefits of HLS is security. The technology supports user authentication and media encryption, thereby providing a more secure browser for the clients when they consume media content and even afterward.
When to use HLS streaming
HLS is currently the up-to-date and widely used protocol for media streaming. A 2019 Wowza video streaming report shows that more than 45.18 percent of content distributors use the HLS protocol for the distribution of content.
This popularity that HLS has gained over its contemporaries such as RTMP, MPEG-DASH and HDS is mostly due to the quality of experience and the playback compatibility it provides to the viewers. Here are three scenarios when you should use HLS technology:
1. Streaming to mobile devices
Video streaming on mobile devices has become increasingly popular. They are smaller in size, lighter, easily portable than computers and laptops. The devices have enabled viewers to consume video content on-the-go rather smoothly.
Moreover, since mobile accounts for nearly half of all internet traffic, adopting the HLS technology for streaming to mobile devices such as smartphones, laptops, and tablets make all the more sense.
Also, the HTML5 video players do not pair with RTMP or HDS. In such a scenario, HLS then becomes the sole option.
2. Streaming with an HTML5 video player
The native HTML5 video does not support the RTMP or HDS, which means HLS is the only solution. However, if you are still using Flash technology, the RTMP would prove to be a better option among others.
Even then, it would be a wise decision to make the switch from RTMP to HLS technology. If you want to stream content purely using an HTML5 video player, then the HLS is your best bet.
3. Streaming to connected TV devices
Because the HLS is one of the most popularly used protocols for media streaming today, the majority of the broadcasts prefer it over others. Those streaming to connected devices must consider HLS, especially during the broadcasting of live events such as sports tournaments and news, where the quality of streaming is crucial.
Over to you
HTTP Live Streaming reduces client network bandwidth required to watch videos, and at the same time, stops the video quality from fluctuating when the content is being streamed.
If your consumers are always watching videos on their computer with a high-speed internet connection, they will see top-quality imagery consistently. But if they switch to watching videos on their mobile phones, a high-quality experience may not always be the case.
Fortunately, by embracing HLS technologies, you can deliver a seamless viewing experience to your consumers, wherever they are.