Log in

View Full Version : MVTools working in some scripts but not others?


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?)

foxyshadis
5th July 2006, 00:23
loadplugin("mvtools.dll") # my default plugin path is set properly in the registry)

This might be where the confusion stems from, if you do this, it will load whatever plugin is in the script's folder, not what's in the avisynth folder. But what I'm guessing is it's actually hiding the error, because mvbob.avs includes its own loadplugin("mvtools.dll") which would pull it from "d:\Program Files\AviSynth 2.5\plugins\" instead! Ie, the one in your script's folder is current and the one in your main plugin folder is old. So you can either comment out the load in mvbob, or remove every mvtools.dll you can find and only place the most current in your main plugin folder (and remove the loadplugin calls since it'll be autoloaded).

That's my attempt at psychic debugging, anyway. :p

Trixter
5th July 2006, 05:14
A good guess, except that the only copy of mvtools.dll on the system is in my plugins directory. But thanks for trying :-)

I'm hoping Scharfis sees this and comments, because it's his mvbob that had the typo in it, which leads me to believe he hasn't used it in a while :-)

Boulder
5th July 2006, 08:45
You are supposed to extract the MVBob package to its own directory. Then when you import the mvbob.avs in your script, it loads the correct mvtools.dll which is also in the MVBob directory. That's why there is no path in the LoadPlugin line.

scharfis_brain
5th July 2006, 14:46
mvbob.avs loads plugins by itsfelf. this means it loads an outdated mvtools.dll. there is NO typo in mvbob.avs.

just load mvtools.dll after importing mvbob.avs.

Trixter
5th July 2006, 19:04
mvbob.avs loads plugins by itsfelf. this means it loads an outdated mvtools.dll. there is NO typo in mvbob.avs.

just load mvtools.dll after importing mvbob.avs.

So that means that "convertttoyuy2" isn't a typo, it's something provided by one of the .dlls?

Trixter
5th July 2006, 19:23
there is NO typo in mvbob.avs.

Then what is this:

http://img416.imageshack.us/img416/7251/mvconverror7kd.png (http://imageshack.us)

(if the above attachment didn't work, it's an error message "there is no function named "convertttoyv12", mvbob.avs, line 115") This is straight out of your mvbob.rar file, unedited. Here's the script that produced it:

import("d:\Program Files\AviSynth 2.5\plugins\mvbob\mvbob.avs")
AVISource("h:\assets\mc2\pal\groovy.avi").ConvertToYUY2(interlaced=true).AssumeTFF
mvbob
mvconv
info

BTW, mvbob works fine now that it's in its own directory, thanks for the tip :-) And it is definitely the best -- and slowest -- bobber I've ever used. For longer projects, I will probably fall back to TDeint(order=1,mode=1,type=0,sharp=false,AP=50,APtype=0) for speed reasons since the quality is only about 2% worse than mvbob with my footage.

Trixter
5th July 2006, 19:24
You are supposed to extract the MVBob package to its own directory. Then when you import the mvbob.avs in your script, it loads the correct mvtools.dll which is also in the MVBob directory. That's why there is no path in the LoadPlugin line.

Indeed, that fixed one of the issues, thanks very much!

Boulder
5th July 2006, 19:50
You can (and probably should) replace that mvtools.dll by the most recent one, or load it separately after importing mvbob.avs like scharfi said.

scharfis_brain
5th July 2006, 23:01
oh okay. that's a typo, indeed. (I wasn't aware of it)

but I thought you were referring to the truemotion-thing

Trixter
7th July 2006, 05:08
but I thought you were referring to the truemotion-thing

Originally, I was :-) I put it all into its own directory and all is well.

Your understanding of proper bobbing is impressive; one wonders what Faroudja units use (not motion synthesis, that's for sure).

scharfis_brain
7th July 2006, 14:42
I guess that faroudja uses a similar thing like securedeint (eedi2 + motionmask) and a 3:2 / 2:2 Pulldown detection for FILM-sequences.