This started as a quick post about how to gain finer control over the compression settings in the QuickTime dialog. But before we can get there, we first need to talk talk about how 3:2 pulldown works. (Trust me; it all ties together; it was also a good little mystery.)
I recently gave a training session at a local studio, and at the end they were invited to trot out their Barney Stumpers (questions about why something went wrong, how something works, etc.). For one stumper, a user had some footage with 3:2 pulldown, and after pulldown was removed, he noticed that an after-image of the previous frame appeared in the next frame after an edit. Why?
Pulldown and Split Frames
3:2 pulldown is the process of spreading 4 frames of film across 5 frames of video to help resolve the frame rate differences between the two. The most common form spreads 4 whole film frames across 10 video fields, following a 3/2 alternating pattern: the first film frame is spread across 2 video fields, the next film frame is spread across 3 video fields, and so on. Here is a diagram of how the process works:
Sometimes, the resulting video frame is “whole” – both of its fields came from the same original film frame. Sometimes, the resulting video frame is “split” – one field came from film frame, and the other field came from the next film frame. But as long as you know the pattern, you can reverse the process and get back to the original whole film frames.
A potential problem arises if you take footage with 3:2 pulldown and compress it using a codec that is unaware of the interlaced nature of video – one that instead compresses each whole video frame as if it was a single image from the same point in time. Compress it too hard, and compression artifacts can smear bits of one field into pixels of the adjacent field. This is a problem if you’re compressing a “split” frame as described above, as it contains two different images. When you later remove the 3:2 pulldown sequence, suddenly you find bits of one film frame appearing in an adjacent film frame. This is particularly obvious is the scene changed between those frames – and that’s what the user was seeing:
The two frames above show scenes before and after an edit. After applying 3:2 pulldown, compressing the heck out of it, and removing pulldown, there is a chance (depending on where the cut lands) that the result will be a frame that looks like the one at left, which includes a ghost of one frame superimposed over the prior frame.
In this case, the user had chosen the PhotoJPEG codec, which was designed for whole images – not interlaced footage. Despite this shortcoming, it’s a codec we personally like, and some video card manufacturers such as Blackmagic also use it. But if you reduce it’s quality setting too much, you’ll get the smearing described above.
When the user asked me how to cure this problem, one solution I suggested was setting the quality higher. And here’s the punch line: He didn’t know you could change the quality settings of codecs such as this. Which brings us to the real point of this post – which is continued on the next page (so much for this being a quick post).
Finer Compression Settings
Chances are, the NLE or compositing program you’re using has a place where you can choose the QuickTime codec you ultimately want to compress to. Not too far from that selector, there should also be an innocuous Format Options button or section. Here it is in the After Effects Output Module (yes, it’s a little hidden, below and off to the side in relation to where you pick QuickTime as your render format):
Click on Format Options, and you will then get the standard QuickTime Compression Settings dialog:
The “Quality” slider seems to have rather coarse markings. As you drag it, you will get a numeric readout, but the cursor will try to snap to the big named divisions (like Best), making it difficult to reach certain numbers. The trick is to hold down the Control key on Mac while dragging the Quality slider: This will give you much finer control.
(After Effects Tip: Hold down Command on Mac/Control on Windows to scrub parameters by finer increments; hold down Shift to scrub by larger increments.)
If you didn’t know this setting was here, you may be stuck with whatever was the last setting the previous user chose – which might be really low. (By they way, we prefer 85-99 for PhotoJPEG; 75 and below results in pretty hard compression for our uses, although it can be useful for client proofs on the web.)
Some codecs – such as Animation, or H.264 – allow you to enable “key frames.” This is different than your normal animation keyframes. When Key Frames are enabled, the codec will periodically save a whole “reference” frame, and then inbetween will store only the differences between one frame and the next. The amount of compression used on a single frame is referred to as “Spatial” compression; the amount of compression used between different frames is referred to as “Temporal” compression.
How do you access the temporal compression in QuickTime? Press the Option key (Alt on Windows), and the word “Quality” toggles to the word “Temporal” – with a potentially different value! Again, if you didn’t know it was there to check for, you may be at the mercy of whatever the last user set it to.
It turns out that my user with the Barney Stumper didn’t know about the existence of any of these settings (indeed, few know about that hidden Temporal value). So I thought I’d share it with you, just in case you didn’t either.
The Origin of the Barney Stumper
In case you were curious about where the term “Barney Stumper” came from:
In the earliest days of desktop video, we were asked to develop some potential transitions for a TV show, using an early version of After Effects. Barney was the head technical guy at the show, and came from the hardware rather than desktop world. So whenever we showed off a trick, he had to step in and say “well, we can already do that one” – and explain what contortions they had to go through with their hardware system to pull it off.
We finally showed one transition that consisted of 6 cards, each with a different video image on them, that flipped over and revealed 6 different videos on the back. Add in the background, and we’re talking 13 different pieces of video – which in the old days, would have required 13 video decks all playing at the same time.
When Barney didn’t say anything after we showed off this transition, the other folks from the show asked him how he would do that. His reply, after a pause: “I have no idea.” We had finally stumped Barney with an image he couldn’t reverse-engineer. And thus, the term “Barney Stumper” was born.
The content contained in our books, videos, blogs, and articles for other sites are all copyright Crish Design, except where otherwise attributed.