Configure SVT-AV1 Screen Content Detection in FFmpeg
This guide explains how to configure and optimize screen content
detection in the SVT-AV1 (libsvtav1) encoder using FFmpeg.
You will learn the specific command-line parameters required to enable,
disable, or set screen content coding to automatic, helping you achieve
better compression efficiency and visual quality when encoding desktop
recordings, presentations, or gaming content.
Understanding Screen Content Mode in SVT-AV1
SVT-AV1 includes specialized encoding tools designed specifically for
screen content, which typically features sharp edges, high-contrast
text, and large areas of flat color. The parameter used to control this
feature is screen-content-mode.
This parameter accepts three distinct values:
0(Off): Disables screen content tools. Use this for standard, natural photographic video.1(On): Forces screen content tools on. Use this when you are encoding pure screen captures, software tutorials, or slide presentations.2(Auto): Enables automatic detection. The encoder analyzes the input frames and dynamically enables screen content tools when it detects synthetic content.
Using the Parameter in FFmpeg
To pass SVT-AV1-specific parameters through FFmpeg, you must use the
-svtav1-params flag. Multiple parameters inside this flag
are separated by colons.
Force Screen Content Mode On (Value: 1)
If you are encoding a video that is entirely a screen recording (such as a coding tutorial or a PowerPoint presentation), force the screen content mode on to maximize quality and compression:
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -svtav1-params screen-content-mode=1 output.mkvEnable Automatic Screen Content Detection (Value: 2)
If your video contains a mix of real-world camera footage and screen recordings, or if you want the encoder to decide per-frame, set the mode to automatic:
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -svtav1-params screen-content-mode=2 output.mkvDisable Screen Content Mode (Value: 0)
To ensure that no screen content tools are used (which can save computational overhead during encoding for purely cinematic or natural camera footage):
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -svtav1-params screen-content-mode=0 output.mkvAdditional Optimizations
When encoding screen content, combining
screen-content-mode with other parameters can yield better
results:
- Tune for Sharpness: You can pair the screen content
setting with
tune=0(visual quality tuning) to preserve fine text details. - Combining Parameters: To combine multiple options
within
-svtav1-params, use a colon as a separator:
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 25 -svtav1-params screen-content-mode=1:tune=0 output.mkv