View Full Version : MSharpen turns everything green
Andrimner
12th March 2005, 13:00
Feel free to tell me I'm an idiot but I'm pretty new to avisynth.
Anyway I use Gordian Knot to encode my DVDs to XviD.
I am very happy with the results but yesterday I ran into a video where I needed some sharpening.
Since I never done any sharpening I did a search and decided to try the msharpen filter.
I must be doing something wrong because no matter what settings I use everything turns into green.
I was supposed to take a screenshot of it but for some reason the screenshot I take will only be saved as totally black.
Why this happens is also a mystery to me maybe someone can shed some light on this problem.
But my big problem is why I can't get MSharpen to work.
Below is the script I use. In that script I have put the MSharpen vaules to something I thought wouldn't change things much at all but still the whole picture is totally green.
# Created with Gordian Knot
#
# http://gknot.doom9.org
# PLUGINS
LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\dgdecode.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\dgbob.dll")
LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\MSharpen.dll")
# SOURCE
mpeg2source("E:\test - shot\VIDEO_TS\test\damn.d2v", idct=0)
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=1)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(10,4,696,568)
# DENOISING: choose one combination (or none)
# RESIZING
LanczosResize(688,512)
# DENOISING: choose one combination (or none)
MSharpen(0,0,false,true,false)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
# FOOL CCEnc
#ResampleAudio(44100)
Spyn
12th March 2005, 13:24
read the doc include in the zip :
http://neuron2.net/msharpen/msharpen110b2.zip
and use named parameter to simplify things.
a good line is something like :
MSharpen(strength=60,threshold=25)
Following is the syntax for MSharpen (replace parameter_list with your comma-separated list of named parameters):
MSharpen(parameter_list)
threshold (0-255, default 10): This parameter determines what is detected as edge detail and thus sharpened. To see what edge detail areas will be sharpened, use the 'mask' parameter.
strength (0-255, default 100): This is the strength of the sharpening to be applied to the edge detail areas. It is applied only to the edge detail areas as determined by the 'threshold' parameter. Strength 255 is the strongest sharpening.
mask (true/false, default false): When set to true, the areas to be sharpened are shown in white against a black background. Use this to set the level of detail to be sharpened. This function also makes a basic edge detection filter.
highq (true/false, default true): This parameter lets you tradeoff speed for quality of detail detection. Set it to true for the best detail detection. Set it to false for maximum speed.
debug (true/false, default false): This parameter enables debug output to the DebugView utility. Currently, only the filter version is output.
Andrimner
12th March 2005, 13:55
Thanks a lot for the reply Spyn.
I have tried pretty much every setting I can think off including the one you suggested but still the whole picture turns into green no matter what I do.
Here's a small sample of it(without sound) this was done with MSharpen(strength=60,threshold=25)
http://w1.123.telia.com/~u05700204/damn.zip
Why does this happen? :confused:
Leak
12th March 2005, 15:50
Originally posted by Andrimner
Here's a small sample of it(without sound) this was done with MSharpen(strength=60,threshold=25)
http://w1.123.telia.com/~u05700204/damn.zip
Why does this happen? :confused:
That's exactly what happens if you use "mask=true" with MSharpen.
Try "MSharpen(strength=60,threshold=25,mask=false)", and if this works take a look in your AviSynth plugin folder and see if there's an MSharpen.def file in there - if there is one and it contains a line with "mask=true" you'll always get the mask feature turned on unless you override it in your script; you can just delete the .def file with no ill effects other than getting the default default settings...
If that's not it, something must be terribly broken in the version you have - try using the MSharpen 1.10 beta 2 from http://neuron2.net/msharpen/msharpen.html which works fine for me.
Hope this helps. :)
np: Klimek - (Sun)Rise (Edit) (Milk & Honey)
Andrimner
12th March 2005, 16:25
A big thank you for your help Leak.
Problem is. It didn't help :(
I'm pretty sure that I've always had mask=false so that can't be the problem.
I also searched through my whole computer for MSharpen.def but couldn't find anything. I have also made sure that I have MSharpen 1.10 beta 2.
I think I have to give this up because this seem to be a problem that can't be solved.
Here's the script I used for my last try that still gave me the same result as in the video I posted a link to.
# Created with Gordian Knot
#
# http://gknot.doom9.org
# PLUGINS
LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\dgdecode.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\dgbob.dll")
LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
LoadPlugin("C:\Program\GORDIA~1\AviSynthPlugins\MSharpen.dll")
# SOURCE
mpeg2source("E:\damn - damn\VIDEO_TS\test\asdf.d2v", idct=0)
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=1)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(10,4,696,568)
# DENOISING: choose one combination (or none)
# RESIZING
LanczosResize(688,512)
# DENOISING: choose one combination (or none)
MSharpen(25,60,false,true,false)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
# FOOL CCEnc
#ResampleAudio(44100)
Leak
12th March 2005, 17:07
Originally posted by Andrimner
Here's the script I used for my last try that still gave me the same result as in the video I posted a link to.
<chop>
# DENOISING: choose one combination (or none)
MSharpen(25,60,false,true,false)
<chop>
Ummm... the 4th parameter you're setting to true here is actually the mask parameter - of course the result will then look like what you posted above; that's what mask is there for.
You probably want to use
MSharpen(25,60,true,false,false)
instead...
np: Digitalis - Pheromone ([THN070-2] Crossways)
Andrimner
12th March 2005, 17:34
Thanks again for your help Leak.
The thing is I set it to false from inside the filter menu in GK but for some reason that is not right :confused:
Maybe it's a bug in GK or something.
This time I did the settings in the avisynth script manually and now it worked :D
Thanks again :)
Guest
12th March 2005, 18:23
Moved to GK forum as it appears to be a GK issue.
Andrimner
12th March 2005, 21:10
There must be something that I don't understand here.
According to the help file that came with the MSharpen filter
the order the filter settings appears in is:
threshold
strength
mask
highq
debug
That is also the exact same order that they are placed in if you use it from inside of Gordian Knots filter menu.
Leak wrote:Ummm... the 4th parameter you're setting to true here is actually the mask parameter - of course the result will then look like what you posted above; that's what mask is there for.
You probably want to use
MSharpen(25,60,true,false,false)
That is absolutely correct but is not what the 4th parameter is according to what is being listened in the filters help file and GKs filter menu. The 4th parameter there is highq.
What am I missing here? :confused:
I have now been experimenting with the filter and also took the strength and threshold setting as high as I could but I can't see that this filter changes anything at all.
With or without the filter everything looks the same.
No sharpening is taking place at all.
Please tell me I'm stupid.
At least that's an answer I can live with and understand right away :)
Leak
12th March 2005, 22:51
Originally posted by Andrimner
That is absolutely correct but is not what the 4th parameter is according to what is being listened in the filters help file and GKs filter menu. The 4th parameter there is highq.
What am I missing here? :confused:
This is from the syntax part of the documentation:
MSharpen(threshold,strength,highq,mask,debug)
while this is the explanation of the parameters further down:
threshold (0-255, default 10): This parameter determines what is detected as edge detail and thus sharpened. To see what edge detail areas will be sharpened, use the 'mask' parameter.
strength (0-255, default 100): This is the strength of the sharpening to be applied to the edge detail areas. It is applied only to the edge detail areas as determined by the 'threshold' parameter. Strength 255 is the strongest sharpening.
mask (true/false, default false): When set to true, the areas to be sharpened are shown in white against a black background. Use this to set the level of detail to be sharpened. This function also makes a basic edge detection filter.
highq (true/false, default true): This parameter lets you tradeoff speed for quality of detail detection. Set it to true for the best detail detection. Set it to false for maximum speed.
debug (true/false, default false): This parameter enables debug output to the DebugView utility. Currently, only the filter version is output.
Basically, the full explanation of the parameters is not in the same order; but if you're using named parameters instead of a comma delimited list it's still correct.
MSharpen(25,16,true,false,false)
is the same as
MSharpen(debug=false,highq=true,mask=false,treshold=16,strength=25)
but of course it seems as if GK is using the wrong order...
np: Martin Jarl feat. Jon Ericsson - Inidimman ([THN070-1] Crossways)
Guest
13th March 2005, 03:24
Originally posted by Andrimner
Please tell me I'm stupid.
Yes, you are stupid.
A high threshold causes the filter to do nothing. Turn on the mask and see what happens with it when you start from threshold 0 and go up from there.
Andrimner
13th March 2005, 10:30
Thanks neuron2 ;)
I appreciate an honest opinion. I thought it was the other way around with the treshold.
It's not easy to teach an old dog to sit. I will be 36 this year and I'm pretty new to this.
To bad younger people who post here can't blame their stupidity on age :)
Thanks again for all your time.
manono
13th March 2005, 10:57
Hi-
Bah, that age argument doesn't wash. neuron2's older than that, as am I. Whether you're 16 or 60, if you're just starting out, and trying to digest a ton of information all at once, it's difficult. I don't know that I would have called you stupid, though. Ignorant, maybe. :)
His filters are very well documented, and the docs are meant to be read. You'll learn a lot if you take the time. Plus, all his filters have a mask, or a map, or a show, so you can play around with the different parameters, and then see what effect they'll have. Just add what you want, save it, open the .avs in VDubMod and scroll around.
Andrimner
13th March 2005, 11:31
That age thing was more meant as a joke manono.
I should also mention that I've been hanging out here for about half a year now and learned a lot by just using the search function and reading through a ton of posts.
A few weeks ago I was up all night reading through posts at this forum to find the answer to some questions. And I did find the answers I needed.
I am also very familiar with neuron2 great filters and I have used them a lot.
My brain has been a bit slower then usual the last days because of a very high fever.
That is actually a really good excuse because I've done some really stupid things the little time I spent in front of my computer. Things I would never had done otherwise. Like asking stupid questions ;)
Thanks again
niamh
13th March 2005, 13:56
All the same the 3rd and 4th parameters are definitely reverted in the GK advanced avs window for Msharpen.
Guest
13th March 2005, 15:32
Normally, I wouldn't be so rude as to call someone stupid, but you did insist upon it. I was torn between my urge to politeness and my desire to please. :) No offense intended.
len0x
14th March 2005, 11:42
Originally posted by niamh
All the same the 3rd and 4th parameters are definitely reverted in the GK advanced avs window for Msharpen.
Yep, blame whoever wrote XML description file for the filter :)
(it can be easily fixed by editing XML file and swapping the order of mask and highq params. I guess whoever wrote it was looking at the description, not the actual order).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.