Audio Multitrack Settings

Encoding.com supports the use of multiple audio tracks mapped to outputs. You can change audio track settings in the <audio_stream> section.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required -->
    <format>
        <output>[OutputFormat]</output> <!-- required -->
        <audio_stream>
            <use_stream_id>[SourceMediaAudioStreamID]</use_stream_id>
            <natural_order>[yes|no]</natural_order>
            <language>[ISO639-2 language identifier]</language>
            <!-- Common audio settings -->
            <channel>
                <id>[OutputChannelID]</id>
                <in>
                    <id>[SourceTrackID:SourceChannelID]</id>
                    <gain>[ChannelGainLevel]</gain>
                </in>
                <in>
                    <!-- input channel params -->
                </in>
                <split_layout>[SplitLayout]</split_layout>
            </channel>
            <channel>
                <!-- audio channel params -->
            </channel>
            <normalize>[yes|no]</normalize>
            <layout>[AudioLayoutName]</layout>
            <audio_channels_number>[ChannelsNumber]</audio_channels_number>
            <automix_channels>[yes|no]</automix_channels>
            <lfe_low>[LfeLow]</lfe_low>
            <lfe_high>[LfeHigh]</lfe_high>
            <lfe_gain>[LfeGain]</lfe_gain>
            <split_channels>[yes|no]</split_channels>
            <validate>
                <on_error>[pass|fail|report]</on_error>
                <repair>[yes|no]</repair>
                <loudness_diff>[LoudnessDiff]<loudness_diff>
                <stereo_diff>[StereoDiff]</stereo_diff>
                <side_diff>[SideDiff]</side_diff>
            </validate>
            <metadata_channel_layout>[LayoutMetaData]</metadata_channel_layout>
        </audio_stream>
        <!-- multiple audio_streams -->
        <audio_stream>
            <!-- audio_stream params -->
        </audio_stream>
        <!-- format params -->
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[OutputFormat]", // required
            "audio_stream": [
                {
                    "use_stream_id": "[SourceMediaAudioStreamID]",
                    "natural_order": "[yes|no]",
                    "language": "[ISO639-2 language identifier]",
                    "channel": [
                        {
                            "id": "[OutputChannelID]",
                            "in": [
                                {
                                    "id": "[SourceTrackID:SourceChannelID]",
                                    "gain": "[ChannelGainLevel]"
                                },
                                {
                                    // input channel params
                                }
                            ],
                            "split_layout": "[SplitLayout]"
                        },
                        {
                            // audio channel params
                        }
                    ],
                    "normalize": "[yes|no]",
                    "layout": "[AudioLayoutName]",
                    "audio_channels_number": "[ChannelsNumber]",
                    "automix_channels": "[yes|no]",
                    "lfe_low": "[LfeLow]",
                    "lfe_high": "[LfeHigh]",
                    "lfe_gain": "[LfeGain]",
                    "split_channels": "[yes|no]",
                    "validate": {
                        "on_error": "[pass|fail|report]",
                        "repair": "[yes|no]",
                        "loudness_diff": "[LoudnessDiff]",
                        "stereo_diff": "[StereoDiff]",
                        "side_diff": "[SideDiff]"
                    },
                    "metadata_channel_layout": "[LayoutMetaData]"
                },
                {
                    // audio_stream params
                }
            ]
            // format params
        }
    }
}

Parameter

Description

Allowed Values

Default Values

use_stream_id

Specify the source media stream ID.

Non negative integer number

By default # of **<audio_stream /> param will be used.

natural_order

If set to yes then value of <use_stream_id /> will mean number of source's audio stream, not number of stream in all type streams list.

yes, no

no

language

Specify the track language.

A language code in 3 lowercase letters according to ISO639-2.

none

normalize

Enable the renormalization output track to avoid clipping noise.

yes, no

none

layout

Specify the output channels layout.

One of these channel layouts:
mono — FC
stereo — FL+FR
2.1 — FL+FR+LFE
3.0 — FL+FR+FC
3.0-back — FL+FR+BC
4.0 — FL+FR+FC+BC
quad — FL+FR+BL+BR
quad-side — FL+FR+SL+SR
3.1 — FL+FR+FC+LFE
5.0 — FL+FR+FC+BL+BR
5.0-side — FL+FR+FC+SL+SR
4.1 — FL+FR+FC+LFE+BC
5.1 — FL+FR+FC+LFE+BL+BR
5.1-side — FL+FR+FC+LFE+SL+SR
6.0 — FL+FR+FC+BC+SL+SR
6.0-front — FL+FR+FLC+FRC+SL+SR
hexagonal — FL+FR+FC+BL+BR+BC
6.1 — FL+FR+FC+LFE+BC+SL+SR
6.1 — FL+FR+FC+LFE+BL+BR+BC
6.1-front — FL+FR+LFE+FLC+FRC+SL+SR
7.0 — FL+FR+FC+BL+BR+SL+SR
7.0-front — FL+FR+FC+FLC+FRC+SL+SR
7.1 — FL+FR+FC+LFE+BL+BR+SL+SR
7.1-wide — FL+FR+FC+LFE+BL+BR+FLC+FRC
7.1-wide-side — FL+FR+FC+LFE+FLC+FRC+SL+SR
octagonal — FL+FR+FC+BL+BR+BC+SL+SR
downmix — DL+DR

none

automix_channels

Automatically upmix or downmix audio stream to the specified number of channels in <audio_channels_number />

yes, no

no

lfe_low

LFE low cut off frequency

Integer number between 3 and 255

20

lfe_high

LFE high cut off frequency

Integer number between 3 and 512

120

lfe_gain

LFE gain

Float number between 0 and 1

none

split_channels

Mux PCM audio stream channels into output as individual tracks.

yes, no

no

Output Audio Channel Parameters

id

Specify the output channel ID.

Channel number or one of these channel names:
FL — front left
FR — front right
FC — front center
LFE — low frequency
BL — back left
BR — back right
FLC — front left-of-center
FRC — front right-of-center
BC — back center
SL — side left
SR — side right
TC — top center
TFL — top front left
TFC — top front center
TFR — top front right
TBL — top back left
TBC — top back center
TBR — top back right
DL — downmix left
DR — downmix right
WL — wide left
WR — wide right
SDL — surround direct left
SDR — surround direct right
LFE2 — low frequency 2

none

split_layout

Set stream layout name for if <split_channels />set to yes

fl, fr, fc, lfe, bl, br, flc, frc, bc, sl, sr, tc, tfl, tfc, tfr, tbl, tbc, tbr, dl, dr, wl, wr, sdl, sdr, rsl, rsr, lw, rw, lfe2, lt, rt, -

none

Input Audio Channel Parameters

id

Specify input audio channel ID.

Input channel ID in format [track_id]:[channel_id]

none

gain

Sepcify the input audio channel gain level.

Float positive number from 0 to 1

none

Validate Parameters

See dedicated article

metadata_channel_layout

Force channel layout value in the stream metadata

c – C,
l_r – L R,
l_r_head – L R Head,
lt_rt – Lt Rt,
m_s – M S,
x_y – X Y,
w_x_y_z – W X Y Z,
l_r_ls_rs – L R Ls Rs,
l_r_lrs_rrs_c – L R Lrs Rrs C,
l_r_lrs_rrs_c_cs – L R Lrs Rrs C Cs,
l_r_lrs_rrs_c_crs_ls_rs – L R Lrs Rrs C Crs Ls Rs,
l_r_lrs_rrs_vhl_vhr_vhlrs_vhrrs – L R Lrs Rrs Vhl Vhr Vhlrs Vhrrs,
l_r_c – L R C,
c_l_r – C L R,
l_r_c_cs – L R C Cs,
c_l_r_cs – C L R Cs,
l_r_c_ls_rs – L R C Ls Rs,
l_r_ls_rs_c – L R Ls Rs C,
l_c_r_ls_rs – L C R Ls Rs,
c_l_r_ls_rs – C L R Ls Rs,
l_r_c_lfe_ls_rs – L R C LFE Ls Rs,
l_r_ls_rs_c_lfe – L R Ls Rs C LFE,
l_c_r_ls_rs_lfe – L C R Ls Rs LFE,
c_l_r_ls_rs_lfe – C L R Ls Rs LFE,
l_r_c_lfe_ls_rs_cs – L R C LFE Ls Rs Cs,
l_r_c_lfe_ls_rs_lc_rc – L R C LFE Ls Rs Lc Rc,
c_lc_rc_l_r_ls_rs_lfe – C Lc Rc L R Ls Rs LFE,
l_r_c_lfe_ls_r_rls_rrs – L R C LFE Ls R Rls Rrs,
l_r_ls_rs_c_lfe_lc_rc – L R Ls Rs C LFE Lc Rc,
l_r_c_lfe_ls_rs_lt_rt – L R C LFE Ls Rs Lt Rt,
l_r_cs – L R Cs,
l_r_lfe – L R LFE,
l_r_lfe_cs – L R LFE Cs,
l_r_lfe_ls_rs – L R LFE Ls Rs,
l_r_c_lfe – L R C LFE,
l_r_c_lfe_cs – L R C LFE Cs,
l_r_ls_rs_lfe – L R Ls Rs LFE,
l_r_ls_rs_c_cs – L R Ls Rs C Cs,
l_r_ls_rs_c_rls_rrs – L R Ls Rs C Rls Rrs,
c_l_r_ls_rs_cs – C L R Ls Rs Cs,
c_l_r_ls_rs_cs_lfe – C L R Ls Rs Cs LFE,
c_l_r_ls_rs_rls_rrs – C L R Ls Rs Rls Rrs,
c_l_r_ls_rs_rls_rrs_cs – C L R Ls Rs Rls Rrs Cs,
l_r_c_vhc_lsd_rsd_ls_rs_vhl_vhr_lw_rw_csd_cs_lfe1_lfe2 – L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2,
l_r_c_vhc_lsd_rsd_ls_rs_vhl_vhr_lw_rw_csd_cs_lfe1_lfe2_lc_rc_hi_vi_haptic – L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2 Lc Rc HI VI Haptic

none

🚧

Note for lfe_low, lfe_hight, and lfe_gain

<lfe_low />, <lfe_hight />, and <lfe_gain /> parameters will be allied only in case of channel upmixing.

🚧

Note for split_channels

The <split_channels /> parameter available only for PCM audio codecs.

🚧

For metadata_channel_layout

The <metadata_channel_layout /> parameter available only for mov and dnxhd output formats.