Lossless Codec Quick Survey
I use intermediary video files all the time in my editing workflow. An "intermediary" is when you render out a part of a project (or even a whole project) to be rendered later to a different format (or a number of different formats). There are many reasons to do this. For example, if you create a video in another application (like a 3D app or a compositing app) to bring into your project, you'll want to render out of that app to a format that is losslessly perfect. Or you might want to render out to a lossless master and then dump that into a batch compression utility to create distribution formats for DVD-Video, Blu-ray and multiple bit rates for the Internet. Or you might have a sticky painful section of a project that you want to render to speed things up. Or you might be collaborating with other folks using other programs and need to pass off your work to them, again, in a perfectly lossless format. Or you might be wondering: What's the absolute best format for pristine archives? You get the idea: lossless compression is good.
So the problem is: Which lossless codec do you use? Over the past dozen years, I've used different ones, depending on whim and compatibility (for example, choosing QuickTime when collaborating with someone using a Mac). Occasionally, I've even run some render tests to assess speed vs. file size, but I haven't done so recently. Well, until just this morning. And so, without further ado, I present to you the results of my (almost) 2010 Lossless Video Format Render tests for Windows. It should be noted that these aren't rigorous, scientific tests (at least not as rigorous as these guys from 2007), but they are fair and pragmatic and you will definitely be able to use all of these codecs in your editing software of choice and I am confident you will see similar numbers.
I rendered the same raw file from my camcorder (AVCHD 1080i) four times with each codec in a handful of applications. The "Render Time" is an arbitrary, but standardized rating based on renders through a number of different applications (including Adobe, Sony, Sorenson and a few others). On my system, (a three year old 3.0 GHz quad core - go buy one of my publications if you would like to see these tests updated on a modern system) you could consider it a realtime multiplier. If you are running a new 8-core Nehalem system, you'd see faster numbers, but as a relative rating, you'd see similar results. There was nothing special about the footage and it actually had rather a lot of camera motion (yes, I sadistically enjoy abusing codecs, so I picked footage with not only camera motion, but a bunch of trees with leaves blowing around in the background), so it was not trivial to encode for codecs that attempted to compress the size (e.g., Lagarith, PNG).
|Codec||File Format||Speed*||Size per Second (MB)|
|Sony YUV (4:2:2)||AVI||1.9||121.5|
|Sony YUV (10-bit)||AVI||2.9||162.0|
|Animation ("mostly lossless")||QuickTime||6.1||174.7|
On a Windows machine, I think we have two obvious choices in terms of file size + render speed: HuffYUV (faster!) and Lagarith (smaller files!), with the edge going to the venerable HuffYUV (38% faster than Lagarith, while the file size is only +11%). Yes, the Sony YUV codec is blindingly fast and I would certainly consider it, but it's not (by design) entirely lossless, since it operates in a 4:2:2 color space. Now, will anyone be able to tell the difference between the Sony YUV and a truly lossless format? Not without PQR software they won't and even then the codec is likely nearly lossless under many situations. Furthermore, the file size efficiency of the lossless HuffYUV and Lagarith are far better than the Sony "mostly lossless" YUV. Personally, I am not terribly bothered by longer render times if I can be assured I'm getting the best quality I can.
Well, unless that render time is twice what it should be, so, no more QuickTime for me. And no more PNG. Trust me, my rebel nature and love of all things open source and free pre-disposes me to root for Apple and do everything in my power to make the PNG codec look good, but, frankly, as implemented in QuickTime, it's slow as molasses on a January morn in Wisconsin and there's no way to look at these numbers without concluding that it is simply broken.
Finally, I had wanted to test the QuickTime ProRes codec, but couldn't do so: Stupid Apple does not make it available for rendering on Windows. (Alternatively: Smart Apple does not make it available for rendering on Windows and, therefore, you should go out and buy a Mac.) And while it has different implementations, it is often used as a 4:2:2 codec, so maybe it's sour grapes, but it's probably as lossless as Sony's YUV codec anyhow (which is to say "mostly lossless"). One brutal conclusion of my little experiment is that QuickTime is crippled on Windows machines. Once again, I'd love to get my rant on and smack Mr. Jobs upside the head and tell him to get with it and play nice and slam Mr. Gates for this sad state of affairs, but such is life. It's just the way it is and when the economic equations pit compatibility vs. profit, profit wins every time. Thanks, guys, but in my case, I'd spend MORE money on your products if I didn't have to deal with these quirks all the time. Instead, fortunately, there are open sauce folks that create algorithms that are better than your crippled codecs anyhow: thank you Ben Rudiak-Gould (HuffYUV) and Ben Greenwood (Lagarith)! Go download the HuffYUV and Lagarith codecs and toss these gentlemen each $10 as a donation. Honestly, these codecs are each worth $30, in my opinion, and probably worth the $69 that Apple is charging for its ProRes codec. Which doesn't work on Windows anyhow. Yea. Thanks. At least I have an extra $69, I suppose.
- Lossless Video Codecs Comparison 2007
- HuffYUV codec download (free, and you can support Ben here)
- Lagarith codec download (free, but you should also toss "the other Ben" a tenner, too!)
- ffdshow codecs (free!)