Audio Encoding

{# TODO: Add pagination #} All media files contain a number of streams. If a file contains audio, that audio information is written in on of these streams.
It is also not uncommon for a media file to contain more than one audio stream.

This audio information is compressed in a standard format called a codec.
Different codecs have different capabilities such as supporting multiple channels (eg. surround sound), how many of those channels it can contain, or how much audio data is lost when it is compressed.

You may wish to standardise the audio codec streams of your files to better suit your needs.

In order to compress an audio stream into a particular codec, we need to use an audio encoder. Unmanic currently does not support advanced audio encoder features, so only one option is available per codec.

If `Enable Audio Encoding` is not selected, all audio streams from the source file will be copied through to the output file without the codec being modified.

If you select `Enable Audio Encoding`, two configuration sections will be available to you.

TRANSCODE ALL AUDIO STREAMS:
If `Enable Audio Stream Transcoding` is not selected, audio streams will be copied through to the output file without the codec being modified.

Selecting the `Enable Audio Stream Transcoding` checkbox will give you the option to transcode your audio streams to a standard audio codec.

Use the `Audio Codec` drop-down to choose which codec the audio streams will be encoded into.

Once you have selected a `Audio Codec` drop-down, you may also select an encoder using the `Audio Encoder` drop-down.

CREATE A STEREO CLONE OF STREAMS:
If `Enable Audio Stream Cloning` is not selected, no clones of the file's audio streams will be created.

Selecting the `Enable Audio Stream Cloning` checkbox will give you the option to to create a stereo clone all multi-channel audio streams. This is helpful for playback compatibility on devices that do not support multi-channel audio.

Use the `Bitrate` drop-down, to select how much audio data should be encoded. A higher value will encode more audio data and better quality audio, but will increase the size of the audio stream.
{# Enable/Disable settings on this screen #}

Audio streams will be copied
All audio streams will be copied to the destination file without being modified.

{# Transcoding audio streams #}
Transcode all audio streams
Modify the audio stream codec. Channel count and bitrate are kept the same as the source.


Audio streams will be copied
All audio streams will be copied to the destination file without being modified.
Select the output audio codec

{# If there is only one option, disable this field #}
{% include "audio_stream_encoder.html" %}

{# Cloning audio streams #}
Create a stereo clone of streams
Create a stereo clone of all audio streams if the original stream is more than 2 channels. If the source file already has a stereo stream, this is ignored and no clone is generated.


Multi-channel audio streams will not be cloned
No stereo clones of multi-channel audio streams will be created.
Select the output audio codec

{% include "audio_stream_encoder_cloning.html" %}
Select the bitrate for your stereo stream
{# TODO: Make the audio cloning capibility able to select the number of channels #}