The picture will become clear shortly – Pam recently clued me in to an interesting development in the area of ‘open video formats’, known as WebM format. The format is actually composed of (1) A video stream compressed with the On2 VP8 video codec (2) An audio stream compressed with the Vorbis audio codec (3) The aforementioned elements wrapped up in the WebM container, which is relatively similar to the Matroska media container (you may have seen this as .mkv, WebM is actually a subset of this open-source container). Now all of this may sound foreign to those who do not spend their days mired in codecs, so allow me to explain a bit more. This explanation will also allow me to outline some of the reasons as to why this WebM business is fairly exciting for end-users and compression junkies like myself alike.
To begin, let’s talk containers. The best way to think of a container (aka ‘wrapper’) is to think of it like a…container – tupperware, pyrex, plastic, etc. A container can hold a variety of items. You could put leftovers, spices, fresh fruit, liquids, salad dressing, small pieces of wood, rocks, used motor oil, and even mixtures of these items into it. The point to be taken here is that containers are flexible. The same is true of media containers – they can hold one (i.e. still images, audio) type of media within them, but can also hold a mixture (i.e. audio + video). You most likely use containers any time you open a media file, either on your computer or online. Examples are AIFF, WAV (audio only); TIFF (images only); MOV, AVI, MPEG-2, 3GP (combination of audio/video and often other information such as subtitles and metadata). Hence, when you open a .mov (Quicktime Movie Container), you are actually telling Quicktime to read the data within the .mov container, which in theory (not in practice) could be encoded in a variety of ways. This is where containers get to be tricky, and where you very well may have run in to some difficulty in your experience with the files. You can have a perfectly good .mov file, and when you decide to open it, it may even launch QT for you. However, the video and audio streams within the container may very well have been encoded with codecs that have not been loaded onto your computer and hence Quicktime will be unable to decode the files, resulting in some type of error (perhaps imagine getting a box full of spices from India, labeled in Sanskrit – you might be able to identify that you had spices in your hand, but you’d have a heck of a time organizing and actually using any of them in your cooking unless you found someone to be your ‘codec’; a person who could translate the labels from Sanskrit into English). Add to this difficulty the fact that most containers are proprietary and you have a recipe for disastrous video playback problems, which is actually what occurs fairly frequently. Someone might send you a perfectly harmless looking Quicktime file, and next thing you know, you have embarked on a labyrinthine quest through Apple’s support website, Google, and message boards seeking a missing codec that your program has alerted you to (but for some reason rarely helps you find). One good example of some difficulty with streaming containers is our forays into hinted Quicktime streams, which had limited success due to the wide variety of codecs which could be ‘contained’ within the hinted wrapper. So, enter the open video format.
Without worrying a great deal about the video and audio codecs (know that they are both open-source and are both very good, rivaling the long ascendant H.264 as well as MP3 or AAC), the container that WebM has created is first and foremost extremely narrow. So narrow that in fact, a WebM formatted file can only be defined as one that has the video track encoded with On2 VP8 (A Google sponsored open-source video codec), and audio with the Vorbis audio codec (aka .ogg file, another open-source codec). Hence, the reason as to why WebM is a subset of the Matroska (.mkv) container – Matroska allows for a few more options to be contained within. So, WebM is blurring the boundary between codec and container, in that to some extent a container is supposed to hold lots of different materials ( keeping with my ‘spices theme’ – it would be like labeling a container ‘cinnamon-sugar’ in your spice cabinet, with the intent that only those elements be used to fill it). The reason behind this narrow definition is so that you don’t run into the perennial problem of having to download new codecs, or update 50 different codecs to play a video. Additionally, the WebM container is made for use on the internet – ideally in streaming and is thus designed for integration into a browser. In fact, Youtube is kind of secretly using the WebM container and will allow you to see it for yourself – go to www.youtube.com/html5, and near the bottom, enroll in the html5 test. You will need to download a test version of your browser, Firefox has one as does Chrome, and when you search for videos, append ‘&webm=1’ to the url. This will allow you to watch videos in this new, open, format. I found them to look a bit better than the typical YouTube format, likely due to the fact that VP8 is an excellent codec, arguably better than H.264. You can also play files in this container locally using VLC, that Swiss-army knife of players.
Ideally, one would be able to download a patch for the VP8/Vorbis audio combo, start churning out videos in the format, and be uploading amazing-looking streaming videos in no time. Unfortunately, we’ll have to wait a bit, especially Mac users. Currently, there is only a integration for ffmpeg, which requires you to encode using terminal commands. The site has some DirectShow filters which make it usable for those running a Windows Media workflow on a PC and will allow you to try and build the codec from the ground up, but those are for the most part outside the realm of even an intermediate codec junkie. One other minus is that WebM/VP8 takes a good deal of fine-tuning out of your hands – perhaps for some, not having to worry about key-framing, B-frames, VBR vs. CBR, and aspect ratio sounds like a dream come true; however, the control-freak compression-tweaker inside me screams out for some more user input here. However, if the trade-off is less codec-based headaches, I will take it. So, as it is a very new release, we must keep an eye on this developing format, especially as it is being tested on YouTube. As of now, there are a few programs which have WebM compression built-in, the most notable of which is Sorenson Squish. There is no support for playback on portable devices, but there has been some talk of integration with the Android in the near future, and Kaltura HTML5 Media Library offers some support for those wishing to host the files.
In the end, WebM holds great promise for taking another step towards a nearly universal video format for use on the internet, and could prove worth waiting a bit for as we at Yale’s ITG seek new solutions for streaming videos in a format that will create the fewest complications for our end-users.
Photo from Wikimedia Commons (http://commons.wikimedia.org/wiki/File:Spices_22078028.jpg)