> Guide Index

Removing Interlacing

If you happened to edit your video interlaced (and I really hope you didn't, but alas, this shall remain here for completeness sake), you will definitely want to remove this interlacing now. If you removed interlacing before editing, then you should obviously skip this step. Interlacing looks terrible on progressive displays like computer monitors and it makes good looking compression difficult.

There are many ways to remove interlacing. However, as your video has been edited together, some of these options are less successful than they would be before you started editing. So let's look at some possible techniques.

OK, so we just
IVTC, right?

Usually the best way to remove interlacing in anime is to use Inverse Telecine (IVTC). This matches up the fields in order to restore the progressive frames. These fields are usually in a pattern, so finding and combining them is usually not that difficult. However, your video has been edited. This makes things very tough indeed. Imagine one pattern of telecine being faded into another pattern of telecine... that pattern now becomes very difficult to find. Footage that is sped up will also have completely lost some fields, making it even harder to find the pattern.

IVTC also includes decimation. If you've done lots of tight editing, beat matching, flashes and all sort of other video trickery, it may be ruined by the decimation process as the footage is reduced from 29.97fps to 23.976fps.

So you can see now the basic problem that we have in removing interlacing with edited videos. Add to this the numerous problems that you can find in sources (hybrids, field blending etc etc) and it becomes a real mess.

So, what can you do?

There are basically two solutions to the problem. You can attempt to perform IVTC on the footage, or you can deinterlace it. I strongly recommend that you try both methods and see which one works best for your video.

Before you begin: Get the correct colorspace

It is likely that at this point you have an avi that has been exported losslessly from your editing program - probably in an RGB colorspace. For pretty much all the filters on this page you will need to convert this to YV12 (the exceptions to this rule will say what you need to convert it to instead). To do this conversion make sure your avisynth script looks something like this:

1) Try to IVTC anyway (might work pretty well)

It may be that your video is edited together in such a simplistic way that IVTC will be just as good now as it would have been working on the original source. It's not very likely, but it's possible. If you are going to use this method, a script like this will do:
TFM(slow=2, pp=5, clip2=TDeint(mode=2, type=3))

If you have PAL footage, add the cycle=25 parameter to the TDecimate() part, like this: TDecimate(cycle=25).

2) Full Frame Deinterlace (most likely solution)

Not always the prettiest option but certainly one of the more reliable techniques.

TDeint() - Tdeint is a deinterlacer that uses motion adaptation and all kinds of interesting interpolation tricks. This is a really excellent deinterlacer and worth trying.

At the default settings, this does a pretty nice job at deinterlacing by interpolating the fields, but this can leave jagged lines in the video. I also highly recommend you try this filter with either of the following settings:
TDeint(mode=2, type=3)

This filter has a lot of different options and modes which cause it to deinterlace in different ways. I highly recommend you check out the documentation on it and experiment to see what works best for your particular source.


Once you have a script with deinterlacing, you will want to check out how to crop and resize your video.