How to add filters to script?

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Vanity
Joined: Fri Dec 28, 2007 10:52 pm
Status: XIII
Location: Everywhere, yet no where
Org Profile

How to add filters to script?

Post by Vanity » Wed Jan 07, 2009 7:13 pm

I keep getting this error and im not sure how to add these three filters to my script in the right order =/.

my script:

mpeg2source("C:\Documents and Settings\HP_Administrator\My Documents\My Music\vid.d2v")
ConvertToYV12(interlaced=true)
Telecide(order=1)
Crop(8,0,-8,0)
LanczosResize(640,480)


filters i want to add:

deen("a3d",4,11,10)
FastLineDarken(thinning=0)
SSXSharpen()
Tweak(sat=1.25)

How do i add these three to my script ?

User avatar
Krisqo
Cooking Oil
Joined: Mon Jul 07, 2003 1:22 pm
Status: W.O.A (Waiting on Aion)
Location: Moderating the Adobe Forums
Org Profile

Re: How to add filters to script?

Post by Krisqo » Wed Jan 07, 2009 7:29 pm

What is the error? Are the plugins in your AVISynth plugins folder?

As for order it's best to do your smoothing first followed by your sharpening since sharpening before smoothing will actually sharpen any artifacts making removal pretty difficult. Though some require you to place them in specific places. The order you have there looks okay. Maybe flip FastLineDarken and SSXSharpen.
Image

User avatar
Vanity
Joined: Fri Dec 28, 2007 10:52 pm
Status: XIII
Location: Everywhere, yet no where
Org Profile

Re: How to add filters to script?

Post by Vanity » Thu Jan 08, 2009 6:00 pm

This is the dam error i gotz =/
:evil:
Image

User avatar
Vax
Sexy black guy
Joined: Sat Oct 11, 2008 11:14 am
Status: Chayin
Location: New York
Org Profile

Re: How to add filters to script?

Post by Vax » Thu Jan 08, 2009 6:16 pm

From what I'm seeing it's saying there is no function named fastlinedarken.
So, you would insert this..

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)
into notepad and save it with the extension of .avsi into your avisynth plug-in directory. I don't think it was the order of your script that was wrong.

User avatar
Vanity
Joined: Fri Dec 28, 2007 10:52 pm
Status: XIII
Location: Everywhere, yet no where
Org Profile

Re: How to add filters to script?

Post by Vanity » Thu Jan 08, 2009 6:29 pm

now its saying that i don't have SSXsharpen when I already have Warpsharp in the plugin directory so idk what going on with that

User avatar
Vax
Sexy black guy
Joined: Sat Oct 11, 2008 11:14 am
Status: Chayin
Location: New York
Org Profile

Re: How to add filters to script?

Post by Vax » Thu Jan 08, 2009 7:05 pm

Zenkia wrote:now its saying that i don't have SSXsharpen when I already have Warpsharp in the plugin directory so idk what going on with that
http://aquilinestudios.org/avsfilters/sharpeners.html
Just scroll down a little and you'll find SSXsharpen.

User avatar
Vanity
Joined: Fri Dec 28, 2007 10:52 pm
Status: XIII
Location: Everywhere, yet no where
Org Profile

Re: How to add filters to script?

Post by Vanity » Thu Jan 08, 2009 8:46 pm

i did but it just has info on it....what do i do? :sweat:

User avatar
Vax
Sexy black guy
Joined: Sat Oct 11, 2008 11:14 am
Status: Chayin
Location: New York
Org Profile

Re: How to add filters to script?

Post by Vax » Thu Jan 08, 2009 9:25 pm

Zenkia wrote:i did but it just has info on it....what do i do? :sweat:
Did you not see the download link?
http://mf.creations.nl/avs/functions/
You downoad sharptools and save it into your plug-in directory. It is a function that allows SSXSharpen to work. So now I'm guessing that problem should be resolved. What next?

User avatar
Vanity
Joined: Fri Dec 28, 2007 10:52 pm
Status: XIII
Location: Everywhere, yet no where
Org Profile

Re: How to add filters to script?

Post by Vanity » Thu Jan 08, 2009 9:45 pm

can you copy the function because im not sure im copying it the correct way =|

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Re: How to add filters to script?

Post by Scintilla » Thu Jan 08, 2009 9:58 pm

When you saved the SharpTools file, did you remember to change the extension from .AVS to .AVSI so that the functions within can autoload?
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

Locked

Return to “AviSynth Help”