Pass libsvtav1 Parameters Directly in FFmpeg
This article explains how to pass advanced, encoder-specific
parameters to the SVT-AV1 encoder (libsvtav1) using FFmpeg.
While FFmpeg maps basic options like bitrate and presets to its standard
flags, unlocking the full potential of SVT-AV1 requires using the
dedicated -svtav1-params option. Below, you will find the
exact syntax, key parameter options, and practical command-line examples
to customize your AV1 video encoding pipeline.
The -svtav1-params Syntax
The primary method to pass library-specific arguments directly to
SVT-AV1 is via the -svtav1-params flag. This option accepts
a list of key=value pairs separated by colons
(:).
The basic syntax structure is as follows:
ffmpeg -i input.mp4 -c:v libsvtav1 -svtav1-params key1=value1:key2=value2 output.mkvUsing this method bypasses the limitations of FFmpeg’s generic wrapper, allowing you to access new or highly specific features of the SVT-AV1 library directly.
Practical Example
Here is a practical FFmpeg command that utilizes
-svtav1-params to configure film grain synthesis, tuning
metrics, and keyframe intervals:
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 26 -preset 5 -svtav1-params tune=0:film-grain=8:keyint=240 output.mkvIn this command: * tune=0 sets the tuning metric to
“Visual Quality” (0 is visually optimized, 1 is PSNR, 2 is VMAF). *
film-grain=8 enables film grain synthesis with a strength
parameter of 8, which helps represent film grain efficiently without
bloating the bitrate. * keyint=240 sets the maximum
keyframe interval to 240 frames.
Common SVT-AV1 Parameters
Below are some of the most useful parameters you can pass through the
-svtav1-params flag:
tune: Optimizes the encoder for specific metrics. Set to0for visual quality,1for PSNR, or2for VMAF.film-grain: Enables film grain denoising and synthesis on the decoder side. Accepts values from1to50to control the level of grain.scd: Enables or disables Scene Change Detection. Set to1to enable (default) or0to disable.hierarchical-levels: Defines the prediction structure hierarchy. Accepts3,4(default), or5. Higher levels can improve compression efficiency but increase latency and memory usage.tile-rowsandtile-cols: Controls multi-threaded tiling. For example,tile-rows=1:tile-cols=2splits the video frame into tiles to speed up encoding and decoding on multi-core processors.