Log in

View Full Version : correct way to deinterlace


Mounir
8th May 2009, 03:44
Well i'm steppin my game up now, i'm trying to figure out what avisynth can bring to the table compared to this good old vdub especially to deinterlace.
There a few parts i'm sure i missed but it's so a mess to gather infos and be sure that's the good way, some help is welcome.

Anyway here is my little script of nothing (almost ridiculous i'd say lol)
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\TomsMoComp\TomsMoComp_Avisynth\Debug\TomsMoComp.dll")
LoadVirtualDubPlugin("C:\Program Files\VirtualDubMod\plugins\msu_sharpen.vdf","MSUSmartSharpen", 0)
MPEG2Source("C:\myvideo.d2v")
ConverttoYV12()
TomsMoComp(-1,5,1)
Deblock()
ConverttoRGB32()
MSUSmartSharpen(4)


I'm satisfied with the script in this present form but i think i missed "color matrix" somewhere and some stuff after the ("C:\myvideo.d2v") not sure.
The video is a video clip (interlaced,29.970fps, TFF), maybe i should also ivtc it, you tell me

Sagekilla
8th May 2009, 04:23
Well, you can try using LimitedSharpenFaster, as its more or less the avisynth equivalent to MSS. You won't have to do a ConvertToRGB32() either, so it saves you from doing YV12 -> RGB -> YV12.

Adub
8th May 2009, 08:45
As for the Colormatrix usage, adjust your lines to look something like this:


# Load Plugins...
MPEG2Source("C:\myvideo.d2v", info = 3)
Colormatrix(hints = true, threads = 0)
# Do more stuff

midnightsun
8th May 2009, 09:48
IF it's interlaced you don't have to IVTC it, and converttoyv12() (if not yv12 in the first place) will mess it up since you're resizing it as if it were progressive. Of course chances are that your video is already yv12 so that line won't do a thing, but it's still bad scripting to do that.

IF it's telecined (either hard or soft) then you don't have to deinterlace it, but rather IVTC it using one of the decimation/IVTC plugins.

If you ask me I'd recommend yadif as a deinterlacer. It has a very good quality/speed ratio. Oh and Limitedsharpenfaster(mod) as a sharpener as Sagekilla pointed out above.

Sagekilla
8th May 2009, 15:42
I would definitely recommend using LSF over MSU's because you won't have to do colorspace conversions. The longer you can keep your material in YV12, the better ;)

Mounir
8th May 2009, 15:53
yeah but the thing is i feed this script to video enhancer (deemon) if you know this software and it needs rgb32 (just like vdub).
Some other guy advise me TGMC (deinterlacer) , where can i get this filter ? I wanna try yaddif a tgmc today

10L23r
9th May 2009, 06:22
i assume tgmc to be tempgaussmc: http://avisynth.org/mediawiki/TempGaussMC