Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th September 2021, 19:35   #1  |  Link
thunderclap
Registered User
 
Join Date: Nov 2010
Posts: 13
RemoveDirt

I'm new to the world of AviSynth scripting and need some help. I've been trying to get Pinterf's RemoveDirt working for about a week with no luck. I have the latest versions of AviSynth+ and AvsPmod installed as well as the x64 version of RemoveDirt. The script seems right since AvsPmod doesn't through up any errors, however when I export the clip it doesn't seem to have removed any dust or hair or anything. The script I'm using came from the RemoveDirt site:

Code:
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 )
}
Any idea what I'm doing wrong? Any suggestions?
thunderclap is offline   Reply With Quote
Old 16th September 2021, 20:15   #2  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
Can you post the complete script you're using?
Reel.Deel is offline   Reply With Quote
Old 16th September 2021, 21:49   #3  |  Link
thunderclap
Registered User
 
Join Date: Nov 2010
Posts: 13
Quote:
Originally Posted by Reel.Deel View Post
Can you post the complete script you're using?
This is the full script I have in AvsPmod.

Code:
FFVideoSource("E:\movie.mkv")
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 RemoveGrainHD(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
}

Last edited by thunderclap; 16th September 2021 at 23:51.
thunderclap is offline   Reply With Quote
Old 16th September 2021, 21:54   #4  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
You need to actually call the function for it to do anything.

Code:
FFVideoSource("E:\movie.mkv")
RemoveDirt() # same as RemoveDirt(last, _grey=false, repmode=16)
Reel.Deel is offline   Reply With Quote
Old 16th September 2021, 23:54   #5  |  Link
thunderclap
Registered User
 
Join Date: Nov 2010
Posts: 13
Quote:
Originally Posted by Reel.Deel View Post
You need to actually call the function for it to do anything.

Code:
FFVideoSource("E:\movie.mkv")
RemoveDirt() # same as RemoveDirt(last, _grey=false, repmode=16)
Okay, but now I'm getting "I don't know what 'input' means".
thunderclap is offline   Reply With Quote
Old 17th September 2021, 00:06   #6  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
Quote:
Originally Posted by thunderclap View Post
Okay, but now I'm getting "I don't know what 'input' means".
Can you post your script please? If you have something out of other it may cause that.
Reel.Deel is offline   Reply With Quote
Old 17th September 2021, 00:23   #7  |  Link
thunderclap
Registered User
 
Join Date: Nov 2010
Posts: 13
Quote:
Originally Posted by Reel.Deel View Post
Can you post your script please? If you have something out of other it may cause that.
The full script is now:

Code:
FFVideoSource("E:\movie.mkv")
RemoveDirt() # same as RemoveDirt(last, _grey=false, repmode=16)
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 RemoveGrainHD(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
}
Should 'clip input' and all the other 'input' reference something? Unfortunately the documentation on this plugin isn't very helpful to a layman.
thunderclap is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.