Convert a video to WebM

Encodes to VP9 and Opus in a WebM container, the royalty-free combination browsers accept.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -c:v libvpx-vp9 -crf 32 -b:v 0 -c:a libopus -b:a 96k -t 5 out.webm
Encode
5208 ms
Output
420.9 KB
Cost
$0.0067
Result
1280x720

job_58374ee514aa4960

The part everyone gets wrong

-b:v 0 is mandatory for constant-quality VP9 and is the single most-forgotten flag in the codec. Leaving it out gives constrained quality that ignores most of what you asked for. VP9 is also slow: our own measurements had it at 5,347 ms where SVT-AV1 did the same job in 1,111 ms.

What the common version does

Without -b:v 0 the CRF value is treated as a ceiling on a constrained-bitrate encode rather than a pure quality target, which is not what CRF means elsewhere.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -c:v libvpx-vp9 -crf 32 -c:a libopus -b:a 96k -t 5 out.webm
It succeeds, and that is the problem

It did not error. It produced 420.9 KB against the correct command's 420.9 KB, a 1.0x smaller file. A pipeline would accept this silently.

job_7fd2c4d6ea724421

Frequently asked questions

How do I convert mp4 to webm?

Encodes to VP9 and Opus in a WebM container, the royalty-free combination browsers accept.

What goes wrong most often?

-b:v 0 is mandatory for constant-quality VP9 and is the single most-forgotten flag in the codec. Leaving it out gives constrained quality that ignores most of what you asked for. VP9 is also slow: our own measurements had it at 5,347 ms where SVT-AV1 did the same job in 1,111 ms.

What happens if I get it wrong?

We ran the naive version too. It did not error. It produced 420.9 KB against the correct command's 420.9 KB, a 1.0x smaller file. A pipeline would accept this silently.

Do I need FFmpeg installed?

Not with Rendobar. The command on this page ran through the API against a URL, with no local FFmpeg and no server. The job id below it is the job that produced these numbers.

Run this without installing FFmpeg

This exact command ran through the API against a URL.