Encoding Pioneer One in WebM and Theora

I recently watched the first episode of Pioneer One, an excellent Creative Commons BY-NC-SA-licensed series. It’s from VODO, an indie film distributor that really gets it (the whole “free distribution is good for you, not evil” thing). After suggesting that a WebM or Theora version should exist, the VODO people challenged me to make it. So I did. And here are the links:

The Theora/Vorbis version will work in Google Chrome/Chromium or Firefox while the WebM version works primarily with pre-release browsers. You may need to use this wrapper page to view the WebM version in-browser.

Transcoding steps

Since not many people are familiar with the process of transcoding (converting from one set of codecs to another), I thought it would be helpful to share the methods I used for converting Pioneer One into Theora/Vorbis and WebM. It’s really not as hard as it sounds and it’s gotten a lot easier recently with pretty graphical tools.

Theora/Vorbis

While not graphical, ffmpeg2theora is an extremely simple tool that quickly converts video from a wide range of formats into Theora and Vorbis (see the WebM section below for graphical transcoding tools). I chose to use the June 20 nightly ptalarbvorm version (ptalarbvorm is like the new Thusnelda, basically a drastically improved encoder), which is available on the nightly builds page. I ran it from the command line like this:

$ ./ffmpeg2theora-ptalarbvorm.linux -o Pioneer.One.S01E01.720p.theora-VODO.ogv Pioneer.One.S01E01.720p.x264-VODO/Pioneer.One.S01E01.720p.x264-VODO.mkv

The builds page has binaries for Windows, Linux, and OS X. Thanks to j for pointing out the ptalarbvorm build on the theora-dev list.

The whole transcoding process took 2 hours 15 minutes on my Core i5 670, resulting in a 437 MiB file, down from the 1118 MiB H.264 original. The quality of the Theora version looks pretty good so I’d say the ptalarbvorm encoder is quite competitive.

WebM

WebM is a very new video format, launched by Google on May 19 of this year, which I blogged about shortly after its release. Because it is quite new, the WebM transcoding tools are more bleeding-edge and less mature than Theora transcoding tools. However, the tools that are available are easy to use once you’ve found and installed them.

For virtually any WebM transcoder, you will need the latest version of the GStreamer libraries. If you run Ubuntu, you can add them quite easily using the PPA for GStreamer developers. Once you have the PPA added to your repositories, you should install the libvpx0 and gstreamer0.10-plugins-bad packages, otherwise transcoding tools are likely to complain about missing video/webm and video/x-vpx codecs (thanks to this post for noting the second package).

After the codecs are installed, you’ll need a transcoding tool. At first I tried Transmageddon, but the presets turned out sub-par audio. I ended up settling on Arista, a similar project that resulted in better-quality output. To get WebM support, you’ll need a newer version than what’s available in the Ubuntu repositories. I downloaded the latest version and then installed it manually. You can do this by extracting the archive and running sudo python setup.py install. I chose instead to install locally to avoid modifying my system files by using python setup.py install --home=$HOME/local and then running PYTHONPATH=$HOME/local/lib/python $HOME/local/bin/arista-gtk, but this isn’t required. In general, you can run Arista by using the command arista-gtk.

Once Arista is running, just select the Source (the video you want to transcode), the Device (Computer) and Preset (WebM) to get it to transcode to WebM. Then click “Add to Queue” and it will start transcoding, showing you the progress by displaying screenshots of where it is in the video.

Transcoding Pioneer One took about 1 hour and produced a 265 MiB file, a significant reduction from the 1118 MiB of the H.264 original. I did notice some popping in the audio so I think some sacrifices were made to achieve that size, but the video looks pretty similar to the original. Adjusting the encoding parameters would probably correct bugs like that. Over time, I suspect the WebM transcoding tools will become much more mature, allowing users to easily make WebM versions of videos that are indistinguishable from the original.

Arista will also transcode to Theora; just choose Theora instead of WebM in the Preset menu. I chose to use ffmpeg2theora because it allowed me to use a newer encoder; most people will be satisfied with GStreamer’s default Theora encoder.

Conclusion

Transcoding videos to free formats like Theora and WebM is a relatively painless procedure these days. There are a variety of transcoding tools that will convert videos without needing to tweak a bunch of settings. Video distributors should spend a few minutes to ensure their videos are available in free formats so that the widest possible audience can view them.

1 Response to “Encoding Pioneer One in WebM and Theora”


  • Thanks, that was quite helpful. It’s great to see that only a bit more than 1 month after it was announced WebM is almost ready to replace h.264.

Leave a Reply