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.

Methodology

Removing interlacing is typically one of the most difficult concepts to grasp properly. Because of this, I have written some special avisynth functions just for this guide, which should greatly simplify the process for you in 99% of cases. However, if you have one of those 1% of cases where these simplified functions don't work optimally, or if you simply want to have a more thorough understanding of the process involved, then you may wish to read the documentation for the following AviSynth filters, which my functions use: TFM(), TDecimate(), Tdeint(), NNEDI().


Before You Begin

Before you do anything on this page, you need to decide whether you are planning to edit directly from the AviSynth files, or if you plan to make clips. If this is your first time using this guide, you should skip ahead to this page which gives a thorough explanation of each method. After you have decided how you will be editing, then come back here and expand the appropriate section below which relates to the type of content that you have. You need to remember which method you are using along with it's number (method #1, #2, or #3).

collapse control Telecined Footage
Using the AMVIVTC function, you should be able to deal with this sort of 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 whereas PAL will keep its framerate of 25fps.

For NTSC footage you you make a script like this:
MPEG2Source ("C:\yourfolder\blah.d2v")
AMVIVTC(mode=x)

Replace the x with the number for the method you plan to use to deal with your avisynth clips. For instance, if you plan to follow method #1, converting your avisynth scripts to lossless files, then you should use AMVIVTC(mode=1)

If you have PAL footage, you should add the parameter decimate=0, like so:

AMVIVTC(mode=1, decimate=0)
PAL footage does not need to have it's framerate decimated. However, if you have PAL footage, it is far more likely that you have field blended footage, which is explained further down this page.


Advanced settings:

If you think that the fields in your footage are not being matched properly by the IVTC algorithm, you can change the method being used by the tfmmode parameter, which can be set to a value between 0 and 7. Normally, you should not need to adjust this setting, but if your footage is not being IVTC'ed properly, you might want to try various values here and see if they improve things.

You can also change the postprocessing method used on your footage by using the parameter pp, which can have a value from 0 to 3. In terms of IVTC, postprocessing refers to deinterlacing. IVTC is not always perfect, and some interlaced frames can still come through from time to time. In these cases the filter will simply deinterlace the interlaced parts of those frames. Because deinterlacing methods vary in both speed and quality, you may want to adjust this setting. By default, the postprocessing is set to the most ideal setting depending on the mode that you selected.

pp=0 disables postprocessing entirely, which is the fastest method, but you may see some interlaced frames.

pp=1 is a slow but high quality method which interpolates the fields to deinterlace the image.

pp=2 is a slow but high quality method which blends the fields to deinterlace the image.

pp=3 is a faster but lower quality deinterlacing method.


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.

One solution that you may find works for your field blended footage is using the tfmmode=7 parameter in AMVIVTC, like this:

AMVIVTC(mode=1, tfmmode=7)

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 MRestore. MRestore should ONLY be tried if you have PAL footage with a framerate of 25 fps. MRestore will attempt to convert the material back to its original framerate of 23.976 fps while removing blended frames. MRestore can be used like so:

MPEG2Source("C:\yourfolder\blah.d2v")
TDeint(mode=1)
Mrestore()
MRestore may often 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. It has some settings that you can tweak, so in order to get the most out of it, you should read it's documentation.



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 so you don't have to remember how to use a ton of different deinterlacing filters, I have created the AMVDeint() function which will allow you to very easily try different methods. AMVDeint have a parameter called mode (NOT related to the mode parameter in AMVIVTC!) which can be set from 0 to 4. Each mode specifies a different type of deinterlacing, with the lower values representing faster methods, and larger values representing the slower methods. Try them all out on your source to see what you think works best for your situation.

One of the downsides of using the AMVDeint function is that you cant tweak any settings on the deinterlacers if you want to. I think you normally shouldnt need to tweak any settings on them, but in case you do, here is a list of the deinterlacers that are used, in case you want to call them normally.

AMVDeint(mode=0) - This mode uses the LeakKernelDeint filter, which is a very fast deinterlacer with alright quality.

AMVDeint(mode=1) - This mode uses the Sangnom filter, which tends to give particularly good results on anime.

AMVDeint(mode=2) - This mode uses the Tdeint filter, which is a very good deinterlacer which interpolates fields.

AMVDeint(mode=3) - This mode uses the Tdeint filter with the settings TDeint(mode=2, mtnmode=3, blim=100). This makes it blend fields together which some people find more pleasing than interpolating.

AMVDeint(mode=4) - Ok, now we start getting more complicated. This mode calls the Tdeint filter, and uses the TMM filter to create a mask of the interlaced parts of the images, and finally uses the NNEDI filter to deinterlace those areas. This tends to look very nice but is also very slow.


collapse control Hybrid Footage

Hybrid stuff tends to be annoying because you often may not even notice that you are working with hybrid footage until after you start editing. Hybrid just means that you have various types of footage all mixed together. Some parts of an anime might be regular telecined, while some parts could be pure interlaced, while other parts might even be progressive! In some particularly evil cases, an anime might have been produced telecined, and then the studio decided to add some pure interlaced special effects on top of it. However there are also lots of simple cases, where the anime itself is produced at 24fps and simply telecined, but the opening or ending is produced at 30fps.

Now there are some convoluted ways of trying to work with hybrid source, but it's usually more trouble than it's worth. We are going to do it the easy way.

You basically have 2 options: You can either decide what type of footage is most prevalent in your source, handle that content properly, and let the rest of the footage just look less good. In this case you simply follow one of the methods outlined in the sections above, and just forget that your source is even hybrid. This isn't a particularly good solution, but honestly, most people wont even be able to tell.

Your other solution is to make seperate avisynth scripts for the different types of footage. You could make one script that performs IVTC on your footage, and another script that deinterlaces the footage. Then when you are editing, you simply pull your clips from the appropriate script. Although this is annoying, it does the job perfectly. However you don't want to be mixing footage at different framerates, so you need to decide what framerate you will be editing at, and then make most of your footage conform to that, as outlined below.



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 Decimate PAL footage or 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.