6. Dolby Metadata

6.1. Notes

Dolby software and equipment creates detailed hinting metadata that can help receiving applications decide how to present the audio content, particularly how it should be downmixed, and dialogue normalization settings.

6.2. Class Reference

Reading Dolby Bitstream Metadata

Unless otherwise stated, all § references here are to EBU Tech 3285 Supplement 6.

class wavinfo.wave_dbmd_reader.WavDolbyMetadataReader(dbmd_data)

Reads Dolby bitstream metadata.

dolby_atmos() List[DolbyAtmosMetadata]

Every valid Dolby Atmos metadata segment in the file.

dolby_atmos_supplemental() List[DolbyAtmosSupplementalMetadata]

Every valid Dolby Atmos Supplemental metadata segment in the file.

dolby_digital_plus() List[DolbyDigitalPlusMetadata]

Every valid Dolby Digital Plus metadata segment in the file.

segment_list: List[Tuple[SegmentType | int, bool, Any]]

List of the Dolby Metadata Segments.

Each list entry is a tuple of SegmentType, a bool indicating if the segment’s checksum was valid, and the segment’s parsed dataclass (or a bytes array if it was not recognized).

class wavinfo.wave_dbmd_reader.DolbyDigitalPlusMetadata(program_id: int, lfe_on: bool, bitstream_mode: BitStreamMode, audio_coding_mode: AudioCodingMode, center_downmix_level: CenterDownMixLevel, surround_downmix_level: SurroundDownMixLevel, dolby_surround_encoded: DolbySurroundEncodingMode, langcode_present: bool, copyright_bitstream: bool, original_bitstream: bool, dialnorm: DialnormLevel, langcode: int, prod_info_exists: bool, mixlevel: MixLevel, roomtype: RoomType, loro_center_downmix_level: DownMixLevelToken, loro_surround_downmix_level: DownMixLevelToken, downmix_mode: PreferredDownMixMode, ltrt_center_downmix_level: DownMixLevelToken, ltrt_surround_downmix_level: DownMixLevelToken, surround_ex_mode: SurroundEXMode, dolby_headphone_encoded: HeadphoneMode, ad_converter_type: ADConverterType, compression_profile: RFCompressionProfile, dynamic_range: RFCompressionProfile, stream_dependency: StreamDependency, datarate_kbps: int)

Dolby Digital Plus is Dolby’s brand for multichannel surround on discrete formats that aren’t AC-3 (Dolby Digital) or Dolby E. This metadata segment is present in ADM wave files created with a Dolby Atmos Production Suite.

Where an AC-3 bitstream can contain multiple programs, a Dolby Digital Plus bitstream will only contain one program.

class ADConverterType(value)

An enumeration.

class AudioCodingMode(value)

Dolby Digital Plus acmod field § 4.3.2.3

CH_ORD_1_0 = 1

Mono

CH_ORD_2_0 = 2

L/R stereo

CH_ORD_2_1 = 4

LR + mono surround

CH_ORD_2_2 = 6

LR + LR surround

CH_ORD_3_0 = 3

LCR stereo

CH_ORD_3_1 = 5

LCR + mono surround

CH_ORD_3_2 = 7

LCR + LR surround

class BitStreamMode(value)

Dolby Digital Plus bsmod field § 4.3.2.2

COMMENTARY = 5

associated service: commentary

COMPLETE_MAIN = 0

main audio service: complete main

DIALOGUE_ONLY = 4

associated service: dialogue

EMERGENCY = 6

associated service: emergency

HEARING_IMPAIRED = 3

associated service: hearing impaired

MUSIC_AND_EFFECTS = 1

main audio service: music and effects

VISUALLY_IMPAIRED = 2

associated service: visually impaired

VOICEOVER_KARAOKE = 7

associated service: voice over OR main audio service: karaoke. If acmod is 0b001 (mono 1/0), this is voice-over, otherwise it should be interpreted as karaoke.

class CenterDownMixLevel(value)

§ 4.3.3.1

DOWN_3DB = 0

Attenuate 3 dB

DOWN_45DB = 1

Attenuate 4.5 dB

DOWN_6DB = 2

Attenuate 6 dB

class DialnormLevel

§ 4.3.4.4

class DolbySurroundEncodingMode(value)

Dolby surround endcoding mode.

class DownMixLevelToken(value)

A gain coefficient used in several metadata fields for downmix scenarios.

MINUS_1_5DB = 3

-1.5 dB

MINUS_3DB = 4

-3 dB

MINUS_4_5DB = 5

-4.5 dB

MINUS_6DB = 6

-6 dB

MUTE = 7

-∞ dB

PLUS_1_5DB = 1

+1.5 dB

PLUS_3DB = 0

+3 dB

UNITY = 2

0dB

class HeadphoneMode(value)

dheadphonmod § 4.3.9.2

class LanguageCode

§ 4.3.4.1

Per ATSC/A52 § 5.4.2.12, this is not in use and always 0xFF.

class MixLevel

§ 4.3.6.2

class PreferredDownMixMode(value)

Indicates the creating engineer’s preference of what the receiver should downmix. § 4.3.8.1

class RFCompressionProfile(value)

compr1 RF compression profile § 4.3.10 (fig 42)

class RoomType(value)

roomtyp 4.3.6.3

class StreamDependency(value)

Encodes ddplus_info1.stream_type field § 4.3.12.1

class SurroundDownMixLevel(value)

Dolby Digital Plus surmixlev field § 4.3.3.2

class SurroundEXMode(value)

Dolby Surround-EX mode. dsurexmod § 4.3.9.1

audio_coding_mode: AudioCodingMode

Indicates which channels are in use. acmod § 4.3.2.3

bitstream_mode: BitStreamMode

The kind of service of this stream. bsmod § 4.3.2.2

center_downmix_level: CenterDownMixLevel

When the front three channels are in use, gives the center downmix level. ``

copyright_bitstream: bool

True if this bitstream is copyrighted.

datarate_kbps: int

Data rate of this bitstream in kilobits per second

dolby_headphone_encoded: HeadphoneMode

Dolby Headphone mode

dolby_surround_encoded: DolbySurroundEncodingMode

If the acmod is LR, this indicates if the channels are encoded in Dolby Surround.

downmix_mode: PreferredDownMixMode

Preferred downmix mode

langcode: int

Language code

langcode_present: bool

True if there is a langcode present in the metadata.

lfe_on: bool

True if LFE is enabled. § 4.3.2.1

loro_center_downmix_level: DownMixLevelToken

LoRo preferred center downmix level

loro_surround_downmix_level: DownMixLevelToken

LoRo preferred surround downmix level

ltrt_center_downmix_level: DownMixLevelToken

LtRt preferred center downmix level

ltrt_surround_downmix_level: DownMixLevelToken

LtRt preferred surround downmix level

mixlevel: MixLevel

Mix level

original_bitstream: bool

True if this bitstream is original.

prod_info_exists: bool

True if mixlevel and roomtype are valid

program_id: int

Program ID number, this identifies the program in a multi-program element. § 4.3.1

roomtype: RoomType

Room Type

stream_dependency: StreamDependency

Indicates if this stream can be decoded independently or not

surround_downmix_level: SurroundDownMixLevel

When the surround channels are in use, gives the surround downmix level.

surround_ex_mode: SurroundEXMode

Surround-EX mode