Issues with two script codes with new amvapp.

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 7:01 pm

Hello, I wanted to know if anybody knew why the code mftoon and the darkline() code doesnt want to work with the newamvapp software. I put those scripts with other ones and when i hit save and refresh, the video has an error when reopening and it has an error with these two codes. is there a reason why mftoon wont work?
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby Enigma » Tue Dec 08, 2009 7:23 pm

U need to download those plugins,I believe FastLine is in MaskTools1.5,Don't know about Toon doh :<
User avatar
Enigma
That jolly ol' bastid
 
Joined: 07 Mar 2009
Location: California
Status: Free

Re: Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 7:27 pm

Here is a picture of what error i get. its the same error that i get for fastlinedarkline code but it says no function named expand" etc etc.

Image
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 7:34 pm

Soup wrote:U need to download those plugins,I believe FastLine is in MaskTools1.5,Don't know about Toon doh :<


where do i find masktools1.5?
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 7:42 pm

I find it weird that these scripts are giving me errors when in my plugins folder in avisynth there is files named this.

fastlinedarkline.avs
mftoon-v0.52a.avs
mftoon-vo.54.avs which is what i just found in some maskedtools folder on this site. http://avisynth.org/warpenterprises/
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby Enigma » Tue Dec 08, 2009 7:52 pm

Save theses as .avs and put them in your plugins folder.

Code: Select all
function FastLineDarken( clip c, int "strength", int "luma_cap", int "threshold", int "thinning") {
   str = string(default(strength, 48) /128.)
   lum = string(default(luma_cap, 191))
   thr = string(default(threshold, 4))
   thinning = default(thinning,24)
   thn = string(thinning /16.)
   exin=c.mt_expand().mt_inpand()
   diff = mt_lutxy(c,exin,yexpr="y "+lum+" <y> x y "\
      +lum+" < y "+lum+" ? - 0 ? 127 +",uexpr="x",vexpr="x")
   linemask = mt_lut(diff.mt_inpand(),"x 127 - "+thn+" * 255 +")\
      .mt_convolution("1 1 1","1 1 1",y=3,u=0,v=0)
   thick = mt_lutxy(c, exin, yexpr="y "+lum+" <y> x y "\
      +lum+" < y "+lum+" ? - 0 ? "+str+" * x +",uexpr="x",vexpr="x")
   thin = mt_lutxy(c.mt_expand(),diff,yexpr="x y 127 - "+str+" 1 + * +")
   return (thinning == 0) ? thick : mt_merge(thin,thick,linemask,y=3,u=4,v=4)
}


AND

Code: Select all
#############################
# FastLineDarken 1.3 MT MOD #
#############################
#
# Written by Vectrangle, last update 12 Sept 04
#
#  * requires masktools 1.5.1 -- http://jourdan.madism.org/~manao/
#  * requires yv12 input
#
# Usage is FastLineDarken(strength, luma_cap, threshold, thinning),
#   named parameters are supported eg FastLineDarken(thinning=0)
#
# Note that you must import this avs into your script using import("...\FastLineDarken.avs")
#
# Parameters are:
#  strength (integer)  - Line darkening amount, 0-256. Default 48. Represents the _maximum_ amount
#                        that the luma will be reduced by, weaker lines will be reduced by
#                        proportionately less.
#  luma_cap (integer)  - value from 0 (black) to 255 (white), used to stop the darkening
#                        determination from being 'blinded' by bright pixels, and to stop grey
#                        lines on white backgrounds being darkened. Any pixels brighter than
#                        luma_cap are treated as only being as bright as luma_cap. Lowering
#                        luma_cap tends to reduce line darkening. 255 disables capping. Default 191.
#  threshold (integer) - any pixels that were going to be darkened by an amount less than
#                        threshold will not be touched. setting this to 0 will disable it, setting
#                        it to 4 (default) is recommended, since often a lot of random pixels are
#                        marked for very slight darkening and a threshold of about 4 should fix
#                        them. Note if you set threshold too high, some lines will not be darkened
#  thinning (integer)  - optional line thinning amount, 0-256. Setting this to 0 will disable it,
#                        which is gives a _big_ speed increase. Note that thinning the lines will
#                        inherently darken the remaining pixels in each line a little. Default 24.
#
# Changelog:
#  1.3  - added ability to thin lines, now runs much slower unless thinning=0. Changed the defaults (again)
#  1.2  - huge speed increase using yv12lutxy =)
#       - weird darkening issues gone (they were caused by yv12layer)
#       - show option no longer available due to optimizations. Use subtract() instead
#  1.1  - added luma_cap option
#  1.0  - initial release
#


function FastLineDarkenMOD( clip c, int "strength", int "luma_cap", int "threshold", int "thinning")
{
## parameters ##
str    = string(default(strength, 48) /128.)
lum    = string(default(luma_cap, 191))
thr    = string(default(threshold, 4))
thinning = default(thinning,24)
thn    = string(thinning /16.)

## filtering ##
exin   = c.mt_expand().mt_inpand()
diff    = mt_lutxy(c,exin,yexpr="y "+lum+" < y "+lum+" ? x "+thr+" + > x y "+lum+" < y "+lum+" ? - 0 ? 127 +",uexpr="x",vexpr="x",u=2, v=2)
linemask= mt_lut(diff.mt_inpand(),"x 127 - "+thn+" * 255 +").mt_convolution("1 1 1","1 1 1",y=3,u=0,v=0)
thick    = mt_lutxy(c, exin, yexpr="y "+lum+" < y "+lum+" ? x "+thr+" + > x y "+lum+" < y "+lum+" ? - 0 ? "+str+" * x +",uexpr="x",vexpr="x",u=2, v=2)
thin    = mt_lutxy(c.mt_expand(U=2,V=2),diff,yexpr="x y 127 - "+str+" 1 + * +",u=2, v=2)

return (thinning == 0) ? thick : mt_merge(thin,thick,linemask,y=3,u=2,v=2)
}


Now for Toon = http://www.sendspace.com/file/hy2dq8
User avatar
Enigma
That jolly ol' bastid
 
Joined: 07 Mar 2009
Location: California
Status: Free

Re: Issues with two script codes with new amvapp.

Postby Enigma » Tue Dec 08, 2009 7:53 pm

By the way Mftoon is the same as Toon :x
User avatar
Enigma
That jolly ol' bastid
 
Joined: 07 Mar 2009
Location: California
Status: Free

Re: Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 8:03 pm

Soup wrote:By the way Mftoon is the same as Toon :x


ah i see. well this sucks...its still giving me that same error as the picture above....i dont know what is so different with the new amvapp software with the avisynth stuff.
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby Enigma » Tue Dec 08, 2009 8:06 pm

Rather odd :x They work for me.
User avatar
Enigma
That jolly ol' bastid
 
Joined: 07 Mar 2009
Location: California
Status: Free

Re: Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 8:08 pm

it looks like i already have those plugins...its just that when they get that error says something about no function named maskmerged for the mftoon and no function named expand for the fastlinedarkline. I have windows 7 in my computer, but dont see why that wouldnt work, when its the amvapp. do you have amvapp 3.0? or do you have the old amvapp 21?
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby SacredArrow18 » Tue Dec 08, 2009 9:34 pm

I fixed the problem. apparently i had to install the old amvapp then install the separate stuff from the new amvapp and the codes now work. i dont know what caused that to happen, but at least i got it fixed and can use those scripts again, but thanks for your help.
Image
Image
User avatar
SacredArrow18
 
Joined: 14 Mar 2005
Location: Ohio

Re: Issues with two script codes with new amvapp.

Postby Bakadeshi » Sat Dec 19, 2009 4:47 pm

yea masktools seems to not come in the new amvapp, but it does in the old one, which is why it worked when you reinstalled the old one. For future refrence, you need to install the masktools package from here into your avisynth plugins directory. Just having the avs files that soup mentioned will not work since the avs files are refrencing other plugins that come in the masktools package that arn't present.
User avatar
Bakadeshi
Abuses Spellcheck
 
Joined: 29 Sep 2003
Location: Atlanta, GA

Re: Issues with two script codes with new amvapp.

Postby Zarxrax » Sun Dec 20, 2009 11:39 am

The new amvapp contains masktools 2, which is not compatible with the original masktools. So functions that rely on masktools 1 wont work unless they are upgraded. Mftoon wasnt included in the new amvapp because its rather old now, so I wouldn't recommend anyone to use it anymore.
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: Issues with two script codes with new amvapp.

Postby Kariudo » Sun Dec 20, 2009 1:34 pm

It is worthwhile to mention, however, that you can have both masktools and mt_masktools (v1 and v2 respectively) in your plugins folder at the same time without causing problems
ImageImage
Image
User avatar
Kariudo
Twilight prince
 
Joined: 15 Jul 2005
Location: Los taquitos unidos
Status: 1924 bots banned and counting!


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest