[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Tue Jul 06 2021

How to create Dolby Digital (Plus) Encodings

OverviewLink Icon

Bitmovin and its Encoding Service is officially and fully certified by Dolby to create Dolby Digital (Plus) audio content! This is great news as it enables you to easily deliver certified High Quality Audio content to your end users and their dolby digital compatible end devices! In this tutorial we will walk through the specific features of this new Audio Codec Configuration object for Dolby Digital (Plus) and when/how to use them.

If you want to check out all the details in the API reference right away, please see the API description for Dolby Digital and Dolby Digital Plus

RequirementsLink Icon

  • Encoder version 2.83.0 or higher
  • API SDK version 1.78.0 or higher

Known LimitationsLink Icon

  • Support Workflows: VoD only
  • DRM: not supported yet
  • Audio Sample rate: 48kHz only
  • Supported Muxings: fMP4, MP4, MOV(DD only), TS (incl. BroadcastTS, ProgressiveTS)
  • Supported Streaming Formats: MPEG-DASH, HLS
  • Supported Bitrates: Depends on Audio Coding Mode for DD/DD+ (Please see Audio Coding Modes)
  • Supported Channel Layouts: up to 5.1 (Loudness control is required to be enabled at all times, which supports up to 6 channels).
  • Supported Channel Layouts for Downmixing: 5.1 or lower

Dolby Audio Codec Configuration DetailsLink Icon

As for every Audio Codec Configuration, a Dolby Digital or Dolby Digital Plus Audio Codec Configuration requires at least: name, bitrate

The latter and its value depends on the Channel layout you're using for your encoded content. Therefore, please make sure to select the appropriate, supported value within the given range from the table below.

Audio Coding ModesLink Icon

Dolby Digital - Bitrates

Bitmovin Channel LayoutAudio Coding ModeMin kbpsMax kbpsDefault kbps
MONO1/05664096
STEREO2/096640192
BACK_SURROUND, BACK_SURROUND_LFE2/1160640256
SURROUND, 3.13/0160640256
4.0, 4.13/1192640320
QUAD, QUAD_LFE2/2192640320
5.0, 5.13/2224640384

Individual supported bitrates: 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640

Dolby Digital Plus - Bitrates

Bitmovin Channel LayoutAudio Coding ModeMin kbpsMax kbpsDefault kbps
MONO1/032102464
STEREO2/0961024128
BACK_SURROUND, BACK_SURROUND_LFE2/11281024160
SURROUND, 3.13/01281024160
4.0, 4.13/11601024192
QUAD, QUAD_LFE2/21601024192
5.0, 5.13/21921024192
Not available yet3/32561024384
Not available yet3/43841024384

Individual supported bitrate values: 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 144, 160, 175, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1008, 1024


Dolby Digital Audio Codec FeaturesLink Icon

Dolby Digital and Dolby Digital Plus do support certain features like loudness control, pre-processing and downmixing.

Loudness ControlLink Icon

It allows you to either manually adjust the eventual loudness of the encoded audio content on your own, or to apply defined loudness correction methods like EBU R128, ATSC A85 FIXED, or ATSC A85 AGILE to align the loudness levels of your contents and therefore to enhance the experience for your viewers.

The Loudness Control feature is always enabled and therefore a required property. If not explicitely configured, the mode is set to CORRECTION and regulationType to ATSC_A85_FIXED by default. You can choose between the modes PASSTHROUGH or CORRECTION to configure how it is applied to your content. Please see the following table which mode and loudness control features are compatible

ModeregulationTypepeakLimitdialogueIntelligencedialnorm
PASSTHROUGHnot supported
CORRECTIONMANUAL
CORRECTIONEBU_R128, ATSC_A85_FIXED, ATSC_A85_AGILEnot supportednot supportednot supported

Pre-ProcessingLink Icon

Pre-Processing allows to prepare for characteristics of your input file. Please mind the table below as not every feature supports every channel layout/audio coding mode.

LFE Low Pass Filter is disabled by default. If enabled, it filters frequencies above 120Hz on the LFE channel, when enabled.

90° Phase Shift is enabled by default. Its applied to the surround channels during encoding to decorrelate front and back channels. This is done to ensure dolby surround compatible output if the encoded multi-channel content gets downmixed, so these front and back channels don't cancel each other out.

3dB Attenuation is disabled by default. Enable it, if your input file is master file and comes from a film room, or wasn't yet converted to a home theater format. Cinema surround channels are mixed 3 dB higher to account for amplifier gains in cinemas, which can be corrected with this option.

PropertySupported Bitmovin Channel LayoutSupported Audio Coding Modes
lfeLowPassFilterBACK_SURROUND, BACK_SURROUND_LFE, QUAD, QUAD_LFE,4.0, 4.1, 5.0, 5.12/1, 2/2, 3/2, 3/1
ninetyDegreePhaseShiftBACK_SURROUND, BACK_SURROUND_LFE, QUAD, QUAD_LFE,4.0, 4.1, 5.0, 5.12/1, 2/2, 3/1, 3/2
threeDbAttenuationBACK_SURROUND, BACK_SURROUND_LFE, QUAD, QUAD_LFE,4.0, 4.1, 5.0, 5.12/1, 2/2, 3/1, 3/2

DownmixingLink Icon

This feature allows to either remove certain channels to achieve a different Channel layout, or to adjust the loudness level of certain channels by a fixed amount (depends on the channel you want to adjust).

Please see table below to check which option is available for which channel layout.

PropertyBitmovin Channel LayoutSupported Audio Coding Modes
loRoCenterMixLevelCL_SURROUND, 3.1, 4.0, 4.1, 5.0, 5.13/0, 3/1, 3/2
ltRtCenterMixLevelCL_SURROUND, 3.1, 4.0, 4.1, 5.0, 5.13/0, 3/1, 3/2
loRoSurroundMixLevelBACK_SURROUND, BACK_SURROUND_LFE, QUAD, QUAD_LFE,4.0, 4.1, 5.0, 5.12/1, 2/2, 3/1, 3/2
ltRtSurroundMixLevelBACK_SURROUND, BACK_SURROUND_LFE, QUAD, QUAD_LFE,4.0, 4.1, 5.0, 5.12/1, 2/2, 3/1, 3/2
preferredModeBACK_SURROUND, BACK_SURROUND_LFE, QUAD, QUAD_LFE, CL_SURROUND, 3.1, 4.0, 4.1, 5.0, 5.13/0, 2/1, 2/2, 3/1, 3/2

Create an EncodingLink Icon

This tutorial is based on the already existing Multi-Codec Encoding example, which was using AC3 codec configurations before, but due to its replacement by Dolby Digital Audio Codec Configuration, is using Dolby Digital Audio Codec Configurations by now.

As with every encoding, we will need an Encoding Object, that holds all related stream objects and their configuration, as well as an Input and Output Object.

Create or Reuse an Input

HTTP is just used for simplicity in this example, as there is no limitation in where the input file can be downloaded from for that use-case. Of course, you can also reuse existing Input objects available in your Bitmovin Account.

1HttpInput input = createHttpInput(configProvider.getHttpInputHost());

Create or Reuse an Output

AWS S3 is just used for simplicity in this example, as there is no limitation in where the content can be written to. Of course, you can also reuse existing Output objects available in your Bitmovin Account.

1Output output =
2 createS3Output(
3 configProvider.getS3OutputBucketName(),
4 configProvider.getS3OutputAccessKey(),
5 configProvider.getS3OutputSecretKey());

Create an Encoding Object

1Encoding encoding = createEncoding("H.265 Encoding", "H.265 -> fMP4 muxing, Dolby Digital -> fMP4 muxing");

Create an Video Stream using an H265 Video Codec Configuration

A Stream Object effectively maps a stream of the input file to a given CodecConfiguration which will be used to encode it.

1H265VideoConfiguration videoConfiguration =
2 createH265VideoConfig(rendition.height, rendition.bitrate);
3 Stream videoStream = createStream(encoding, input, inputFilePath, videoConfiguration);

Create an fMP4 Muxing using the Video Stream

1Fmp4Muxing fmp4Muxing =
2 createFmp4Muxing(
3 encoding,
4 output,
5 String.format(
6 H265AndDolbyDigitalEncodingTracking.H265_FMP4_SEGMENTS_PATH_FORMAT,
7 rendition.height,
8 rendition.bitrate),
9 videoStream);

Create an Audio Stream using an Dolby Digital Audio Codec Configuration

A Stream Object effectively maps a stream of the input file to a given CodecConfiguration which will be used to encode it.

Please

1DolbyDigitalAudioConfiguration dolbyDigitalConfig = createDolbyDigitalAudioConfig();
2
3encodingTracking.dolbyDigitalAudioStream = createStream(encoding, input, inputFilePath, dolbyDigitalConfig);

createDolbyDigitalAudioConfig() create a new Audio Codec Config in your account as usual, and utilizes its default configurations by default.

1private static DolbyDigitalAudioConfiguration createDolbyDigitalAudioConfig() {
2 DolbyDigitalAudioConfiguration config = new DolbyDigitalAudioConfiguration();
3 config.setName("DolbyDigital Channel Layout 5.1");
4 config.setBitrate(256_000L);
5 config.setChannelLayout(DolbyDigitalChannelLayout.CL_5_1);
6
7 return bitmovinApi.encoding.configurations.audio.dolbyDigital.create(config);
8}

Create an fMP4 Muxing using the Audio Stream

The creation of a muxing is no different than before (If supported, please see known limitations for details about supported muxing types). You only have to provide it with the stream that is configured to use the Dolby Digital (Plus) Audio Codec Configuration.

1dolbyDigitalFmp4Muxing =
2 createFmp4Muxing(
3 encoding,
4 output,
5 H265AndDolbyDigitalEncodingTracking.DOLBY_DIGITAL_FMP4_SEGMENTS_PATH,
6 encodingTracking.dolbyDigitalAudioStream);

Start the Encoding

The Multi-Codec Example, as per best practise, launches three separate encodings, one per Video Codec. So the example we use here launches three threads and monitors each encoding for its completion.

1List<Callable<Encoding>> encodingTasks =
2 Arrays.asList(
3 () -> executeEncoding(h264AndAacEncodingTracking.encoding),
4 () -> executeEncoding(h265AndDolbyDigitalEncodingTracking.encoding),
5 () -> executeEncoding(vp9AndVorbisEncodingTracking.encoding));
6
7executor.invokeAll(encodingTasks);
8executor.shutdown();

Other ExamplesLink Icon

The example used in this tutorial is available for all available Bitmovin API SDK's in our Github Repository. Check out the MultiCodecEncoding example for the SDK of your choice!

Java | Javascript/Typescript | Python | .NET | PHP


Get Started with a Bitmovin SDKLink Icon

Bitmovin API SDKDescription
JavaIntegrate the SDK into your Java Project easily and add it to the config of your dependency manager like Maven or Gradle. Learn more
Javascript/Typescript Integrate the SDK into your Javascript/Typescript based project easily by adding it as a dependency via NPM. Learn more
PythonIntegrate the SDK into your Python based project easily by adding it as a dependency via pip or Setuptools. Learn more
.NETIntegrate the SDK into your .NET based project easily by adding it as a dependency via nuget. Learn more
PHPIntegrate the SDK into your PHP based project easily by adding it as a dependency via composer. Learn more

Visit our Github Example Repository that provides you with examples for all Bitmovin SDK's available.

Give us feedback