Brightness Issues with H.264 QuickTime Movies

Solutions – good and bad – to a long-standing problem.

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

Bad Solutions

You can find anything on the internet. What you don’t know is if it is true, or stopped working recently. Such is the case with cures to the H.264 brightness/gamma problem.

The most common solution you will find are the following instructions:

  • In QuickTime Player Pro, after rendering or exporting using the H.264 codec, select Show Movie Properties.
  • Select the video track, then click on the Visual Settings tab.
  • Click on the Visual Settings tab.
  • Near the bottom left, click on the Transparency popup menu. If you are on Mac, select Composition. If you are on Windows, select Blend, set the Transparency Level slider to 100%, and then select Straight Alpha. Then re-save the file.

This fix works in some – but not all – situations. For example, some applications such as VLC Player will still display the movie was washed out. It also disables the settings that allow Fast Playback (playing a movie before it is completely downloaded), and also affects playback performance, especially if the video was played back in Full Screen mode.

Another common solution I’ve seen recommended is to artificially darken your content before exporting to H.264. You can either apply a Levels effect to the final composite and use its Gamma setting to darken the image when you render, or add a QuickTime Filter (namely, Brightness & Contrast) when exporting from QuickTime Pro.

Two wrongs do not make a right: Don’t artificially darken your content just because the wrong codec under the wrong circumstances is playing it back artificially bright.

The problem with this is that there are situations – such as inside After Effects, QuickTime Player on Windows, inside the Firefox or Explorer browsers, etc. – where the movie will not be artificially brightened. If you artificially darkened it ahead of time, your movies will play back too dark in these situations. Plus, we do hope that someday Apple will indeed fix this bug, and playback will be more consistent under more circumstances – and you don’t want that fix to break all of your overcompensated content!

It is sad that this known bug has been around for so long (along with many other known bugs in QuickTime (Mark Christiansen has complained about it up here as well). But at least you now know a bunch of workarounds (including which ones to avoid)…

The content contained in our books, videos, blogs, and articles for other sites are all copyright Crish Design, except where otherwise attributed.

Support ProVideo Coalition
Shop with Filmtools Logo

Share Our Article

Chris & Trish Meyer founded Crish Design (formerly known as CyberMotion) in the very earliest days of the desktop motion graphics industry. Their design and animation work has appeared on shows and promos for CBS,…