-->
Save your seat for Streaming Media NYC this May. 现在注册!

Best Practices for Encoding and Delivering 杜比 Audio to Apple Devices

This video tutorial series is sponsored by 杜比.

杜比 Audio is a family of premium sound format(s) that provides enhanced clarity, easy-to-hear dialogue, consistent volume, and also surround sound when played on a 5.1 or 7.1 channel system. Since the release of iOS 10, tvo 10, and MacOS Sierra, you can now deliver 杜比 Audio via HLS and play it back on any audio endpoint, including device speakers, 耳机, or external sound systems via AirPlay or HDMI.

Over the course of this three-part tutorial series, we’ll show you how to do just that. In the first tutorial, we’ll provide an overview of the workflow and show examples of the 工具s you’ll need to get the job done. In the second tutorial, you’ll learn how to measure audio loudness and how to encode files in 杜比数字 Plus, 杜比数字, and AAC格式 formats to support all devices and audio end points. In the third tutorial, you’ll learn how to segment your streams and create media playlist files with Apple’s Media File Segmenter, and how to create the master playlist file that tells the playback client what audio formats and variants are available, including how to support multiple languages.

Finally, you will learn how to validate your streams with Apple’s Media Stream Validator 工具.

There’s a lot of detail in all presentations and they move pretty fast. But you can read up on these materials in this post on the 杜比 Developer blog, which also provides full access to the various master playlists you’ll learn to create, as well as the actual HLS video clips they enable, and the presentations you'll see in these videos.

For more 信息 HLS encoding in general, check out Apple's HLS Authoring Specification on the Apple Developer site.

音频格式

Let's start with a brief discussion of audio formats.

AAC格式 is a widely deployed audio codec in online video, often used as a baseline stereo audio codec. It is supported in HLS for compatibility with systems that don’t support native 杜比 playback.

杜比数字, also known as AC-3, 是高级的, metadata-rich audio format that can deliver up to six channels of audio at data rates between 384 and 640 Kbps.

杜比数字 Plus, evolved from 杜比数字, is a more capable audio format that brings higher audio quality, lower data rates, more powerful metadata-driven features and support for 7.1 audio channels. 也被称为 EC3 or E-AC-3, 杜比数字 Plus produces clear and powerful sound for a remarkably versatile set of outputs, from stereo 耳机 and speakers to 7.1 surround sound systems.

Both 杜比数字 Plus and 杜比数字 are supported natively across iOS, macOS, 和tvo, as well as Microsoft’s Windows 10 platform. Because of its advanced features, it’s a good idea to make 杜比数字 Plus the preferred audio format on platforms and devices that support it.

If you start from a surround sound audio source, you’ll typically create two encodes in 杜比数字 Plus format; a stereo encode for optimized delivery to stereo devices like iPhones and iPads, and a multichannel encode for systems that support it, 比如苹果电视. You’ll also want to produce an AAC格式 stereo stream for systems without 杜比 support. and optionally, a legacy 杜比数字 5.1 stream to maintain compatibility with older systems that don’t support 杜比数字 Plus.

You can find system compatibility 信息 for many systems and devices at the 杜比 Developer website.

We won’t spend a lot of time on video encoding in this tutorial, but as an overview, our 1080p source video was encoded into eight video-only variant streams, each of which were segmented into multiple MPEG-2 transport stream chunks using Apple’s Media File Segmenter, which also created an M3u8 playlist for each variant.

我们的场景

We’re going to cover three scenarios, all working with the same segmented video streams. 

In the first scenario, we’ll assume your video comes only with a stereo audio track in a single language. 在这种情况下, you’ll output both 杜比数字 Plus stereo audio that will play wherever supported, and AAC格式 stereo audio for older devices that can’t play 杜比数字 Plus.

You’ll segment both audio tracks just like the video files. Then you’ll create a master playlist that enables the player to select and retrieve the appropriate audio and video streams for synchronized playback.

The second scenario assumes 5.1 input in one language. Here, you will output 5.1 杜比数字 Plus, and optionally 5.1 杜比数字 to support legacy devices.

You’ll also output 杜比数字 Plus in stereo for native playback on supported devices, and AAC格式 stereo for devices without 杜比 support. 再一次。, you’ll segment the files and create media playlists, plus a master playlist to enable and synchronize playback of these different audio streams.

Our last example will include 5.1 audio, but now in multiple languages: English, Spanish, and Chinese. You’ll output the same four tracks that we covered in the second example, in each language, segment the files, and create media playlists, and create a master playlist file that selects the best audio and videos streams, and the default language, while making the other languages available via menu controls.

During playback, the media player will retrieve video segments from one of these video variant streams, plus audio segments from the appropriate audio track, and synchronize the two to play the complete program. This approach of keeping audio and video separate and dynamically combining the appropriate versions at playback time is sometimes called “late binding.”

Tools Covered in the Tutorials

Let’s quickly cover the 工具s we’ll be using in these tutorials.

In the second tutorial, we’ll lay out the tracks in 音频处理, though you can accomplish the same functions with many other 工具s. You can measure loudness using the 杜比 Professional Loudness Metering Solution and encode the audio using the Adobe Media Encoder.

In the final tutorial, we’ll segment our audio tracks and create media playlists with Apple’s Media File Segmenter, create the master playlist in a text editor, and then validate the streams with Apple’s Media Stream Validator 工具. 

This article is Sponsored Content

Streaming Covers
免费的
for qualified subscribers
现在就订阅 最新一期 过去的问题
Related Articles

杜比 Acquires Low-Latency Streaming Platform Millicast

Millicast becomes the third video-related acquisition in 4 years, and will be available immediately as part of the 杜比.io suite of APIs.

杜比 Acquires Hybrik to Grow Media Processing Business

杜比 Laboratories has plans to build up its media processing business, and believes an acquisition of Hybrik will help it get there.

YouTube Introduces SDK for Spatial Audio on Mobile and Desktop

With its latest software development kit, 共振音响, YouTube makes immersive video environments even more convincing.