So… what is a codec exactly?
A codec is a piece of software or a physical device that can encode or decode audio or video data. There are all kinds of codecs around, with MP3, Ogg Theora and DivX among them.
They capture audio or visual input and convert it into a compressed 'container format'. It's worth doing this because saving raw binary data (usually a Wav file for sound) takes up a huge amount of disk space, but we can compress this to certain levels without losing too much quality.
Container formats you may be familiar with are MP3, Ogg and DivX movies.
So WebM is one of these 'codecs' then?
Not exactly, WebM is a container for two codecs. One is called Vorbis, which you'll have come across if you've ever tried to convert your MP3s or rip CD audio as Ogg files and, as you can probably guess, this deals with audio content. Vorbis is patent-and royalty-free and is widely used in the Linux world.
Does this mean it's technology we've had the whole time?
In the case of Vorbis, that is indeed true. The exciting part of WebM isn't necessarily the use of Vorbis, however, but a new patent-free codec called VP8 that handles the video side of the WebM container.
But I thought that Ogg Theora already did video content?
It does, but the compression-to-quality ratio isn't as good as the competing (and non-free) H.264 format, it's nowhere near as well-supported and doesn't have big-money backers. The latter is an important point, because if MPEG-LA were to pursue a patent case against Theora, they wouldn't have the financial backing to fight it. Theora has escaped litigation so far through obscurity, but this blessing is also a curse, as companies won't adopt a format that has the potential to get them sued.
Hang on, what is MPEG-LA and why does it want to attack everyone?
MPEG-LA is the authority in charge of enforcing the patents behind H.264. This is already supported in all the main browsers and Adobe Flash, and also had widespread support from hardware companies.
This means H.264 has the advantage of hardware-acceleration, which vastly improves playback quality.
Is having H.264 in the HTML5 standard a bad thing?
For the free software community, yes. Though MPEG-LA has promised a few years' grace period where no-one will be pursued for royalties, after that, all the patent-holders are free to do so. This would mean that any free software with encoding or decoding support for H.264 would be liable and could face litigation.
This could lead to less free playback software being developed, free software not being able to provide playback support for high-quality video legally or even existing free software disappearing.
So how does WebM go about avoiding patent issues?
Google itself is the patent holder for VP8 after its purchase of On2 (the codec developer) and as a result has added a 'patent promise' to WebM's OSI-approved free licence that anyone using the codec won't be pursued for royalties for the container's existence. This would mean that any software could provide full support for the format without facing the possibility of legal action.
Which OSI-approved licence does WebM use?
WebM uses a BSD-style licence that has been approved by the Open Source Initiative (OSI), a body that checks to see if free licences are truly 'free' and 'open source'. This is also enclosed with a 'patent promise' that, in the event of Google being pursued for patent royalties, sees patent rights revoked.
This sounds bad, but is something you typically see in GNU General Public Licence v3 and Apache Licence v2. The difference is that WebM decouples patent licensing from copyright licensing, meaning that even if Google gets sued, WebM remains under a free licence.