AfterDawn.com

Deinterlacing


If you have an interlaced source, but want progressive output, and your source isn't telecined, you need to deinterlace. This section will describe 2 different ways to deinterlace, but there are many different ways to do it. Depending on the source material, the destination format, your viewing equipment, and your personal preferences you'll get better results from one or the other, or you may prefer a different approach altogether.



Discarding Fields


One option is to simply remove every other field. This will leave you with frames that are half the height of the original video, so you'll need to resize after discarding fields. This can be a useful approach if your final format will be half the height of your source like converting a 720x480 video into VCD (or a VCD resolution DVD), because AviSynth doesn't have to add information that's not in the original source. On the other hand, you may lose important details that were only in the fields you removed. Add the SeparateFields filter from the interlaced category and then either SelectEven or SelectOdd from the Editing category.



Bobbing


This will usually give you the best quality for deinterlaced video. Like the previous method, bobbing starts by separating fields, but then each field is changed to a full-size frame by filling in either the even or odd lines, depending on whether it was originally a top or bottom field. You can also use this method to create double framerate or slow motion video. Make sure you have the DGBob plugin for this operation. You'll also need to know the field order of your video. This can be done using Core filters from the Interlaced category. Add AssumeTFF and SeparateFields to your script and preview it. Navigate through the preview until you find a section where something moves either left to right or right to left across the screen and step through several frames, one frame at a time. If the object moves backwards in every other frame, the field order is BFF. If the movement looks correct it's TFF.


Add the DGBob filter from the ??? category. There are 2 parameters you need to set - order and mode. Set the order parameter to 0 if your video is BFF or 1 if it's TFF. You must set the order because there is no default value. If you want video with a doubled framerate (59.94 fields per second becomes 59.94 frames per second) you don't need to change the mode. If you want to maintain a standard video framerate (59.94 fields per second becomes 29.97 frames per second by dropping every other frame) set the mode parameter to 0. If you want slow motion video (59.94 fields per second becomes 29.97 frames per second but no frames are dropped) set the mode to 2.
Written by: Rich Fiscus
Last updated: