libvpx-vp9 Quality Degradation Warning Causes
When encoding video using the FFmpeg libvpx-vp9 codec,
encountering a quality degradation warning typically indicates a
configuration issue in your rate control settings. This article outlines
the primary causes behind this warning—such as mismatched two-pass
settings, insufficient target bitrates, and improper Constant Rate
Factor (CRF) configurations—and provides direct solutions to resolve
them for optimal VP9 encodes.
1. Mismatched Two-Pass Encoding Settings
The most common trigger for the quality degradation warning is a
configuration mismatch between the first and second pass of a two-pass
encode. During the first pass, libvpx-vp9 analyzes the
video and writes statistics to a log file. If you change critical
parameters—such as resolution, framerate, bitrate (-b:v),
or quality settings (-crf)—in the command for the second
pass, the encoder cannot reconcile the new parameters with the
first-pass log, resulting in warnings and degraded output.
2. Using CRF Without Setting Bitrate to Zero
Unlike the x264 and x265 encoders, VP9 requires an explicit bitrate
target of zero to enable pure Constant Rate Factor (CRF) mode. If you
define a CRF value (e.g., -crf 30) but do not specify
-b:v 0, the encoder defaults to a constrained quality mode.
Under this mode, the encoder caps the bitrate at a low default
threshold. When the video complexity demands more data than this default
cap allows, the encoder issues a quality degradation warning because it
cannot meet your target CRF.
3. Insufficient Bitrate Limits
If you are encoding using Variable Bitrate (VBR) or Constrained
Quality (CQ) mode with explicit maximum limits, setting the target
bitrate (-b:v) or the maximum bitrate
(-maxrate) too low for your video’s resolution and
framerate will trigger the warning. VP9’s rate control algorithm detects
that the allocated budget is mathematically insufficient to compress the
high-motion or high-detail scenes without severe macroblocking and
compression artifacts.
4. Incorrect Buffer Size Specifications
When using constrained bitrate modes (VBV), the relationship between
target bitrate (-b:v), maximum bitrate
(-maxrate), and buffer size (-bufsize) must be
properly balanced. If the -bufsize is set too small, the
encoder’s rate control buffer fills up too quickly. This forces the
encoder to aggressively drop quality frame-by-frame to remain within
your strict limit, triggering warnings about rate control
tolerances.