FFmpeg libvpx-vp9 Default Encoding Settings
This article provides a clear overview of the default encoding
configurations applied when using the libvpx-vp9 encoder in
FFmpeg without specifying any extra flags. It covers key parameters such
as rate control, target bitrate, CPU usage, pixel format, and threading,
helping you understand how FFmpeg processes VP9 video out of the
box.
When you run FFmpeg with the basic command
ffmpeg -i input.mp4 -c:v libvpx-vp9 output.webm without
defining additional parameters, the encoder falls back on a set of
built-in defaults. These defaults are generally optimized for
compatibility rather than speed or visual quality, often resulting in
slow encoding times and low-quality output if left unmodified.
Default Bitrate and Rate Control
By default, the libvpx-vp9 encoder uses One-Pass
Average Bitrate (ABR) mode.
- Default Bitrate: If no bitrate (
-b:v) is specified, FFmpeg defaults to 256 kbps. - Quality Implications: A default of 256 kbps is extremely low for modern high-definition video (such as 1080p or 4K), which will result in heavy pixelation and compression artifacts.
Speed and Quality Settings (CPU-Used)
The -cpu-used parameter controls the trade-off between
encoding speed and video quality. The scale ranges from 0
(slowest, highest quality) to 8 (fastest, lowest
quality).
- Default Value: The default setting is
1. - Impact: Because the default is set to
1, the encoding process will be exceptionally slow. For practical use, values between2and4are recommended for a better balance, or5to8for fast/real-time encoding.
Threading and Multi-Processing
VP9 encoding is highly resource-intensive, but its default threading settings do not utilize modern multi-core processors efficiently.
- Default Threads: The default is
1thread. - Row-Based Multithreading: Row-based multithreading
(
-row-mt 1) is disabled by default. - Impact: Without manually setting the
-threadsand-row-mtflags, your CPU usage will remain low, and encoding will take significantly longer.
Pixel Format and Color Space
- Default Format: FFmpeg will attempt to match the
input format, but it typically defaults to
yuv420p(8-bit, 4:2:0 chroma subsampling) for maximum compatibility with web browsers and media players.
Keyframe Interval (GOP Size)
- Default GOP: The default maximum keyframe interval (Group of Pictures size) is 250 frames. This means the encoder will insert a keyframe at least once every 250 frames, or sooner if a scene change is detected.