>>1509514ffmpeg -i INPUT -c:v libvpx-vp9 -b:v 0 -crf 30 -c:a libopus -b:a 64k -vf "scale=1280:-2" -speed 0 -lag-in-frames 25 -auto-alt-ref 1 -frame-parallel 0 -tile-columns 6 -quality best -sn -ac 2 -an -y -threads 4 -colorspace bt709 -pix_fmt yuv420p -f webm -pass 1 NUL
ffmpeg -i INPUT -c:v libvpx-vp9 -b:v 0 -crf 30 -c:a libopus -b:a 64k -vf "scale=1280:-2" -speed 0 -lag-in-frames 25 -auto-alt-ref 1 -frame-parallel 0 -tile-columns 6 -quality best -sn -ac 2 -y -threads 4 -colorspace bt709 -pix_fmt yuv420p -f webm -pass 2 OUTPUT.webm
This is a basic command I've used for years. The way you use it is you copy and paste the first one, erase the INPUT, drag the file you want to convert from your file manager to your terminal/cmd window and hit enter.
After it's done you hit up arrow to bring up the same command, then erase -an and replace -pass 1 NUL with -pass 2 output.webm
(you can put whatever filename you want for the output)
However this is not a one size fits all command, here are some ways you can modify it to suit your needs
To trim the video, you can add:
-ss hh:mm:ss -to hh:mm:ss
anywhere after input and before output, replace the start values and end values accordingly
-threads is how many threads ffmpeg will use, 4 is a low value that will reduce workload, slightly increase quality but greatly increase encode time, you can replace the value with 8 or higher
-vf "scale=1280:-2" will scale the video to 1280x720, you can change this value
-crf value can be increased for lower quality+lower filesize and decreased for higher quality+higher filesize
-b:a is the audio quality, I find 64k to be good quality but you can try lowering it for a tiny bit lower size
-speed can be increased for faster encode but it will impact quality negatively
-quality can be set to good for faster encode but it will impact quality negatively
Play around with it. I don't know of any way to predict the file size, you just have to test it with different values