PDA

View Full Version : Deinterlacing


falconfighter
8th April 2004, 16:21
Here's the script I'm using:

LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3dg.dll")
MPEG2Source("C:\temp.d2v")
DoubleWeave()
Pulldown(0,2)

However, it's interlaced as well as pulled-down 3:2. What's the best solution for deinterlacing? It has to be flicker-free, as there's a lot of stars in this movie.

Mug Funky
10th April 2004, 15:22
search for "smart bob".

there's no perfect solution.

with 3:2 material you'll get good results with decomb (telecide + decimate), most useful if you can't be bothered checking the pulldown pattern (like me) but can be annoying with hybrid content.

if the video is significantly interlaced, then smart-bobbing is the way to go. there's a few out there, they all give slightly different results, but most are motion-aware, meaning if something doesn't move it will not be deinterlaced.

falconfighter
12th April 2004, 01:45
Grr. What is wrong with this script? Directly cut+pasted from Avisynth.org, scripts file, and DG himself.

LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3dg.dll")
LoadPlugin("C:\avisynth plugs\decomb510.dll")
clip=MPEG2Source("C:\batchripper\temp\1x03.d2v")
Import("C:\batchripper\temp\vdub_filters.avs")
clip.ConvertToRGB32() # only when necessary (but doesn't hurt)
VD_SmartBob(1, 0, 10, 1)

Returns "Invalid arguments to funciton VD_Smartbob", line 6

falconfighter
12th April 2004, 01:52
also: Playing aroudn with the filter, I noticed a tendancy to make splotches of color. I had to set it to 0 (dumb bobbing) to get it to stop completely. Something wrong with me?

stickboy
12th April 2004, 02:20
Originally posted by falconfighter
VD_SmartBob(1, 0, 10, 1)

Returns "Invalid arguments to funciton VD_Smartbob", line 6It looks like the FAQ entry (http://www.avisynth.org/index.php?page=Section+4%3A+Importing+filters+from+VirtualDub) is wrong*.

Let's look inside vdub_filters.avsi and see what arguments VD_SmartBob takes:
function VD_SmartBob(clip clip, bool "show_motion", int "threshold", bool "motion_map_denoising")That doesn't match your call at all.

Let's look at the rest of VD_SmartBob to see what the arguments 1, 0, 10, 1 are supposed to correspond to:
function VD_SmartBob(clip clip, bool "show_motion", int "threshold", bool "motion_map_denoising")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\bob.vdf", "_VD_SmartBob", 1)
return clip.SeparateFields._VD_SmartBob(clip.GetParity()?1:0,
\ default(show_motion,false)?1:0, default(threshold,10),
\ default(motion_map_denoising,true)?1:0)
}
From this we can deduce that:
1 -> parity
0 -> show_motion
10 -> threshold
1 -> motion_map_denoisingVD_SmartBob figures out the parity for us, and hence doesn't take it as an argument. VD_SmartBob takes show_motion and motion_map_denoising as boolean types, not integers; for those parameters, then, we need to substitute false for 0 and true for 1.

Putting it all together, the correct version of the call is:
VD_SmartBob(false, 10, true)

Edit:
* fixed the FAQ entry