Using ffmpeg to encode video with webm
A good friend asked me the other day whether or not ffmpeg supported the new webm (Google VP8) video format. As it turns out, ffmpeg 0.6 and above does support encoding VP8 video (the actual video codec) and Ogg
Theora Vorbis audio (the audio codec) and packaging the two together in a webm container that can be used to embed video for HTML 5 browsers.
Going back to my previous ffmpeg example where I took a bunch of images and stitched them into video in mpeg-4 format I will throw together a quick example where we create a video in webm format.
The command line parameters I am using with ffmpeg:
\ffmpeg\bin\ffmpeg -r 10 -b 1800 -i img%04d.jpg -f webm test1800.webm
So following the previous example, I already have a folder with all my images, etc. The difference between the two command lines is the new -f webm option I included. This will tell ffmpeg to force the format to webm on the encoded file. You can see the results of the output here:
This is not a very serious example, but it should give you a little to go off of. Also note, encoding for webm takes longer than say, mpeg4.