2015.12.04

Baka Encoder configuration file reference

Baka Encoder tries to load it's presets from an XML configuration file in the following order:

  1. From an XML file specified in command line arguments. To make Baka Encoder use presets from a particular configuration file you can launch it like
    "C:\Program Files\Baka Encoder\Baka Encoder.exe" "C:\my presets.xml"

    or simply drag an XML file onto Baka Encoder executable icon in Windows Explorer.
  2. From an XML file named
    "Baka Encoder.config.xml"
    located at the folder where
    "Baka Encoder.exe"
    resides.
  3. From the embedded resource with default presets.

Notes on loading process:

  • Configuration file is opened as read-only.
  • If loading of the configuration file fail then a diagnostic message will be shown.

Configuration file should be a valid XML document saved with UTF-8 encoding. Here is a complete reference of configuration file content:

<baka_encoder>
requiredyes
quantityone
descriptionTop level element of the configuration file.
"logging"
requiredyes
typeboolean
values0, 1
descriptionControls initial enabled / disabled state of the logging.
<presets>
requiredyes
quantityone
descriptionContains list of presets. Baka Encoder window height will be adjusted automatically for all the presets to fit in.
<preset>
requiredyes
quantityone or many
descriptionDefines particular encoding preset.
"name"
requiredyes
typestring
valuesnon-empty strings
descriptionDisplayed name.
"suffix"
requiredyes
typestring
valuesnon-empty strings without reserved characters
< > : " / \ | ? *
descriptionContains string that will be appended to the input file name to form the output file name.
"on"
requiredyes
typeboolean
values0, 1
descriptionControls initial enabled / disabled state of the preset.
<hint>
requiredyes
quantityone
descriptionDefines a tooltip displayed for users when they hover over presets list.
"quality"
requiredyes
typeinteger
values0..16
descriptionА value to be displayed by the quality meter bar in tooltip.
"compression"
requiredyes
typeinteger
values0..16
descriptionА value to be displayed by the compression meter bar in tooltip.
"speed"
requiredyes
typeinteger
values0..16
descriptionА value to be displayed by the encoding speed meter bar in tooltip.
"streaming"
requiredyes
typeboolean
values0, 1
descriptionSet to 1 if encoded file supposed to be suitable for streaming.
<audio>
requiredyes
quantityone
descriptionDefines audio encoding parameters.
"cmd"
requiredyes
typestring
valuesany
descriptionNeroAAC command line parameters go here, leave empty to disable audio encoding.
<video>
requiredyes
quantityone
descriptionDefines video encoding parameters.
"tool"
requiredyes
typestring
valuesx264, x265
descriptionControls which video stream encoding tool to use, if this attribute is missing or invalid x264 will be used.
"passes_count"
requiredyes
typeinteger
values1, 2, 3
descriptionEncoding passes count.
"bit_depth"
requiredyes
typeinteger
values8, 10
descriptionСolour bit depth. If this attribute is missing,
"use_10bit"
attribute will be used.
"max_width"
requiredyes
typeinteger
values0..9000
descriptionMaximum allowed width of the video for this preset in pixels. Video will be automatically resized (maintaining the same aspect ratio) if it's width exceeds specified value. Depending on colorspace must be multiple of two pixels . 0 - unlimited width.
"max_height"
requiredyes
typeinteger
values0..9000
descriptionMaximum allowed height of the video for this preset in pixels. Video will be automatically resized (maintaining the same aspect ratio) if it's height exceeds specified value. Depending on colorspace must be multiple of two pixels. 0 - unlimited height.
"resizing_method"
requiredyes
typestring
valuespoint, linear, bicubic, gauss, sinc, lanczos, spline
descriptionMethod to be used for video resizing. Must be provided if
"max_width"
or
"max_height"
are not 0.
"base_bitrate"
requiredyes
typeinteger
values0..2000000000
descriptionTarget bitrate for 640x480@24 video. Real bitrate will be calculated by adjusting specified value depending resolution, fps, colorspace and bit depth of the video. 0 - disable automatic bitrate calculation. Set this to 0 if you are encoding using CRF or manually specifying bitrate among command line arguments.
"max_bitrate"
requiredyes
typeinteger
values0..2000000000
descriptionMaximum allowed value for automatically calculated bitrate. Only used if
"base_bitrate"
is not 0. 0 - unlimited.
"cmd"
requiredyes
typestring
valuesnon-empty strings
descriptionVideo encoding tool (x264 or x265) command line parameters go here. Argument
--bitrate
can be specified only if automatic bitrate calculation is disabled. If logging is disabled
--log-level
is set to
none
and
--quiet
is used as well (for x264), otherwise
--log-level
is set to
debug
. Value specified for
--output-csp
is used to determine required colorspace conversion parameters. Value specified for
--input-range
or
--range
are used to determine required colorspace conversion parameters. If
--input-range
is absent then
TV
range will be assumed by default for input video. If
--range
is absent then
TV
range will be assumed by default for output video. If
--input-range
and
--range
(or assumed values for them) differ then a conversion will occur. Value specified for
--colormatrix
or
--colorprim
are used to determine required colorspace conversion parameters. Following arguments are added automatically when necessary and MUST NOT be present here:
--pass, --fps, --input-res, --input-depth, --input-csp, --stats, -o, -

Also note that x264 and x265 used in Baka Encoder do not include any addons, such as swscale.
<muxing>
requiredyes
quantityone
descriptionDefines muxig parameters.
"container"
requiredyes
typestring
valuesmp4, none
descriptionContainer for muxing, set to none to skip muxing.
"cmd"
requiredyes
typestring
valuesany
descriptionl-smash command line parameters go here.