WIP
VP9 encode is very very slow ?
Yes and no. Unlike x265 use all core to speed up encode time, the low threaded libvpx-vp9 use for me 4 core of my Ryzen 3900X. Encode 4 video in the same time -> x4 "boost".
Force dynamic bitrate with b:v 0
Set quality level with -crf <quality level>
is a integer (0 to 63)
libvpx use -deadline
and ffmpeg -quality
need to be set to good.
libvpx use -cpu-used
and ffmpeg -speed
0 to 8 but > 4 isn't recommended.
Lowering this value increase quality.
Optional for linux user: use gamemoderun
to dynamic set (cpu) performance scheduler.
For boost encode without decreasing quality -row-mt 1
Threaded tile -tile-columns 0
but can be for little threaded boost: 1 for 720p, 2 for 1080p, 3 for 2160p, 0 for non-HD or better quality.
Don't set it >
Set OFF other -tile-rows 0
and -frame-parallel 0
, don't boost and can decrease quality.
Better quality with more frame complexity and increase bitrate with -auto-alt-ref 6
(2-pass only)
Set alt-ref look ahead -lag-in-frames 25
No VP9 adaptative quantization -aq-mode 0
-tune-content film
better film grain, less blur but increase bitrate/file size
-enable-tpl 1
unclear is new but somebody use it. Need more info/test (lower distortion). Better PSNR but lower SSIM
ffmpeg -hide_banner -i 'input video' -pix_fmt yuv420p10le -c:v libvpx-vp9 -b:v 0 -crf 31 -speed 1 -quality good -static-thresh 0 -tile-columns 0 -tile-rows 0 -frame-parallel 0 -row-mt 1 -aq-mode 0 -auto-alt-ref 6 -lag-in-frames 25 -enable-tpl 1 -profile:v 2 -g 240 -an -sn -pass 1 -f null -
ffmpeg -hide_banner -i 'input video' -pix_fmt yuv420p10le -c:v libvpx-vp9 -b:v 0 -crf 31 -speed 1 -quality good -static-thresh 0 -tile-columns 0 -tile-rows 0 -frame-parallel 0 -row-mt 1 -aq-mode 0 -auto-alt-ref 6 -lag-in-frames 25 -enable-tpl 1 -profile:v 2 -g 240 -an -sn -pass 2 -f webm out.webm