PDA

View Full Version : Stab function in new Python version?


Lynx_TWO
2nd September 2017, 21:56
Good Afternoon!

This might be a really easy question, so apologies in advance if so... :o

When stabilizing older Bluray transfers from film, years ago I previously used the Stab script in Staxrip with MVTools in AVISynth to stabilize high-frequency film judder before de-noising and compressing. I've been out of the loop for awhile and just now getting back into it. So, now, with the latest VapourSynth version of this MVTools, how would one write the Stab script with these new Depans in MVTools? I'm using Staxrip 1.6 x64, VapourSynth filter setup if that helps.

Thanks so much in advance for your time! :)

I posted the orginal below from http://avisynth.nl/images/Stab.avsi:

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

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

range = default(range, 1)
dxmax = default(dxmax, 4)
dymax = default(dymax, 4)
mirror = default(mirror, 0)

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=mirror )
SelectEvery(2,0) }

WolframRhodium
3rd September 2017, 11:12
haf.Stab()

havsfunc: https://github.com/HomeOfVapourSynthEvolution/havsfunc

Lynx_TWO
4th September 2017, 11:09
Oh wow, too easy! :D

I'll check it out and report back :)

alexx7777
12th November 2017, 03:15
I can not understand in any way what better values ​​to set for dxmax and dymax function Stab () to remove strong shaking (720x576, 50p)?

alexx7777
13th November 2017, 17:58
I guess you should use the combo of mv.DepanAnalyse + mv.DepanStabilise instead of the Stab function for stabilizing shaky videos. But I have zero experience on this so I can't give you advice on what better values to set for optimal result.
Thank you! I will try!

ChaosKing
16th November 2017, 14:19
Here is an example for mv.DepanAnalyse + mv.DepanStabilise (scroll down to VPY)

https://forum.doom9.org/showpost.php?p=1769570&postcount=374