VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
Thread
  1. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    Hows everyone? Been awhile for me. I am trying to add a vdub script to avsp and its giving errors. I dont know what I am doing wrong. Here's a copy as it is written and pasted in to avsp

    AVISource("D:\folder\party.avi")
    Trim(3288,6055) ++ Trim(6325,6868) ++ Trim(7133,7820) ++ Trim(7943,8545) ++ Trim(13095,13415) ++ Trim(13612,15088) ++ Trim(17221,17836) ++ Trim(18463,19145)
    Levels(0, 1.062, 189, 31, 255)
    function VD_MSU SmartBrightness(clip clip, int "strength", int "treshold")
    {
    LoadVirtualDubPlugin("...\Virtual Dub\plugins\MSU_SmartBrightness.vdf","MSUSmartBrightn ess", 0)
    clip=AVISource("D:\Video\Samples\MSU.avi", false, "RGB24")
    clip.ConvertToRGB32.MSUSmartBrightness(0, 150, 100, 0)
    }

    Can someone tell me, by looking at this, what I did wrong?
    That is one filter I wish cam included with avisynth, because I use the filter a lot to brighten those homemade vid that are a tad bit too dark. greatly appreciated!!
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    What errors are you getting?
    Is that the complete script? You don't actually call the function you declared.
    Also, the function itself is very odd, having a clip parameter that is overwritten by calling AviSource.

    It's not clear what you meant to do, but most likely you want to remove the line
    clip=AVISource("D:\Video\Samples\MSU.avi", false, "RGB24")
    and add (after Levels) this line:
    VD_MSU SmartBrightness()
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    You don't say what errors, so it's a bit difficult.

    Anyway, just to be neater, if this is a filter you're using often, put it in an AVSI file in the Avisynth plugins folder and you can then just call it in any AVS script.
    Also replace "...\Virtual Dub\plugins" with the full pathname, (starting with C:\ or whatever drive you have it on). This will only work now if you call it from a specific directory.

    And is it really "treshold", not "threshold", or "thresh" as many scripts seem to use?

    If you're doing it inline, you don't need to define a function at all, as you don't call it anyway -- not to be rude, but do you understand how functions work in Avisynth?

    Maybe something like this would be what you're trying to do (again, substitute the correct pathname to the vdf):

    Code:
    LoadVirtualDubPlugin("...\Virtual Dub\plugins\MSU_SmartBrightness.vdf","MSUSmartBrightness", 0) 
    AVISource("D:\folder\party.avi") 
    Trim(3288,6055) ++ Trim(6325,6868) ++ Trim(7133,7820) ++ Trim(7943,8545) ++ Trim(13095,13415) ++ Trim(13612,15088) ++ Trim(17221,17836) ++ Trim(18463,19145) 
    
    Levels(0, 1.062, 189, 31, 255) # why???
    
    ConvertToRGB32()
    MSUSmartBrightness(0, 150, 100, 0)
    -- And if MSUSmartBrightness is so smart, why do you use Levels at all, and why before using the MSU filter?
    You can adjust the parameters in the MSU function to do that.
    Quote Quote  
  4. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    Okay, I see what I did wrong. I tried the script this way:

    LoadVirtualDubPlugin("C:\Program Files\VDub\plugins\MSU_SmartBrightness.vdf","MSUSmartBrightn ess", 0)
    clip=AVISource("D:\wetness\partygirls.avi", false, "RGB24")
    clip.ConvertToRGB32.MSUSmartBrightness(0, 150, 100, 0)
    Trim(3288,6055) ++ Trim(6325,6868) ++ Trim(7133,7820) ++ Trim(7943,8545) ++
    Trim(13095,13415) ++ Trim(13612,15088) ++ Trim(17221,17836) ++ Trim(18463,19145)


    It worked. However, I thought this script would enable sliders like in Vdub. Thats something else I have to work out..
    I definitely would not need levels with this, but I am trying everything available out to see what best suits me.
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by willmoodom
    I thought this script would enable sliders like in Vdub. Thats something else I have to work out.
    avsp doesn't know what parameters MSUSmartBrightness has, so can't add sliders automatically.
    But you can add them manually - see the menu 'Help - User Sliders'.
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by willmoodom
    It worked. However, I thought this script would enable sliders like in Vdub. Thats something else I have to work out..
    I definitely would not need levels with this, but I am trying everything available out to see what best suits me.
    AvsP doesn't know about every function, you need to add a definition:

    Edit/Avisynth Function/Show function definition/New function

    and there you fill in the parameters and define sliders.
    Quote Quote  
  7. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    After reading a few posts about the "Ylevels" filter I wanted to try it out. I downloaded the masktools v.1.5.8.
    I pasted this script in:

    function YlevelsG(clip clp, int a, float gamma, int b, int c, int d)
    { wicked="x "+string(a)+" - "+string(b)+" "+string(a)+" - / 1 "+string(gamma)+" / ^ "+string(d)+" "+string(c)+" - * "+string(c)+" + 255 x 162,97466 / cos 255 * - * x x 162,97466 / cos 255 * * + 255 /"
    return( clp.YV12LUT(Yexpr = wicked, U=2,V=2) )
    }


    And I swear I see no difference at all. What am I missing? what procedures did I not follow? My objective is to brighten some avi videos without bleaching and distortion.
    Quote Quote  
  8. You can try HDRAGC() , it's a very good filter for "brightening".

    If it becomes too much you can limit it as well (read the documenation, there are lots of controls to adjust if you want)
    Quote Quote  
  9. Originally Posted by willmoodom
    And I swear I see no difference at all.
    I don't use YLevelsG. Try YLevelsS instead:

    YLevelsS(0,2.0,255,0,255)

    That's pretty strong and you might have to tone it down a bit (lower the 2.0 to 1.5 or whatever). But you'll easily notice a difference.

    Also, you don't paste that function script into an .avs without also using it with something like I just supplied. So, in your case, it really is doing nothing at all. Better is to put it into your AviSynth plugins folder as an .avsi so it loads automatically. Either that or put it into the plugins folder and import it into your script:

    Import("C:\Path\To\YLevels.avsi")

    And then add a line into your script similar to the one above. Be careful, though, as it's easily to over-contrast your video when using it and you might have to lower the contrast with Tweak to compensate.
    Quote Quote  
  10. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by willmoodom
    I pasted this script in:

    function YlevelsG(clip clp, int a, float gamma, int b, int c, int d)
    { ...
    }

    And I swear I see no difference at all. What am I missing?
    Just like in your first post, you are missing the function call.
    The "function ... { ... }" bit only defines the function and makes it available - on its own it does not do anything else. (How could it? It cannot know what values you want for the parameters.)
    So (as manono points out), you need to add a line like
    YLevelsG(0,2.0,255,0,255)
    which calls the function with the given values and applies it to your clip.
    (The values I used here are just an example and not necessarily the best for your clip.)
    Quote Quote  
  11. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    alright, so I succeeded in loading both the MSU smartbrightness filter and the hdrac filter. though I am still having problems getting the Ylevels to load. It's my understanding that a script should be saved as avs extension and put in the avisynth plugin folder before it can be imported. Is this correct? what I wrote definitely is not working. I'm getting the error "import couldnt open the file" path I dont know code of any kind, so I'm learning as I go. sometimes a nudge in the right direction is all one need. how should the script be written to allow me to load Ylevels?
    Quote Quote  
  12. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by willmoodom
    alright, so I succeeded in loading both the MSU smartbrightness filter and the hdrac filter. though I am still having problems getting the Ylevels to load. It's my understanding that a script should be saved as avs extension and put in the avisynth plugin folder before it can be imported. Is this correct?
    No.
    If you save a file with an .avsi extension, and put it in the plugin folder, it will be automatically imported and available for other scripts.
    If you explicitly Import() a .avs script, it can be anywhere.

    But for experimenting, simpler to just put your function in your AVS file.

    When you know what you want to use, save those functions you need to an AVSI.

    See http://avisynth.org/mediawiki/Main_Page and
    and http://avisynth.org.ru/docs/english/ for lots of background, tutorials, examples.
    Quote Quote  
  13. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    If you are using Import, it's best to use a full path name for the file, eg
    Import("C:\whatever\script.avs")
    because you can't always rely on the 'current folder' being what you want in all applications.

    There is also Avisynth documentation installed on your computer in
    C:\Program Files\AviSynth 2.5\Docs\English\index.htm
    I think AlanHK's second link is basically a copy of that documentation.
    Quote Quote  
  14. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    Thanks for the reply. I've read and continue to read through those manuals. Every time I go in , I see something I didn't before.
    Anyway, I put the full path and nothing. Here is a complete copy of something I'm working on:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\AGC.dll")
    LoadVirtualdubPlugin("C:\Program Files\Virtual dub\plugins\MSU_Smart_Deblocking.vdf","MSUSmartDebloc king",0)
    LoadVirtualdubPlugin("C:\Program Files\Virtual dub\plugins\MSUDenoiser251.vdf","MSUDenoiser",1)
    LoadVirtualDubPlugin("C:\Program Files\Virtual dub\plugins\msu_sharpen.vdf","MSUSmartSharpen", 0)
    AVISource("D:\wetness\partygirls.avi")
    ConvertToRGB32(matrix="Rec601", interlaced=False)
    MSUSmartDeblocking(1,1,1,1)
    MSUDenoiser(0, 1, [<"denoise", 50, 100, 50>],1)
    MSUSmartSharpen([<"sharpen", 0, 10, 0>])
    ConvertToYV12(matrix="Rec601", interlaced=False)
    HDRAGC(10.0, 1.3,[<"co gain", 1.0, 10.0, 3.0>],5.0,0.0,[<"co sat", 0.0, 5.0, 1.0>],1,0,1,0,1,[<"shift", 1, 09, 1>],0,true,[<"shift_u", -20, 20, 0>],0,0.75,[<"reducer", 0.5, 2.0, 0.5>],0,[<"LUMA", -200, 100, -161>],[<"black clip", -0.00028, 30, -0.00028>],2)
    Trim(3288,6055) ++ Trim(6325,6868) ++ Trim(7133,7820) ++ Trim(7943,8545) ++ Trim(13095,13415) ++ Trim(13612,15088) ++ Trim(17221,17836) ++ Trim(18463,19145)

    Everything look good? I have the smartblock filter in the Vdub plugin folder where it belongs, but It wont load. The error I get is: Script error: there is no function named "MSUSmartDeblocking" (partygirls1.avs,line7).
    What could be preventing that filter from coming up? Right now none of the filters that I'm using are garunteed. I am just trying things out to see what they actually do. This video turned out okay except with the brighter enhancement, Ithe picture is a tad bit blurry or runny. I suppose that is the blockiness according to the picture sample on "compression.ru" site. Avisynth and avsp are awesome . I wish I had some of the knowledge you guys have with these programs ,code writing and film in general. alot of the filters I dont know what they do so I have to try them to see the affect. Anyway, I am hooked un this hobby and will continue learning.
    Quote Quote  
  15. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    That's odd. To get as far as line 7, it must have loaded the plugin OK, and yet it says the function does not exist.

    Perhaps you have the wrong type or number of parameters when calling MSUSmartDeblocking?
    (I'm not familiar with that filter, so I don't know).
    Even so, I would expect a different error in that case.

    Can you successfully use the other plugins if you 'comment out' or remove the call to MSUSmartDeblocking?
    Quote Quote  
  16. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    well I dont know what happened, but I removed the blocking filters and reinstalled one. The msu deblock seems to be working. next I'll try the smart version.
    Quote Quote  
  17. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    Finally! success!! Ylevels filter up and running. the problem could have been a number of things from have an older version of avisynth to the wrong mask. I will say this though. After updating the masktools kit,avisynth and avsp, the Ylevels script continued to cause problems. With the extension ".avsi" I could not open filter definitions in avsp and I would get an error after trying to load the filter through macros. What worked was loading it manually. renamed the extension .avs and by way of Import. Is it just me who has to do it this way?
    Quote Quote  
  18. Originally Posted by willmoodom
    Is it just me who has to do it this way?
    If named with the .avsi extension and sticking it in the AviSynth plugins folder, it should load automatically. If named with either the .avsi or the .avs extension, it can be imported into the script, something like this:

    Import("C:\Path\To\SRestore.avs")#or .avsi

    You only have to make sure it's named with the same extension in both the plugins folder and in the Import line. In the case of YLevels.avsi, it's named exactly like that in my plugins folder and I don't have to import it into the script as it loads automatically. I can just use it. So it's 'just you' that is probably doing something wrong. I don't use AVSP so I don't know what, if anything, it does differently. Is the behavior the same when opening scripts in VDub(Mod)? I use VDubMod for testing scripts.
    Quote Quote  
  19. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    Maybe I spoke too soon! As of right now, The ylevels filter works, but what ever the script did in ".avsi" version to cause an error, the damage is done. when I attempt to go to "Avisynth function>show function definition" I get an error box that says this:

    "Traceback (most recent call last):
    File "AvsP.pyo", line 5566, in OnMenuEditShowFunctionDefinition
    File "AvsP.pyo", line 8596, in ShowFunctionDefinitionDialog
    File "AvsP.pyo", line 1950, in __init__
    File "AvsP.pyo", line 2002, in CreateWindowElements
    KeyError: u'hdragc' "

    Does anyone know what this means? I had to remove the last avisynth and avsp version and reinstall to enable the "show function definition" Basically, I have know filters or plugins becuase of this error. I got the script from here: "http://avisynth.org/mediawiki/upload/1/1a/YLevels_mt.avsi" and downloaded the v2 masktools kit from here: "http://manao4.free.fr/masktools-v2.0a36.zip" by way of "doom9.org". So i assumed after spy and virus checks that all was well. Below is the script in question and the one i renamed the extension to ".avs" By looking at this, can some one tell me whats going on and whether I can repair the problem or do I have to remove the software again and reinstall them?

    ########
    # Levels transforms by Did?e
    # Requires MaskTools v2.0 or greater
    # last revision 2004-12-07; update to MaskTools v2.0 semantics 2008-03-09
    #
    # PARAMETERS:
    # "input_low" : (Default: 0)
    # "gamma" : (Default: 1.0)
    # "input_high" : (Default: 255)
    # "output_low" : (Default: 0)
    # "output_high" : (Default: 255)
    # "show_function" : (Default: false) - the function to be made into a lookup-table
    # transform, shown in postfix notation
    #
    # USAGE:
    # YLevels(0, 1.2, 255, 0, 255, false)
    # YLevels(0, 1.2, 255)
    # YLevels(gamma=1.2)



    # Constant
    function Ylevels(clip clp,
    \ int "input_low", float "gamma", int "input_high",
    \ int "output_low", int "output_high", int "show_function")
    {
    input_low = Default(input_low, 0)
    gamma = Default(gamma, 1.0)
    input_high = Default(input_high, 255)
    output_low = Default(output_low, 0)
    output_high = Default(output_high, 255)
    show_function = Default(show_function, false)

    wicked = "x " +string(input_low)+ " - " +string(input_high)+ " " +string(input_low)+ " - / 1 " +string(gamma)+
    \ " / ^ " +string(output_high)+ " " +string(output_low)+ " - * " +string(output_low)+ " +"

    return( show_function ? clp.subtitle(wicked) : clp.mt_lut(Yexpr = wicked, U=2,V=2) )
    }

    # Gradient
    function YlevelsG(clip clp,
    \ int "input_low", float "gamma", int "input_high",
    \ int "output_low", int "output_high", bool "show_function")
    {
    input_low = Default(input_low, 0)
    gamma = Default(gamma, 1.0)
    input_high = Default(input_high, 255)
    output_low = Default(output_low, 0)
    output_high = Default(output_high, 255)
    show_function = Default(show_function, false)

    wicked = gamma > 1.0
    \ ? "x " +string(input_low)+ " - " +string(input_high)+ " " +string(input_low)+ " - / 1 " +string(gamma)+
    \ " / ^ " +string(output_high)+ " " +string(output_low)+ " - * " +string(output_low)+ " + x * x 255 x - * + 255 /"
    \ : "x " +string(input_low)+ " - " +string(input_high)+ " " +string(input_low)+ " - / 1 " +string(gamma)+
    \ " / ^ " +string(output_high)+ " " +string(output_low)+ " - * " +string(output_low)+ " + 255 x - * x x * + 255 /"

    return( show_function ? clp.subtitle(wicked) : clp.mt_lut(Yexpr = wicked, U=2,V=2) )
    }

    # Sine
    function YlevelsS(clip clp,
    \ int "input_low", float "gamma", int "input_high",
    \ int "output_low", int "output_high", bool "show_function")
    {
    input_low = Default(input_low, 0)
    gamma = Default(gamma, 1.0)
    input_high = Default(input_high, 255)
    output_low = Default(output_low, 0)
    output_high = Default(output_high, 255)
    show_function = Default(show_function, false)

    wicked="x " +string(input_low)+ " - " +string(input_high)+ " " +string(input_low)+ " - / 1 " +string(gamma)+
    \ " / ^ " +string(output_high)+ " " +string(output_low)+ " - * " +string(output_low)+ " + x 162,97466 /" +
    \ " sin 255 * * x 255 x 162,97466 / sin 255 * - * + 255 /"

    return( show_function ? clp.subtitle(wicked) : clp.mt_lut(Yexpr = wicked, U=2,V=2) )
    }

    # Cosine
    function YlevelsC(clip clp,
    \ int "input_low", float "gamma", int "input_high",
    \ int "output_low", int "output_high", bool "show_function")
    {
    input_low = Default(input_low, 0)
    gamma = Default(gamma, 1.0)
    input_high = Default(input_high, 255)
    output_low = Default(output_low, 0)
    output_high = Default(output_high, 255)
    show_function = Default(show_function, false)

    wicked="x " +string(input_low)+ " - "+ string(input_high)+ " " +string(input_low)+ " - / 1 "+string(gamma)+
    \ " / ^ " +string(output_high)+ " " +string(output_low)+ " - * " +string(output_low)+ " + 255 x 162,97466" +
    \ " / cos 255 * - * x x 162,97466 / cos 255 * * + 255 /"

    return( show_function ? clp.subtitle(wicked) : clp.mt_lut(Yexpr = wicked, U=2,V=2) )
    }
    Quote Quote  
  20. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Sounds like a bug in AvsP.
    But I use AvsP and I have no problems with YLevels_mt.avsi in the plugins folder.
    Starting with a clean AvsP installation, what steps did you go through to produce the error?
    Have you already set up a user function definition for YLevels in AvsP?
    Or perhaps for some other function(s)?
    Quote Quote  
  21. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    At the time, no function was set up. Both times was a fresh install. step by step....I place the filter in the plugin folder, loaded the dllattempted to load the script and error. second time, I loaded the dll, the avi file and attempted the script and again error. I dont know.
    Quote Quote  
  22. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    On another subject relating to the scripts, when viewing the enhancements on avsp, everything looks good. But when I send the script to be viewed through external player, the picture looks as if it hasn't been touched. looks even worst after saving to avi w/ xvid codec. any reason for that?
    Quote Quote  
  23. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Which dll are you referring to here? (perhaps masktools?)
    And is it loaded via LoadPlugin or by automatic loading from plugin folder?
    Do you have any other added (ie not installed by Avisynth) files in your plugins folder?
    What is in your script?

    Sorry for all the questions, but with this sort of hard-to-reproduce error, every bit of information helps to narrow down the source of the problem.
    Quote Quote  
  24. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    I can just as easily send you or upload a screen capture(video) of what I am doing and where all my filters and dll's are. Infact, I'll remove and reinstall so there will be a fresh start.
    Quote Quote  
  25. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Just a hunch, and it may not be relevant, but do you have (or have you had) any avsi files in your plugins folder that contain things other than function and global variable definitions?

    And just to confirm my understanding of the problem you're experiencing: you say that if you put the YLevels avsi in the plugins folder, it stops AvsP's function definition dialog from working. If you take it out again, it works, or is it still screwed up?
    Quote Quote  
  26. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    Update to my issue, It turns out that I was not loading it correctly and also loading the wrong script. Let me see if I can explain.. If you look at the script, The first section without "#" says YLevels, then the parameters. Below that are the scripts for Ylevels G,C,S. Loading "Ylevels" is what caused the avsp hangup. But loading the other levels scripts G,C,S work fine. Also was trying to load or import the script. That turned out to be wrong. and thats when the YLevels shut things down. Now I made the function for the G,C,S and now I understand that the only thing I need to load is the Dll and video ofcourse. Then type in the Ylevels of choice, "tab" the parameters in and I'm in business. Jesus! took me 4 days to figure this out. with a little help from you guys Now I need to figure out why, after loading filters and enhancing my video, When played in external player, the video looks as if there are no filters installed. I've tried the view on Vdub, Vdubmod,windows media player and media player classic. same result. Is there something I have to tweak in order for the external player to receive the complete filtered video?
    Quote Quote  
  27. Give us your complete script.
    Quote Quote  
  28. Member
    Join Date
    Sep 2007
    Location
    United States
    Search Comp PM
    This is the script I'm using.:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll")
    AVISource("D:\wetness\partygirls.avi")
    YlevelsS([<"1", 0, 5, 0>],[<"2", 0.0, 5.0, 4.0>],[<"3", 10, 255, 192>],[<"4", -255, 255, 0>],[<"5", -300, 300, 227>],false)
    Trim(3288,6055) ++ Trim(6325,6868) ++ Trim(7133,7820) ++ Trim(7943,8545) ++ Trim(13095,13415) ++ Trim(13612,15088) ++ Trim(17221,17836) ++ Trim(18463,19145)

    As stated, when viewed within the Avsp player, everything looks as it should. But when I serve it to any external player, I get much less than. Almost as if there were no filters loaded; except for the Trim filter. That is as it should be. I have sliders set for the Ylevels filter.
    Quote Quote  
  29. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Are you invoking the external player from within AvsP, or manually outside AvsP?
    If manually, did you save your script first?

    Incidentally, you should be using mt_masktools-25.dll, not mt_masktools-26.dll, which is for the later, still experimental, version 2.6 of Avisynth. And if a dll is in the standard plugins folder, it gets loaded automatically, so you don't need to use LoadPlugin. (For that reason also, you should delete mt_masktools-26.dll from that folder.)
    Quote Quote  
  30. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by willmoodom
    This is the script I'm using.:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll")
    AVISource("D:\wetness\partygirls.avi")
    YlevelsS([<"1", 0, 5, 0>],[<"2", 0.0, 5.0, 4.0>],[<"3", 10, 255, 192>],[<"4", -255, 255, 0>],[<"5", -300, 300, 227>],false)
    Trim(3288,6055) ++ Trim(6325,6868) ++ Trim(7133,7820) ++ Trim(7943,8545) ++ Trim(13095,13415) ++ Trim(13612,15088) ++ Trim(17221,17836) ++ Trim(18463,19145)

    As stated, when viewed within the Avsp player, everything looks as it should. But when I serve it to any external player, I get much less than. Almost as if there were no filters loaded; except for the Trim filter. That is as it should be. I have sliders set for the Ylevels filter.

    It might not make a difference, but it would simplify the scripts if you added a function definition for YLevelsS to AvsP.

    Edit/Avisynth function/Show function definition.

    Then "edit function information" window will pop up. (Or click "New function".)

    Put the name "YLevelsS" and the arguments:
    Code:
    (
    clip clip,
    int input_low=0 (0 to 255),
    float gamma=1.00 (0.01 to 10.00),
    int input_high=255 (0 to 255),
    int output_low=0 (0 to 255),
    int output_high=255 (0 to 255)
    )
    (Just copied the existing definition of Levels, omitting "Coring".)

    I'm not sure about the parameter ranges you have in your script, if they're what you want, then use:

    Code:
    (
    clip clip,
    int input_low=0 (0 to 5),
    float gamma=1.00 (0.01 to 5.00),
    int input_high=255 (10 to 255),
    int output_low=0 (-255 to 255),
    int output_high=255 (-300 to 300)
    )

    Then instead of
    YlevelsS([<"1", 0, 5, 0>],[<"2", 0.0, 5.0, 4.0>],[<"3", 10, 255, 192>],[<"4", -255, 255, 0>],[<"5", -300, 300, 227>],false)
    you can use
    YLevelsS(0, 4.00, 192, 0, 227)
    and you will see named sliders in AvsP too.

    The inline sliders were used in earlier versions of AvsP and made the script rather messy. Only AvsP will understand parameters like "[<"1", 0, 5, 0>]") so AvsP has to comment them out and insert the normal Avisynth command when you save it. Using AvsP's internal definitions means the AVS file uses normal Avisynth syntax all the time.

    Also I don't know why you need
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll")

    If it's in that folder it should be loaded automatically without needing LoadPlugin; I have the masktools dll there and it does.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!