AMV Post Production - Removing Interlacing
OK, so you decided to edit interlaced footage. That's fine, nothing wrong with that. However, you probably don't want to make an Internet distro version which contains all that interlacing, right? I agree :) Also, you should always deinterlace before doing any other filtering, especially resizing.
Right, you have two choices of what to do now:
1) Inverse Telecine (IVTC) - This works by attempting to reconstruct the original FILM frames (at 23.976fps). It generally works better before you edit something but can have reasonably good results in post production too. It is not a great method for something that is pure interlaced but it works well for most things.
2) Full Deinterlace - This will not attempt to reconstruct the original FILM frames (at 23.976fps) but instead will try and remove all of the interlacing using various techniques. Use this if your file is still interlaced when attempting IVTC :)
If you want a detailed description of what IVTC is and what it does, then read this part of the guide first. If you just want to do it, then read on.
As with all our post production work, we will be doing the IVTC in Avisynth using a plugin called Decomb. It's easy to use, all you need to do is to install the AMVapp and make an avisynth script. If this is your first time doing avisynth scripts then please read the avisynth guides first.
If you have installed AMVapp then all avisynth plugins will auto load, so all you have to do is make a script that imports your amv (the AVI file you exported from your editing package) and then applies the filtering. To do IVTC of NTSC footage your avisynth script (.avs) should look like this (replace the file location with your own):
If you have used interlaced PAL footage then you can try a script that looks like this:
If you do not have the most recent AMVapp installed you will have to add LoadPlugin("C:/filterloaction/decomb.dll") to the top of your script.
Right, if you load that .avs into virtualdub you can have a look at it and see if it's deinterlaced enough.
This method of removing interlacing does have two essential problems:
a) It removes frames (in the NTSC version) and as a result will make certain effects look a little odd... namely flashes and other one-frame events. Some of the frames are likely to be removed during decimation.
b) The telecide process sometimes blend deinterlaces frames it can't return to progressive FILM. Usually that's not too big a problem but if you don't like it, try one of the deinterlacing methods below.
To solve a) you can try doing as follows:
This will find the original FILM frames and duplicate them to return to 29.97 fps - the extra decimate line will check them out to make sure that they wont appear jerky when you watch the video. It's a pretty reasonable method.
If your video is pure interlaced and original FILM frames are very difficult (or impossible) to reconstruct, you will find that IVTC will return most of your frames blended. This isn't very good and if this happens you need to try a full deinterlace.
There are lots of different deinterlacing methods and I've been spending ages trying them all. I've concluded that there are 4 methods that are very good and worth your attention. Which one to use? To be honest they're all good in their own ways. If you have no FILM content then you will want to use method 2 or 3, if you have some FILM content then use method 1 or 4.
1) Telecide without blending
This is basically hacking the decomb plugin to access it's deinterlacing methods. It will attempt FILM frame recovery but when it fails it will deinterlace with interpolation instead of blending. It's actually a pretty nice method, although can leave some very faint lines on fades. All you need in order to do this filter is have the AMVapp installed and make an avisynth filter as follows:
This is quite a strong deinterlacing setting but does work surprisingly well on my sources. Well worth trying.
2) Area-based and smart deinterlacer mix
This is a good method (thanks to this post for the tip :) It actually requires the use of two virtualdub deinterlacing filters. These work in RGB mode, which should be fine as long as you export from Premiere in RGB mode. If not, then you will be making an unnecessary conversion as your editing package will no doubt be working in RGB. If you have no choice, then the script below will still work but will be slightly lossy (
The filters this method uses are Area Based Deinterlacer and Smart Deinterlacer. If you download the Advanced Avisynth pack it includes these filters. The filters need the following settings:
Area-Based Deinterlacer - threshold 27, edge detect 50 (no other settings)
Smart Deinterlacer - frame and field differencing, blend, cubic, motion threshold 20, scene change 100, field swap before and after (no other settings)
This can be done in either virtualdub or avisynth. If all you are doing to your file is deinterlacing and resizing then you can just use virtualdub filters. If you want to do any other cleaning work, then it's best if you do everything in avisynth as it has some of the best cleaning filters nowadays. To do the deinterlace listed above in avisynth, make sure you have the AMVapp and the Advanced Avisynth pack installed then make a script as follows:
There is one caveat with this script in that it relies a little on blurring so wont look quite as crisp as it might - it wont be as bad as full blending though.
3) Smooth Deinterlacer
This is an excellent new deinterlacing filter and better for general deinterlacing that any other single deinterlacer I've tried. The other great benefit is that it works in both RGB and YUV!! You can't lose :) To deinterlace this way, make sure you have the AMVapp and the Advanced Avisynth pack installed then make a script as follows:
Again, these are very strong settings but I find they worked very well on my sources - this filter doesn't really make lines look jagged if it deinterlaces stuff it shouldn't, which is a good thing.
4) Smooth Deinterlacer with telecide
This is very similar to the last one but if you want to use Telecide to reconstruct FILM parts and then use smooth deinterlacer for the pure interlaced sections, do a script like this:
This can work really well, in my experience.
You can now do further image quality enhancements after deinterlacing.