Skip to content

Configuration Files

patrickenfuego edited this page May 9, 2023 · 7 revisions

Introduction

Three configuration files, ffmpeg.ini, encoder.ini, and script.ini can be found in the /config directory inside the project root folder. Each file allows you to specify options you use frequently, which is useful for settings that are inconvenient to pass every time via a dedicated parameter or -FFMpegExtra/-EncoderExtra (although I still find these more convenient for infrequently used settings).

Each time the script runs, the configuration files are parsed and loaded.

NOTE: If you set an option that has a script parameter and that parameter is used, it will override the configuration file setting

WARNING: The script does not check for proper syntax/casing. If you mistype an option, an error will more than likely occur

encoder.ini

Here you can specify options for both x264 and x265 separately:

; COMMENT
; Encoder specific settings in key=value form

[x264]
open-gop=0
keyint=192
min-keyint=24
me=umh
; If the -Bframes parameter is used, this is overridden
bframes=8

[x265]
open-gop=0
keyint=192
min-keyint=24
sao=0

ffmpeg.ini

This file allows you to pass settings to ffmpeg, which is divided into two categories:

  • Arguments - Options that receive an argument, like -loglevel warning
  • NoArguments - Command switches that receive no argument, like -shortest
; COMMENT

[Arguments]
; Settings that take arguments. Do not quote arguments:
-loglevel=panic
-cpucount=10

[NoArguments]
; Settings that take no arguments:
-hide_banner
-shortest

script.ini

A configuration file which allows you to set default values for the script's various "utility" options. Read the comments carefully as they describe what values are expected.

; Accepts True or False values only
[SwitchOptions]
RemoveFiles=False
DisableProgress=False
ExitOnError=False
SkipHDR10Plus=False
SkipDolbyVision=False
GenerateReport=False
HDR10PlusSkipReorder=False

; A None value means the option is unset and will be ignored
; NoMux & AllowClobber are switch parameters and accept True/False values when set
; Properties & SkipProperties should be a single value or comma separated list of values when set

[MKVTagGenerator]
Path=None
APIKey=None
Properties=None
SkipProperties=None
Title=None
Year=None
NoMux=None
AllowClobber=None

; Reference, Distorted, and EnableVMAF must be set via parameter
[VMAF]
EnableSSIM=False
EnablePSNR=False
LogFormat=json
VMAFResizeKernel=bicubic

As a use example, I used to hardcode -GenerateReport to $true because I always wanted a report file created; with the configuration file, that is no longer necessary.

Clone this wiki locally