AnimeMusicVideos.org > Guide Index

Making your footage Progressive

Hopefully by this point you will know (or at least have a good idea) whether your source is Telecined, Hybrid, Field-Blended or Pure Interlaced.
Armed with this knowledge I can show the different ways of handling this footage. If, on the other hand, you read the Analyzing your Footage page and couldn't decide which type of interlacing your source had then you may want to try each method one by one and see what looks best to you.


collapse control A (very basic) video tutorial is available for this topic

The player will show in this paragraph

Methodology

The information contained on this page are general rules of thumb and like all rules there are exceptions. There are different solutions to different problems and although I have tried to cover numerous possibilities it is very likely that you may find better solutions yourself so don't be afraid to experiment. IVTC can potentially be one of the most complex topics when it comes to working with DVDs, and it is beyond the scope of this guide to fully cover everything in depth. But with that said, I believe the information contained here should be satisfactory for most people.

For most of our efforts at restoring progressive frames, we will be using two plugins: TIVTC and TDeint. TIVTC is an inverse telecine plugin which we will be using (replacing Decomb from the old version of this guide). TDeint is an excellant deinterlacing plugin, which uses some interesting deinterlacing techniques which work quite well for anime. I highly recommend that you become familiar with these plugins by reading the documentation on them which is available in your start menu (if you installed the AMVApp).

TIVTC uses a function called TFM() to do the field matching. This function has a LOT of settings that you can tweak. I'm not going to cover all of those settings in this guide, because I would just be restating what is already written in the TFM readme file. I highly recommend that you look over it to get a feel for what all of the various options can do.

After TFM is used, we will have some duplicate frames. To remove these duplicates, we need to use a function called TDecimate(). This will change the framerate of the video from 29.97 fps to 23.976 fps. If you are using PAL footage though, you should use TDecimate(cycle=25), this will change the framerate to 24 fps exactly.


collapse control Telecined Footage

Note: If you are using PAL footage, Whenever You see the TDecimate() command, you need to add a cycle=25 command, like this: TDecimate(cycle=25)
This will convert the framerate to 24 fps exactly. If you want to later convert the fps to 23.976, like NTSC footage, you can follow that up with the AssumeFPS command, explained at the bottom of this page. But please note that if you have PAL footage, then your footage is most likely NOT telecined, but rather field blended.


The TIVTC functions should be able to deal with telecined footage very easily by using Inverse Telecine. This will take your footage and restore the original progressive frames. With NTSC footage this will also restore the framerate to 23.976fps.

For NTSC footage you you make a script like this:
MPEG2Source ("C:\yourfolder\blah.d2v")
TFM()
TDecimate()

You can optionally add a slow parameter to TFM, like so: TFM(slow=2). This simply tells it to use the slowest and most accurate field matching. If you are editing Avisynth scripts directly, you obviously want to omit that parameter.


Better post-processing:

The simple script above will work pretty well, but I think we can do better. First though, let me explain what the post-processing is. Sometimes, TFM is not able to restore a progressive frame, and it will have to simply deinterlace the frame. However, I think TFM's built in deinterlacers kinda suck. Fortunately, TFM has an advanced feature that lets you utilize any deinterlacer that you want! Here is a script that you can use for some much nicer (but slower) postprocessing:

MPEG2Source ("C:\yourfolder\blah.d2v")
TFM(slow=2, pp=5, clip2=TDeint(mode=2, type=3))
TDecimate()

A number of new parameters have been used here, but I am not going to go into the specifics of what they all do. If you are curious then I recommend that you check out the documentation for these filters.


collapse control Hybrid Footage
This stuff isn't much more complicated than telecined footage, but you'll need to make a decision on the nature of your hybrid footage - is it more basic FILM or more VIDEO? This will govern how the thing is Decimated. Note that Hybrid Sources are basically an NTSC phenomenon so there's no PAL option here.

Mostly FILM:
You simply use the same script you would use for Telecined footage that was shown above. However, there is a problem. The VIDEO (29.97fps) sections of your footage will now become jerky. If your footage doesnt have many of these sections, or if you might not even use any of that footage, then you don't even need to worry.

Mostly 29.97 fps:
Just do it exactly the same as above, but don't include the TDecimate() command. This method will give you 29.97fps footage. If you plan to mix it with other sources that use a framerate of 23.976, you will need to follow it up with AssumeFPS("ntsc_film"). Again though, this method has a problem. This will cause all of the FILM (23.976fps) sections of your footage to be jerky. It probably wont be too noticable though, but it can be a problem.

The best way to deal with Hybrid Footage:
Now, no matter whether you choose the method for mostly FILM, or mostly interlaced, either your 23.976fps scenes or your 29.97fps scenes are going to end up with some jerky sections. Wouldn't it be great if there was a way to get BOTH the 23.976 and 29.97 fps scenes without any jerkiness? Well, fortunately there is. It's quite simple, but requires a little extra work. All we need to do is make two avisynth scripts. One for the 23.976 fps scenes, and another one for the 29.97 fps scenes. Then when you edit your video, you can use whichever script displays the particular scene you need the best.
For your first script, you simply need to use the script recommended above for Telecined Footage.

For your second script, you need to determine whether the 29.97 fps scenes are interlaced or progressive. The way to do this is by looking at the 29.97 fps sections in VirtualDub and see if there is any interlacing visible.

If it's progressive, you simply need a script like this:
MPEG2Source("C:\yourfolder\blah.d2v")
AssumeFPS("ntsc_film")
Since the 29.97 fps scenes are already progressive, we simply change the framerate to match the Telecined footage.

If it's interlaced, you need a script like this:
MPEG2Source("C:\yourfolder\blah.d2v")
TDeint()
AssumeFPS("ntsc_film")
Here, we add a deinterlacer before changing the framerate. You can actually use any deinterlacer you want, and there are more listed below in the section on Pure Interlaced Footage.

collapse control Field Blended Footage

If you have half field blended or full field blended footage, no solution will ever be satisfactory and you will really want to experiment as much as possible to find a solution you are happy with. Full deinterlacing may work well on some particular sources so you should refer to the section on pure interlacing for some good approaches.

For half-blended stuff, like most older GAINAX series, you usually want to just try IVTC, and just accept the blends as a fact of life. Plain deinterlacing may be another option. (for deinterlacing options, see the section on "Pure Interlaced Footage" below)

If you have a full field blended source, which is usually the case with PAL footage, you will probably just deinterlace. Another option you have with PAL footage is a function called SRestore. SRestore should ONLY be tried if you have PAL footage with a framerate of 25 fps. SRestore will attempt to convert the material back to its original framerate of 23.976 fps while removing blended frames. SRestore can be used like so:

MPEG2Source("C:\yourfolder\blah.d2v")
TDeint(mode=1)
Srestore()
SRestore may sometimes look worse than simply deinterlacing though, but it doesn't hurt to give it a shot and see if you like how it turns out.



collapse control Pure Interlaced Footage
When you have a source where looking for progressive frames is mostly futile, it is often best to just attempt to deinterlace the source. There are many different ways to deinterlace things and, like many things, the best method will depend on your source.

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)
TDeint(edeint=nnedi2())

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.


LeakKernelDeint(order=1) - I recommend this deinterlacer if you are editing directly from Avisynth scripts. The quality isn't that great, but, its very fast. The order parameter is the field order of your footage. If this filter doesn't seem to be working properly with order=1, try changing it to order=0.



Dealing with the new FPS

After you have successfully made your footage progressive (in the sections above) you need to think about what effect this change has on things. This all depends on the new framerate.

23.976fps Footage

You have done IVTC on NTSC material and now have progressive frames at 23.976fps. This is good, particularly when editing with programs such as Vegas or Premiere Pro which support 23.976fps projects.

Be warned that some editing programs such as Magix and older versions of Adobe Premiere can't handle 23.976fps properly, but rather only support 23.98fps. 23.98fps is NOT the same as 23.976, although the difference is pretty minor. If you have to use an editing program that only supports 23.98, then I recommend you simply put the following line at the end of your script: AssumeFPS(23.98). This will prevent any frames in your source from being dropped.

29.97fps or 25fps Footage
If your interlacing removal left you with 29.97 or 25fps footage, then that is fine and you shouldn't have any problems with these framerates in any editing program.

xx.xxfps

If you have a framerate that is not one of the above then you should check your settings and re-read this page - you may be trying to do something silly like do IVTC on a source that has already been put (incorrectly?) through Force FILM in DGIndex.

Using multiple sources with different framerates

Now if you are using multiple different anime in your AMV, and they don't all have the same framerate, then you will need to convert them all to the same framerate. I would recommend using the framerate that the majority of your source falls under, simply because it requires you to change less. To change the framerate of your sources, just use AssumeFPS("ntsc_video") to convert to 29.97, AssumeFPS("ntsc_film") to convert to 23.976, or AssumeFPS(25) for 25fps.