VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. 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):

    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)
    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.
    Any Avisynth guru could shed a light on this one?
    Thanks in advance.
    Quote Quote  
  2. Yellow subtitle text?
    Quote Quote  
  3. Originally Posted by jagabo View Post
    Yellow subtitle text?
    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.
    Quote Quote  
  4. 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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!