Tool

x265-params Validator: Catch Option Conflicts, Preset Defaults and Colon Errors

If you added options to -x265-params and nothing changed, or ffmpeg seems to read a value strangely, the input string is the first thing to suspect. Paste a command or an option string and this tool points out where a colon cuts a value off, where an option overlaps with ffmpeg’s own options, where you override a value the preset sets, and where options collide with each other.

Examples

Pasted text is not sent to a server and is processed only inside this browser. If a path contains your user name, remove it before pasting.

How do I use it?

  • You can paste the whole ffmpeg command, or only the "psy-rd=2.0:aq-mode=3" part after -x265-params. If you paste the whole command, the tool also looks at how the options relate to -preset, -crf and -pix_fmt.
  • Fix the “Problem” lines at the top first, then copy and use the “Cleaned-up string” below them. After fixing, read the actual applied values once in the x265 [info]: lines of the encoding log.

What does it check?

  • Colon errors: ffmpeg separates options with colons. So deblock=-1:-1 is cut into two pieces, deblock=-1 and -1, and stats=C:\log\x.log is cut at the colon after the drive letter. It is safer to write lists inside a value with a comma (deblock=-1,-1) and to use relative paths.
  • Key names and value ranges: it fixes underscores, capital letters and leading hyphens, and suggests the closest name for keys that aren’t in its list (not being in the list doesn’t mean a key is wrong). Value ranges are checked only for some keys, based on Command Line Options in the x265 documentation.
  • Overlap with ffmpeg options: it finds cases where one value is set in two places, such as -crf and crf=, -preset and preset=, -g and keyint=, -bf and bframes=, or -b:v and crf. Which one wins can depend on the ffmpeg version, so we recommend keeping only one.
  • Preset-implied values: if it knows the preset, it compares your values with the table below and tells you whether you repeated the same value or overrode it with a different one. Params are known to be applied after the preset.
  • Conflicts between options: it looks at min-keyint larger than keyint, only one of vbv-maxrate and vbv-bufsize present, crf used together with qp or bitrate, an output-depth whose bit depth differs from -pix_fmt, and HDR options without 10-bit.
  • It decides using only regular expressions and a fixed table. No AI or external server is involved, and the same input always gives the same result.

Values the preset sets implicitly

These are only the rows of the Preset Options table in the x265 documentation that this tool uses to judge conflicts. Depending on the documentation edition (stable or master), the same cell is sometimes written differently (for example subme for slower), so the values here follow the latest documentation. For the table of the x265 version you use, check that version’s documentation.

Optionultrafastsuperfastveryfastfasterfastmediumslowslowerveryslowplacebo
bframes3344444888
ref1122334455
subme0112223345
rd2222234666
rect0000001111
amp0000000111

How do I use the results?

  • If you want to change psy-rd or aq-mode: the table below (our measurements) answers how much size and VMAF change at the same CRF. These are options where recommended values disagree from one web post to the next, so the surest way is to measure a short segment of your own video.
  • When you change the preset: the values the preset sets change with it, so a value you overrode with params may already be the same in the new preset. See the table above and the “same value” notes in the check results above. Speed and size by preset are in the x265 presets measured.
  • To read which options went into a result file, use the x264/x265 settings string decoder. This tool is a pre-check of your input, while the decoder checks the result. Continue to the HDR10 metadata helper for HDR options, and to the ffmpeg command explainer and linter for checking the whole command.

Our measurements: changing psy-rd and aq-mode (against the medium default)

From the x265 psy-rd and aq-mode measurements, this is the size change (%) and VMAF difference against the preset medium default, at the same CRF and on the same clip. Values are the minimum to maximum across four 1080p25 10-second clips. psy0 and psy1 set psy-rd to 0 and 1, and aq1, aq3 and aq4 set aq-mode to 1, 3 and 4.

VariantCRFSize change (%)VMAF difference
psy022-16.2~-4.5-0.6~0.0
psy028-15.3~-5.8-1.3~-0.5
psy034-14.5~-7.7-2.1~-1.2
psy040-9.7~-7.4-2.3~-1.9
psy122-8.7~-2.1-0.1~0.0
psy128-9.0~-2.6-0.3~-0.1
psy134-8.6~-3.7-0.7~-0.3
psy140-5.6~-3.6-0.9~-0.6
aq122-30.0~-14.4-3.4~-0.0
aq128-27.5~-13.4-8.2~-2.1
aq134-26.3~-13.3-10.2~-5.8
aq140-31.0~-14.6-11.0~-7.1
aq322+4.5~+17.80.0~+0.4
aq328+3.1~+11.0+0.0~+0.8
aq334+2.8~+9.8+0.1~+1.4
aq340+2.9~+10.7+0.4~+2.1
aq422-39.0~-15.2-4.5~-0.0
aq428-35.3~-13.5-10.1~-2.6
aq434-33.6~-13.4-12.5~-5.8
aq440-36.2~-15.0-13.1~-7.1

At the same CRF, some variants that shrink the file also lower VMAF, so don’t judge a variant as good from size alone. To look at size and VMAF together, see the RD curves in the measurement article above.

Limitations worth knowing

  • The key list and range table are partial. They cover only commonly used options, and keys not in the list aren’t judged and are only marked “Note”. The final reference is the official documentation for your x265 version.
  • It varies by version. Some cells of the preset table, the handling of keys without a value and of duplicate options, and the interpretation of a single deblock value can differ by version, so they are reported only as warnings.
  • Whether an option was actually applied must be confirmed with the log. This tool only reads the string and does not run the encoder. It also can’t tell whether your build is 10-bit, so use the FFmpeg build checker alongside it.
  • The measurements use a CPU software encoder, 8-bit input, one PC and four 10-second clips. They may differ from your video, and times were run at IDLE priority and are for reference. We did not measure the effect of other options (rd, subme, pools and so on).
  • Pasted text is not sent to a server and is processed only inside this browser.

Sources