Please read the start of part 1 to find out how you can try out these features too!
OK so part 2 is about in-browser video transcoding. So…what does all that jargon mean and why should you care?
Just as image files come in different formats (BMP vs JPG vs TIFF vs PNG vs SVG vs …), so too do videos. In fact it’s rather more complicated because there’s these things called codecs. As far as I understand it, different codecs are different methods of compressing audio/video – codes that say how to pack the raw (and huge) audio/video file in a particular way to save space. But because each codec has its own particular way, you need to unpack it in that same particular way otherwise your computer won’t be able to understand it, and you won’t be able to play the file. MP3 is an audio codec. MPEG-2/3/4 are video codecs.
Unfortunately it’s not even as simple as equating file format == codec, because some file formats are “container formats”. AVI and OGG are container formats, and it means that inside, the audio/video can be encoded in a variety of different codecs. So basically it’s more pain.
Now some codecs seem free, but some codecs really are Free, and hopefully this coincides with being patent-free so no one will sue you just for using them. The Wikimedia Foundation, bless their cotton socks, recognise through their Values statement the importance of free formats and codecs:
An essential part of the Wikimedia Foundation’s mission is encouraging the development of free-content educational resources that may be created, used, and reused by the entire human community. We believe that this mission requires thriving open formats and open standards on the web to allow the creation of content not subject to restrictions on creation, use, and reuse.
Consequently, Wikimedia Commons has a policy on which file types may be used:
Patent-encumbered file formats like MP3, AAC, WMA, MPEG, AVI and the like are not accepted at Wikimedia Commons. Our mission requires content to be freely redistributable to all. Patent-encumbered formats fail to meet this standard.
So what is allowed? For audio/video, it comes down to Ogg container format with Ogg Speex/FLAC/Vorbis (audio) and Ogg Theora (video) inside. Yay Ogg! There’s only one tiny problem… no Windows software plays anything Ogg by default, no recording devices produce Ogg files by default, and this means users have to convert their files before uploading. Blah! What a hassle! Why can’t using free software and free formats be easy?!? (I’m not being facetious… I half know what I’m doing and it’s still a pain.)
Well, soon things are going to get a whole lot better: with Firefox 3.1, due next month in February, by default Firefox will support Ogg Theora. That means you’ll be able to play Ogg video in your browser without any extra software.
But even better: someone has written an extension called Firefogg which will transcode a file for you when you upload it. So, if you have Firefox 3.1+, and you have the Firefogg extension, and you come to a site that only accepts Ogg and you have a something-else file, now you just need to upload it as normal and Firefogg will convert the file for you before uploading it to the site.
I don’t know about you but I think that’s some serious genius. And Michael Dale has an implementation of it for Wikimedia Commons! Here’s what it looks like:
So we make it to the Commons upload form, and notice a new option saying “Enable video converter”. So if we tick that…
… then we can choose some random video format (in this case, AVI). And instead of just uploading, it will do transcoding (converting the format) and then uploading.
And, uploading! (Nice to get progress meters “for free” with this extension)
And… wala! Here’s my uploaded file, now in Ogg format, and playing using just the browser because that’s how awesome Firefox 3.1 is going to be.
As it transcodes, it also writes a copy of the final Ogg file next to your original file – handy to have both around.
One of my favourite things about this is that it removes the need for me to figure out all the configuration options in transcoding files. There’s so many and figuring out the optimum ones can be very tedious. With Firefogg, the site that is accepting the Ogg file tells your browser what settings it wants you to use — and you don’t have to see or deal with any of it! Total win. :)
So, to recap, how you can play with this awesomeness:
- Add this to your /monobook.js:
- Install the Firefox 3.1 beta (…or wait til February and it won’t be beta anymore)
- Install the Firefogg extension for Firefox
- Go and upload videos with the greatest of ease!
Again this is something I hope that will become available as a Gadget for people’s user preferences, so if you like to experiment a bit please do so and report back, so it can be stable enough by the time Firefox 3.1 is released to be a Gadget for everyone.
Long live the Ogg! :D
For more information on the current codec situation, I recommend reading The codec dilemma. It describes why it’s hard for most people to view video using royalty-free codecs, including the business motives of Apple and Microsoft that have created and maintain these problems.
I’m excited about the inclusion of Theora and Vorbis decoders in Firefox 3.1 and the work on projects like Firefogg that you mentioned. These will help speed up the transition to royalty-free codecs, which needs exactly this sort of help because it won’t come from the big operating system vendors.
— Denver Gingerich · 29. January 2009, 03:46
Thanks for the pointer Denver. Do you know – aren’t the Ogg codecs free beyond just being royalty-free? like they publish their algorithms or whatever? Or is the only sense that codecs can be “free” royalty-free (“gratis”), are there no “libre” senses for codecs?
— pfctdayelise · 29. January 2009, 09:41
Don’t quote me on this, but i believe all the ogg (and theora/vorbis etc) stuff is publicly specified (at the very least, the ogg container format is published as an RFC), and official tools/reference implementations under the bsd license. So i think they are “libre”
— bawolff · 29. January 2009, 12:59
OK, thanks for the info bawolff. I won’t quote you :)
Thanks Melancholie! Glad you like it. Are you going to try them out??? :)
— pfctdayelise · 29. January 2009, 23:36
pfctdayelise: I started writing a response to your questions, but it ended up being long enough for a blog post of its own so I posted it on my web site as Evaluating codec freedom. I will monitor comments both there and here in case you have any questions.
In general, I prefer to use the term “Xiph codecs” to refer to Theora and Vorbis, as they were both created by the Xiph.Org Foundation. Using the term “Ogg codecs” can be confusing because it’s a container format that could technically hold many different codecs, not just Theora and Vorbis.
— Denver Gingerich · 30. January 2009, 05:14
Elsewhere on the web...
Commenting is closed for this article.