VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I need to get the max Y-value per frame and just got stuck with all that runtime stuff.

    So, how do I get a variable for the maximim Y value and (depending on that variable) do something to the clip:

    if Y > 16 --> autolevel

    else

    --> do nothing
    Quote Quote  
  2. Runtime filters (eg AverageLuma, YPlaneMax) can only be used with runtime functions (eg conditional filter, scriptclip)

    Code:
    src=last
    
    src
    #your filter here
    filtered=last
    
    ConditionalFilter(src, filtered, src, "YPlaneMax", ">", "16", show=true)
    Just replace #your filter here, with whatever filter e.g. autolevels() . To debug it , use show=true to show the value of the conditional. You might have to adjust the 16 value slightly. Change it to show=false for the real thing
    Quote Quote  
  3. Thanks poisondeathray!

    It works. Not perfect but result is much better than before. The problem I'm having with all "autolevels" scripts/plugins is that they also
    "crank-up" black fades and crossfades, which looks really bad.
    After setting the Y-level to 40 almost every frame in the fade/crossfade remains dark except a few at the start and end.
    I can live with that though.

    Thanks again for your help!
    Quote Quote  
  4. Have you tried the other "autolevels" plugins ? (there are a few variations of "autolevels", and a different one called "autogain" by lato) . Lato's works the best overall IMO, but "auto" anything is prone to problems in general . It has a dark_exclude parameter which allows you to exclude a percentage of the darkest pixels in the minima calulation
    Quote Quote  
  5. I tried all of them. From ColorTuv(autogain=true) to several VD-filters. Also Lato's.
    They all fail when handling fades-in or crossfades thru black.

    But when using your script and setting the minY level to 75, the results are quite acceptable.

    Thanks again PDR!
    Quote Quote  
  6. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    PeterNL, out of curiosity why do you need this?
    Quote Quote  
  7. I got some old super8 homevideos laserscanned to lossless AVI.
    The luma-levels are not constant and vary a lot because of the lousy camera i had at that time
    Beside that, I will put them only on my Dune mediaplayer so there is no need for studio-levels either and I prefer 0-255 levels.
    Doing this manually is a nogo so autolevels is my way to go.
    I edit them, render the complete project to some lossless codec and push them thru avisynth/virtualdub to get the right levels which worked well, except for the fades/crossfades. Finally I render to X264.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!