2017-10-23

Baka Encoder configuration file reference

Baka Encoder tries to load its 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>
quantityone
descriptionTop level element of the configuration file.
"logging"
typeboolean
values0, 1
descriptionControls initial enabled / disabled state of the logging.
<presets>
quantityone
descriptionContains list of presets. Baka Encoder window height will be adjusted automatically for all the presets to fit in.
<preset>
quantityone or many
descriptionDefines particular encoding preset.
"name"
typestring
valuesnon-empty strings
descriptionDisplayed name.
"suffix"
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"
typeboolean
values0, 1
descriptionControls initial enabled / disabled state of the preset.
<hint>
quantityone
descriptionDefines a tooltip displayed for users when they hover over presets list.
"quality"
typeinteger
values0..16
descriptionА value to be displayed by the quality meter bar in tooltip.
"compression"
typeinteger
values0..16
descriptionА value to be displayed by the compression meter bar in tooltip.
"speed"
typeinteger
values0..16
descriptionА value to be displayed by the encoding speed meter bar in tooltip.
"streaming"
typeboolean
values0, 1
descriptionSet to 1 if encoded file supposed to be suitable for streaming.
<audio>
quantityone
descriptionDefines audio encoding parameters.
"format"
typestring
valuesnone, aac
descriptionDefines audio codec. Set to "none" to disable audio encoding, in this case the rest of "audio" node attributes will be ignored.
"cmd"
typestring
valuesany
descriptionAudio encoding tool (NeroAAC) command line parameters go here.
<video>
quantityone
descriptionDefines video encoding parameters.
"format"
typestring
valuesnone, avc, hevc
descriptionDefines video codec. Set to "none" to disable video encoding, in this case the rest of "video" node attributes will be ignored.
"bit_depth"
typeinteger
values8, 10
descriptionСolour bit depth.
"passes_count"
typeinteger
values1, 2, 3
descriptionEncoding passes count.
"base_bitrate"
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"
typeinteger
values0..2000000000
descriptionMaximum allowed value for automatically calculated bitrate. Only used if
"base_bitrate"
is not 0. 0 - unlimited.
"max_width"
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"
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"
typestring
valuespoint, linear, bicubic, gauss, sinc, lanczos, spline
descriptionMethod to be used to resize video when its dimensions exceed maximum. Must be provided if
"max_width"
or
"max_height"
are not 0.
"cmd"
typestring
valuesany
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>
quantityone
descriptionDefines muxig parameters.
"format"
typestring
valuesnone, mp4
descriptionDefines container format for muxing, set to "none" to disable muxing, in this case the rest of "muxing" node attributes will be ignored and Baka Encoder will procuce separate files for each encoded stream.
"cmd"
typestring
valuesany
descriptionMuxing tool (l-smash) command line parameters go here.