VideoHelp Forum




+ Reply to Thread
Results 1 to 25 of 25
  1. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    I was reading the read me file for PeachSmoother and I am not sure what should I set. I know it will be PeachSmoother(what should I put here?) Of course you have to do the LoadPlugin. I don't know what should I put inside those brackets, well parentices where I wrote. Will someone please help me?
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Here is a sample script used to process a series of old VHS tapes

    Code:
    LoadPlugin("g:\video\avisynth 2.5\plugins\peachsmoother.dll")
    avisource("D:\CAPTUREs\lindow man.avi")
    crop(8,4,-8,-4)
    SeparateFields()
    ConvertToYUY2()
    odd=SelectOdd.PeachSmoother(noiselevel=4.286, baseline=3.141, NoiseReduction = 60, Stability = 30, Spatial = 0)
    evn=SelectEven.PeachSmoother(noiselevel=4.286, baseline=3.141, NoiseReduction = 60, Stability = 30, Spatial = 0)
    Interleave(evn,odd)
    Weave()
    DoubleWeave.SelectOdd()
    AddBorders(8,4,8,4)
    Of course, each parameter is adjusted for each video, as no two are exactly alike. Using the Readout parameter (Readout=True) you can see just how much noise PS is seeing in it's analysis, and adjust accordingly. Just remember to set it back to False when you start encoding.

    Recently I have been playing with RemoveDirt, which is a pretty good noise reducer, but also has the advantage of cleaning larger spots. I have used it successfully to clean footage taken from old films, and the results are very good. It may also help with tape drop out, although I have not tested this.

    Code:
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\removedirt.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\removegrain.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\repair.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\deflicker.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\msharpen.dll")
    
    function RemoveDirt(clip input, bool "_grey", int "repmode") 
    {
        _grey=default(_grey, false)
    	repmode=default(repmode, 16)
    	clmode=17
    	clensed=Clense(input, grey=_grey, cache=4)
    	sbegin = ForwardClense(input, grey=_grey, cache=-1)
    	send = BackwardClense(input, grey=_grey, cache=-1)
    	alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) 
    	restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
    	corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
    	return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
    }
    	
    base=DirectShowSource("macbeth.mpg").AssumeFPS(25)
    
    baseYV=ConvertToYV12(base)
    
    base_clean=RemoveDirt(baseYV, true, 25).MSharpen(10,100,true,false,false)
    
    GreyScale(base_clean)
    Note : the above script was for cleaning black and white film, hence the greyscale tags.
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Thank you guns,

    Where do I download repair.dll and nsharpen.dll from?

    Edit: function RemoveDirt(clip input, bool "_grey", int "repmode")
    { Where it says clip input, do I put my movie clip there?








    Originally Posted by guns1inger
    Here is a sample script used to process a series of old VHS tapes

    Code:
    LoadPlugin("g:\video\avisynth 2.5\plugins\peachsmoother.dll")
    avisource("D:\CAPTUREs\lindow man.avi")
    crop(8,4,-8,-4)
    SeparateFields()
    ConvertToYUY2()
    odd=SelectOdd.PeachSmoother(noiselevel=4.286, baseline=3.141, NoiseReduction = 60, Stability = 30, Spatial = 0)
    evn=SelectEven.PeachSmoother(noiselevel=4.286, baseline=3.141, NoiseReduction = 60, Stability = 30, Spatial = 0)
    Interleave(evn,odd)
    Weave()
    DoubleWeave.SelectOdd()
    AddBorders(8,4,8,4)
    Of course, each parameter is adjusted for each video, as no two are exactly alike. Using the Readout parameter (Readout=True) you can see just how much noise PS is seeing in it's analysis, and adjust accordingly. Just remember to set it back to False when you start encoding.

    Recently I have been playing with RemoveDirt, which is a pretty good noise reducer, but also has the advantage of cleaning larger spots. I have used it successfully to clean footage taken from old films, and the results are very good. It may also help with tape drop out, although I have not tested this.

    Code:
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\removedirt.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\removegrain.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\repair.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\deflicker.dll")
    LoadPlugin("C:\Video\AviSynth 2.5\plugins\msharpen.dll")
    
    function RemoveDirt(clip input, bool "_grey", int "repmode") 
    {
        _grey=default(_grey, false)
    	repmode=default(repmode, 16)
    	clmode=17
    	clensed=Clense(input, grey=_grey, cache=4)
    	sbegin = ForwardClense(input, grey=_grey, cache=-1)
    	send = BackwardClense(input, grey=_grey, cache=-1)
    	alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) 
    	restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
    	corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
    	return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
    }
    	
    base=DirectShowSource("macbeth.mpg").AssumeFPS(25)
    
    baseYV=ConvertToYV12(base)
    
    base_clean=RemoveDirt(baseYV, true, 25).MSharpen(10,100,true,false,false)
    
    GreyScale(base_clean)
    Note : the above script was for cleaning black and white film, hence the greyscale tags.
    Quote Quote  
  4. Here we go again. The Repair.dll comes included in the RemoveGrain package. It's MSharpen. Both can be had here:

    http://avisynth.org/warpenterprises/

    Bookmark that page.
    { Where it says clip input, do I put my movie clip there?
    No. If you're going to use his function, you had best leave it alone.
    Quote Quote  
  5. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Oh ok. I leave it alone then..
    Quote Quote  
  6. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    I get this error:

    AviSynth open failure:
    Video returned: "DirectShowSource: couldn't open file macbeth.mpg: An object or name was not found."

    Audio returned: "DirectShowSource: couldn't open file macbeth.mpg: An object or name was not found."
    (I:\Apollo 13\movie.avs, line 21)

    Here is a copy of my script.



    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removedirt.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removegrain.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\repair.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\deflicker.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\msharpen.dll")
    AVISource("I:\Apollo 13\video.avi")
    function RemoveDirt(clip input, bool "_grey", int "repmode")
    {
    _grey=default(_grey, false)
    repmode=default(repmode, 16)
    clmode=17
    clensed=Clense(input, grey=_grey, cache=4)
    sbegin = ForwardClense(input, grey=_grey, cache=-1)
    send = BackwardClense(input, grey=_grey, cache=-1)
    alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
    restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
    corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
    return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
    }

    base=DirectShowSource("macbeth.mpg").AssumeFPS(25)

    baseYV=ConvertToYV12(base)

    base_clean=RemoveDirt(baseYV, true, 25).MSharpen(10,100,true,false,false)

    GreyScale(base_clean)
    BlackmanResize(720,400)
    Quote Quote  
  7. Do it like normal people and make a D2V using DGIndex so you can then use MPEG2Source rather than DirectShowSource.

    And what does the AVI have to do with anything? And why make it so complicated when you don't know jack? Haven't you heard of "walk before you run?" Try this first before you get lost in the script complications:

    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\DGDecode.dll") #if that's where it is
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removegrain.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\msharpen.dll")
    MPEG2Source("C:\Path\To\macbeth.d2v")#make the D2V first
    AssumeFPS(25)
    RemoveGrain()#read the doc if you want stronger grain removal, or apply it twice, or both
    MSharpen(10,100,true,false,false)
    GreyScale()
    BlackmanResize(720,400)
    Quote Quote  
  8. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Because it's not an DVD that is why. It is an XviD with a AVI container. I am trying to encode it to DivX using new scripts.






    Originally Posted by manono
    Do it like normal people and make a D2V using DGIndex so you can then use MPEG2Source rather than DirectShowSource.

    And what does the AVI have to do with anything? And why make it so complicated when you don't know jack? Haven't you heard of "walk before you run?" Try this first before you get lost in the script complications:

    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\DGDecode.dll") #if that's where it is
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removegrain.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\msharpen.dll")
    MPEG2Source("C:\Path\To\macbeth.d2v")#make the D2V first
    AssumeFPS(25)
    RemoveGrain()#read the doc if you want stronger grain removal, or apply it twice, or both
    MSharpen(10,100,true,false,false)
    GreyScale()
    BlackmanResize(720,400)
    Quote Quote  
  9. You're not making any sense, and neither did that script. What's Macbeth.mpg then?
    Because it's not an DVD that is why. It is an XviD with a AVI container. I am trying to encode it to DivX using new scripts.
    More idiocy from you. Look, we're all willing to do what we can to help, but if you're going to ignore perfectly good advice, then what's the point? I know, you like to encode. Then find a worthwhile project on which to practice.
    Quote Quote  
  10. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by manono
    You're not making any sense, and neither did that script. What's Macbeth.mpg then?
    Because it's not an DVD that is why. It is an XviD with a AVI container. I am trying to encode it to DivX using new scripts.
    More idiocy from you. Look, we're all willing to do what we can to help, but if you're going to ignore perfectly good advice, then what's the point? I know, you like to encode. Then find a worthwhile project on which to practice.
    I got the script to load into VirtualDubMod.
    Quote Quote  
  11. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by manono
    You're not making any sense, and neither did that script. What's Macbeth.mpg then?
    it comes directly from gunslinger

    Originally Posted by rocky12
    .....
    AVISource("I:\Apollo 13\video.avi")
    ....

    replace
    base=DirectShowSource("macbeth.mpg").AssumeFPS(25)
    with
    base=AVISource("I:\Apollo 13\video.avi")

    also kill
    GreyScale(base_clean)
    replace with
    return(base_clean)

    and kill the resize.
    gunslinger's resize isn;t tailored for you.
    it depends on your source. and target.
    specify and define,
    then resize properly.

    and you probably want removegrain from here:
    http://home.arcor.de/kassandro/RemoveGrain/


    but!!!

    what do you actually want to do?
    that's the first question!

    post a sample clip of your material....
    and someone can help you figure out what you actually can or might want to do with it.

    then we might get something more straightfoward like manono's script
    which is where you should be at.


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  12. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Sorry - I assumed that you would work out that you had to replace my video name with yours. Macbeth was the file I was working on - Orson Welle's 1948 version, to be precise.

    You wanted to see how peachsmoother was up. I was simply giving you an example of how I use it. You weren't supposed to just run my scripts as-is.

    (@manano : I know DirectShow is a lazy way to work with mpg files, but it was easier at the time)
    Read my blog here.
    Quote Quote  
  13. Oh, that came from you then. I didn't pay much attention to your sample function. You can do it any way you like. You know what you're doing. It's when rookies start trying to get fancy before they know the basics that they can run into all kinds of problems. I still don't understand his problem(s). Converting a perfectly good XviD to DivX for no good reason. Using a script much more complicated than necessary, and then coming running for help when he runs into the inevitable problems. The principle is simple; open the video, apply a denoiser, apply a sharpener, resize or whatever else has to be done. Finished. But that's too easy and I can see this thread running on for 2 or 3 more pages, like that earlier one. At least we managed to pretty much chase him out of Doom9.
    Quote Quote  
  14. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by manono
    Oh, that came from you then. I didn't pay much attention to your sample function. You can do it any way you like. You know what you're doing. It's when rookies start trying to get fancy before they know the basics that they can run into all kinds of problems. I still don't understand his problem(s). Converting a perfectly good XviD to DivX for no good reason. Using a script much more complicated than necessary, and then coming running for help when he runs into the inevitable problems. The principle is simple; open the video, apply a denoiser, apply a sharpener, resize or whatever else has to be done. Finished. But that's too easy and I can see this thread running on for 2 or 3 more pages, like that earlier one. At least we managed to pretty much chase him out of Doom9.
    Not only chase me out but here on VH in off topic, I made a thread to remove my name from the database. If someone can't remove me then please ban me. Since your a moderator over there, will you remove my name and password from the database or ban me? Just on Doom9 NOT here. I was thinking more like remove me and save the banning for last. It's per my request. I know your question is why? and don't sign in. Oh no I want my name REMOVED. Thank you.
    Quote Quote  
  15. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Below is a sample clip but a few things are 1 my movie turned out to be black and white when it is suppose to be color and 2 something with the audio got messed up and before I tried that script, everything was fine!



    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removegrain.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\msharpen.dll")
    AVISource("I:\Executive Decision\video.avi")
    AssumeFPS(25)
    RemoveGrain()
    MSharpen(10,100,true,false,false)
    GreyScale()
    BlackmanResize(640,352)








    Originally Posted by 45tripp
    Originally Posted by manono
    You're not making any sense, and neither did that script. What's Macbeth.mpg then?
    it comes directly from gunslinger

    Originally Posted by rocky12
    .....
    AVISource("I:\Apollo 13\video.avi")
    ....

    replace
    base=DirectShowSource("macbeth.mpg").AssumeFPS(25)
    with
    base=AVISource("I:\Apollo 13\video.avi")

    also kill
    GreyScale(base_clean)
    replace with
    return(base_clean)

    and kill the resize.
    gunslinger's resize isn;t tailored for you.
    it depends on your source. and target.
    specify and define,
    then resize properly.

    and you probably want removegrain from here:
    http://home.arcor.de/kassandro/RemoveGrain/


    but!!!

    what do you actually want to do?
    that's the first question!

    post a sample clip of your material....
    and someone can help you figure out what you actually can or might want to do with it.

    then we might get something more straightfoward like manono's script
    which is where you should be at.


    tripp
    Quote Quote  
  16. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    that's not a sample.
    a sample is something you host on a filesharing page,
    something i can download and look at.

    Originally Posted by rocky12
    my movie turned out to be black and white when it is suppose to be color
    .....
    GreyScale()
    i already said kill greyscale()
    1+1=2

    also kill assumefps()


    and define encoding target.


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  17. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    I don't know of any filesharing and I don't know how to host. Sorry. My script is below. Does this look right now?

    Edit: How do I remove dirt as well?

    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removegrain.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\msharpen.dll")
    AVISource("I:\Apollo 13\video.avi")
    RemoveGrain()
    MSharpen(10,100,true,false,false)
    BlackmanResize(720,400)










    Originally Posted by 45tripp
    that's not a sample.
    a sample is something you host on a filesharing page,
    something i can download and look at.

    Originally Posted by rocky12
    my movie turned out to be black and white when it is suppose to be color
    .....
    GreyScale()
    i already said kill greyscale()
    1+1=2

    also kill assumefps()


    and define encoding target.


    tripp
    Quote Quote  
  18. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Do your resize before you sharpen. If you resize after sharpening you undo much of good work msharpen does.
    Read my blog here.
    Quote Quote  
  19. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    There we go. How do I remove dirt? Below is another copy of my script.



    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\removegrain.dll")
    LoadPlugin("H:\Program Files\AviSynth 2.5\Plugins\msharpen.dll")
    AVISource("I:\Apollo 13\video.avi")
    RemoveGrain()
    BlackmanResize(720,400)
    MSharpen(10,100,true,false,false)









    Originally Posted by guns1inger
    Do your resize before you sharpen. If you resize after sharpening you undo much of good work msharpen does.
    Quote Quote  
  20. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    You need to post samples to see what the problem is. Dirt removal is pretty specialised.
    Read my blog here.
    Quote Quote  
  21. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by guns1inger
    You need to post samples to see what the problem is. Dirt removal is pretty specialised.

    So don't use Dirt Remove?
    Quote Quote  
  22. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by rocky12
    I don't know of any filesharing and I don't know how to host. Sorry.
    mediafire.com
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  23. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by 45tripp
    Originally Posted by rocky12
    I don't know of any filesharing and I don't know how to host. Sorry.
    mediafire.com
    1.) What is wrong with posting my script here since I already know how? hosting is going to be about 3 or 4 long if I get help. You seen some of these threads and on top of it, I never hosted before.

    2.) Is it a good idea to use Dirt Remove? If yes then how do I write a script for it?
    Quote Quote  
  24. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    For some reason you keep missing the point. It isn't your script we need to see, but the video you are woking on. We need to understand your problem to know if the solution is correct or can be improved. All we can tell you about your script is that it is syntactically correct (i.e it will run). Is it the right script for your video ? Will it improve the video or make it worse ? Who knows. Without being able to see a sample of the video, we can't tell you what is best.

    Use Virtualdub to create a small clip (use Direct Stream Processing mode) and upload it to mediafire.com or somewhere similar, then post a link here.
    Read my blog here.
    Quote Quote  
  25. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by rocky12
    I never hosted before.
    about time you started.

    Originally Posted by rocky12
    hosting is going to be about 3 or 4 long if I get help

    what's that supposed to mean?
    you cut a short sample (easy with vdub - select range, direct stream copy video and audio)
    you upload, and wait until someone gets back to you.


    Originally Posted by rocky12
    2.) Is it a good idea to use Dirt Remove?
    probably not

    Originally Posted by guns1inger
    You need to post samples to see what the problem is. Dirt removal is pretty specialised.
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  



Similar Threads

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