VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi,

    I browsed Videohelp and Doom9 but could not find answers to the questions.

    I have installed the files (.DLLs) and created a simple script just for sharpening:

    DirectShowSource("F:\Documents\Temp\moviename.m2v" )
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT_MAskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
    MPEG2Source("C:\Program Files\AviSynth 2.5\plugins\moviename.d2v")
    dull=last
    Sharp=LimitedSharpenFaster(ss_x=1.25,ss_y=1.25,Smo de=4,strength=150,soft=30)
    Soothe(sharp,dull,25)

    What should I do with the "LimitedSharpenFaster.avs" file if I load script into Procoder?

    Once I load the script into Procoder and try to open the file in Procoder preview window, I receive error message: "Script error: there is no function named "LimitedSharpenFaster". What does this mean?

    Do I understand right that for every movie, file "moviename.d2v" should be manually put into Plugins directory every time?

    What should I do with the folders from which I copied .DLLs? Should they stay on HD or I can delete them?

    Sorry for the naive questions. Thank you!
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    The d2v file can stay with the mpeg video it represents. You load it with the MPEG2Source statement, and can point the path to where ever the file is. I would never put it in the plugins folder.

    You also do not need the DirectShowSource statement, as MPEG2Source is loading your video via DGDecode.

    If the folders have come from unpacking downloaded filters then yes, you can remove them. They no longer serve a purpose.

    As for LimitedSharpenFaster - you need to copy the function code from here

    http://www.avisynth.org/LimitedSharpen#LimitedSharpenFaster

    into your script so that it exists when you call it.
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Thank you!
    Quote Quote  
  4. Nah, you don't need the whole thing in your script, although you can. But if you plan on using it regularly, stick that giant function inside of:

    LimitedSharpenFaster.avsi

    That's AVSI. Notice that's what it says at the top of the page to which guns1inger linked. Put it inside your AviSynth Plugins folder and it'll get called automatically. Or you can Import it every time, but it shouldn't be necessary.

    Also, I think I renamed some of the Dlls, can't remember. Make sure your names and paths check out.
    Quote Quote  
  5. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi manono,

    I tried to edit as per guns1inger instructions but it looks I am doing it wrong as I get various error messges all the way.

    Please have a look what's wrong:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT_MAskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
    MPEG2Source("C:\Program Files\AviSynth 2.5\plugins\Test-25(PAL.NTSC).d2v")
    dull=last
    function LimitedSharpenFaster( clip clp,
    \ float "ss_x=1.25", float "ss_y=1.25",
    \ int "dest_x", int "dest_y",
    \ int "Smode=4" , int "strength=150", int "radius",
    \ int "Lmode", bool "wide", int "overshoot", int "undershoot",
    \ int "soft=30", int "edgemode", bool "special",
    \ int "exborder" )
    {
    Soothe(sharp,dull,25)
    Quote Quote  
  6. If you're going to do it that way, you have to fill in all the parameters. You still have to stick the giant LimitedSharpenFaster.avsi in the AviSynth Plugins folder.

    Just test out and get working:

    LimitedSharpenFaster()

    first.
    Quote Quote  
  7. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Thanks!

    I'd love to make it smaller but how?
    Quote Quote  
  8. That link guns1inger gave? There's a huge function there. From:

    # LimitedSharpen() ( a modded version, 29 Oct 2005 )
    #
    # A multi-purpose sharpener by Didée

    down to:

    (edgemode!= -1) ? last : edge.lanczosresize(dest_x,dest_y).greyscale

    return last
    }

    Stick the whole thing inside of LimitedSharpenFaster.avsi, and put that in your AviSynth Plugins folder. Then:

    LimitedSharpenFaster()


    Forget that Soothe and Dull stuff for the time being. Soothe has its own function you have to do the same thing with.
    Quote Quote  
  9. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    manono, thankyou!
    Quote Quote  
  10. Got it going, did you? Good. Then you can next try something a bit more complex:

    LimitedSharpenFaster(ss_x=1.50,ss_y=1.50,Smode=4,s trength=200,soft=30)

    Followed by letting it do your resizing for you. I don't use that myself, so you're on your own there. It's something to do with these parameters:

    int "dest_x", int "dest_y",

    maybe:

    dest_x=720,dest_y=480

    if those are the final resolutions you want. I got this going OK:

    LimitedSharpenFaster(ss_x=1.50,ss_y=1.50,Smode=4,s trength=200,soft=30,dest_x=720,dest_y=576)

    And since Soothe smooths out any edginess or jaggies/aliasing/shimmering that might be created by LSF, you might go get the Soothe function next from the link I posted in that other thread, and try and copy that. The Soft setting does something similar, I think.

    Sorry I wasn't any help with your Procoder settings.
    Quote Quote  
  11. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi,

    I am still confused about LimitedSharpenFaster. What have I done so far?

    1. Copied the function code without any changes as advised above into NotePad.

    2. Created “LimitedSharpenFaster” file with extension .avsi in Notepad

    3. Put the file into "C:\Program Files\AviSynth 2.5\Plugins".

    3. Created a script (for sharpening only):

    MPEG2Source("F:\Documents\Temp\moviename.d2v")
    function LimitedSharpenFaster(){}

    4. Put the script into NotePad and created "Sharpen-Test" file with extension .avs

    When I load the script in Procoder > Source and open Preview, I get the movie picture. It works!!!

    But how do I know whether the sharpener works? Where should I change parameters to make picture sharper or smother?

    I still cannot get what I have the "LimitedSharpenFaster.avs" file for? What should I do with file?

    Sorry for being so boring. I just do not get it -)
    Quote Quote  
  12. Once you make the LimitedSharpenFaster.avsi and stick it in the Plugins folder, you can get rid of LimitedSharpenFaster.avs. You'd use that one if you were going to import it like so:

    Import("C:\Path\To\LimitedSharpenSharper.avs")
    AVS-files:
    Just import it at the beginning of your script:
    Import("d:\filename.avs")
    In v2.05 or a more recent version you can use the autoplugin loading. Just move your AVS-file in the autoloading plugindir, and rename the extension to 'avsi'.
    http://www.avisynth.org/Section+2%3A+AviSynth+and+frameserving

    I don't even understand why what you had works for you. Always test by opening in VDubMod before sending to your encoder. This should be enough:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    MPEG2Source("F:\Documents\Temp\moviename.d2v")
    LimitedSharpenFaster()

    One way to make sure it's working is to do a CQ (aka OPV) encode, one with it on and another without it. With my settings, I usually get a 10-15% difference in filesizes, meaning that when using it, my video is less compressible, i. e., sharper. Another is to make one AVS with no sharpening, and another with lots of sharpening:



    The pic on the left has no sharpening, and the one on the right:

    LimitedSharpenFaster(Strength=1000)

    You should easily be able to tell that the face of the guy on the right has more detailed wrinkles and texture, and that the wrinkles of his doctor's gown are much more obvious. But the scratches in this old film are also accentuated. You adjust the sharpness with the sharpen parameter. I think default is 100, but I'm not positive. Be careful, though. With heavy sharpening comes a greater likelihood of artifacts, which Soothe and Soft are designed to ameliorate.

    By having the LSF.avsi in the plugins folder, it's called when needed, and used when you use LSF in your script. The LSF line refers back to the AVSI in the plugins folder which is doing the actual work. Think of it as a DLL, but the guy that created this function doesn't know how to make a DLL out of it. There are lots of AviSynth functions. Here is a page of them (including LSF):

    http://www.avisynth.org/ShareFunctions
    Quote Quote  
  13. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    manono, thank you!

    “I don't even understand why what you had works for you.” – Why? Is the script wrong for sharpening or I can use it? Please edit it if required. I just need a script for sharpening that I will use permanently with minor adjustments.

    I tried to open it in VirtualDub and it worked perfectly well.

    “This should be enough:
    LoadPlugin("C:\Path\To\DGDecode.dll")
    MPEG2Source("F:\Documents\Temp\moviename.d2v")
    LimitedSharpenFaster()” – Do you mean to create this short script in order to test whether the script works, right?

    Sorry, do not see any pics on the screen. Could it be due to my PC settings?

    “which Soothe and Soft are designed to ameliorate.” – Left the function code unchanged but as you could see removed Soothe and Soft from script as if they are in the avsi they must work anyway, right?

    I put the whole huge thing into Avisynth plugins folder as it is probably the only script I am going to use all the way and every time.

    Should I change parameters (more or less sharpening) if required in .avsi file?

    Thank you for your concern about my hardships with Procoder. It is hard but anyway not that hard as with scripts. That’s why I am still with the software that is not that much popular here -)
    Quote Quote  
  14. I meant that you had this:

    MPEG2Source("F:\Documents\Temp\moviename.d2v")
    function LimitedSharpenFaster(){}

    No pics? You don't see a little pic you click on to see a big pic?

    I've already dumped the direct link to the fullsized pic. Hold on...

    [img=http://img171.imageshack.us/img171/2421/comparexh4.th.jpg]
    Quote Quote  
  15. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    I clicked the link and saw the pics. Thanks. The right one is sharper, no doubt.

    manono, so can I use the script if it works in VirtualDub? Where can I change parameters (more or less sharpening), if required? In .avsi file?
    Quote Quote  
  16. I said this before:
    You adjust the sharpness with the sharpen parameter.
    And gave an example:

    LimitedSharpenFaster(Strength=1000)

    No, you don't touch the LSF.avsi back in the Plugins folder. You set the parameters in the script. If you had paid attention when I posted my full script earlier, you'd know that already. Here's your version of it:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT_MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
    MPEG2Source("C:\Program Files\AviSynth 2.5\plugins\moviename.d2v")
    dull=last
    Sharp=LimitedSharpenFaster(ss_x=1.25,ss_y=1.25,Smo de=4,strength=150,soft=30)
    Soothe(sharp,dull,25)

    Use Soothe if you can get it working and if you want it. As posted before, you get the Soothe Function here:

    http://forum.doom9.org/showthread.php?t=99679&highlight=Soothe

    And also put the Soothe.avsi containing the function in your AviSynth Plugins folder. As near as I can tell, you can't use Soothe if resizing in LSF.

    Otherwise just:

    LimitedSharpenFaster(ss_x=1.25,ss_y=1.25,Smode=4,s trength=150,soft=30)

    Or if you don't want to mess with all that:

    LimitedSharpenFaster(Strength=1000)# or whatever strength you like.

    Here's the main LS thread:

    http://forum.doom9.org/showthread.php?t=84196&highlight=limitedsharpen
    Quote Quote  
  17. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    manono, thank you. I believe I am getting there.
    Quote Quote  
  18. Member
    Join Date
    Feb 2007
    Location
    China
    Search Comp PM
    Could someone help me with this. I keep getting an error message when trying to use limitedsharpenfaster. Below is the error message and my AVISynth script.


    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT_MAskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
    avisource("E:\....avi")
    RemoveGrain(mode=2)
    #BicubicResize(704,454)
    Lanczos4Resize(704,574)
    LimitedSharpenFaster()
    AddBorders(8,2,8,0)
    ConvertToYUY2(Interlaced=False)

    Quote Quote  
  19. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    You've got the wrong version of Removegrain loaded.

    removegrain_1.0.rar
    Quote Quote  
  20. Member
    Join Date
    Feb 2007
    Location
    China
    Search Comp PM
    ...and here is what my AVISynth plugins folder looks like:

    Quote Quote  
  21. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Download the .rar file above
    Quote Quote  
  22. Use this RemoveGrain:

    removegrain.dll

    Edit: Sorry Soopafresh. I didn't realize you were in the process of making the right one available.
    Quote Quote  
  23. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    No problemo You might have the correct one anyway.
    Quote Quote  
  24. Member
    Join Date
    Feb 2007
    Location
    China
    Search Comp PM
    Yep. That did it. Thank you both. One minutre response from Soopafresh . I love this forum.
    Quote Quote  
  25. Member
    Join Date
    Jan 2009
    Location
    Brazil
    Search Comp PM
    Hi all, my first post here.

    How can I use this ripping a mkv file, to make a brrip?
    Quote Quote  
  26. In the AviSynth script, same as encoding anything else. If you're not using AviSynth, then you can't use LimitedSharpenFaster.
    Quote Quote  
  27. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    As you aren't actually ripping anything if you have an mkv file, the simplest method is to load your mkv file into Xvid4PSP, which already has LimitedSharpFaster built-in as a filtering option, and use it when you convert to whatever format you need to use.

    However if your mkv is already AVCHD compliant, I would think carefully about re-encoding it - you may lose more than you gain.
    Read my blog here.
    Quote Quote  
  28. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    I know this is ANCIENT. My apologies...

    For some reason the basic script, which a lot of it I tried copying from this thread, just simply will not run when I try to preview it in Windows Player. Before I added the LimitedSharpenFaster script it DID run.

    Here is the script I'm using. I already have the LimitedSharpenFaster.avsi in my Avisynth plugins folder, but I call it anyway just because I'm new and HOPEFULLY learning

    DirectShowSource("C:\x\00000.mkv")
    LoadPlugin("D:\EXECUTABLES\BD-RBV05018\BD_Rebuilder\tools\decomb521.dll")
    FieldDeinterlace(blend=true)
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\masktools2.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\RgTools.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\warpsharp.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\LimitedSharpenFaster.avsi")
    LimitedSharpenFaster()
    Addborders(80,0,80,0)
    ConvertToYV12()
    AssumeFPS(30000,1001)

    The reason why I loaded all those plugins is because on the Wiki it said that these other plugins were necessary to run LimitedSharpenFaster. Also, the reason why I'm using BDRB's tools is because that is where I first learned to use the deinterlace filter, so I just still use it.

    Again, before I added just the stuff for LimitedSharpenFaster, the script ran fine. I tried it before with 'deen' and that worked and did improve the image a little (it is an old movie file capture I think) but, I wanted to try LSF because it looks like it perhaps can do more.

    PLEASE, if anyone has any simply suggestions or can tell me what I'm doing wrong, that would be great, thank you!

    Here is a snippet of the file that I am trying to 'improve' http://lathe-of-heaven.com/01.mkv
    Last edited by Lathe; 18th Oct 2016 at 23:34. Reason: More stuff...
    Quote Quote  
  29. Try opening it in VirtualDub. What's the error message?

    Also, I open MKVs using FFVideoSource, anything but DirectShowSource. It's a movie and movies don't get deinterlaced, and certainly not with FieldDeinterlace(Blend=True). A simple IVTC seems to work fine:

    TFM().TDecimate()

    Since it has all that blotchy color, it should be greyscaled. I'd say making LSF work is the least of your worries with that one. There's no better source anywhere? It's already in YV12, so you don't need that line. And after the IVTC it'll be 23.976fps, so you don't need the AssumeFPS line.

    Why the AddBorders line? Why do you want it 880x480?
    Last edited by manono; 18th Oct 2016 at 23:49.
    Quote Quote  
  30. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by manono View Post
    Try opening it in VirtualDub. What's the error message?

    Also, I open MKVs using FFVideoSource, anything but DirectShowSource. It's a movie and movies don't get deinterlaced, and certainly not with FieldDeinterlace(Blend=True). A simple IVTC seems to work fine:

    TFM().TDecimate()

    Since it has all that blotchy color, it should be greyscaled. I'd say making LSF work is the least of your worries with that one. There's no better source anywhere? It's already in YV12, so you don't need that line. And after the IVTC it'll be 23.976fps, so you don't need the AssumeFPS line.

    Why the AddBorders line? Why do you want it 880x480?
    Hey, thanks Manono! I've read a LOT of your posts and have really learned many things from what you have said, thank you!

    Hmmm... Well, that is why YOU are the expert, not me... Good, so in looking at this clip you suggest using a different deinterlacer with the line of code you suggested, right? So, I will replace the blend/true stuff with that to see how it looks. And then you say it will be progressive after that? Great! I sure didn't know that. No, this is a SUPER rare film capture that doesn't exist commercially. THAT print, believe it or not is light years better than most others IF you can find them.

    Okay, first thing is that I will go in and change the deinterlace code and take out the stuff you said. I will also try to load this existing script in virtualdub as you suggested. I just used Classic Media player because I wanted to see what I was doing (I WOULD have used VLC, but it doesn't render Avisynth scripts)

    Maybe then you can help me look into the greyscale thing if that is okay? I will come back and let you know the results of this so far.

    Thank you!

    Oh, I forgot to answer you about the aspect ratio, sorry... Well, it is kind of a weird story, but my OPPO player will absolutely NOT play ANY MKV file that I re-encode no matter what settings I use. So, the only way around that is to create a BDMV folder which my OPPO will play. Thus the need to add borders. I KNOW that the AR is not quite right. Normally I would go with a perfect 16x9 ratio (in this case it would be 864x486) BUT... with this particular print, it looks too wide so I'm adding the extra padding on the sides.
    Last edited by Lathe; 19th Oct 2016 at 00:13. Reason: More stuff...
    Quote Quote  



Similar Threads

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