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.mkv

Using 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.mkv

In 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: