Libvpx has no hardware encoding or acceleration support of any kind, it's purely a software implementation. There are some VP9 hardware encoders out there but they're few in number and neither Nvidia or AMD have one. However, if you have an Intel CPU from the Skylake architecture or newer you should be able to use Intel's QuickSync hardware encoder built into their CPUs. I don't have the hardware to test it and don't know which OS you're on, but to use it on Linux I think you'd do something like this: ffmpeg -vaapi_device /dev/dri/renderD128 -i 16.mov -vf 'format=nv12,hwupload' -c:v vp9_vaapi -g 150 -bf 4 -compression_level 1 -bsf:v vp9_raw_reorder,vp9_superframe -b:v 15M -an 16_vp9.webm
You may find that the quality leaves much to be desired which is often the case with hardware encoders, most of them are built for speed over quality. So a better approach might be tuning libvpx for faster encoding. For starters you should use -row-mt 1
to enable row-based multithreading which can speed up encoding quite a bit, especially at higher resolutions and when you have lots of cores/threads available. Next you might want to adjust the encoding speed for HD resolution videos by setting -cpu-used 2
. This is similar to x264's -preset
option and it adjusts the speed/efficiency tradeoff. The default in FFmpeg is 1 which is the slowest most people would want to go; 0 basically triples the encoding time.
Depending on how old your version of FFmpeg and libvpx are, you might also want to set the number of encoding threads manually. I'm not sure which version of FFMpeg or libvpx changed this, but in the past you had to set your -threads
by hand or else FFmpeg would only use a single thread for encoding. Also, the -frame-parallel
option was removed from libvpx quite some time ago. It's ignored in the libvpx code so there's no detriment to using it, but it offers no benefit either.
I also recommend checking out Google's VP9 Encoding Guide. It's a pretty good reference on which parameters and bitrates you might want to use for different resolutions.