Hi,
For filtering out random red cast from some clips I'm trying to make a script.
I use 2 plugins to do sort of "whitebalancing.
After that I want to pick those frames with the lowest red-level from the original (V0), the one "coloryuvved-autowhite(V1) or the third one treated with Gammac(V2):
For some mysterious reason this doesn't work correctly ---> it's not always picking the frame with the lowest value as I can see on the horizontal stacked.Code:clip=clip.ScriptClip("subtitle(string(VPlaneMax),size=48)") ###### show redlevels clip1=clip1.ScriptClip("subtitle(string(VPlaneMax),size=48)") clip2=clip2.ScriptClip("subtitle(string(VPlaneMax),size=48)") clip1=clip.converttoRGB24().Gammac(show=false,LockChan = 1,Verbosity=1,RedMul=1.0,BluMul=1.0,GrnMul=1.0,Scale=1,x=50, y=50).converttoYV12() #clip1=clip.coloryuv(off_v=-5) clip2=clip.coloryuv(autowhite=true) #clip2=clip.AutoAdjust(Auto_Balance=true,chroma_limit=2.0,balance_str=1.0) ConditionalSelect(clip," V0 = VPlaneMax(clip) V1 = VPlaneMax(clip1) V2 = VPlaneMax(clip2) V0<=V1 && V0<=V2 ? 0 : (V1<=V2 ? 1 : 2)", clip, clip1, clip2) Stackhorizontal(clip,clip1,clip2,last)
Any Avisynth guru could shed a light on this one?
Thanks in advance.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
Yes, indeed.... don't know why but no problem. I just want to see the red-levels in the horizontal stack..
Correction: Just got it. Now trying without those subs...
Oh stupid me....
Jagabo, your my savior! Works like a charm now. Took me hours and some more grey hair.
Many thanks for helping out this old man!Last edited by PeterNL; 27th Feb 2018 at 13:47.
-
Yes, I suspected the yellow text was interfering with your red detection. I think if you move the ScriptClip(Subs) to the clips at StackHorizontal() it will work correctly.
Similar Threads
-
Basic Avisynth Script Problem For Simple X264 Launcher
By sam1776 in forum Newbie / General discussionsReplies: 11Last Post: 16th Oct 2015, 07:51 -
Avisynth Script audio problem
By Mr_Flintstone in forum Video ConversionReplies: 12Last Post: 20th Apr 2014, 00:01 -
avisynth - How to write avisynth script for rgba overlay
By moelover in forum EditingReplies: 3Last Post: 13th Apr 2014, 13:24 -
Problem with Avisynth script, trimming several sources
By slicknick610 in forum EditingReplies: 10Last Post: 14th Feb 2014, 12:41 -
How can i Use VDub Script[.vcf] into Avisynth Script[.avs] ( Megui )
By Maskoff in forum EditingReplies: 1Last Post: 25th Jun 2013, 16:30