Log in

View Full Version : Motion blur and mvfps


Cobydawg
6th May 2007, 05:13
Any advice on a script to replicate what mvfps does, but with the latest version of mvtools (which doesn't have mvconvertfps)? That is, changing framerate with a tweakable motion blur parameter?

function mvfps(clip i, float fps, int "oversample", int "blurradius")
{
oversample=default(oversample,1)
blurradius=default(blurradius,1)
j=i.temporalsoften(2,4,5,2)
fwd=mvtools0962_mvanalyse(j,isb=false,lambda=4000)
bwd=mvtools0962_mvanalyse(j,isb=true, lambda=4000)
i.mvtools0962_mvconvertfps(bwd,fwd,fps=fps*oversample)
(oversample>1) ? last.temporalsoften(blurradius,255,255,mode=2).selectevery(oversample,0) : last
}

WorBry
6th May 2007, 07:05
http://forum.doom9.org/showthread.php?t=105015

foxyshadis
7th May 2007, 00:11
mvconvertfps has also been replaced with mvflowfps; parameters are mostly the same except framerate is a num/den fraction instead of a float. In other words:


function mvfps(clip i, float fps, int "oversample", int "blurradius")
{
oversample=default(oversample,1)
blurradius=default(blurradius,1)
fr=i.assumefps(fps*oversample)
j=i.temporalsoften(2,4,5,2)
fwd=mvanalyse(j,isb=false,lambda=4000,truemotion=true,idx=1)
bwd=mvanalyse(j,isb=true, lambda=4000,truemotion=true,idx=1)
i.mvflowfps(bwd,fwd,num=fr.frameratenumerator,den=fr.frameratedenominator,idx=1)
(oversample>1) ? last.temporalsoften(blurradius,255,255,mode=2).selectevery(oversample,0) : last
}
Should work. If not, just use the one in the other thread, though it's slower. Make sure you get the latest from Fizick's page (http://avisynth.org.ru/mvtools/mvtools.html).

Cobydawg
14th May 2007, 06:26
Thanks - appreciated!