Skip to content
Clybius edited this page Jan 24, 2023 · 18 revisions

Overview of custom parameters and arguments

  • dq-modulate = Takes arguments (0..(1)). 0 will enable a switch in the aomenc code to utilize variance deltaq for deltaq-mode 2.
  • delta-qindex-mult = Takes arguments (1..(100)..1000). A simple multiplier of tpl-strength-pos/neg. Can be used to increase deltaq strength/quantization changes.
    1. -pos = Takes arguments (0..1000). A multiplier of upwards quantization (making parts lower quality,) can be used to increase/decrease the amount of reduced bits in stationary and moving out-of-frame objects when using deltaq.
    2. -neg = Takes arguments (0..1000). A multiplier of downwards quantization (making parts higher quality,) can be used to increase/decrease extra allocated bits to regions that are in-frame depending on importance in the frame.
  • vmaf-motion-mult = Takes arguments (1..(100)..1000). A multiplier of the vmaf motion delta qindex (allocating more bits to objects in motion,) preferably used to increase the bitrate to objects in motion. Only available when using any of the vmaf tunes.
  • ssim-rd-mult = Takes arguments (1..(100)..1000). A multiplier of the ssim_rdmult factor in aomenc. Can be used to raise or reduce the effects of extra SSIM RD tuning when using tune=ssim|ipq|ipq_vmaf_psy. (Mostly untested param, feel free to experiment.)
  • luma-bias = Takes arguments (-5..(1)..5). Adds an energy bias depending on the content's luminance. It is recommended to keep this parameter untouched for fidelity purposes.
  • chroma-q-offset-u/v = Takes arguments (-63..(0)..63). Change from default of 0 to override the automatic adjustment based on subsampling (-2 for 4:2:0, -1 4:2:2, 3 for 4:4:4)
  • vmaf-preprocessing = Force VMAF preprocessing, can be used to obtain higher perceivable sharpness/fidelity.
  • loopfilter-sharpness = Adjust the sharpness of the loopfilter, increasing can remove some blur at the expense of further blocking artifacts.
  • enable-experimental-psy = Experimental frame decision from VP9's film tune parameter. Results may vary.
  • vmaf-resize-factor = Changes the internal resolution for VMAF calculations. Only usable with a tune that utilizes VMAF RD.
  • vmaf-rd-mult = Multiplier for the rdmult value produced from VMNAF tuning. Can be used to increase/decrease rdmult in blocks prioritized by the specific tuning.
  • tpl-rd-mult = Multiplier for the rdmult value produced from the temporal layer model. Can be used to increase/decrease rdmult in blocks that are deemed of high importance (in-frame areas, objects of little motion, generally important blocks for overall efficiency).

Preferred params to start with for tuning:

  • delta-qindex-mult = Commonly weakened when certain regions are visibly low quality in comparison to the rest of the objects in frame. Commonly raised in bit-starved scenarios to obtain higher perceivable quality.
  • vmaf-motion-mult = Rather sensitive multiplier. Recommended to lower/raise by no more than 50 or so from the default of 100 (1.0x), depending on if you want more bits allocated to objects in motion.

"Where should I begin tuning for higher fidelity?"

--tune=butteraugli

Butteraugli, like VMAF, is a metric to give a score of an image, in comparison to another image. Scores are measured in monitor height, where 2H is x2 the height of your monitor in distance. Due to the test conditions of Butteraugli, it is a very sensitive, yet very high quality metric. Due to this, we can utilize its functionality to improve encoder decisions. Butteraugli as of 9/16/2022 vastly outperforms other tunes in quality, and is only slightly slower than the new added-in VMAF tunes (ipq_vmaf_psy, vmaf_psy_qp), and faster than the stock vmaf tunes (vmaf, vmaf_neg, etc.)

DeltaQ Tuning

This is where subjective things come into play. If you're noticing artifacts or visibly low framerate in certain regions of video that aren't in frame for long (or when people are moving behind an object,) you can reduce tpl-strength-pos from the default of 100 to reduce the increase in quantizer for that region. If you're using a mode such as variance DQ2 (deltaq-mode=2 with dq-modulate=0,) it may help to reduce the tpl-strength-neg to reduce bitrate, and in turn, you can reduce cq-level (higher overall quality) to make the overall quality a bit more consistent.

"What does x mean?"

  • rdmult: is a parameter used in the AOMedia Video 1 (AV1) encoder, specifically in the rate-distortion (RD) loop. It controls the trade-off between the quality of the encoded video (measured by the distortion) and the bitrate. A higher value of "rdmult" results in a lower bitrate but also lower quality video, while a lower value results in higher bitrate but higher quality video. This parameter can be adjusted to meet specific bitrate and quality requirements for a given video encoding task.

  • HF asymmetry: refers to the difference in the way the human visual system perceives high-frequency image information compared to low-frequency information. High-frequency information, such as fine details, textures, and edges, is generally perceived as more important than low-frequency information, such as smooth areas or large-scale structures. The Butteraugli metric accounts for this by assigning a higher weight to high-frequency differences when computing the overall similarity score.

"Where should I begin tuning for low-bitrate?"

From personal experience(!), I recommend using wavelet deltaq (stock deltaq 2) along with a raised TPL-Strength, and a increased vmaf-motion-mult.

! Any recommendation may not be optimal depending on your source. Nobody else is likely to have not encoded anything you're currently encoding, and best results can be achieved from trial, error, and memorization of how each setting affects what.

Happy encoding!