This is a much expanded version of part of the guide which previously only took one paragraph. The guides are much more focused on showing you how to analyse your footage and how to deal with it depending on the footage you have. Hopefully by this point you will know (or at least have a good idea) whether your source is Telecined, Hybrid, 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 Analysing 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.
Fore ease of reference, you can go directly to a section:
MethodologyThe information contained on this page are general rules of thumb and like all rules there are exceptions. When reading this document you should try to understand why certain options are being used so that you can modify these depending on your own source footage. 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.
Decomb works in two stages using two functions - Telecide and Decimate.
Telecide: This part of the filter chain looks for the original progressive frames in the source and attempts to restore them. If it can't find a progressive frame it can use Post Processing to adaptively deinterlace the frame for you.Each of these fuctions have settings which will differ depending on the kind of interlacing you have, so let's have a look at the different ways of dealing with your source.
The simple stuff - or so we hope. The decomb functions 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 the its framerate of 25fps.
For NTSC footage you you make a script like this:
MPEG2Source("C:\yourfolder\blah.d2v")and for PAL you do
MPEG2Source("C:\yourfolder\blah.d2v")So you can understand what is going on with these functions and settings, allow me to explain the options that are being used.
Order - This dictates the field order of the source. Top Field First or Bottom Field First - you should know this from the analysis stage you did earlier.Decimate:
Cycle - The number tells decimate how regularly to remove a frame. For NTSC IVTC it is 1 in every 5 frames. Later you will see some examples where decimation is used differently or not at all..You will notice that there is no decimate for PAL Telecine. This is because if a source has used a simple Telecine process for PAL then once the frames are recoverable they will be at the correct framerate of 25fps. Again, I must stress that it is unlikely that a PAL source has been encoded like this.
Remember it is common for a Telecine pattern to be hard to find, which in turn makes it difficult for the filters to restore the orignal frames. One difficulty which you can try and overcome is when Telecide has trouble finding good mathches when it looks for the progressive frames - if you believe this to be true then you will want to refer to the Decomb 5 FAQ which you should have in your start menu under AMVapp/Avisynth Filters/Documentation/. Yes, that's right, I'm telling you to RTFM - I'd only be repeating things if I put them here. All the decomb documentation file are great and well worth reading. Here's a quick rundown of what you need to do to tweak your settings:
If you are still having trouble, there are some alternatives.
Alternative Method 1: SmartDecimate
Some sources respond better to the filter SmartDecimate which is a decomb alternative. For NTSC footage use SmartDecimate(24,60). For more information see the Smart Decimate documentation in the Start Menu - AMVapp/Avisynth Filters/Documentation. This filter can be used in other creative ways as described in the documentation so mess around with it.
Alternative Method 2: Better deinterlacing in Post-processing
When Telecide cannot match a field, it has to deinterlace the frame. By default it uses FieldDeinterlace... but FieldDeinterlace isn't all that good. You can specify other filters to do the interlacing on those frames. Two deinterlacers that can do this are KernelDeinterlace and TDeinterlace. To use these, do as follows:
To use KernelDeint:
This stuff is marginally more complicated and you'll need to make a decision on the nature of your hybrid footage - is it more basic FILM or more pure interlaced NTSC? This will govern how the thing is Decimated. If it's more FILM then you can decimate it easily (like with regular Telecine) but if it's more pure interlacing then doing so will make all the motion jerky so you need to be careful. Note that Hybrid Sources basically are an NTSC phenomenon so there's no PAL option here.
MPEG2Source("C:\yourfolder\blah.d2v")Note that this will blend the frames in the pure interlaced areas to keep the smoothness of the motion at 23.976fps. On the Hybrid source I was messing with earlier, Super GALS these settings seem to work pretty well but I didnt go into it too thoroughly.
However, if there are too many pure interlaced sections then you will get far too much blending and you want to avoid that if you can. Using Decimate mode 2 stops the blending but gives you jerky motion - if you don't want blending or jerky motion treat it as 'mostly pure interlaced':
Mostly pure interlaced:
MPEG2Source("C:\yourfolder\blah.d2v")The two changes to notice here are that there is no pattern guidance and no decimate cycle. This method will give you 29.97fps footage with progressive frames restored as best as telecide can manage. Extra smoothness can be obtained by using Telecide(order=1, post=4)
With Hybrid footage some parts of your video stream will have to be deinterlaced - these are the pure interlaced parts. Decomb contains pretty decent adaptive deinterlacing in its post-processing options and the settings I've referred to here should be fine. If, however, you find that the deinterlacer is hurting good frames or isn't catching all the deinterlacing then you should tweak the vthresh and dthresh options in Telecide. These are advanced settings that you should refer to the Decomb 5 Reference Manual and the Decomb 5 Tutorial pages for full explanation about how this works.
If you have lots of pure interlaced frames and decomb isn't helping then it may be best to just treat it like completely pure interlaced material.
The third way:
If you have hybrid footage and Decomb is getting you nowhere fast then the answer for you is to use BlendBob. BlendBob works in a similar but opposite way to decomb - where decomb tries to match fields and deinterlaces when it can't, BlendBob bob deinterlaces all the fields and then does the matching, blending the matched fields together or discarding on if they don't match. This is very very effective at getting rid of interlacing but it should be used only when decomb fails because decomb does produce better wuality when it works well.
To use BlendBob you can use this chain of commands:
LoadTDeint()You can actually use any bob function provided you set it to output double framerate. TDeint gives the best results in my tests but KernelBob is also a good option (and much faster than TDeint).
These settings I found to really help reduce the prevalence of the blending (frames that contained blends were often removed during decimation) but this approach would often leave the footage looking very jerky in scenes with linear motion. Some scenes were so jerky they were unusable and so I generally had a second avisynth script importing footage and doing a different approach for scenes where I wanted to retain smoothness of motion:
[Note, if you are doing to be converting your footage to RGB32 for editing then you can use ConvertToRGB32(interlaced=true) instead and avoid converting twice.]
Note well: if you try any bob deinterlacing on this kind of footage it can often produce situations where you have different parts of an image moving in different frames which looks really nasty. There is no quick fix with this kind of footage and there is definitely no perfect solution, only different ways with different pros and cons. When you have footage this bad, you have to experiment - try as many methods as you can to see which works best.
- Use one of the deinterlacing options described in the 'pure interlacing' section below. They will not remove the blends but will retain the smoothness of the footage.NTSC users (less likely):
- Try treating it just like the half-field blending type above and see how it comes out.
Adaptive and Motion Compensated Deinterlacing:
These techniques generally search for areas of movement and deinterlace those areas or, from the other viewpoint, search for areas without motion and leave them alone. It's a useful approach but is often made difficult by the fact that it is so easy to have false matches. If you set the threshold too low you get interlacing coming through... too high and you start messing with frames that were decent to start with. It's problematic but these techniques are worth a shot to see if they can help you out. There are a number of deinterlacers that use this approach:
FieldDeinterlace() - this is the Avisynth Version of the old virtualdub Smart Deinterlacer. You will want to tweak the thresholds of this manually to fit your source if you use it. The numerous parameters are described in the Decomb 5 Reference Manual. I've never really found this deinterlacer to give me entirely satisfactory results but different sources require different methods so you should experiment. Each source is different so any of these deinterlacers could give the best results.
KernelDeint(order=1, threshold=10) - This is a nice new deinterlacing approach. Order is just like the same setting in Telecide. 'Threshold' detects motion areas for deinterlacing - if too many areas are being deinterlaced then increase the threshold; if too few then reduce it. As with all Donald Graft filters, the settings are well documented and can be found in the start menu.
Bobbing and Field Interpolation Deinterlacing:
This is a technique that takes the fields and resizes them to full frame size. That's the start at least. Different bob deinterlacers do all sorts of different things after that that give different results. If you have a problem with interlacing appearing in your video with other methods then bob deinterlacing will definitely get rid of that - unfortunately they have other problems such as shimmering, aliasing (jagged edges) and so on but they are worth trying out as they are usually smooth and almost always interlacing free. Note that some bobbing methods double the framerate and so Decimate(2) has been added to the end to keep these 29.97fps. You can remove this if you so desire.
DGbob(order=1,mode=0) - Order is just like with Telecide. Mode=0 will keep the frame rate the same as the source although it works best at double framerate (mode=1) you may not want to edit with that. For tweaking read the DGBob Help documentation in the amvapp start menu directory.
1) Do bob deinterlacingThere have been a few attempts at doing this: Unblend, RePal, Restore24, UnblendPattern and PFR (Progressive Frame Restorer). RePal is for footage that was originally pal and converted to NTSC, however, so it's unlikley to be any use for anime.
Here's an example of how you would try removing blending on PAL footage.
KernelBob(4) #or some other frame-doubling bob deinterlacerFrankly if you can work this stuff out then I take my hat off to you. Doing searched on the doom9 forums for the above filters will give you clues as to how to attempt this kind of thing but it's not the kind of filtering that has been acheived with any amazing and easily duplicatable level of success.
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 which support 23.976fps projects.
Be warned that Adobe Premiere can't handle 23.976fps without screwing up and yes that includes Premiere Pro (well, mostly... you'll need to read this page for more information on that). 23.98fps is NOT the same as 23.976 and you will get things mistimed and miscalculated.
If you are using Premiere you basically have two options
1) Convert to 24fps and edit with that orI use option 1 in all my videos with the exception of some multi-editor projects where I often create progressive 29.97fps videos just so they are easy to intergrate with other people's videos.
If you want to edit the video at 24fps then you will need to read this page on how.
If you want to just edit it as progressive 29.97fps then add AssumeFPS(29.97) after your have done your IVTC filtering. Remember that your footage is now progressive so you should set any field rendering options to "no fields" or disabled.
Your interlacing removal has left you with a 29.97fps source. You can go straight ahead and edit this as NTSC. It does not have a field order (set rendering to "no fields" in your editing program) but it can be considered either top field or bottom field by any playback device so it is good for converting to DV or MPEG2 or anything you like for conventions. It's also fine for making internet distribution encodes as the frames are progressive.
If you have progressive 25fps footage then you can quite simply edit with the regular PAL profiles in your editing application. Remember that field rendering should be set to "no fields" if you now have progressive frames and that you can create DV and mpeg2 files with any field order you like as it will be look the same.
If you have a framerate that is not one of the above then you have either a) Used a bob deinterlacer that has doubled the framerate or b) done frame decimation on a source that should not be decimated such as PAL footage. If your answer is a) and you want the framerate returned then try putting Decmate(2) at the end. If the answer is b) then you should check your settings and re-read this page - you may be trying to do something silly like IVTC PAL footage with cycle=5 or do IVTC on a source that has already been put (incorrectly?) through Force FILM in DGIndex.
OK so you've now dealt with your interlaced footage, you need to have a quick think about what to do about Aspect Ratios.