After applying Levels through AviSynth on VirtualDub2, I’m seeing vertical stripes in my video. (These are not the same stripes I posted about on this forum five years ago.)
Sometimes, in other processing videos, those lines do not appear. I’m also running several filters in a single AviSynth script: QTGMC, DeHalo, and Santiag. After Levels, I change the frame using SplineResize
1 image: Captured with the camera lens cap closed.
2 image: Enhanced so the vertical stripes are more visible.
Any ideas on what could be causing this? Thanks in advance.
+ Reply to Thread
Results 1 to 22 of 22
-
Last edited by taigi; 1st Jun 2025 at 03:45.
-
Could be caused by:
(Capture/GraphicCard) Driver issues.
Improper luma-plane handling during resizing/sharpening/color conversion.
You probably can get rid of them by lowering the luma resolution and then restore it.
I'm pretty sure I saw this before somewhere on the forum.
General idea:
Code:clip = last # Extract luma Y = clip.ConvertToY8() scaleFactor = 2 # if two isn't enough try 4 or 8 # Lowering horizontal resolution; you might want to try different resizers Y_half = Y.BilinearResize(Y.Width() / scaleFactor, Y.Height()) # Restoring original resolution; you might want to try different resizers Y_restored = Y_half.BilinearResize(clip.Width(), clip.Height()) # Convert luma back to YV12 by adding dummy chroma (if you source isn't YV12 adjust this) Y_restored_yv12 = ConvertToYV12(Y_restored) # Replace chroma from original clip MergeChroma(Y_restored_yv12, clip)
Ps.: Here's also a Vapoursynth version:
Code:# Extract luma luma = core.std.ShufflePlanes(clip, planes=0, colorfamily=vs.GRAY) # Lower horizontal resolution width = luma.width scalingFactor = 2 luma_half = core.resize.Bilinear(luma, width // scalingFactor, luma.height) # Scale back to original width luma_restored = core.resize.Bilinear(luma_half, width, luma.height) # Merge modified luma back with original chroma clip = core.std.ShufflePlanes([luma_restored, clip], planes=[0, 1, 2], colorfamily=vs.YUV)
Last edited by Selur; 1st Jun 2025 at 00:54.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
-
I'm using this script:
video = FFMPEGSource2("file.avi", atrack=1)
video = video.Levels(12, 1.0, 255, 16, 235, coring=false, dither=true)
return video
Prefetch(2)
Anything wrong with it? -
Try LWLibAvVideoSource("file.avi"), that's LSMASH.
Remove "return". -
Remove "return".
Code:SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) video = FFMPEGSource2("file.avi", atrack=1) video = video.Levels(12, 1.0, 255, 16, 235, coring=false, dither=true) Prefetch(2) return video
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Source file is typical. I'm having stripes on other similar files too. I think problem is in the whole script. Yes two dehalos:
video = FFMPEGSource2("1.avi", atrack=1)
video = video.QTGMC(TR0=2, TR1=1, TR2=0, Rep0=1, Rep1=0, Rep2=2, DCT=5, ThSCD1=400, ThSCD2=150, SourceMatch=2, Lossless=1, Sharpness=0, Sbb=0, MatchPreset="slow", NoiseProcess=1, NoiseRestore=0, NoisePreset="slow", StabilizeNoise=true, NoiseTR=1, NoiseDeint="true", Sigma=2.0)
video = video.FineDehalo(rx=1.5, ry=1.5, thmi=80, thma=128, thlimi=50, thlima=100, darkstr=1.0, brightstr=1.0, showmask=0, contra=0.0, excl=true)
video = video.santiag(strv=3, type="nnedi3", nns=4, threads=0, nsize=4, halfres=false, scaler_post="LanczosResize")
video = video.FineDehalo(rx=1.0, ry=1.0, thmi=80, thma=128, thlimi=50, thlima=100, darkstr=1.0, brightstr=1.0, showmask=0, contra=0.0, excl=true)
video = video.Levels(12, 1.0, 255, 16, 235, coring=false, dither=true)
video = video.Spline64Resize(1024,576)
Prefetch(2)
return video -
-
I doubt that this works, use it like I wrote you.
your suggestion
Code:video Prefetch(2)
Code:last=video Prefetch(2) return last # since there is no return
users currently on my ignore list: deadrats, Stears555, marcorocchini -
There is no "last" in his script, so I doubt that it works for you too.
EDIT:
Oh, I see, it's you who suggested him that, I guess you are not that secret/unknown avs expert[s] then.
Read there [starts from that post I think] -> https://forum.doom9.org/showthread.php?p=1975646#post1975646Last edited by VoodooFX; 4th Jun 2025 at 06:53.
-
There is no "last" in his script, so I doubt that it works for you too.
Read there [starts from that post I think] -> https://forum.doom9.org/showthread.php?p=1975646#post1975646
=> totally lost, but the vertical line problem is useless to discuss without a sample
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
-
Show me where there are no direct variables in his or your script.
With:
Code:video Prefetch(2)
(same as "Levels()" actually is "last = Levels(last)")
and since at the end of the script nothing got returned, last will be returned.
soCode:video Prefetch(2)
Code:last = video Prefetch(2) return last
If you follow the conversation there then you'll see that it boils down that there is some bug in FFMS2 + VirtualDub/StaxRip combo or FFMS2 is not frame accurate.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Last edited by VoodooFX; 4th Jun 2025 at 11:28.
-
like I wrote without a sample of the source this is moot,...
users currently on my ignore list: deadrats, Stears555, marcorocchini -
The script isn't causing the vertical stripes. It's just making existing stripes visible. Your VCR, cables, or capture device is causing them.
-
Yes, I had stronger vertical stripes in my orig. footage before, and applied Santiag.
But after Levels stripes seem to reappear, in a different form.
Should I apply the same Santiag again?
Those stripes are from my broken DV camera. I captured it directly from the DV camera using a FireWire cable with Windows Vista. I tried capturing with different DV cameras, but got the same result. -
Came across the VirtualDub2 “Levels” filter.
Is it reliable for production work, or mainly a legacy/utility tool?
Context: Windows 7, mostly DV sources.
Thanks. -
vdub2 levels filter is not ideal because: does not work at higher bit depths , has no dithering options, and most importantly coring is permanently set to true - which can causing clipping of useful data
For example, many DV recordings have usable overbrights in the 235-255 range. Typically they record 16-255. Clipping 0-15, 236-255 before you even do anything is a shame
(A workaround for the clipping if you must use vdub2 levels filter is to interpret as full range in the decoding options ... but then the black point, gamma change more than they might need to. So you make counter adjustments and manipulations and that can cause more 8bit rounding errors and banding) -
Because these lines are in the source file, you're only brightening the ones that slightly exceed the limit (luma=12). Use this instead of Levels:
ApplyGradationCurves(lumapoints="0,0,12,16,255,235 ")
http://avisynth.nl/index.php/GradationCurve
Maybe it would be a good idea to denoise the source file as well.
And once saved as a limited range file and played correctly, these lines wouldn't be visible. It's hard to judge without the source file.
Edit: Well, this probably won't work, because you only want to lighten part of the "black".
Last edited by rgr; 26th Aug 2025 at 03:02.
-
-
Wouldn't it be better to just throw away the junk data below luma 16?
Code:ApplyGradationCurves(lumapoints="16,16,255,235") # I prefer ApplyGradationCurve(lumapoints="16,16,64,64,128,128,192,192,255,235") Limiter(16,235,16,240)
Edit: delete all Santiag filters etc. They are unnecessary.Last edited by rgr; 26th Aug 2025 at 02:49.
Similar Threads
-
Betacam Avisynth Script - Levels and Denoising
By ENunn in forum RestorationReplies: 7Last Post: 12th Mar 2024, 09:53 -
I need help with the TemporalDegrain2 filter script error
By Marcio.ciconne in forum RestorationReplies: 4Last Post: 21st Sep 2023, 17:05 -
What would be a must have filter to add to the Avisynth script?
By HansensUniverse in forum Newbie / General discussionsReplies: 10Last Post: 5th Feb 2022, 07:36 -
What do you think about the result of my AviSynth script
By ingoldie in forum RestorationReplies: 30Last Post: 18th Nov 2020, 11:35 -
Where/At What Point is the VirtualDub "Levels" Filter Used?
By Avagadro1 in forum EditingReplies: 4Last Post: 15th Aug 2020, 22:59