Bill Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

September 2007
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Aug  Oct

Converting QuickTime Movies to Ogg

Tuesday, September 4, 2007

I recently did a blog post about using Tassilo Horn's doc-view.el utility to display PDF/PS/DVI files in an Emacs buffer. I included in the post a link to a screen recording I made to demonstrate the utility. As I normally do when I create a screen recording, I used SnapZ Pro and saved the recording as a QuickTime movie. When I posted the movie, I got a number of favorable comments on it; however, one poster mentioned that it "would have been cooler not to choose QuickTime format". My first reaction was defensive but, after thinking about it for a bit, I decided that I really didn't know that much about video and audio formats. So, I asked:

"What would have been a better format and what utility would you have used to do the movie? I've tried a number of different ones and I've gotten the best results with QuickTime format using SnapZ Pro on Mac OS X. However, I'm not an expert in video utilities/formats so would appreciate recommendations."
This resulted in a number of newsgroup exchanges and a lot more research on my part. Tassilo Horn suggested that recordmydesktop was a good tool to do the screencasts and that it produced Ogg output. Well, recordmydesktop is a linux-only utility, so I couldn't use it on my Mac OS X Powerbook; however, I was intrigued by the idea of producing Ogg format movies. But, before I proceed any further with this story, I should probably digress to provide a bit of background.

When it comes to audio/video formats, I am a complete newbie/luser. Back in the late 80's, I had done some wild dolphin sound recordings with Wade Doak in New Zealand; however, since then, I hadn't played around with audio or video at all (except for recording user group meetings). Since I'm a Mac user, when I do lispvan user group recordings, I use what I consider the best Mac software for the job - SnapZ Pro. It supports output in a lot of different formats, but Ogg was not one of them. So, I decided to not be a complete luser and did a bit of research. It turns out that the QuickTime ".mov" and the Ogg ".ogg" file formats are both container formats. In other words, they are just a storage mechanism that identifies and "interleaves" the different data types that are stored in them (see here for a good comparison of different container formats). The QuickTime format is proprietary and can accomodate quite a few different audio and video codecs (standards for encoding/decoding digital data streams). Ogg is an open standard maintained by the Xiph.org Foundation and is recommended by the FSF. With the Ogg container format, the Vorbis codec is normally used to encode audio and the Theora codec is normally used to encode video. Ogg support is installed by default on most GNU/Linux systems but it is not a format that is supported by default on Windows or Mac OS X. However, the excellent VLC media player can be used on both Windows and Mac OS X (and many other systems) to play Ogg (and other) audio and video formats. In addition, you can install the VLC Firefox plugin to play Ogg audio and/or video directly in Firefox. However, I couldn't find any commercial or open source utility for Mac OS X that could be used to do screen recordings that would produce Ogg files.

So, I decided to try converting the QuickTime movie to Ogg. Peter Dyballa suggested that I look at the Perian site as they offer plug-ins for QuickTime to enable the use of additional audio, video, and encoding formats. I had a look at that project but it didn't offer Ogg output as an option. Peter then suggested that I have a look at the XiphQT plug-in. According to the Xiph web site:
"Xiph QuickTime Components (XiphQT) is, in short, the solution for Mac and Windows users who want to use Xiph formats in any QuickTime-based application, e.g. playing Ogg Vorbis in iTunes or producing Ogg Theora with iMovie."
This looked like exactly what I needed. So, I did the following:
  1. Downloaded the XiphQT package from: http://www.xiph.org/quicktime/download.html
  2. Moved the "XiphQT.component" to "~/Library/Components/"
  3. Loaded my doc-view.mov movie into iMovie
  4. In iMovie, selected the File/Share... menu option
  5. Selected "Expert Settings" from the drop down menu
  6. Selected "Movie to Ogg" as the "Export:" option and pressed "Options..."
  7. Under "Video Settings", I selected "Best" for Frames per Second and "Best" for Compressor Quality and "High" for Sharpness
The movie was converted to Ogg format (e.g. - an Ogg container with the sound in the Vorbis codec and the video in the Theora codec). However, although the resulting sound quality was ok, the video quality was very poor. It was so poor that, although I could make out what was happening in the movie, it is doubtful that anyone would want to watch it. So, at that stage, I thought that converting ".mov" movies to Ogg format wasn't really a viable option.

I decided to send an email to SnapZ Pro technical support to see whether they knew of any way that I could either output to Ogg format from SnapZ Pro or effectively convert the resulting movie into Ogg format without losing quality. I received back a very helpful response from them:
"The issue is iMovie converting everything to DV, not Snapz. If you are able to use QuickTime Pro to export again as OGG you should not have the same problem."
It seemed odd that iMovie converts to DV before exporting, but I decided to give it a try again with QuickTime. So, I re-exported the movie using QuickTime Pro (with the exact same Ogg output settings) and, this time, it produced an Ogg movie that was comparable in quality to the QuickTime movie! And, it was only 9MB in size compared to the 16MB size of the original QuickTime movie! If you want to compare the two, you can grab them here: So, it looks like Ogg is quite a nice format for movies. It's unfortunate that there is no built-in Ogg player for Windows or Mac OS X. Since Firefox has been gaining momentum as an alternative Internet browser to IE and Safari, it would be nice if Mozilla decided to bundle the VLC player/plugin (or some built-in Ogg player functionality) with Firefox so that Firefox could be the catalyst for increasing the use of Ogg as a media format. However, that's unlikely to happen as Mozilla prefers to not "bundle" plugins. Hopefully, Ogg will continue to get greater "mind share" and tool support over time.

Update-2007-09-04: Chris Double and some others pointed me at the work that Chris has been doing to add Ogg Theora support to Firefox (without needing any plugins). This is great! You can read more about what Chris has been doing in his Ogg-related blog posts: http://del.icio.us/bluishcoder/ogg. You can also experiment with what he's been doing by cloning the git repository that he's maintaining. His latest post describes where he's currently at with Ogg for Firefox. In addition, I was told that Wikipedia have chosen Ogg Theora as a video standard. Wikipedia have a nice page describing how to get Ogg players for Unix, Mac, and Windows.

emacs Copyright © 2007 by Bill Clementson