Brightness Issues with H.264 QuickTime Movies

Solutions - good and bad - to a long-standing problem.
Chris and Trish Meyer

If you haven't encountered this problem yet, you will: QuickTime movies re-exported from applications such has QuickTime Player Pro using the H.264 codec (a common format for web content) appear brighter than the original in some contexts - such as inside QuickTime Player on the Mac, or on a web page viewed by Safari - but not in other contexts such as QuickTime Player on Windows, or the stripped-down QT Player inside After Effects.

Many attribute this to a bug introduced by use of a hidden, optional "gamma" tag (which is different than a full-blown color profile tag) inside QuickTime movies that is supposed to aid in cross-platform compatibility. Unfortunately, this tag is not exposed for the user to edit, and may be interpreted differently by different programs. It has been the cause of much grief among After Effects users employing color management, and has spread into the realm of web video.

I was recently bitten by this myself when I went to encode a batch of introductory video training movies going onto the DVD for the second edition of our book After Effects Apprentice. Everything worked fine two years ago when we did the first edition, but something has changed since then, and now the same settings produce unsatisfactory results:



The image on the left is a frame from the uncompressed source movie; the image on the right is after encoding to H.264 in QuickTime Player Pro version 7.5.5. Similar results were obtained using Apple Compressor version 3.0.4.


(Interesting side note: The problem is exaggerated by my use of a color calibrator and custom profile for my monitor; this issue seems to be confirmed by others. The default Apple Cinema Display profile makes my monitor look bright, reducing the difference between the source and rendered movies - but the artificial brightening is still there. Engaging my custom profile darkens the uncompressed source file to where it should be, while the H.264 compressed result remains too-bright as before.)

After a lot of research and experimentation, I've found two solutions that work around this problem. I also found several "solutions" that either no longer work, or which cause other problems. Let's start with what works:

Good Solutions



There is a free (under the GNU General Public License) H.264 codec available known as x264. It installs quickly and painlessly into QuickTime, and appears as another codec in its list: Just choose "H.264 (x264)" instead of "H.264." Its main screen looks identical to the normal H.264 codec, so you can use your exact same settings, but it also includes additional options that may be reached by clicking on the Options button inside the QuickTime Standard Compression Settings dialog.



The x264 codec contains an additional Options dialog to further customize its settings.


If you are a Mac user, in the past I have said that the easiest place to download x264 is from MacUpdate. However, I have found that they (and most other sites) have outdated versions of the codec; I found the most recent version on this obscure Japanese site, as well as SoftPedia. The updated 1.1.6 version looks like h.264 at the most basic level, but when you click on Options, you get a lot more flexibility, including presets optimized for different media types. Windows users should try the Free-Codecs.com x264 page.

x264 is not without problems. The 1.1.0 version was slow, and would occasionally fail for me during a compression (especially when exporting multiple movies at once) with an otherwise benign, non-specific error; re-exporting works fine (1.1.6 seems much faster; I don't have enough experience yet to judge its stability). But the good news is, it works - at least for me - looking fine in a variety of applications and platforms. I suspect the main difference is that it merely does not embed the dreaded gamma tag.

Speaking of the dreaded gamma tag, if you already have a bunch of already-encoded, problematic content, you can occasionally find QuickTime gamma tag strippers out there. Fellow PVC writer Mark Christiansen turned me onto one available from FuelVFX, although it requires a bit of hunting: hover your cursor over the red bar, select Software, and then click on the QTGammaStrip folder icon. Make sure you also download the ReadMe.txt file, as it includes (extremely) terse instructions on how to run it inside Terminal. And even then, I've not had much luck with it.

next: "solutions" you'll find on the web which don't work


Prev Next »