Thursday, 8 October 2009

Converting Quicktime Videos

I am a movie fan and I like watching trailers. I feel it's a shame that too few of them are freely available in good quality, and even more of a shame that theatres show too few of them before the main film. I always wondered why they show a few trailers and a lot of commercials and then they make a pause. They could easily show a few more trailers or at least play a part of the score. Ah, that was great when a movie opened with a musical overture before even the projectors started up! Star Trek: The Motion Picture comes to mind... Well, one of the best scores ever made. Shame too that it didn't win the Academy Award. But no, the Oscar went to A Little Romance. Does anyone remember that film, or the score?

But still, you can find a decent number of trailers on the web. Two addresses are Apple Movie Trailers and Yahoo! Movies. Alas, those trailers are in the Quicktime format and hardly any freeware video software can work with those.

So I looked hard to find a way to convert quicktime videos (i.e., the well-known MOV extension) to AVI videos. Pretty much any software, from open-source to high-end video suites, can open and write those. Since at least the now standard OpenDML version no limits in size are inherent to this container format. And it can contain pretty much any video codec (even MPEG-2 I read somewhere), so it is quite multiversed.

But which codec should one use? It basically will come down to what you gonna use the video for. I want to create a DVD. Of course, I could try use the Quicktime movie as direct source for encoding to MPEG-2, but I found out that most import filter have some problem with Quicktime. Either they don't get the ratio right or will insist that the frame rate is different (or both). By converting it to an AVI file, which I can edit much more comfortably, I circumvent this problem. And since I want to re-encode the AVI later, I want a lossless codec, and right now the best open source codec is Ben Greenwood's Lagarith Lossless Video Codec.

Still, we need to convert the Quicktime. The first choice seems to be Bink Video's RAD Video Tools. And why not? It's fast and you can encode the video using your favourite codecs. But there's a hitch! It relies on Windows to create AVI files and so can not create files larger than 2 GB. Normally that wouldn't be a problem as well all know that an entire movie can be made to fit a CD-ROM which has little more than a third of that space for storage. But if you want to use lossless video, then even a minute can reach that limit, especially when dealing with high-definition video content.

But there's another way to work with Quicktime videos. And you'll just need open source software. The solution lies in AviSynth, an open source video editor. Unfortunately AviSynth does not operate with a fancy graphical interface but is instead script-based. But for our needs a very simple script is sufficient. Open a simple text editor (like Window's own Notepad) and type in the following code:
QTInput("", color = 2, quality = 100, audio = true)
Best is to include the full path for your Quicktime movie (like "C:\Trailers\"). You'll need the QTInput filter for this to work. Extract the filter to the plugin folder in the AviSynth installation directory. Save the text file with an .avs extension. Now you can open it was any video editor that supports AviSynth scripts. My obvious choice is VirtualDub. Now you can do anything that your editor will allow you to do, including encoding it with the codec of your choice.

No comments:

Post a Comment