De-interlacing for fun and profit (or: how to create a film-look with video)

Oops.

After I finished writing my last post on interlacing, I realised that I missed out one important aspect of the whole de-interlacing discussion, and more specifically, another very good reason why you would want to use de-interlacing: creating a film-look for your video.

When you watch most soap opera or current affairs programmes on TV, you’ll notice that they have a much sharper and crisper look than the picture of a drama or film you watch on the same TV. It has a distinctly “video” look to it, which creates a very immediate and “real” image.

Part of that is down to the way images are captured on most video cameras, and the way in which the signal is processed. There are video formats which create a softer, richer image, such as digi-beta. But for those of us who work with cheaper, less-cumbersome formats (such as DV, HDV, XDCAM etc) there remains the issue of how to change that “video” look to one which looks more like film.

Well, there are three basic things I do which create that magical film-look.

The first is to desaturate the image a little - using a more less vivid colour palette instantly gives your image more subtlety. The hyper-reality of video is dampened.

The second thing to do, is to recoup some of the richness you lost when desaturating, but increasing the contrast of the image. This will tend to “bleach” the image, and you’ll lose some detail, but the detail which remains will be sharper and add more depth.

And then the third, and final thing: de-interlacing. There’s a very good reason for this, and even if you don’t want to apply desaturation and increased contrast, if you don’t apply a de-interlace, you just aren’t going to get anywhere near a film-look. Here’s the reason why:

Film consists of 24 unique frames per second. Even if those frames are being displayed several times in a row (for instance, due to a faster shutter speed when projecting at say 50fps) the fact remains that there are only ever 24 unique images being shown every second.

TV has a similar “shutter speed”, showing 50 frames per second. But those frames are split into two sets of fields (see my previous post for a fuller explanation of this), and a video signal records one field every 1/50th of a second. So, rather than there being 25 full frames being displayed every 1/25th of a second, there are 50 half-resolution frames being displayed every 1/50th of a second. When your eye sees this and feed the signal to your brain, everything gets merged to fill in the gaps between the missing fields, and that’s what creates that super-crisp, video look.

So to get rid of that video look, and to simulate more closely the mechanism of film, you de-interlace the video image, combining each set of fields, which creates 25 full frames, instead of the 50 “half” frames. Even if the video ends up being interlaced again (for DVD for example), then it will still retain the filmic look, because the interlacing will still only be showing one full frame every 1/25th of a second.

The Great Swim

Last weekend, my Mum took part in the first Great North Swim in Windermere. It was the first mass participation swim event of its kind in Great Britain, and it was the first time she’d trained for any kind of swimming event.

A group of us went along to support her, and we filmed a few bits throughout the day - nothing serious, but then I edited the footage together to make this little diary of our outing.

This gave me a chance to try out the 25p mode properly on our Sony Z7 for the first time. When it came to editing, I didn’t really notice much of a difference to just de-interlacing the final render, and since I was applying a Nattress filter to the finished edit, it actually meant i had to tweak a few more settings to make sure I wasn’t re-de-interlacing! I think what I need to do is do a test of two different workflows, side-by-side: one using 24p mode, the other with 50i and a de-interlace applied.

This wasn’t a very serious shoot, so it’s not brilliant footage, and with it being a changeable overcast day, the lighting don’t help much. One thing I am learning more and more about the Z7 though is that it is so easy to over-expose - the LCD screen can be very misleading and you almost have to force yourself to drop an f-stop just to make sure you’re not washing out.

I also played around with a vignette for the first time, just to add a little more of a home movie feel.

Interlacing

Having done a fair amount of video editing which involves working with, or converting to different resolutions, I’ve stumbled across a lot of problems in the past which are caused by interlacing.

In a recent post, I wrote about my workflow for down-converting from HDV to SD, which included a step for de-interlacing footage to avoid artefacts appearing when publishing to DVD. Although that post explained the “whats” to get around problems, it didn’t really go into the “whys”. And since interlacing seems to be an area which causes a lot of people to stumble when it comes to editing and rendering video (particularly in this world of multi-formats) I thought it worthwhile to look at the subject in a little more detail.

People tend to sit either side of the fence when it comes to their views on interlacing: some view it as a bucket of putrid evil which should be banished into the bowels of purgatory; others view it as a clever tool which is misunderstood. My view? I consider it an outdated idea, which we’re sadly stuck with for the time-being, and life is a lot easier if you learn to live with it, rather than fight against it.

So what is interlacing? And why does it exist? Let me try to explain in simple terms.

(Please note: the numbers I’m using here are probably not accurate, and are muddled by the fact that PAL and NTSC frame rates vary. I’m using PAL as my benchmark, and if I had more time to research I’d hunt out more accurate numbers.)

Moving pictures are made up of a series of static pictures, displayed in quick succession, creating the illusion of a moving image. People generally cite 24 frames per second as the “magic” number, at which our eyes and our brains are tricked into believing that what we see on the screen is “real” - i.e. the point at which we no longer think “this is a series of pictures”. Traditional film runs at this magical rate of 24 frames, and that number (or thereabouts) has remained as a benchmark ever since.

But there’s a problem with viewing film at 24 frames per second (fps): you get a noticeable flicker between each frame. So, to mask that, cinemas run film with a faster shutter speed, creating the illusion of about 50 frames per second - because the shutter effectively creates a faster flicker which makes it less noticeable. But now it’s starting to get confusing, so I won’t go into that too much - all you need to know is that moving images work best at 24fps, but to avoid any kind of flickering, you ideally need to be viewing at around 50fps.

Then, along came television. The boffins who were behind the technology noted that TV pictures would suffer from the same flicker as film, so they needed to crank up their technology to run at 50fps. But there was a problem: there wasn’t enough bandwidth to send 50 frames of pictures every second - 25 was about all they could squeeze into the analogue signal.

So here was the problem: there needed to be 25 frames of images displayed every second, but to avoid flicker, those 25 images somehow needed to be sent down the signal 50 times a second, but using half the bandwidth. And that’s where the idea of interlacing came from.

Video images are split into individual lines - around 576 lines for standard PAL video. You need to see all 576 of those lines every 1/25th of a second for the moving image to display correctly. It doesn’t particularly matter when those lines reach your eye within that 1/25th of a second - your brain won’t work that fast - as long as they are not all arriving at once.

So interlacing is essentially this: send half the lines during one 1/50th of a second, and the remaining liens during the next 1/50th of a second. Result: the picture is being viewed as 25fps (the optimal viewing rate), being sent through a signal at 50fps (eliminating flicker), using half the bandwidth.

These “sets” of lines are commonly referred to as “fields”, and you’ll find them called “Upper/Lower” fields or “Odd/Even” fields.

So what implications does this have on our modern-day digital world of HD and internet video? Well, we still use PAL and NTSC video standards, and they are standards which use interlacing. Modern HD video even uses it to get around the same initial problem as those early TV pioneers: to squeeze more data into a smaller bandwidth. So, for the foreseeable future at least, we’re kind of stuck with it. Which is why I advocate learning to live with it, to save a world of pain for yourself.

And where does that pain come from? Why is interlacing such a swine to handle when it comes to editing? The most common problem people experience are interlace artefacts - you’ll edit some beautiful footage, which seems fine when you edit, and when you view it on a TV, the picture will strobe and display all sorts of weird lines. That kind of thing can really cause serious headaches and frustration beyond the limits of humankind - I’ve learned the hard way, through trial and error, with late nights trying to prepare masters, sat in front of a rendering process praying to whatever silicone god might be listening.

Most problems though, are down to one very simple thing: field order. Remember those fields: odd/even, upper/lower? Well, get those mixed up at any stage, and that’s when artefacts appear. Field order dictates which field is displayed first: line 1 or line 2 (odd or even) If you’ve edited video which has it’s field order set to “odd”, and then you render out to a video file which has it’s field order set to “even”, that’s when everything goes wrong.

If there was one simple bit of advice I’d give to people to deal with interlacing problems it’s this: Keep track of field order. Simple as that. Here are things to watch out for:

* Make sure you’re editing timeline has the same field order as the footage your editing.
* Make sure you’re final rendered file uses the same field order as your editing timeline.
* If you’re converting files for building a DVD, be especially careful that your field order is the same (DVD Studio Pro is a flagrant culprit when it comes to setting default field order differently to the rest of Final Cut Studio)
* If you’ve got mixed formats in your editing timeline, be really, really careful to make sure that field orders are consistent, and where appropriate de-interlacing is applied, and applied correctly (that’s a whole other topic though).

Another area where field order is important is when you’re converting from one resolution to another. I edit, as standard, using HDV footage, but regularly have to down-convert to standard defintion (PAL) for DVD authoring. Interlaced HDV and DV footage - although they use exactly the same interlacing technique - have a different number of lines, and generally tend to have different field orders. To make life easier, it is always safest to make sure your HD resolution footage gets de-interlaced before it’s converted.

I’ve mentioned de-inerlacing a few times, but what does de-interlacing actually do, and when should you use it?

De-interlacing is very simply taking the two fields of lines (two separate frames) and combining them into one single frame. There are different techniques and algorithms which can be used for achieving that, and the best is generally interpolation, where an average of the two fields is calculated to give you the best estimate of how the single frame should look. If you’re down-converting to a lower resolution though, you can usually get away with just using field duplication - this technique just trashes one of the sets of fields, and doubles up the other, which you don’t notice once you’ve scaled down. Interpolation is best for retaining detail, duplication is quicker.

It’s also worth noting that if you’re producing video for distribution on the internet, it’s a good idea to de-interlace. Computer video (and most modern LCD and Plasma screens) display a “progressive” image. Whereas traditional television display a picture by “scanning” each set of lines every 1/25th of a second, a progressive display only changes those parts of the image which need to change. Because of this progression, there are absolutely no benefits to interlacing.

I hope that demystifies some of the black magic of interlacing, and helps to soften the pain should you run into problems with it. I welcome any other tips or advice which I might have missed.