>>970039>or how to make good webms with it. ffmpeg Scientist here. When I do ffmpeg for the webm portions of this site I use ffmpeg in two steps;
first cut the clip in the same format as the source video; options: -to and -ss is start time and end time.
ex: ffmpeg -i video.mp4 -ss 00:00:00 -to 00:00:00 -i video.mp4 -c copy output.mp4
then run a 2 pass conversion to webm specifying the bitrate and resolution.
first pass:
ffmpeg -y -i output.mp4 -c:v vp8 -vf scale=-1:1080 -pass 1 -b:v <bitrate>k -an -f webm /dev/null
second pass:
ffmpeg -i output.mp4 -c:v vp8 -vf scale=-1:1080 -pass 2 -b:v <bitrate>k -c:a libvorbis -b:a 128k -f webm output.webm
For the bitrate you have to aim for the 4mb size limit in this boards case, you get that with bitrate = file size / duration.
So 4mb would be 4 x 8192 (32768). For a 15 second clip you'd use 32768 / 15, then I take 128 off for audio, so ~2000.
The first pass generates a file that can be resourced in the second pass at different bitrates to tweak the final webm size.
Audio bitrate can be as low as 60k without quality issues, and can save file space.