Developed by Apple in 2009, HTTP Live Streaming (HLS) allows content producers to send live and on-demand audio and video using standard HTTP, the protocol which powers the web.
The Internet we know and use, with every website capable of playing video, images, and music, was not always as interactive as it is today. When the first web page came online in the mid-1990’s text was the order of the day. The rich media experience we have come to enjoy on the Internet has been made possible by several technologies, some of which have since disappeared and have been replaced by more modern and efficient protocols.
For many years Adobe Flash was the chosen technology for providing users with a video experience via the Internet. However, with the advent of HTML5 and due to the security issues and proprietary nature of Adobe’s technology, several video and audio streaming protocols were created to meet the growing demand for multimedia services on the Internet.
The Real-Time Messaging Protocol (RTMP), which was created by Macromedia and subsequently owned by Adobe, known to us as Flash, has been the default streaming protocol on the Internet. However, as stated, the use of this protocol is rapidly declining due to newer, more advanced protocols like HLS gaining popularity and platform support. Other vendors have developed streaming protocols such as HTTP Dynamic Streaming (HDS) and Microsoft Smooth Streaming (MSS), but these services did not gain the popularity or support of the broader Internet streaming community. As such, HLS is the current standard for Internet streaming in the industry due to its performance advantages over other protocols and the use of HTTP as its delivery mechanism.
HLS Technical Overview
The primary advantage of HLS is that it utilizes the HTTP protocol with HLS streams generated on demand and then stored on an HTTP server. It also uses a technique known as adaptive bitrate streaming which delivers video to a user in the most efficient manner possible, and more importantly, in the highest quality possible depending on the user’s current Internet connection. By detecting the user’s bandwidth capacity through the combined use of server and client software, adaptive bitrate streaming adjusts the quality of the video stream automatically by selecting the appropriate bitrate and resolution for the connection quality.
HLS manages streaming efficiency by splitting video files into shorter pieces while labeling them with an MPEG2 Transport Stream (.ts) file extension. The HTTP server which hosts this data then creates an index file which acts as a library catalog. This catalog then links to additional index files which categorize each file segment across the different existing quality options available. Modern video players, including those built on the HTML5 standard, can automatically detect when the user’s connection quality improves or deteriorates. The HLS library catalog then assesses which video would provide the best possible user experience and then automatically selects the relevant index file, seamlessly executing this workflow without the user needing to adjust any settings.
Because every browser or application which consumes services from the Internet needs to support HTTP, support for HLS is ubiquitous. This extensive support base means content producers can publish their video without needing to concern themselves with providing a media player to their targeted end users. Users can play the video files directly in their browsers, so no additional software needs to be installed. This feature is a significant benefit, as in the past with older streaming technologies, the relevant software had to be downloaded and installed, and of course, each operating system platform required a unique software installation package. This multi-platform support also makes HLS a very cost efficient streaming protocol to implement.
The other benefit which comes with using HLS is, of course, its implementation of adaptive bitrate streaming. By seamlessly adapting the amount of data it streams by selecting the appropriate bitrate and resolution quality which matches the user’s current Internet connection quality, HLS delivers a superior experience in that the user endures far less buffering when viewing video files through their browser.
HLS also provides better security when compared to is predecessor, Flash. As the protocol runs natively in the browser and no additional software needs to be patched and maintained, securing HLS is far more straightforward which leads to better security for end users.
Unfortunately, no protocol is perfect, and HLS does have a few drawbacks which content producers need to be aware of and plan for accordingly. Increased latency is the primary criticism of HLS. When viewing video files delivered via this protocol, users experience a time delay between the live streaming event and the actual delivery of the video to their browser or device. The delay experienced is usually between 20 and 60 seconds which is due to the keyframe intervals, packet size and playback buffer requirement decisions HLS needs to make to ensure users experience the best video quality possible for their current Internet connection. Even though HLS does come with some latency challenges, this is only an issue where live streaming requires users to experience events as they happen which is only relevant to sporting occasions and video gaming.
HLS does have a few other identified disadvantages over and above the latency issue. Firstly, because it is a proprietary technology created by Apple, some believe that this means it will eventually be made obsolete. However, this is not bound to happen anytime soon. Another identified issue with HLS is that it does not provide suitable protection for content creators. This protection issue is as a result of the encryption it offers which many believe does not constitute a well implemented Digital Rights Management (DRM) solution.
Although HLS does have some disadvantages, it remains the de facto streaming standard in use today. Content creators need to be aware of these challenges and put measures in place to mitigate these issues if they are relevant to their specific use case.
Utilizing a CDN to Harness the Benefits of HLS
Websites gain multiple benefits by using a CDN. These include faster load times, improved scalability when a site experiences heavy traffic, enhanced stability as the CDN minimizes the risk of traffic spikes at the point of origin, and decreased infrastructure costs. However, content creators can also utilize CDN’s to improve the optimization of content they deliver via HLS. By harnessing the power of the CDN, content creators can enhance the delivery of HLS video with significantly higher cache-hit ratios which will result in a substantial improvement in streaming performance.
CDNsun offers optimization of its CDN Static and CDN Static Push services for HTTP streaming by internally optimizing this service. For more information visit this page on our website.