Mug Funky
19th December 2005, 11:16
yo, i just got a clip that i was meant to put a slowmo on (using clouded's script), and found that it was full of dropped frames which were b0rking the motion-interpolation.
so i wrote a little function to replace all frames that are identical to the previous one with a motion-interpolation of the adjacent frames. it could be useful for captures that you can't get again, but are full of drops (this one's got heaps... i odn't know what happened there).
function filldrops (clip c)
{
vf=c.mvanalyse(truemotion=true,pel=2,isb=false,delta=1,idx=1)
vb=c.mvanalyse(truemotion=true,pel=2,isb=true,delta=1,idx=1)
global filldrops_d = c.mvflowinter(vb,vf,time=50,idx=1)
global filldrops_c = c
c.scriptclip("""ydifferencefromprevious()==0? filldrops_d : filldrops_c""")
}
usage:
xxxsource("blah.xxx")
filldrops()
currently it doesn't support interlaced frames (though that would be quite handy, and very do-able, but i don't care enough right now).
hope someone finds a use for this :)
[edit]
oh, forgot to say (but it's kinda important...) that this requires fizick's latest version of manao's MVtools. you can get it from http://bag.hotmail.ru
[edit 2]
thanks Didée, i just put your changes in.
so i wrote a little function to replace all frames that are identical to the previous one with a motion-interpolation of the adjacent frames. it could be useful for captures that you can't get again, but are full of drops (this one's got heaps... i odn't know what happened there).
function filldrops (clip c)
{
vf=c.mvanalyse(truemotion=true,pel=2,isb=false,delta=1,idx=1)
vb=c.mvanalyse(truemotion=true,pel=2,isb=true,delta=1,idx=1)
global filldrops_d = c.mvflowinter(vb,vf,time=50,idx=1)
global filldrops_c = c
c.scriptclip("""ydifferencefromprevious()==0? filldrops_d : filldrops_c""")
}
usage:
xxxsource("blah.xxx")
filldrops()
currently it doesn't support interlaced frames (though that would be quite handy, and very do-able, but i don't care enough right now).
hope someone finds a use for this :)
[edit]
oh, forgot to say (but it's kinda important...) that this requires fizick's latest version of manao's MVtools. you can get it from http://bag.hotmail.ru
[edit 2]
thanks Didée, i just put your changes in.