Trixter
4th July 2006, 23:52
I'm really confused at the moment; I'm using MVTools to do some standards conversion and it works in some scripts and I get an error message in others. I discovered this when I was trying to use Scharfis' mvbob (http://home.arcor.de/scharfis_brain/mvbob/) as a preprocessor to the standards conversion. I'm using avisynth 2.56 with mvtools version 1.3.0 (the most recent one).
For example, this works perfectly:
loadplugin("mvtools.dll") # my default plugin path is set properly in the registry)
AVISource("h:\assets\mc2\pal\groovy.avi").ConvertToYUY2(interlaced=true)
function bobit(clip c)
{
# Use TDeint to turn 25i into 50p
c.TDeint(order=1,mode=1,type=0,sharp=false,AP=50,APtype=0)
}
function MOCOMP_50_to_5994(clip c)
{
backward_vec = c.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = c.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = c.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
c.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=60000,den=1001,idx=1,idx2=2) # the 60000 / 1001 = 59.9401
}
bobit
BilinearResize(720,480)
MOCOMP_50_to_5994
#ChangeFPS(60000, 1001) # Convert field rate to NTSC (59.94), by duplicating/dropping fields
AssumeFrameBased
SeparateFields()
SelectEvery(4, 0, 3) # 4,1,2 is for odd field first; 4,0,3 is for even field first
weave
...but this next example results in the error AVISynth open failure: Script Error: MVAnalyse does not have a named argument "truemotion":
loadplugin("mvtools.dll")
import("d:\Program Files\AviSynth 2.5\plugins\mvbob.avs")
AVISource("h:\assets\mc2\pal\groovy.avi").ConvertToYUY2(interlaced=true)
AssumeTFF
mvbob
function MOCOMP_50_to_5994(clip c)
{
# Assume progressive PAL 50 fps source. Lets convert to 60.
backward_vec = c.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = c.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = c.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
c.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=60000,den=1001,idx=1,idx2=2) # the 60000 / 1001 = 59.9401
}
MOCOMP_50_to_5994
Since MVAnalyse quite clearly does have a named argument "truemotion", because it works in the first script, what am I doing wrong? Is the problem with mvbob or is it a malformed script on my part? (I did have to correct a "convertttoyuy2" error in the original mvbob script, maybe there are other errors?)
For example, this works perfectly:
loadplugin("mvtools.dll") # my default plugin path is set properly in the registry)
AVISource("h:\assets\mc2\pal\groovy.avi").ConvertToYUY2(interlaced=true)
function bobit(clip c)
{
# Use TDeint to turn 25i into 50p
c.TDeint(order=1,mode=1,type=0,sharp=false,AP=50,APtype=0)
}
function MOCOMP_50_to_5994(clip c)
{
backward_vec = c.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = c.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = c.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
c.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=60000,den=1001,idx=1,idx2=2) # the 60000 / 1001 = 59.9401
}
bobit
BilinearResize(720,480)
MOCOMP_50_to_5994
#ChangeFPS(60000, 1001) # Convert field rate to NTSC (59.94), by duplicating/dropping fields
AssumeFrameBased
SeparateFields()
SelectEvery(4, 0, 3) # 4,1,2 is for odd field first; 4,0,3 is for even field first
weave
...but this next example results in the error AVISynth open failure: Script Error: MVAnalyse does not have a named argument "truemotion":
loadplugin("mvtools.dll")
import("d:\Program Files\AviSynth 2.5\plugins\mvbob.avs")
AVISource("h:\assets\mc2\pal\groovy.avi").ConvertToYUY2(interlaced=true)
AssumeTFF
mvbob
function MOCOMP_50_to_5994(clip c)
{
# Assume progressive PAL 50 fps source. Lets convert to 60.
backward_vec = c.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = c.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = c.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
c.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=60000,den=1001,idx=1,idx2=2) # the 60000 / 1001 = 59.9401
}
MOCOMP_50_to_5994
Since MVAnalyse quite clearly does have a named argument "truemotion", because it works in the first script, what am I doing wrong? Is the problem with mvbob or is it a malformed script on my part? (I did have to correct a "convertttoyuy2" error in the original mvbob script, maybe there are other errors?)