metadata()
Every audio substream ends with metadata(), which starts audio_size bytes after the audio size field. It says how the audio is meant to be
played, not how to decode it. sus_ver is 0 for substreams of bitstream version 0 and 1 streams (and for version 1 streams whose
substream says so) and 1 for version 2; it changes which fields exist.
| Element | Meaning |
|---|---|
| basic_metadata() | dialogue level, loudness, downmix and upmix information (below) |
| extended_metadata() | dialogue and associated audio information, active channels (below) |
| oamd_dyndata_single() | only for an alternative presentation of objects: object audio metadata for it |
| tools_metadata_size_value, b_more_bits | 7 bits, 1 (extended: variable_bits(3) × 128): the size in bits of the dynamic range control and dialogue enhancement data |
| drc_frame() | only when sus_ver is 0: the dynamic range control data: b_drc_present; in an I-frame drc_config() (decoder modes, compression curves); drc_data() (gains) |
| dialog_enhancement() | b_de_data_present, de_config() (method, maximum gain, channel configuration) and de_data(): the parameters that let a decoder raise the dialogue |
| b_emdf_payloads_substream, emdf_payloads_substream() | EMDF payloads that travel with this substream (see substreams) |
basic_metadata
| Field | Bits | Meaning |
|---|---|---|
| dialnorm_bits | 7 | sus_ver 0 only: the level of the dialogue, −0.25 dBFS a step (92 is −23 dBFS) |
| b_more_basic_metadata | 1 | 1: the fields below follow |
| b_further_loudness_info, further_loudness_info() | 1 | sus_ver 0: loudness measurements (below). sus_ver 1 instead has b_substream_loudness_info, substream_loudness_bits (8) and b_further_substream_loudness_info |
| b_prev_dmx_info, pre_dmixtyp_2ch, phase90_info_2ch | 1, 3, 2 | stereo: how the signal was downmixed before encoding (0 unknown, 1 Lo/Ro, 2 and 3 Lt/Rt with different surround gains), and whether it has a 90 degree phase shift |
| b_stereo_dmx_coeff and gains | 1, then 3, 3, … | more than two channels, sus_ver 0: loro_centre_mixgain and loro_surround_mixgain (3 bits: +3, +1.5, 0, −1.5, −3, −4.5, −6 dB, −inf), loro_dmx_loud_corr, ltrt_centre_mixgain, ltrt_surround_mixgain, ltrt_dmx_loud_corr (5 bits), lfe_mixgain (5 bits) and preferred_dmx_method (0 not indicated, 1 Lo/Ro, 2 and 3 Lt/Rt) |
| pre_dmixtyp_5ch, pre_upmixtyp_5ch, pre_upmixtyp_3_4, pre_upmixtyp_3_2_2 | 3, 4, 2, 1 | the downmix or upmix done before encoding, for 5.X and 7.X channel modes |
| phase90_info_mc, b_surround_attenuation_known, b_lfe_attenuation_known | 2, 1, 1 | more than two channels |
| b_dc_blocking, dc_block_on | 1, 1 | whether the decoder should block DC |
further_loudness_info
Loudness measurements of the programme. A measurement is present when its flag bit is set.
| Field | Bits | Meaning |
|---|---|---|
| loudness_version, extended_loudness_version | 2 (4) | the version of the structure |
| loud_prac_type | 4 | the loudness practice: 1 ATSC A/85, 2 EBU R128, 3 ARIB TR-B32, 4 FreeTV OP-59, 14 manual, 15 consumer leveller; 0 not indicated, the rest reserved |
| b_loudcorr_dialgate, dialgate_prac_type, b_loudcorr_type | 1, 3, 1 | how dialogue gating and correction were measured |
| loudrelgat, loudspchgat, loudstrm3s, max_loudstrm3s, truepk, max_truepk, loudmntry, max_loudmntry | 11 each | relative-gated, speech-gated, short-term (3 s), maximum short-term, true peak, maximum true peak, momentary and maximum momentary loudness |
| b_prgmbndy, prgmbndy, b_end_or_start, prgmbndy_offset | – | programme boundaries |
| lra, lra_prac_type | 10, 3 | loudness range |
| b_rtllcomp, rtll_comp | 1, 8 | a real-time loudness leveller compensation |
| b_extension, e_bits_size, extension_bits | 1, 5 (extended 4), n | reserved extension |
extended_metadata
| Field | Bits | Meaning |
|---|---|---|
| b_dialog | 1 | sus_ver 1: the substream is dialogue. With sus_ver 0 this is known from the presentation configuration or the content classifier |
| scale_main, scale_main_centre, scale_main_front | 8 each, optional | associated audio: how much to lower the main audio (0 to 254: 0 to −76.2 dB in 0.3 dB steps; 255 mute) |
| pan_associated | 8 | associated audio, mono: the pan position |
| b_dialog_max_gain, dialog_max_gain | 1, 2 | dialogue: the largest gain a dialogue enhancement may add |
| b_pan_dialog_present, pan_dialog, pan_signal_selector | 1, 8 (two for stereo), 2 | dialogue: pan data |
| b_channels_classifier and the active flags | 1 and one or two bits for each channel group | which channels carry sound, and which carry dialogue: b_c_active and b_c_has_dialog, b_l_active, b_r_active and their dialogue flags, b_ls_active, b_rs_active, b_lb_active, b_rb_active, b_lw_active, b_rw_active, b_tfl_active, b_tfr_active, b_lfe_active, for the channel groups of the channel mode |
| b_event_probability, event_probability | 1, 4 | how likely the frame holds a sound event |