

This mode is recommended, with the method being a target bitrate is set and targeted twice for max effectivness by using -pass 1 and -pass 2. The example is for a target bitrate of 1.5MBit/s Two-pass ffmpeg -i in.mp4 -c:v libvpx-vp9 -b:v 1.5M output.webm This mode will try and achieve close to a set bitrate throughout the whole video, which means it is not an efficient choice.

The main part is the rate control mode, there are multiple with some being more specific and controlling in the outcome. The basis of these commands needs to call FFmpeg, specify the input file and then the video codec which is libvpx-vp9 ffmpeg -i in.mp4 -c:v libvpx-vp9 Bitrate control modes Here is a shorter guide derived from the FFmpeg VP9 docs. WebM the modern video container encoded by libvpx-vp9 or VP9 for short, handles differently to h264 when encoding with FFmpeg.
