Encoding WebM Video with ffmpeg

I’m writing this on May 20, 2010. The WebM format was literally released yesterday. As such, there is not a lot of choice for encoding tools, and very few end-to-end guides are available. This will all get easier as tools are written (or updated) to provide one-click support for WebM. Until then, here are the tools you will need:

  • libvp8, and a special version of ffmpeg with additional patches (to connect it with libvp8) that are not yet part of the official ffmpeg repository:

  • The latest version of mkclean.

Ready? OK. On the command line, run ffmpeg with no parameters and verify that it was compiled with VP8 support:

you@localhost$ ffmpeg
FFmpeg version SVN-r23197, Copyright (c) 2000-2010 the FFmpeg developers
  built on May 19 2010 22:32:20 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc 
  --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame 
  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora 
  --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx-vp8

If you don’t see the magic words --enable-libvpx-vp8, you don’t have the right version of ffmpeg. (If you swear you just compiled it properly, check to see if you have two versions installed. That’s fine, they won’t conflict with each other—you’ll just need ...

Get HTML5: Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.