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

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th May 2025, 20:41   #1  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
VHS post processing

Hey fellow doomers,

after working out my capture workflow, I'm on a quest to process my VHS captures for better viewing pleasure without loosing details. I learned I need to adress chroma noise and chroma shift, and would love to get rid of dots and horizontal lines. Noise reduction is something I'd like to apply at a minimum, as I don't want to lose detail.

There are lots of discussions and examples on this forum and I found really helpful posts with example scripts that I tried.

ATM, I would like to combine a

- script adressing chroma noise with CNR2 and a degrain function

- with a script including a function for chromashift

- and a script adressing white dots with Despot / depan


Now, I'm doing mostly copy and paste here without thoroughly understanding avisynth's syntax. (I did read about avisynth grammar
and can accomplish some easy scripts, but I still struggle to understand, let alone write advanced scripts)

So, I'm posting three scripts that work separately but not when I try to combine them. May I ask for assistance in combining them?
That would be awesome!

I managed to combine scripts 1 and 2, but when I try to put in script 3, I get an error: invalid argument: converttoYV12


script 1:

#JohnMeyer's Denoiser script for interlaced video using MDegrain2
#This is my recommended starting point script for VHS as of April, 2012

SetMemoryMax(768)

Loadplugin("C:\Program Files\AviSynth\plugins\mvtools2.dll")
LoadPlugin("c:\Program Files\AviSynth\plugins\Cnr2.dll")
#loadplugin("c:\Program Files\AviSynth\plugins\despot.dll")
#Loadplugin("C:\Program Files\AviSynth\plugins\removegrain.dll")
Import("C:\Program Files\AviSynth\plugins\LimitedSharpenFaster.avsi")

SetMTMode(5,4)
#Modify this line to point to your video file
source=AVISource("C:\VHS.avi").killaudio().AssumeTFF()
SetMTMode(2)

#Only use chroma restoration for analog source material
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
#chroma=source.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc
#Set overlap in line below to 0, 2, 4, 8. Higher number=better, but slower
#For VHS, 4,0 seems to work better than 8,2. Most of difference is in shadows
#However, 8,0 is good enough and MUCH faster. 8,2 doesn't seem to make much difference on VHS.

#output=MDegrain2i2(chroma,8,0,0)
output=MDegrain2i2(chroma,8,4,0) #Better, but slower

#output=IResize(output,720,480)

#stackvertical(source,output)
#stackhorizontal(source,output)
#return output.Levels(16, 1, 235, 0, 255, coring=false)

return output


#-------------------------------

function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct")
{
Vshift=0 # 2 lines per bobbed-field per tape generation (PAL); original=2; copy=4 etc
Hshift=0 # determine experimentally
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker

fields=source.SeparateFields() # separate by fields

#This line gets rid of chroma halo
fields=MergeChroma(fields,crop(fields,Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
#This line will shift chroma down and to the right instead of up and to the left
#fields=MergeChroma(fields,Crop(AddBorders(fields,Hshift,Vshift,0,0),0,0,-Hshift,-Vshift))

super = fields.MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct)

#Increasing thSAD doesn't seem to help
# MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)

# Eliminate next three lines and uncomment above line to use MDegrain2 instead of MDegrain3
backward_vec6 = super.MAnalyse(isb = true, delta = 6, blksize=blksize, overlap=overlap, dct=dct)
forward_vec6 = super.MAnalyse(isb = false, delta = 6, blksize=blksize, overlap=overlap, dct=dct)
MDegrain3(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,backward_vec6,forward_vec6,thSCD1=400,thSAD=300)

#UnsharpMask( clip , int "strength" , int "radius" , int "threshold" )
#strength: strength. The default is 64.
#radius: the scope of the blurring process. The default is 3.
#threshold: threshold. Absolute value of the processing component is greater than the threshold blur. The default is 8.

unsharpmask(60,3,0) #not sure whether to put this before or after the weave.

#This function is unstable under SetMTMode
#limitedSharpenFaster(smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=480)
#LimitedSharpenFaster(strength=150) #Default strength=150

Weave()
}



script 2:

#Function FixChromaBleeding (clip input) {

# prepare to work on the V channel and reduce to speed up and filter noise
area = input.tweak(sat=4.0).VtoY.ReduceBy2

# select and normalize both extremes of the scale
red = area.Levels(255,1.0,255,255,0)
blue = area.Levels(0,1.0,0,0,255)

# merge both masks
mask = MergeLuma(red, blue, 0.5).Levels(250,1.0,250,255,0)

# expand to cover beyond the bleeding areas and shift to compensate the resizing
mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12

# back to full size and binarize (also a trick to expand)
mask = mask.BilinearResize(Width(input),Height(input)).Levels(10,1.0,10,0,255)

# prepare a version of the image that has its chroma shifted and less saturated
input_c = input.ChromaShift(C=-4).tweak(sat=0.8)

# combine both images using the mask
return input.overlay(input_c,mask=mask,mode="blend",opacity=1)
}



script 3:

# removal of white dots


LoadPlugin("C:\Program Files\AviSynth\plugins\depan.dll")
LoadPlugin("C:\Program Files\AviSynth\plugins\despot.dll")

AVISource("C:\VHS.avi").AssumeTFF

i = ConvertToYV12()
d = DePanEstimate(i, trust=3)
DePanInterleave(i, data=d)
DeSpot(p1=90, p2=15, pwidth=200, pheight=2, mthres=20, motpn=true, dilate=1, seg=1, sign=-1, maxpts=10)
SelectEvery(3, 1)
Busty is offline   Reply With Quote
Old 12th May 2025, 21:18   #2  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 77
Maybe because you're not converting anything to yv12?
VideoMilk78 is offline   Reply With Quote
Old 12th May 2025, 22:38   #3  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
your comment gave me a hint what to take a look at, thanks.

It seems that the function MDegrain2i2 needs the word "source=" in front of the input video to operate.

The conversion to YV12 works when I delete the word "source=" in front of my video path. However, then I get an error message stating "I don't know what 'source' means".

So, if I want the output of DeSpot to be processed by MDegrain2i2, what phrase would I need to put after the processing steps of DeSpot?
Busty is offline   Reply With Quote
Old 12th May 2025, 23:31   #4  |  Link
VideoMilk78
Registered User
 
VideoMilk78's Avatar
 
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 77
You then need to define the despotted clip then you can use than clip and run it through MDegrain2i2.
I don't like to give paste in solutions to beginners as I find that doesn't really help, often it only creates more error... This is what helped me learn
VideoMilk78 is offline   Reply With Quote
Old 13th May 2025, 23:42   #5  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
I do understand that concept of learning, I appreciate your input, but I really try to find out things myself before I post questions like this. A lot of the times I find a solution. With this one however, I'm stuck.

I guess I can enter a line "return output" after DeSpot, but MDegrain212 needs a defined source, so I think I would need a name of a clip. If I enter the name of the source clip; I fear MDegrain2i2 would process the original file, not the one processed by DeSpot. I cannot find a hint how to define a source that was created within the script.
Busty is offline   Reply With Quote
Old 14th May 2025, 05:04   #6  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,335
In your script you use the very old denoise functions like from the beginning of mvtools in end of 200x. Mdegrain2i2 is sort of simple example how to use mvtools for motion-compensated denoising of interlaced clips. It is now about 0.2 century old and outdated.
To the end of the active AVS+ usage at the beginning of 202x there were developed most advanced denoisers used mvtools engine like SMDegrain on mvtools-2.7.45 and also some alternative version of mvtools branched from 2.7.45 with more advanced MAnalyse and MVs processing-refining mostly described in https://forum.doom9.org/showthread.php?t=183517 . Some practical usage you can see in M_QTGMC script. General ideas on better MVs at denoising:
1. Use multi-generation MVs refining with dual-input MAnalyse where one source is always input full-noised and second input is previous generation processed clip (by MDegrain or any other denoise engine)
2. Use voting for best MV (some averaging of 3-D objects like MV of dx,dy and dissimilarity metric members) from several MVs sources - like make sevral different denoise examples (like BM3D and KNL and MDegrain) and send to next generation MAnalyse and feed MAnalyse output to MVs voting engine (MAverage()) to select most probable MV for next generation of denoise. Also possibe at block-level in MAnalyse for Area analysis of some surrounding of current position of block in blocks tesselation grid and also processing of several motion outputs with averaging engine.
3. Use multi-level MVs search with refining from larger block size (more stable with low quality source) to smaller (better tracking of small objects and complex transforms).
4. Use several different denoise engines outputs in the engine for select the most different samples values from smoothed version (anti-detail loss method). This may make denoise quality somehow worse but save more from blurring.
5. Use MDegrainN for larger tr-values with more shorter scripting (or newer features).
6. Use 'prefiltering' as some pre-processing of input source before feeding to MAnalyse engine (one of its inputs). For prefiltering any method may be used like simple more or less blur or any complex pre-denoiser engine (like BM3D or KNL). In the mvtools-only multi-generation MVs refining the previous generation denoise output used as 'prefiltered' for next generation MAnalyse (one of inputs).

This may make quality of MVs somehow better and lower blurring of output result by MDegrain because of bad blends from bad MVs. At the low quality sources and fast motion this may make some better quality denoise.

Last edited by DTL; 14th May 2025 at 08:29.
DTL is offline   Reply With Quote
Old 14th May 2025, 08:15   #7  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,931
script 1:
Code:
return output
This forces output from here, anything down from here is never called.
Comment that out.
Code:
# return output
script 3:
Code:
AVISource("C:\VHS.avi").AssumeTFF
This envokes script 3 on untouched source.
Comment this line out:
Code:
#AVISource("C:\VHS.avi").AssumeTFF
Then this script will work on implicit last,
meaning the output from previous script 1.

script 2 (this is actually a function, but you never call it):
Code:
#Function FixChromaBleeding (clip input) {
The # comments the function out.
Remove the #
Code:
Function FixChromaBleeding (clip input) {
and now you may call the function from script 1 or the last script.
---------------
If such processing gives a good result after these corrections I can not tell, would need a sample of your source please.
And denoising: as DTL mentions, there is newer and better. You may try the following and lower tr as you see fit
Code:
SMDegrain(tr=6, thSAD=400, RefineMotion=true, contrasharp=true, interlaced=true, plane=4, prefilter=8, chroma=true, Show=false) #5: DFTTest, 6: KNLMeansCL, 7: DGDenoise, 8: BM3D
Or even better: lose interlaced, use QTGMCp and bob up to 50p/59.94p.
This denoises internally already. If this is not sufficient enough, then afterwards
Code:
SMDegrain(tr=6, thSAD=400, RefineMotion=true, contrasharp=true, interlaced=false, plane=4, prefilter=8, chroma=true, Show=false) #5: DFTTest, 6: KNLMeansCL, 7: DGDenoise, 8: BM3D
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 14th May 2025 at 08:29.
Emulgator is offline   Reply With Quote
Old 17th May 2025, 23:02   #8  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
@ DTL:
thanks for the explanation. When reading different threads, it's a bit complicated to determine which denoising methods are superior, so It's nice to have it summed up.
Having installed avisynth and virtualdub via PlayOnMac, I always thought I was stuck with avisynth 2.6, but after your comment I thought I'd have a go at installing avisynth+ 3.7.5 and it installed like a breeze. So I have a whole new world of tools available. I will try some things in the coming week and report back.
Busty is offline   Reply With Quote
Old 17th May 2025, 23:09   #9  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
@ Emulgator:

that's a great explanation of my script errors, highly appreciated, I learned something:-)

Still the same error remains: ConverttoYV12: invalid argument

or, when I remove "source" in front of my input video line; i get "I don't know what 'source' is"

This might be obsolete when I try yours and DTL's suggestions, but I'd still like to understand what is the cause of and solution to it.
Busty is offline   Reply With Quote
Old 17th May 2025, 23:23   #10  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,931
Please post your recent script you are working from.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 18th May 2025, 18:37   #11  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
gladly, it's just a combination of what I posted above with your suggestions edited in:

#JohnMeyer's Denoiser script for interlaced video using MDegrain2
#This is my recommended starting point script for VHS as of April, 2012

SetMemoryMax(768)

Loadplugin("C:\Program Files\AviSynth\plugins\mvtools2.dll")
LoadPlugin("c:\Program Files\AviSynth\plugins\Cnr2.dll")
#loadplugin("c:\Program Files\AviSynth\plugins\despot.dll")
#Loadplugin("C:\Program Files\AviSynth\plugins\removegrain.dll")
Import("C:\Program Files\AviSynth\plugins\LimitedSharpenFaster.avsi")

SetMTMode(5,4)
#Modify this line to point to your video file
source=AVISource("C:\VHS.avi").killaudio().AssumeTFF()
SetMTMode(2)

#Only use chroma restoration for analog source material
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
#chroma=source.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc
#Set overlap in line below to 0, 2, 4, 8. Higher number=better, but slower
#For VHS, 4,0 seems to work better than 8,2. Most of difference is in shadows
#However, 8,0 is good enough and MUCH faster. 8,2 doesn't seem to make much difference on VHS.

#output=MDegrain2i2(chroma,8,0,0)
output=MDegrain2i2(chroma,8,4,0) #Better, but slower

#output=IResize(output,720,480)

#stackvertical(source,output)
#stackhorizontal(source,output)
#return output.Levels(16, 1, 235, 0, 255, coring=false)

#return output


#-------------------------------

function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct")
{
Vshift=0 # 2 lines per bobbed-field per tape generation (PAL); original=2; copy=4 etc
Hshift=0 # determine experimentally
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker

fields=source.SeparateFields() # separate by fields

#This line gets rid of chroma halo
fields=MergeChroma(fields,crop(fields,Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
#This line will shift chroma down and to the right instead of up and to the left
#fields=MergeChroma(fields,Crop(AddBorders(fields,Hshift,Vshift,0,0),0,0,-Hshift,-Vshift))

super = fields.MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct)

#Increasing thSAD doesn't seem to help
# MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)

# Eliminate next three lines and uncomment above line to use MDegrain2 instead of MDegrain3
backward_vec6 = super.MAnalyse(isb = true, delta = 6, blksize=blksize, overlap=overlap, dct=dct)
forward_vec6 = super.MAnalyse(isb = false, delta = 6, blksize=blksize, overlap=overlap, dct=dct)
MDegrain3(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,backward_vec6,forward_vec6,thSCD1=400,thSAD=300)

#UnsharpMask( clip , int "strength" , int "radius" , int "threshold" )
#strength: strength. The default is 64.
#radius: the scope of the blurring process. The default is 3.
#threshold: threshold. Absolute value of the processing component is greater than the threshold blur. The default is 8.

unsharpmask(60,3,0) #not sure whether to put this before or after the weave.

#This function is unstable under SetMTMode
#limitedSharpenFaster(smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=480)
#LimitedSharpenFaster(strength=150) #Default strength=150

Weave()
}



Function FixChromaBleeding (clip input) {

# prepare to work on the V channel and reduce to speed up and filter noise
area = input.tweak(sat=4.0).VtoY.ReduceBy2

# select and normalize both extremes of the scale
red = area.Levels(255,1.0,255,255,0)
blue = area.Levels(0,1.0,0,0,255)

# merge both masks
mask = MergeLuma(red, blue, 0.5).Levels(250,1.0,250,255,0)

# expand to cover beyond the bleeding areas and shift to compensate the resizing
mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12

# back to full size and binarize (also a trick to expand)
mask = mask.BilinearResize(Width(input),Height(input)).Levels(10,1.0,10,0,255)

# prepare a version of the image that has its chroma shifted and less saturated
input_c = input.ChromaShift(C=-4).tweak(sat=0.8)

# combine both images using the mask
return input.overlay(input_c,mask=mask,mode="blend",opacity=1)
}



# removal of white dots


LoadPlugin("C:\Program Files\AviSynth\plugins\depan.dll")
LoadPlugin("C:\Program Files\AviSynth\plugins\despot.dll")

i = ConvertToYV12()
d = DePanEstimate(i, trust=3)
DePanInterleave(i, data=d)
DeSpot(p1=90, p2=15, pwidth=200, pheight=2, mthres=20, motpn=true, dilate=1, seg=1, sign=-1, maxpts=10)
SelectEvery(3, 1)
Busty is offline   Reply With Quote
Old 18th May 2025, 19:54   #12  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,756
I didn't remember posting my original denoising script with all of my alternative ideas still intact. It makes if pretty confusing.

If you just want to denoise, don't forget to uncomment "# return output". You did that in post #1, but you have to remove the # in order to get the script to do anything.

As someone already suggested, you may need to do a colorspace conversion in the initial line:

Code:
source=AVISource("C:\VHS.avi").killaudio().AssumeTFF().ConvertToYV12()
Make sure to change the "AssumeTFF()" to "AssumeBFF()" if your interlaced video is bottom field first.

My ancient script uses an old version of multi-threading ("SetMTMode"). This probably won't work if you are using a reasonably modern version of AVISynth. Until you get the script working I would suggest you simply delete those two SetMTMode lines.

The white dot removal section should be moved up to the end of my script (right after the "#return output" line). If you want it to do anything, keep the comment symbol (#) in front of "return output" and then feed "output" to the first line in the despotting section, e.g.,
Code:
i = output.ConvertToYV12()
Since, if you do what I suggest above, you have already done that color conversion, you can simply write:

Code:
i = output
johnmeyer is offline   Reply With Quote
Old 18th May 2025, 23:34   #13  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
Thank you John, that did it. The script opens. Now I can play with it and tweak it.

Just to understand it: Should something be different when I add "return output" at the very end of the script? I had the impression that the removal of white dots didn't work when I added that line.

I'd love to try SMDeGrain or KNLMeansCL or BM3D, but I still can't get any of those to work. Avisynth+ didn't help there.

KNLMeansCL gives me an "unrecognized system exception".

BM3DCUDA claims "module not found", which I think refers to CUDA CUDA seems to be unsupported by my Graphics Card (Nvidia Geforce 8800 GT).

SMDegrain won't open because of an exe error, which might be a 32bit / 64bit mismatch between app and plugin. Is the latest version of SMDeGrain 64bit, and if so, is there a 32bit version available?
Busty is offline   Reply With Quote
Old 19th May 2025, 06:21   #14  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,335
SMDegrain is only a script but used lots of plugins (as pre-filters or masking and more) and you need to get all used plugins in 32bit versions (or set lowest settings to use a few plugins). Better to use 64bit processing software. Try to get all required plugins as 64bit builds.
DTL is offline   Reply With Quote
Old 19th May 2025, 14:07   #15  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
it seems to be SMDegrain itself that does not work for me. I removed all plugins from the plugin folder but SMDegrain and still got this error.

I tried the current version 4.7.0d and version 1.8d, which were the only ones I could find, they both return this error.

My installation of Avisynth can load MVTools2, Dither and MaskTools, other dependencies are listed as optional.
Busty is offline   Reply With Quote
Old 19th May 2025, 15:53   #16  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,756
The script holds intermediate steps in variables, like "source," "chroma," and "output." At the end of the script you have to "return" one of those variables. This is usually the result of the last variable assignment which, in my original script that ends with "return output," is the variable "output." Whatever is contained in that variable is the video that your script produces.
johnmeyer is offline   Reply With Quote
Old 19th May 2025, 17:21   #17  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
Quote:
Originally Posted by johnmeyer View Post
The script holds intermediate steps in variables, like "source," "chroma," and "output." At the end of the script you have to "return" one of those variables. This is usually the result of the last variable assignment which, in my original script that ends with "return output," is the variable "output." Whatever is contained in that variable is the video that your script produces.
I see, so when I add "return output" at the end of that script, it gives me the result of MDegrain2i2, because that's where the term output is defined.

Thanks for explaining, I appreciate it.
Busty is offline   Reply With Quote
Old 19th May 2025, 18:07   #18  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,756
Quote:
Originally Posted by Busty View Post
I see, so when I add "return output" at the end of that script, it gives me the result of MDegrain2i2, because that's where the term output is defined.
Yes, and that's true even if there are other operations further down in the script. Those will get ignored.
johnmeyer is offline   Reply With Quote
Old 28th May 2025, 14:07   #19  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
I mainly used your (johnmeyer's) script as a base because I wanted to adress chroma noise and chroma shift, the denoising part is mostly a bonus. (Maybe I'll replace that part at some point as suggested)

However, I still notice some double edges, which I guess is either chroma bleeding or halo or something like that.

I upload a 20 sec sample as an example what I'm dealing with. Have a look at the face in frame 456 for example, on the forehead there is a red doubling to the right. I tried to shift it with chromashift which resulted in the same thing, only on the left side.
Or on frame 578 the red is still right of the drummers arm, and when I shift that , like 6 pixel to the left, I see it appearing left from the singer's head.

There's also a similar effect visible on the TV logo, is that the same issue? What exactly am I looking at, e.g. what would you call this issue?

Can this script be tweaked to adress this (on the halo line) or would I need to insert something else?

Edit: Sample upload needs to wait,I get an error from the site (security token missing) and guess I need to wait for an admin to answer...

Last edited by Busty; 28th May 2025 at 14:24.
Busty is offline   Reply With Quote
Old 2nd June 2025, 17:15   #20  |  Link
Busty
Registered User
 
Join Date: Sep 2016
Posts: 56
ok, here are two files, one is an unalterered 20 sec video and one is the output of the script. Any tips how to get rid of the chroma bleed - or shift?

https://limewire.com/?referrer=pq7i8xx7p2
Busty is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:19.


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