Encoding a VP9 WebM with OPUS audio is very easy with FFmpeg. This is using a 2-pass procedure to encode a good quality VP9 WebM.
Do the first pass, this will write a ffmpeg2pass-0.log file, this stores the settings to use for the 2nd pass.
┌──(john㉿DESKTOP-PF01IEE)-[/mnt/e/Downloads] └─$ ffmpeg -ss 00:02:00 -t 20 -i Nosferatu_1922_Symphony_of_Horror.avi -threads 0 -vf scale=960:720 -g 999 -c:v libvpx-vp9 -c:a libopus -b:v 3M -crf 45 -qmin 35 -qmax 63 -y -sn -pass 1 vanp.webm |
Then do the 2nd pass to properly encode the final encoded WebM file.
┌──(john㉿DESKTOP-PF01IEE)-[/mnt/e/Downloads] └─$ ffmpeg -ss 00:02:00 -t 8 -i Nosferatu_1922_Symphony_of_Horror.avi -threads 0 -vf scale=960:720 -g 999 -c:v libvpx-vp9 -c:a libopus -b:v 3M -crf 45 -qmin 35 -qmax 63 -y -sn -pass 2 vanp.webm |
This is the final encoded WebM file I managed to make with these commands.
This turned out very well indeed. And the clip below shows the quality this gives you.
A very good solution for sharing high-quality video clips online.