Video on demand has been replacing television over the past two decades, gradually gaining maturity and technological sophistication. The evolution of video streaming technology has always focused on offering streaming audiences a more reliable, seamless watching experience. This, among other things, involved adapting to inconsistent network bandwidths and ensuring cross-device compatibility. The HLS protocol (aka HTTP Live Streaming) launched in 2009 and soon became the de facto standard for adaptive bitrate video streaming. 

HLS was developed by Apple and intended to replace the company’s own media streaming standard Quicktime Streaming Server – as well as solve some of the issues inherent in other standards in existence at the time, like Real-Time Messaging Protocol (RTMP). RTMP, released by Adobe in 2002, uses Flash technology to send low-latency video across the Internet. And although Flash is obsolete today, RTMP is still a surprisingly popular video streaming protocol. This is finally changing.

In this post, we’ll discuss what HLS is, briefly discuss how it works and what benefits it brings for publishers adopting it as the default protocol for distributing video media.

What is HLS? 

Although it may not ring a bell to many people, HLS is, next to protocols such as MPEG-DASH and SRT, HLS (HTTP Live Streaming),  one of the leading standards for streaming online video and audio media to viewers over the internet. Chances are that you’re using it on a regular basis without even realizing it – especially if you’re deeply entrenched in the Apple ecosystem. 

In spite of being developed by Apple, the HLS protocol is natively supported on a multitude of disparate devices and platforms: Google Chrome browsers, Android and Apple smartphones, Linux, Microsoft, OTT devices, smart TVs, as well as popular internet browsers: iOS Safari, Safari, Android Browser, Microsoft Edge, Chrome for Android and Opera Mobile.

The fact that HLS streaming is typically delivered over the HTML5 video player makes it universal and broadly compatible. HLS is often called HTML5 video – which is not entirely accurate. The HTML5 video player is just compatible with HLS.

Streaming-protocols-by-popularity

Source: Brid.tv

First things first: what is a protocol?

HLS is a video streaming protocol. But what does it mean exactly? You may have heard the term codec, but it’s important to note that a streaming protocol is not a codec. Protocol is a broader category. 

A streaming protocol is a standardized method for transmitting video content between devices. A protocol can assume the use of a specific codec (or codecs), which will be used to compress and decompress the video and audio content.

For example, HLS supports many popular codecs:

  • Audio: AAC-LC, HE-AAC+ v1 & v2, xHE-AAC, Apple Lossless, FLAC
  • Video: H.265, H.264

Benefits of HLS

HLS is designed for reliability and dynamically adapts to network conditions by optimizing (i.e. deteriorating or improving) video playback for the available internet speeds. But on top of that, it also takes care of a lot of things connected with delivering the video content to viewers:

  • Adaptive Bitrate Streaming – HLS adapts video quality to available internet speeds. This allows creators to offer multiple quality renditions of a single broadcast and seamlessly switch between them to ensure a fluid experience. Creating multiple renditions of a single stream helps prevent buffering or stream interruptions. Plus, as a viewer’s signal strength goes from two bars to three, the stream dynamically adjusts to deliver a superior rendition.

video-bitrate

Example average video bitrate (kbit/s) variants. Source: Apple

HLS assumes there are many possible stream variants depending on the connection’s quality. The table above presents a set of bitrate options for different resolutions and framerates (the aspect ratio remains the same).

  • Cross-device compatibility – HLS guarantees that your content can be played on every client device that runs a compatible video player (e.g. HTML5).
  • Subtitles – HLS supports closed captions in the video stream. This allows creators to use multiple subtitle streams embedded into their videos.
  • Alternate audio and video – apart from multiple resolution streams, HLS supports multiple audio track support which can be utilized for multi-language streams.
  • Ad insertion through the VPAID and VAST interfaces.
  • Scalability – HLS is highly scalable for delivering video files and streaming content through global content delivery networks (CDNs). Unlike the RTMP protocol used in conjunction with Flash player, HLS can easily scale for delivery using ordinary web servers across a global content delivery network (CDN). By sharing the workload across a network of servers, CDNs accommodate viral viewership spikes and larger-than-expected live audiences. CDNs also help improve viewer experience by caching audio and video segments. By comparison, CDN support for RTMP is rapidly declining. RTMP also requires the use of a dedicated streaming server, making it more resource-heavy to deploy.

Piracy protection with extensive support for DRM technologies.

Drawbacks

HLS comes with some limitations, but these are inherently connected with the specific design decisions taken in the development of the protocol.

A part of these limitations is associated with latency. Because HLS prioritizes quality of experience over low latency, live content streamed using the HLS protocol is not exactly “live”. It may reach the viewer’s eyeballs with up to 30-second latencies. Thus MLS is not the best choice for applications such as web conferencing or device control where real-time streaming is essential (cameras and drones). Such use cases need a faster streaming protocol like WebRTC (Web Real-Time Communications) instead. 

Latency in HLS results from the fact that the protocol breaks the video into lots of several-second chunks (or segments) that are typically 2–6 seconds long. And because the HLS protocol also needs to buffer several such small segments at a time, the delay can add up to dozens of seconds. However, if latency or poor network conditions aren’t an issue, then HLS is the protocol to go. 

What are the reasons to adopt HLS?

As mentioned above, HLS is well on its way to become the go-to protocol for streaming video content. It lends well to delivering video to a massive number of disparate devices and geographies at the best possible quality, no matter the available internet speed. 

HLS owes its growing popularity to a number of factors:

  • By following the HLS protocol, content creators can prepare versions of their video content for multiple client internet speeds and playback conditions (Cellular, 3G, 4G, LTE, WIFI Low, WIFI High).
  • Various CDN providers like Akamai are slowly phasing out their support for RTMP, saying it’s becoming too expensive to deploy. Instead, protocols like HLS, as well as SRT and MPEG-DASH are gaining popularity.
  • Since Adobe will stop supporting the technology that RTMP relies on, it is only a matter of time before your RTMP streaming process becomes technologically obsolete without the support from the company that created it.
  • HLS optimizes the delivery of audio and video to the broadest range of mobile, desktop, tablet, and OTT devices.
  • HLS enables delivering video on demand with encryption and authentication.
  • HLS significantly reduces CDN costs by delivering only the optimal bitrate to the client network and avoiding the “partial play and complete download” scenario inherent with http progressive streaming.
  • Apple App Store requires that Apps with over 10-minute videos use HLS.

HLS adoption is on the rise and RTMP use is declining. More than 45% of broadcasters use HLS today. Flash is dead, and broadcasters are left with few reasons not to use Apple’s HLS protocol for video streaming. 

Also, there is a growing trend for broadcasters repackaging their RTMP streams into the HLS protocol once they reach the streaming server. This helps ensure that the stream will play across a range of devices without requiring viewers to download any plug-ins.

Summary

For broadcasters, reaching the broadest audience possible is of utmost importance and should always start with accommodating additional video formats. HLS does just that – it allows to transcode the stream into a variety of formats, ensuring video scalability for all the client devices from mobile to smart TVs. 

HLS is gaining popularity in the broadcasting industry because of its out-of-the-box compatibility with HTML5 video players, today’s default playback method on web browsers. 

Other beneficial HLS features include support for embedded closed captions, synchronized playback of multiple streams, advertising standards (i.e., VPAID and VAST), DRM, and more.

At Better Software Group we bring you the many years of hands-on experience implementing the HLS streaming protocol for mobile, smart TV and web applications. If your business model involves streaming live and on-demand content to global audiences, we will help you deliver your project. 

Drop us a line through the contact form and see what we can do for you!