Recommended VP9 CRF Quality for HD Video
This article provides a clear guide on the recommended Constant Rate
Factor (CRF) quality range for encoding high-definition (HD) video using
the libvpx-vp9 codec. It covers the optimal settings
required to balance visual fidelity and file size, ensuring efficient
compression for 720p and 1080p resolutions.
When encoding video with the libvpx-vp9 library in
FFmpeg, the standard recommended CRF range for high-definition video is
20 to 32.
The VP9 CRF scale runs from 0 to 63. Unlike some other codecs, lower values mean higher quality, while higher values result in more compression and lower quality.
To achieve the best results for HD content (720p and 1080p), use the following quality targets:
- CRF 31 (Standard/Recommended): This is the official baseline recommended by Google and FFmpeg for 1080p video. It offers an excellent balance of high visual quality and highly efficient file sizes.
- CRF 20 to 24 (High Quality): Use this range if you require exceptional visual fidelity, such as for video archiving or high-end gameplay uploads, though file sizes will be significantly larger.
- CRF 32 to 35 (Low Bandwidth): Use this range if storage space or streaming bandwidth is limited. Visual quality will still be acceptable, but some compression artifacts may become visible in complex scenes.
Required Encoding Parameters
To properly enable CRF mode in libvpx-vp9, you must set
the video bitrate to limit-free (-b:v 0). Without setting
the bitrate to zero, the encoder will not utilize true Constant Rate
Factor mode.
A standard FFmpeg command for encoding HD video using the recommended settings looks like this:
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 31 -b:v 0 -deadline good -cpu-used 2 output.webmUsing a CRF between 20 and 32, combined with the zero-bitrate flag, ensures your HD videos maintain optimal clarity while leveraging the advanced compression efficiency of the VP9 codec.