Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th November 2004, 01:54   #41  |  Link
zeus163
Registered User
 
Join Date: Apr 2002
Posts: 134
OK, first I have to say, that I'm a cut and paste script writer. Now that I have that off my chest, I'm trying to get MVbob working. I first found out that I needed to upgrade my kerneldeint, which I did. Then I got an undot error and went and found that. Next, I got a tomsmocomp error. I went and got that and put it in. But now I get I get this error: "Script error: motion mask does not have a named argument "thy1" (line 60). I see that joshbm had this error and tried his fix, but that didn't work for me by capitalizing the "Y" in thy. Searching for "thy" obviously produced too many results. I'm sure there is something I'm overlooking, but I don't know what it is.

TIA
zeus163 is offline   Reply With Quote
Old 12th November 2004, 02:01   #42  |  Link
malkion
Registered User
 
Join Date: Feb 2004
Posts: 156
motion mask uses masktools.dll

MaskTool 1.5.4
malkion is offline   Reply With Quote
Old 12th November 2004, 02:07   #43  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
hmmm... to be honest i just got home and haven't had a chance to try out Scharfi's latest effort, but i'm thinking maybe you don't have an up-to-date masktools?

there's a thread in avisynth development that will have the latest version in it (if you've got a HyperThreading enabled P4, then read the thread carefully...).

http://forum.doom9.org/showthread.ph...0&pagenumber=2

download the one with the binarize fix... it's the latest. get the second one below it if you have a HT P4.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 12th November 2004, 04:06   #44  |  Link
zeus163
Registered User
 
Join Date: Apr 2002
Posts: 134
Thanks guys! Got back from $0.50 taco night and there was my answer. I got it going now. Woo-hoo!

Now to try it on some small clips.
zeus163 is offline   Reply With Quote
Old 19th January 2005, 02:27   #45  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 291
balazer,

I believe file atachments have to be approved by the admin before they show up on this forum.
Socio is offline   Reply With Quote
Old 19th January 2005, 02:40   #46  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,924
Quote:
Originally posted by Socio
balazer,

I believe file atachments have to be approved by the admin before they show up on this forum.
Done.
Guest is offline   Reply With Quote
Old 19th January 2005, 03:17   #47  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 291
I have tried this script with three versions of MvTools and always get the same error:

Script error" mvanalyse does not have a named argument "compensate"


Edit:
I think I found the problem had to change a couple "compensate" 's to "mvcompensate" in the script.

Nope that did not fix it, now I get

Script error" mvanalyse does not have a named argument "mvcompensate"

if I try MVCompensate I get:

Script error" mvanalyse does not have a named argument "MVCompensate"




Figured it out!

I had to edit out "compensate=false" from these two lines in the script and it worked!

# create motion vectors
mvf=bobd.mvanalyse(blksize=blksize,pel=pel,isb=false,compensate=false,search=3,searchparam=10)
mvb=bobd.mvanalyse(blksize=blksize,pel=pel,isb=true, compensate=false,search=3,searchparam=10)


Ultra freaking slow though, 2936 frames est time 3hrs 55 minutes!

Last edited by Socio; 19th January 2005 at 04:07.
Socio is offline   Reply With Quote
Old 19th January 2005, 05:20   #48  |  Link
balazer
Registered User
 
Join Date: May 2003
Location: Ann Arbor MI
Posts: 15
You were right about the problem. Corrected here:

I've tried scharfis_brain's MVBob and found it to be, simply, the best de-interlacer I've ever seen or used. It's amazing. I almost forget that I'm watching an interlaced source. Here is the original post, with usage instructions:
http://forum.doom9.org/showthread.ph...r=2#post566854

I've assembled all the required parts here, hoping that it will be easier for people to use. If you put all the required AVISynth plugin DLLs in your plugins folder and enable auto-loading, you won't have to load any plugins explicitly.
http://www.avisynth.org/AviSynthPlugins

Attached is scharfis_brain's MVBob, modified to reflect a change in the function name of LeakKernelDeint. Rename it to MVBob.avsi and put it in your plugins folder.

These are the other parts you'll need:

UnDot v0.0.1.1 and TomsMoComp v0.0.1.7 :
http://www.trbarry.com/
or
http://www.avisynth.org/warpenterprises/

MVTools 0.9.8.5 and MaskTools 1.5.6:
http://manao4.free.fr/
or
http://forum.doom9.org/showthread.ph...hlight=mvtools

LeakKernelDeint 1.5.3:
http://gast3.ssw.uni-linz.ac.at/~kp/...akKernelDeint/
or
http://forum.doom9.org/showthread.ph...ak+kerneldeint

To use MVBob you'll want to make sure that you have the clip's field parity set correctly before you pass the clip to MVBob. (follow the instructions in the KernelDeint readme)


I've encoded several clips and placed them online. They are just the finished product - not before & after or side-by-side comparisons.
http://www.eecs.umich.edu/~balazer/mmb_media/
Attached Files
File Type: txt mvbob.avsi.txt (3.9 KB, 319 views)
balazer is offline   Reply With Quote
Old 19th January 2005, 14:16   #49  |  Link
Valky
Registered User
 
Valky's Avatar
 
Join Date: Feb 2002
Location: Finland
Posts: 275
Quote:
Originally posted by balazer
You were right about the problem. Corrected here:

I've tried scharfis_brain's MVBob and found it to be, simply, the best de-interlacer I've ever seen or used. It's amazing. I almost forget that I'm watching an interlaced source. Here is the original post, with usage instructions:
http://forum.doom9.org/showthread.ph...r=2#post566854

I've assembled all the required parts here, hoping that it will be easier for people to use. If you put all the required AVISynth plugin DLLs in your plugins folder and enable auto-loading, you won't have to load any plugins explicitly.
http://www.avisynth.org/AviSynthPlugins

Attached is scharfis_brain's MVBob, modified to reflect a change in the function name of LeakKernelDeint. Rename it to MVBob.avsi and put it in your plugins folder.

These are the other parts you'll need:

UnDot v0.0.1.1 and TomsMoComp v0.0.1.7 :
http://www.trbarry.com/
or
http://www.avisynth.org/warpenterprises/

MVTools 0.9.8.5 and MaskTools 1.5.6:
http://manao4.free.fr/
or
http://forum.doom9.org/showthread.ph...hlight=mvtools

LeakKernelDeint 1.5.3:
http://gast3.ssw.uni-linz.ac.at/~kp/...akKernelDeint/
or
http://forum.doom9.org/showthread.ph...ak+kerneldeint

To use MVBob you'll want to make sure that you have the clip's field parity set correctly before you pass the clip to MVBob. (follow the instructions in the KernelDeint readme)


I've encoded several clips and placed them online. They are just the finished product - not before & after or side-by-side comparisons.
http://www.eecs.umich.edu/~balazer/mmb_media/

"There is no function called "kernelbob" on line 42"
Is this error somehow related to changes in kerneldeint, since I have downloaded all the tools you mentioned?

Code:
bobx=bobx.kernelbob(order=order,threshold=bobth).undot()
Btw, your video clips looked REALLY nice on your website (I watched that 93mb clip with flag and some stadium audience)

Last edited by Valky; 19th January 2005 at 14:20.
Valky is offline   Reply With Quote
Old 19th January 2005, 18:07   #50  |  Link
balazer
Registered User
 
Join Date: May 2003
Location: Ann Arbor MI
Posts: 15
The kernelbob problem is fixed in the version of MVBob that I attached. We'll have to wait for the mods to approve the new attachment.
balazer is offline   Reply With Quote
Old 19th January 2005, 18:19   #51  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,605
One can clearly see the MV-mismatches in the video michiganmarchingband.
especially on patterned textures.

I hope to get this knocked out with an updated mvtools.dll of manao.


I am waiting for the corrector_double() , as I suggested some time ago

If this corrector exists, I can easily integrate the global motion compensation of depan.dll and a better mismatch handling than the one of the current version of mvbob().
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 19th January 2005, 20:36   #52  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by Valky
"There is no function called "kernelbob" on line 42"
Is this error somehow related to changes in kerneldeint, since I have downloaded all the tools you mentioned?

Code:
bobx=bobx.kernelbob(order=order,threshold=bobth).undot()
It's called LeakKernelDeint now; just add the missing "Leak" and it should work...

np: Zorn - Michelle's Unblockable (The City's Collapsing (But Not Tonight))
Leak is offline   Reply With Quote
Old 19th January 2005, 20:39   #53  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
I heard the call, here is a release with Corrector modified to your liking :

MVTools v0.9.9

There are other changes, but still no temporal interpolators ( they are tricky, though results are better ( & slower ) than before )
Manao is offline   Reply With Quote
Old 19th January 2005, 21:51   #54  |  Link
Valky
Registered User
 
Valky's Avatar
 
Join Date: Feb 2002
Location: Finland
Posts: 275
Quote:
Originally posted by joshbm
I get "Script error: motion mask does not have a named argument "thy1" (line 69).

I have the latest MVTools as well as MaskTools.

[fixed] lol.. Kind of weird but I capitalized it to thY1. It worked like a charm.

PS- This thing works awesome!

Regards,
Josh
Didn't work here. I have already get to this point after numerous other errors in script. What else did you do? error in row 60.
Valky is offline   Reply With Quote
Old 19th January 2005, 22:15   #55  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,605
@manao: wow. THAT was fast!
many many thanks.

@all:
if I have some time, I'll take a deeper look into mvbob().
(hopefully this or following weekend)

mvbob() will need a complete rebuild. it currently is too much unstructurized.

also, I would like to bundle a mvbob-package, like I did with restore24 to avoid major confusion with updated plugins and/or Copy/Paste mistakes.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 19th January 2005, 22:25   #56  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
scharfi : in fact, I had it in my sleeves for two weeks now, but i was trying to finish these damned interpolators. But since waiting for having a fine results with them would have taken too long, here is the new release.

BTW, I take the opportunity here to say that if you're encoutering a strange behavior with the latest version ( not necessarily with Corrector ), don't try too hard to find a bug on your side of the script, the chance is high the issue is on my side ( as always, a lot of changes everywhere... ).
Manao is offline   Reply With Quote
Old 20th January 2005, 18:59   #57  |  Link
balazer
Registered User
 
Join Date: May 2003
Location: Ann Arbor MI
Posts: 15
Seems attachments are a bit of a pain, as mods don't always approve them quickly (or at all). No disrespect to the mods - just seems silly that a text file attachment would need to be approved.

This MVBob works per my previous post. Use MVTools 0.9.8.5, not the newer 0.9.9. Save the following code into a file MVBob.avsi and put it in your plugins folder.

Code:
#LoadPlugin("c:\program files\avisynth 2.5 filters\LeakKernelDeint.dll")
#LoadPlugin("C:\Program Files\AVISynth 2.5 Filters\undot.dll")
#LoadPlugin("C:\Program Files\AVISynth 2.5 Filters\tomsmocomp.dll")
#LoadPlugin("C:\Program Files\AVISynth 2.5 Filters\mvtools.dll")
#LoadPlugin("C:\Program Files\AVISynth 2.5 Filters\masktools.dll")

#Modified from scharfis_brain's post:
#http://forum.doom9.org/showthread.ph...r=2#post566854

#requires UnDot v0.0.1.1, TomsMoComp v0.0.1.7, MVTools 0.9.8.5, MaskTools 1.5.6, and LeakKernelDeint 1.5.3


function MVbob(clip c,int "blksize", int "pel", int "lambda", int "thy", int "thc", int "bobth", bool "predenoise", bool "showmask")
{

#Helper functions:

	function tmcstupid(clip c)
	{	input=c.converttoyuy2(interlaced=true).separatefields.tomsmocomp(1,-1,0)
		a = getparity(input) ? input.selectodd : input.selecteven
		b = getparity(input) ? input.selecteven : input.selectodd
		a=stackvertical(a.crop(0,0,0,1-a.height),a.crop(0,0,0,-1))
		output = getparity(input) ? interleave(b,a) : interleave(a,b)
		output.assumeframebased().converttoyv12()
	}

#disable all scene detection, because it is self-correcting 
sc=255 

showmask=default(showmask,false)

# luma and chroma thresholds for correcting false detected motion 
thy=default(thy,20) 
thc=default(thc,10)

# threshold of kerneldeint
bobth=default(bobth,8)

#denoise the video for kerneldeint (better static areas for noisy video)
predenoise=default(predenoise,false)

blksize=default(blksize,4)
scd=(blksize==8)? 300 : round(300/4)
pel=default(pel,2)

#I decided lambda=0 being better, cause it stupidly trys to catch everything. errors are corrected afterwards.
lambda=default(lambda,0)

#determine clip Fieldorder
order=(c.getparity==true)? 1:0

# create clip for motion analysis and hole-filling
bobx=predenoise ? c.temporalsoften(2,5,7) : c
bobx=bobx.leakkernelbob(order=order,threshold=bobth).undot()
bobd=bobx.verticalreduceby2()
#bobd=bobd.lanczos4resize(bobx.width,bobx.height) 
bobd=bobd.tomsmocomp(-1,-1,0).undot()

# create clip for motion compensation
fields=c.tmcstupid().undot()

# define clip for hole filling
fields1=bobx 

# create motion vectors
mvf=bobd.mvanalyse(blksize=blksize,pel=pel,isb=false,search=3,searchparam=10)
mvb=bobd.mvanalyse(blksize=blksize,pel=pel,isb=true, search=3,searchparam=10)

# detect mismatched areas of motion compensation
bobdf=bobd.mvcompensate(mvf,mode=1,thscd1=scd,thSCD2=sc)
bobdb=bobd.mvcompensate(mvb,mode=1,thscd1=scd,thSCD2=sc)
difff=interleave(bobdf,bobd).motionmask(thy1=thy,thy2=thy,thc1=thc,thc2=thc,thSD=sc).selectodd()
diffb=interleave(bobdb,bobd).motionmask(thy1=thy,thy2=thy,thc1=thc,thc2=thc,thSD=sc).selectodd()
diff=logic(difff,diffb,"OR")

# do the deinterlacing
even1=c.separatefields().selecteven()
odd1a=fields.mvcompensate(mvf,mode=1,thscd1=scd,thSCD2=sc)
odd1a=maskedmerge(odd1a,fields1,difff,y=3,u=3,v=3).selecteven()
odd1b=fields.mvcompensate(mvb,mode=1,thscd1=scd,thSCD2=sc)
odd1b=maskedmerge(odd1b,fields1,diffb,y=3,u=3,v=3).selecteven()
odd1=mergeluma(odd1a,odd1b,0.5).mergechroma(odd1b,0.5)
odd1=(order==1) ? odd1.separatefields().selecteven() : odd1.separatefields().selectodd()

even2=c.separatefields().selectodd()
odd2a=fields.mvcompensate(mvf,mode=1,thscd1=scd,thSCD2=sc)
odd2a=maskedmerge(odd2a,fields1,difff,y=3,u=3,v=3).selectodd()
odd2b=fields.mvcompensate(mvb,mode=1,thscd1=scd,thSCD2=sc)
odd2b=maskedmerge(odd2b,fields1,diffb,y=3,u=3,v=3).selectodd()
odd2=mergeluma(odd2a,odd2b,0.5).mergechroma(odd2b,0.5)
odd2=(order==1) ? odd2.separatefields().selectodd() : odd2.separatefields().selecteven()

even=interleave(even1,odd1)
even=even.weave()
odd=interleave(even2,odd2)
odd=odd.weave()

# output
interleave(even,odd)
analysis=maskedmerge(last.levels(0,1,255,0,200),diff,diff,y=3,u=3,v=3)
showmask ? analysis : last
}
balazer is offline   Reply With Quote
Old 20th January 2005, 20:54   #58  |  Link
Valky
Registered User
 
Valky's Avatar
 
Join Date: Feb 2002
Location: Finland
Posts: 275
I get this error on line 72 'motionmask does not have argument name thy1'
with this script too. I changed back to MVTools 0.9.8.5 as suggested.

Any idea where this error comes from? There were some solutions mentioned before to change to capital letters this 'thy1' but it didn't work with me. I guess this isn't virtualdub error?
Valky is offline   Reply With Quote
Old 20th January 2005, 21:04   #59  |  Link
kempfand
Registered User
 
kempfand's Avatar
 
Join Date: Oct 2001
Location: Switzerland
Posts: 225
I believe motionmask has a conflict with MPEG2DEC.dll.

I had the same error, deleted MPEG2DEC.dll, and it now works like a charm.

Andreas
kempfand is offline   Reply With Quote
Old 20th January 2005, 21:05   #60  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
MotionMask is a filter from the masktools, not related at all with MVTools.

However, MotionMask is also a filter present in one of the mpeg2dec ( don't remember which one ). To prevent avisynth to confuse them, replace motionmask by masktoolsdllname_motionmask ( as stated in avisynth's documentation ).
Manao is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.