NOTICE: The Advanced tab is now deprecated in favor of x264's preset system! The Advanced tab is still available but you must now enable it via the preferences screen.
What they are
Inside of any video codec, there are all sorts of different features and settings that can be turned on and off and given different values. Using different options can change the picture quality, file size, or encoding time. While the default options x264 applies are rather good, power users can tweak them depending on usage. For example, you might want to use different options for a cartoon than for an epic action-adventure.
How to use them
In any of the HandBrake Gui's, there is an Advanced tab on the main window where you can add x264 options with pretty graphic buttons. From the command line, you can add them with --x264opts or -x. They are set up the same way as x264 options in MEncoder. That means they follow this format:
That is to say, each option's value is assigned with an equals sign (=), and each option-value pair is separated by a colon (:). One simple example would be:
Don't worry about what "bframes" or "me" or "umh" mean, quite yet. There are links provided later in this article that describe the options.
The MeWiki describes each parameter that you can set with x264.
For examples of different x264 option strings, look at the CLI equivalents of the presets.
Would that which we call an x264 option, by any other name seem as cryptic?
x264 is pretty flexible about what it will accept for option names.
First off, all underscores (_) are converted to hyphens (-).
Second, if a value isn't given for an option, the value is assumed to be "true".
Third, if an option name starts with "no" or "no-", that part gets chopped off and the value gets converted to the integer representation of a boolean (1, "true" and "yes" become 1, anything else becomes 0), then inverted (0 becomes "true" and 1 becomes "false"). So "no-fast-pskip=1" is the same as "nofast-pskip=1" is the same as "no_fast_pskip" is the same as "fast-pskip=0".
"deblock" is a special case, however. This option doesn't treat 0 and 1 as booleans, so while "no-deblock" is the same as "no-deblock=1" is the same as "deblock=false" and disables the in-loop deblocking filter, "deblock=0" doesn't disable the filter: it means the same as "deblock=0,0" (the default).
Fourth, some options have synonyms:
- deterministic == n-deterministic
- level == level-idc
- ref == frameref
- min-keyint == keyint-min
- filter == deblock
- analyse == partitions
- weightb == weight-b
- direct == direct-pred
- merange == me-range
- mvrange == mv-range
- mvrange-thread == mv-range-thread
- subme == subq
- qpmin == qp-min
- qpmax == qp-max
- qpstep == qp-step
- ipratio == ip-factor
- pbratio == pb-factor
- cplxblur == cplx-blur