HTTP Live Streaming in Dolby

In 2016, Apple added several new features to HTTP Live Streaming (HLS) to make it easier than ever to deliver Dolby Audio to all Apple platforms.
In 2017, Dolby Vision HDR support was added along with HEVC video.
And in 2018, Apple introduced support for streaming Dolby Atmos immersive audio as well.

This means that HLS now supports delivery and playback of the most advanced media experiences to the Apple ecosystem and beyond. Read below to learn how to take advantage of those features and how to craft HLS playlists with Dolby Audio, Dolby Atmos, and/or Dolby Vision while remaining compatible with all Apple devices and OS versions.

Dolby Audio on any endpoint

HTTP Live Streaming has supported Dolby Digital (AC-3) passthrough since 2012 and natively supported Dolby Digital Plus (E-AC-3) starting in 2015. However, support for Dolby Digital Plus and Dolby Digital, two of the audio formats that enable the Dolby Audio experience, was initially limited to playing audio to multichannel audio devices, such as an AVR, via HDMI or AirPlay.

Since the release of iOS 10, tvOS 10, and macOS Sierra, Dolby Audio playback has now been supported for all audio endpoints, multichannel or stereo, including:

  • HDMI
  • AirPlay
  • Built-in device speakers
  • Headphones (via Lightning connector, 3.5 mm analog port, or a wireless connection)

This makes it possible for content providers to deliver Dolby Audio much more widely and for users to benefit from the clarity, richness, and detail of Dolby Audio anywhere they listen to their entertainment. Also, now that stereo content and stereo playback are supported, users can enjoy a consistent quality of experience regardless of how they listen, thanks to the state-of-the-art loudness management and dynamic range control (DRC) capabilities of Dolby Audio.

Dolby Audio is a premium sound format that provides the following key benefits:

  • Leading technology chosen by artists, studios, and producers for broadcast, cinema, and Blu-ray worldwide.
  • Enhanced clarity, richness, and detail give you sharper, more nuanced sound for more realistic entertainment.
  • Easy-to-hear dialogue lets you follow the action and stay immersed in the story.
  • Consistent volume helps eliminate the annoying jumps you hear as you transition across TV shows and movies.
  • Surround sound is always just a connection away: pair an iPhone, iPad, or Mac with any 5.1- or 7.1-channel home theater system through AirPlay or HDMI for a fantastic entertainment experience.

Dolby Audio playback on Apple platforms is completely native and requires no custom player, add-on SDK, or other tweaks. It is built right into Apple’s Core Audio framework. Just follow the guidance below to deliver Dolby Audio via HTTP Live Streaming to all supported devices.

 

1. Media Encoding

Using the highest available quality mezzanine source, encode your content into the following formats:

  1. For stereo source content:
    • 2-channel Dolby Digital Plus (E-AC-3)
    • 2-channel AAC
  2. For multichannel source content:
    • 2-channel Dolby Digital Plus (E-AC-3) — use stereo mix if available, or a stereo downmix
    • 2-channel AAC — use stereo mix if available, or a stereo downmix
    • 5.1-channel Dolby Digital Plus (E-AC-3)
    • 7.1-channel Dolby Digital Plus (E-AC-3) — if 7.1ch source content is available
    • 5.1-channel Dolby Digital (AC-3) — if targeting the third-generation Apple TV

See more specific details about recommended encoding parameters in the Dolby Developer Knowledge Base. Several hardware and software professional encoding tools support Dolby Audio encoding such as Apple Compressor. If you need assistance finding an appropriate encoding tool, please contact us. 

As a reminder, make sure you always properly measure the loudness of your content and signal this using the dialnorm field in the Dolby Audio encoders. This will enable proper loudness management and DRC during playback. You can find more information on how to measure content loudness properly in the Dolby Developer Knowledgebase entry Best Practices for encoding and delivering Dolby Audio to Apple devices.

 

2. HLS Master Playlist Generation

After you encode your audio track(s) in the several codecs listed above and run these through your media segmenter, the next step is to build a master HLS playlist to point to this content. Below are some guidelines on what to do:

  • Each audio track (in each codec) should be listed in the playlist with an EXT-X-MEDIA tag of type AUDIO, and assigned a specific GROUP-ID attribute.
  • Each EXT-X-MEDIA AUDIO tag also needs to set the new CHANNELS attribute to the proper value to indicate the number of audio channels in the content. For example, use CHANNELS=“2” for stereo Dolby Digital Plus and stereo AAC, and use CHANNELS=“6” for 5.1-channel Dolby Digital Plus and 5.1-channel Dolby Digital.
  • The EXT-X-STREAM-INF entries in the playlist should include the specific GROUP-ID attribute of the audio track and codec that should be played back. When there are several audio tracks and audio codecs, the playlist has several blocks of EXT-X-STREAM-INF entries.
  • The ordering of the EXT-X-STREAM-INF lines in the playlist will determine implicit preference if the player considers two Variant Streams encoded with different codecs to be equally suitable for playback. Variant Streams that appear earlier will be preferred.
    • In order to enable stereo Dolby Digital Plus playback on iPhone or iPad with iOS 10, or on Mac with macOS Sierra, you should list the stereo Dolby Digital Plus EXT-X-STREAM-INF variants first, and stereo AAC second. This will play Dolby Digital Plus wherever it is supported, and automatically fall back to AAC on other devices.
  • Whenever several audio tracks are encoded from the same source content (for example, the same language dub), the NAME attribute in the EXT-X-MEDIA tag must be the same for all of them. The native Apple HLS player will automatically switch to the appropriate track from the available codec variants.

To see a few example playlists that demonstrate ways to use these guidelines, read our full Knowledge Base article: "Best practices for encoding and delivering Dolby Audio to Apple devices"

 

Compatibility Notes

Dolby Audio support in HTTP Live Streaming is compatible with all standard Apple platform features, such as FairPlay Streaming content protection, AirPlay, alternate audio, Live playlists, and so on.

By following the guidelines above, media playback will automatically fall back to stereo AAC on unsupported devices, such as devices running iOS 8 or older Apple TV models.

Note that at the time of writing, these features are not yet supported on certain third-party HLS playback frameworks, such as the Microsoft Edge browser, Roku devices. We will update this post as soon as this changes, but for now you should continue using legacy HLS playlists for these target devices.

 

Further Recommended Resources

Please make sure to read through and follow Apple’s HLS Authoring Requirements.