iMovie’s Dirty Little Secret: Colour Banding

(This one has been driving me nuts for weeks…)

My new MacBook Pro came with iMovie ’09, so I decided to edit some 3-year-old DV tapes of my son that I still hadn’t dealt with. The output quality was really bad – it contained what I can only describe as severe posterization or banding in the shadows, which also had the effect of amplifying the noise in the movie. When I tried the same thing on iMovie ’06 (or “iMovie HD”, to give it its proper name), the result was fine. Here are some stills from that movie:

Original DV footage (click image to enlarge):

iMovie ’06 (Exported with Full Quality option) (click image to enlarge):

iMovie ’09 (Exported with HD option) (click image to enlarge):

Take a look at the shadow below his head. iMovie ’09 has absolutely butchered (I don’t think that’s too strong a term) the footage.

Now if you scour the Apple forums you’ll find many people telling you this is because iMovie ’09 deals poorly with interlaced footage, by dropping every other field from the movie, effectively halving the resolution. However, I eventually realised that the interlacing is not the problem here. Even if I deinterlace the footage first with MPEG Streamclip (which produces a very nice result BTW), iMovie ’09 still butchers the deinterlaced video, producing the same horrid output.

Anyway, for my DV footage I gave up on iMovie ’09 and reverted back to iMovie ’06, and I’m very happy with the results. Ironic that a program from 2006 gives better results than one from 2009, but there you go.

iPhone 4 to the rescue? Erm, no

Recently, though, I got an iPhone 4 which shoots 720p HD. Surely iMovie ’09 should produce perfect results with iPhone footage, right? After all, they’re both Apple products!

Wrong. The posterization is still there in the shadows. It’s usually not so noticeable because the iPhone 4 is higher res, and also much less noisy, than my old DV camera. But it’s definitely there.

Incidentally, although I’m using iMovie ’09, the banding is apparently just as bad in iMovie ’11. (I’ll buy iMovie ’11 at some point – if I can bring myself to – just to confirm this.)

Here’s an example. Here I’ve deliberately used some fairly low quality source footage with subtle, noisy shadows to make the effect clear. However, the effect is noticeable, to a greater or lesser extent, in areas of subtle shadow in most 720p footage.

Original iPhone 4 footage (click image to enlarge):

(Download/view movie – 5.6MB)

iMovie ’06 (Exported via QuickTime, H.264, Best quality) (click image to enlarge):

(Download/view movie – 11MB)

iMovie ’09 (Exported via QuickTime, H.264, Best quality) (click image to enlarge):

(Download/view movie – 9.3MB)

Check out the trackpad and surrounding area. Dear oh dear. As you can see, as well as introducing ugly banding, the posterization effect kind of amplifies the noise, making it much more noticeable and annoying:

(By the way, I got a friend to run these tests using Final Cut Pro. The resulting quality was pretty much identical to iMovie ’06 – i.e. acceptable.)

Many people on the Apple forums have reported this problem when using still photos within iMovie (see here and here), but the truth is it happens on any image (still or video) that contains dark, subtle gradients. Unfortunately, many photos contain dark, subtle gradients – and, since they aren’t moving around, you notice the problem more.

For more examples see Clay Alchemist’s post, Why iMovie is a FAILURE, as well as this review of iMovie ’11 by HDSLR Review.

What’s interesting is that you don’t get the banding when exporting any iMovie-rendered content such as maps and globes. So it appears to be a problem with the way iMovie transcodes from the source video to the output, rather than a simple output encoding issue.

A bit of perspective

Now many would say I’m being picky here, and they’d probably be right. Colour banding is an inevitable result of transcoding highly compressed footage. Even Final Cut ends up with a bit of banding in many of these scenarios.

iMovie ’09/’11′s banding problems won’t bother many people. They only happen on certain types of footage (subtle and/or noisy shadows), and they look a lot worse on a high-res Mac display than they do on a TV (which is where many people will be watching home movies). In fact you can hardly see the banding on a TV a lot of the time.

Another thing I realised is that if you calibrate your Mac display properly then the banding is less noticeable. My MacBook Pro display was overly bright and washed out; once I calibrated it properly then much of the posterization and banding were “lost” in the shadows. (In fact, if you’re reading this blog post with a properly calibrated display then you may well be wondering what all the fuss is about! Try turning up your brightness…!)

But it’s still bad…

That said, the banding is definitely there in the output, and it’s definitely worse than either iMovie ’06′s or Final Cut’s output. And I want the best possible quality output I can get for my home movies. These movies of my kids are irreplaceable, and what’s more, I might need to transcode them to another format in 20 years’ time. I don’t want to start out with an inferior quality movie.

I’ve tried messing around with virtually every export option, including QuickTime H.264, AIC and None. They all produce the horrid banding. It definitely seems to be a problem with the way iMovie processes the source video, rather than an export issue.

A workaround (YMMV)

The only thing I’ve found that helps is to increase the brightness of the source footage, taking the shadows above the threshold that causes colour banding. You have to do this before you import the footage into iMovie (increasing the brightness using iMovie merely brightens the banding, since iMovie has already butchered the shadows by that point).

The easiest way I’ve found to do this is to use MPEG Streamclip:

  1. Open the original footage in MPEG Streamclip
  2. Choose File > Export to QuickTime
  3. Select H.264 compression (you can also use Apple Intermediate Codec, but H.264 seems less blocky)
  4. Set the Quality at 100% and the Limit Data Rate to 10000 Kbps
  5. Leave Frame Size at unscaled
  6. Now click Adjustments, and drag the Brightness up to, say, +20
  7. Click OK, then Make Movie
  8. Import the resulting movie into iMovie, and you should get better results.

You may have to play with the Brightness and maybe Contrast in MPEG Streamclip to get something decent – don’t up the brightness too much or you’ll see artifacting in the blacks in the movie.

For example, here’s the MacBook Pro movie from earlier, with the brightness increased by 15 in MPEG Streamclip before importing into iMovie ’09 and exporting (click image to enlarge):

(Download/view movie – 2.4MB)

You can usually do the same trick with still photos before bringing them into iMovie: Open them in Photoshop, use Image > Adjustments / Shadow/Highlight to brighten the shadows, then drag into iMovie. Another trick is to select the shadows using Select > Color Range, then add some noise (Filter > Noise > Add Noise > 5%, Gaussian, Monochromatic). This particularly helps with smoothing out the banding in large subtle gradients.

At the end of the day, though, these are all just band-aids for the fundamental problem – iMovie ’09/’11 is brutal with the tonal range in shadows.

The way forward

The only permanent solutions to this banding problem seem to be:

  • Abandon iMovie ’09/’11 and switch to Final Cut Express (or another NLE) that doesn’t exhibit this banding
  • Stick with iMovie ’06, or
  • Moan at Apple until they fix it

I’d love to stick with iMovie ’09/’11 since they have so many great features (particularly stabilization and – in ’11 – the rolling shutter fix), and they’re really quick and nice to use. But if the quality’s not there then what’s the point?

Does anyone have any other feedback, suggestions, insights, or workarounds for this problem? Please let me know in the comments. If you can fix the problem then I’ll be eternally grateful, and I’ll also buy you a couple of beers (or PayPal you the monetary equivalent!). :)

Bookmark this post:

27 Responses to “iMovie’s Dirty Little Secret: Colour Banding”

  1. Lachlan Says:

    To me it looks like a compression artefact is causing the macro-blocking in your picture. Does iMovie 09 use a different CODEC in regards to capturing the footage than iMovie 06? I don’t think your output settings will resolve the issue as it looks like it’s happening on import … Perhaps the underlying problem is Quicktime X.

    Best Wishes.

  2. JS Says:

    I edited an entire wedding with iMovie only to get this posterization/shadow breaking. Good to know FCP-E will fix this… I may have to do that.

    -JS

  3. George Guerrette Says:

    Interesting about iMovie 09. Have you been able to determine if this occurs at the capturing phase AND the export phase of 09? Or, just one of those two phases?

    If it is just the import phase I guess one could import video using iMovie HD, then import the iMovie HD project into iMovie 09? This would depend on iMovie 09 copying the footage from the HD project file into the 09 folders and not transcoding or something.

    If this crap is induced during 09′s export phase… then Houston? We have a problem.

  4. Matt Says:

    Thanks for all the comments so far!

    @Lachlan: I suspect it’s more an issue with iMovie ’09/’11′s colour handling than a codec issue, although I could be wrong. The rest of the tonal range in the movie looks great, with no noticeable increase in macroblocking compared to iM06.

    The DV footage (my first example with the baby) was actually ingested using iM06 (3 years ago). The iPhone 4 .MOV file was just copied across bit-for-bit into iMovie 09′s Events folder using its “import” command.

    I think you’re right that the problem occurs on import – or, more precisely, when iMovie decompresses and processes the video, since it doesn’t really “import” the iPhone footage. The banding can also be seen inside iMovie’s preview window (in fact it’s even worse there).

    I too suspect QuickTime X, as I’ve heard dodgy things about its colour handling and gamma shifts. That said, iM06 processes & renders the video no problem on the same Mac, and they’re presumably both using the same version of QuickTime?

  5. Matt Says:

    @JS: I feel your pain! I spent hours editing my video only to then find the banding problem on export. Infuriating…

  6. Matt Says:

    @George: As I mentioned above, it seems to be neither the capture nor the export phase, but some internal issue with the way iMovie processes colour as it decodes / transcodes the footage. It’s very noticeable in the iMovie preview window before you even export. And iMovie isn’t really “capturing” the iPhone 4 footage, since it just copies the H.264 .MOV files bit-for-bit into its Events folder (unless of course you’re foolish enough to check the misnamed “Optimize video” checkbox on import, in which case it transcodes to AIC and messes it up even more!).

  7. Lachlan Says:

    re.”I too suspect QuickTime X, as I’ve heard dodgy things about its colour handling and gamma shifts. That said, iM06 processes & renders the video no problem on the same Mac, and they’re presumably both using the same version of QuickTime?”

    I’m not sure whether they do use the same version of Quicktime – or at least the same codecs – do you have Quicktime 7 on your system? It’s possible that the earlier version of iMovie uses a different codec than the later version. I haven’t used iMovie much at all so I’m not sure if it’s just copying the footage or transcoding it to a different format when you import it.

    Can you check the media in your different iMovie projects and determine what codec has been used on each file?

  8. Ian Goss Says:

    What you are showing is posterisation, where varying colours/densities have gaps, especially visible in shadow areas. Banding is more of a variation in evenly coloured areas and is not usually electronic in origin, but often caused by mechanical effects, as in a flatbed scanner.

    The posterisation is possibly caused by using an inappropriate codec—I don’t use iMovie but you mmight have the ability to choose output settings. You do in the QT Player at least. Learn about bit depth, wonderful subject!

  9. george Says:

    8-bit video (consumer) vs 10-bit (pro). 8 it has only 256 steps per channel resulting in banding on gradients and shots with contrast correction. Prior to 10-bit, pros added slight noise to cover banding.

    Note, Pro systems use lots of footage sourced in 8-bit, but as long as the color correction or effects are processed internally in 10-bit, the result will still be fine.

    Consumer gear will migrate to 10-bit as processor speed increased.

    LA Colorist

  10. Matt Says:

    @Lachlan, @Ian, @gorge: Thanks for the extra comments!

    @Lachlan: I do happen to have QT Player 7 (I installed it recently to make http://homepage.mac.com/sith33/FileSharing34.html work). However the results on my Mac were the same before I installed it (iM06 good, iM09 bad).

    “I haven’t used iMovie much at all so I’m not sure if it’s just copying the footage or transcoding it to a different format when you import it.”

    It just copies it – I diffed the .MOV files, they’re identical.

    “Can you check the media in your different iMovie projects and determine what codec has been used on each file?”

    Sure. Looking in my “iMovie Events folder, the DV footage (the baby) is:

    Format: DV, 720 x 756 (768 x 576), Millions
    DV, Stereo, 48.000 Hz.
    FPS: 25
    Data Rate: 57.60 Mbit/s

    The iPhone 4 H.264 footage (the MacBook Pro) is:

    Format: H.264, 1280 x 720, Millions
    AAC, Mono, 44.100 kHz
    FPS: 29.97
    Data Rate: 10.80 Mbit/s

    This is as reported by QuickTime Player 10.0.

  11. Matt Says:

    @Ian: “What you are showing is posterisation, where varying colours/densities have gaps, especially visible in shadow areas. Banding is more of a variation in evenly coloured areas and is not usually electronic in origin, but often caused by mechanical effects, as in a flatbed scanner.” – Interesting, thanks. I used “banding” as it was quite a commonly-used term for this problem – eg see http://www.hdslrreview.com/HDSLRreview/Software.html

    Yes it does happen only in shadows – or at least it’s only noticeable in shadows. (By shadows I mean the bottom 10-20% or so of the tonal curve.)

    “The posterisation is possibly caused by using an inappropriate codec” – I take it you mean on export? I’ve tried every vaguely sensible codec offered to me by QuickTime, at the highest bitrates, including AIC, H.264, MPEG-4 Video, Photo – JPEG, PNG, and even None. They all have exactly the same posterization.

    The posterization is also really obvious inside iM09′s preview window.

    So I’m not sure it’s a problem with the export codec. If you have any suggestions for other codecs to try I’ll happily give them a go!

  12. Matt Says:

    @george: Interesting stuff about bit depth. However it still doesn’t explain why the results look great in iM06 and terrible in iM09, with the same footage and output codec. I assume both iM06 and iM09 use 8-bit internally?

    I may be wrong, but I’m still convinced this is a problem with iM09/11′s colour processing code. Either it’s an actual bug, or it was a sacrifice the Apple engineers made in order to squeeze in all the features and performance they wanted in iM09/11.

    (BTW I presume iM08 also suffers from this problem, although I don’t have it to check.)

  13. Lachlan Says:

    I’m leaning towards an output codec issue. Perhaps iMovie 09 has changed the way the footage is handled through Quicktime X even though it supposedly uses the same codec as iMovie 06 with Quicktime 7.

    When I was working at a DVD encoding house, the problem was generally caused by the compression/bit-rate settings on export – that said, I have seen footage where the codec used to capture the footage on a SD card based camera has caused the loss of information in shadow areas.

    In the DVD scenario, since many encoders drop a lot of information in the shadows leading to blocking, we would up the bit rate manually across the troublesome timecode – I wouldn’t imagine you’d have the capability to do that in iMovie/iDVD, but DVD Studio Pro lets you set minimum bit-rates for encoding which might be worth a shot. Then again you have to get the footage out of iMovie to do anything with it so perhaps the suggestion is moot. I’d file a bug report with Apple and maybe supply your screen grabs too. Not sure what this means for the future if Quicktime X is the future … :o (

    re. iMovie 8 – I’ve compressed iMovie 08 for you to try if you like – it’s at the following link:

    http://www.sendspace.com/file/0872xl

    Best Wishes.

  14. Matt Says:

    @Lachlan: Thanks! Yeah I’d say output codec if it wasn’t for the facts that (a) you can see the banding in the iMovie ’09 preview window and (b) I’ve tried every output codec under the sun at very high bitrates (including the QT “None” codec) and they all have the banding.

    I think filing a bug report is the way forward for now…

    Cheers,
    Matt

  15. Tom Says:

    This problem has also annoyed me and I think I may have an insight on the problem. I took a video clip with my Canon 7D, and exported it using Quicktime X’s Share iTunes/Computer selection. The file didn’t exhibit the gross posterization one gets from using the similar setting in iMovie (iTunes HD 720p). You can verify these are identical compression settings because the metadata from Get Info shows they are the same file size, and same bit rate. One assumes that both iMovie and Quicktime X use the same CoreVideo compression codec.

    Next, I noticed that playing the clip back full screen in iMovie does -not- exhibit the posterization. It is only present in the preview window. This is probably because the preview window uses a lowbit rate version for a better scrubbing speed, etc. So the file is not being imported improperly.

    If you finalize the project, and play full screen, you will now get the posterization. If you do not finalize the file, and export (any option) you will get gross posterization.

    My theory is that iMovie is actually finalizing and exporting the movie from the preview file, rather than applying the effects and transitions to the proper imported file. So I would venture to say it’s not a codec problem at all, but a rather serious bug.

    I would love to see if anyone can reproduce this.

  16. Matt Says:

    @Tom: That’s interesting! However I still get the posterization when playing back in fullscreen mode within iMovie.

    What do you mean by “finalize the file”?

    Matt

  17. Tom Says:

    I’m talking about the “Finalize Project” choice under the File menu.

    I just tried it again with a fresh movie.

    Viewing the test file with Quicktime looks identical to iMovie using the “full screen” button in the Project Library Window.

    However, applying any video effect, including selecting a “Theme”, posterizes the movie.

  18. Amy Says:

    I’m replying because I was on the search for answers to my iMovie problems and came across your article and discussion.

    Following up on Tom’s experience… I recently was working on a project in FCE but was using iMovie for some final color tweaks. ANY application of color correction caused the gross posterization after export. If I exported straight out without making any adjustments, it seemed to be fine (or at least much much better).

    This is really disappointing to me because iMovie (11) is so easy to use it’s great for quick fun projects… but not if I can’t color correct anything without introducing ugly posterization in the darks.

    I will say I was not aware of the “finalize project” choice in the file menu… are you suggesting this fixes the problem (or reduces it)?

  19. Matt Says:

    @Tom: I don’t see a Finalize Project option in my iMovie ’09. Is this an iMovie ’11 thing?

    @Amy: That’s interesting. I get the gross posterization even if I simply import a movie into iM09 and export it (no colour correction).

    BTW I’ve filed a bug report on this with Apple – will post back here If I hear anything from them…

  20. Tom Says:

    The “Finalize Project” is in iMovie 11, and no it doesn’t fix anything.

  21. Matt N Says:

    I’ve just come up against this problem also. Suddenly my AVCHD footage from my new camera doesn’t look so great when i export it from iMovie 11. The colour gradient is awful and the shadows are all blocky and lose all their detail.

    When i play the .mov files from the even folder in finder (which are in the Apple intermediate codec) they look mostly fine however when i use them in iMovie they sometimes look okay and sometimes not. Then exporting makes it looks horrible no matter what the setting (i’ve tried many). Surely this is something Apple needs to fix and pronto!

  22. Sean Says:

    I am experiencing same issue and came across your article. Would like to know if they ever fix the issue for iMovie ’09 (which I doubt). Is there any movie editor on Mac that offers basic editing but exports good quality video?

  23. Matt Says:

    @Sean: I doubt they’ll fix it – they’d probably say it isn’t a “bug” as such.

    I’ve pretty much given up on iMovie and am switching to Final Cut Pro X, which doesn’t appear to have these posterization issues.

    You could try QuickTime Player 7 which lets you do basic editing:

    http://support.apple.com/downloads/#quicktime

    Or there’s QT Pro: http://www.apple.com/quicktime/extending/

  24. Kevin Says:

    Not to start a whole other argument, but windows live movie maker handles this kind of thing without problem. But wait, windows sucks for media things, right? ;)

    http://explore.live.com/windows-live-essentials-movie-maker-get-started

  25. JEH Says:

    Apple have obviously cocked up something because if you try the iPhone version of iMovie it works a treat and the same clips will produce results with no obvious posterisation at all!

  26. Matt Says:

    @ JEH: Interesting…!

  27. todd Says:

    Good article. Frustrating as I notice the same thing. Have beautiful crisp bright HD colors, but once I export the movie it looks all washed out and drab.

    I’m using iMovie ’11 (version 9.0.4)

Leave a Reply