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>
            </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>
        </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]"
                                }
                            ]
                        }
                    ],
                    "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]"
                    }
                },
                {
                    // 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

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

🚧

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

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