April 27, 2003

Codecs and Transports and Players, Oh My!

Over the last few days, I've been playing around with the mencoder video encoder from MPlayer. Mostly, I've been monkeying with options and trying to find the best ways to encode MPEG4 video using the libavcodec codecs.

Last night, I downloaded the final trailer for The Matrix Reloaded, and discovered that my computer (a 1.3GHz Athlon) wasn't fast enough to play the movie. This is probably due to the fact that there are no Linux-native players for QuickTime (at least, none for the Sorenson codecs that Apple uses these days). I can play the files under Linux because some smart programmers use some trickery to load software library files (DLLs and other paraphernelia) ordinarily used for Windows in a way that they can be used in Linux.

Since my computer wasn't fast enough to pull that trick, I re-encoded the file, and then played it. It probably took me about half an hour to get it right, but when I did, the image quality was pretty impressive. The Sorenson codecs appear to sharpen images a little bit, so the image seemed slightly fuzzier when I re-encoded it, but not much. I think if I had the same source material to encode in the first place, the free codec I used would probably compare pretty well with the commercial software used to encode the trailer I downloaded.

The video file has a resolution of 1000x540 (a previous teaser trailer had a resolution of 1024x464, which is actually considerably smaller). The original file had a compressed video bitrate of about 5 megabits/second, and I tried to do a fair comparison, so my encodings were done to the same bitrate. I got a bit frustrated at times, since I was encoding a video that had already been compressed. I could see there were compression artifacts, but it was hard to tell how much was there from the original encoding, and how much was from my second pass.

Anyway, it seemed to me that the codecs are very comparable. It might be good to run a sharpening filter on output from the MPEG4 codec, just to get some edges highlighted, but it's probably hard to do that right. Also, (for me at least), the MPEG4 codec needed much less CPU power.

Posted by mike at April 27, 2003 04:38 PM | Movies , Software | TrackBack
Comments