Log in

View Full Version : Simple Avisynth script to un-jitter DVD movies with DePan, please?


StickHorsie
26th March 2013, 20:04
I can't get the DePan sample scripts to work properly and staring at the manual (http://avisynth.org.ru/depan/depan.html) doesn't seem to help a lot. ;)

So instead of DePan, I use stab()+crop and even stab()+crop+stab()+crop if the DVD is very jittery. The results are usually acceptable, but I'm curious how much better DePan would be.

Anybody got a simple DePan script for movies with jitter (horizontally + vertically) up to 4 or 8 pixels, please? (Source is progressive, speed is 23.976 or 25fps.)
:thanks:

manono
28th March 2013, 03:02
You can modify the Stab script to 4 or 8 pixels yourself. See if this does a better job:

##############################################################################
#Original script by g-force converted into a stand alone script by McCauley #
#latest version from December 10, 2008 #
##############################################################################

#mirror - fill empty borders with mirrored from frame edge pixels (instead of black):
# 0 - no mirror (default);
# 1 - top;
# 2 - bottom;
# 4 - left;
# 8 - right;
# sum any of above - combination (15 - all ).
# From Depan


function Stab (clip clp, int "range", int "dxmax", int "dymax") {

range = default(range, 1)
dxmax = default(dxmax, 8)
dymax = default(dymax, 8)

temp = clp.TemporalSoften(7,255,255,25,2)
inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,255,25,2)),clp)
mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxmax,dymax=dymax)

DePan(inter,data=mdata,offset=-1,Mirror=5)
SelectEvery(2,0) }

There are no guarantees, of course. Maybe you really do need Depan. But this is worth a try.