The Radio Mast Blog

Streaming Audio Platform News and Tips


What is HLS for Audio?

What is HLS for Audio?

HLS, or "HTTP Live Streaming", is a modern streaming protocol optimized for delivering audio or video to mobile devices. Designed by Apple and originally published in 2009, HLS is a living standard that has seen a number of new features added over the years. HLS is the most common protocol used by video streaming platforms, but in this article, we'll be focusing on how HLS works for audio streams and explain the benefits of HLS for radio broadcasters.

On a fundamental level, HLS works by splitting an audio or video stream into segments, which are usually a few seconds in length, and then serving these segments as files over HTTP/HTTPS. The list of available segments is published in a playlist file (.m3u8), which contains a URL for each recent segment. When a player plays an HLS stream, it reads this playlist file every few seconds and continually downloads all available segments, then stitches them back together into a continuous audio or video stream.

This architecture is in contrast to traditional HTTP streaming (Icecast/Shoutcast), where compressed audio is served a single continuous download over HTTP/HTTPS. HLS requires a player to do additional work to play a stream, but also allows a player to provide a more stable playback experience, particularly for listeners on Wifi and mobile connections.

With HLS, if a player's network connection is interrupted, the player can attempt to redownload an audio segment ahead of time so that playback continues uninterrupted. HLS also leads to improved battery life, by allowing the Wifi or cellular modem in a mobile device to power down when it is not actively downloading segments. Lastly, HLS can provide a player with more options for gracefully dealing with network interruptions or server outages, by including a list of alternate servers to use. A player can decide which server to use and even switch between them without interrupting playback. Overall, HLS provides more flexibility for players in order to minimize playback interruptions, especially for mobile listeners.

Looking to try HLS for your audio stream? Radio Mast now offers HLS for all AAC and MP3 streams, providing an easy upgrade path for broadcasters looking to improve their stream stability for mobile listeners.

To experience HLS, try listening to our demo HLS MP3 and AAC streams, which are included in our collection of Reference Audio Streams. These HLS streams can be played in a desktop player like VLC, a mobile browser, or in a Javascript-based player like the HLS.js demo player.

This is an article in our series on HLS for Audio. Learn more about HLS in these articles: