Skip to content

Configuration Files

patrickenfuego edited this page Apr 1, 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

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

As of this writing, the prefix - is required for each setting, although I'll make it optional in the future.

script.ini

A long overdue feature which allows you to set default values for the script's various switch parameters so you don't have to provide it each time you run the script:

; Toggle between True and False (no quotes). Any other value is ignored

[Script]
RemoveFiles=False
DisableProgress=False
ExitOnError=False
SkipHDR10Plus=False
SkipDolbyVision=False
GenerateReport=False
HDR10PlusSkipReorder=False

As an 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