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 16 of 16
-
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.
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