FFmpeg - Encode VP9

From PiRho Knowledgebase
Revision as of 13:36, 6 March 2025 by Knowledgebaseadmin (talk | contribs) (Created page with "Category:FFmpeg Category:VP9 Two-pass is the recommended encoding method for libvpx-vp9 as some quality-enhancing encoder features are only available in 2-pass mode.<br/> Constant quality 2-pass is invoked by setting <code>-b:v</code> to <code>zero</code> and specifying a quality level using the <code>-crf</code> switch:<br/> <pre> ffmpeg -i <input.file> -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 1 -an -f null /dev/null && \ ffmpeg -i <input.file> -c:v libvpx-vp9 -b:v...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Two-pass is the recommended encoding method for libvpx-vp9 as some quality-enhancing encoder features are only available in 2-pass mode.
Constant quality 2-pass is invoked by setting -b:v to zero and specifying a quality level using the -crf switch:

ffmpeg -i <input.file> -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 1 -an -f null /dev/null && \
ffmpeg -i <input.file> -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 2 -c:a libopus <output.file>

Note: Windows users should use NUL instead of /dev/null and ^ instead of \. Reference: [FFmpeg: FFmpeg and VP9 Encoding Guide]