FFmpeg - Encode VP9: Difference between revisions
From PiRho Knowledgebase
Jump to navigationJump to search
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..." |
mNo edit summary |
||
| Line 7: | Line 7: | ||
ffmpeg -i <input.file> -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 2 -c:a libopus <output.file> | ffmpeg -i <input.file> -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 2 -c:a libopus <output.file> | ||
</pre> | </pre> | ||
Note: Windows users should use <code>NUL</code> instead of <code>/dev/null</code> and <code>^</code> instead of <code>\</code>. | Note: Windows users should use <code>NUL</code> instead of <code>/dev/null</code> and <code>^</code> instead of <code>\</code>.<br/> | ||
Reference: [[https://trac.ffmpeg.org/wiki/Encode/VP9 FFmpeg: FFmpeg and VP9 Encoding Guide]] | Reference: [[https://trac.ffmpeg.org/wiki/Encode/VP9 FFmpeg: FFmpeg and VP9 Encoding Guide]] | ||
Revision as of 13:36, 6 March 2025
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]