VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Hi,

    Is there a way to determine what the Luminance levels are set to a particular video file? I would like to know if it's set to 16-235 or 0-255. I tried MediaInfo but didn't see it listed.

    Thanks!
    Quote Quote  
  2. You can use Histogram() or VideoScope() in an AviSynth script. Sony Vegas has a waveform monitor.
    Quote Quote  
  3. Banned
    Join Date: Oct 2004
    Location: New York, US
    Search Comp PM
    -30-
    Last edited by sanlyn; 19th Mar 2014 at 11:46.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    You can use Histogram() or VideoScope() in an AviSynth script. Sony Vegas has a waveform monitor.
    I use both AviSynth script and sony vegas pro 10, and will take a look at the waveform monitor.

    Thanks jagabo!
    Quote Quote  
  5. Originally Posted by sanlyn View Post
    Even if such information was imbedded explicitly in a video, that's no assurance that the creator adhered to the standard. Most people don't. They aren't even aware that such standards exist.
    This is one of the things I'm trying to learn. When should 16-235 or 0-255 be set in video? In the past I've always taken the default.

    Thanks!
    Quote Quote  
  6. Banned
    Join Date: Oct 2004
    Location: New York, US
    Search Comp PM
    -30-
    Last edited by sanlyn; 19th Mar 2014 at 11:47.
    Quote Quote  
  7. Video should almost always be Y=16-235. If you want a traditional horizontal waveform monitor with Histogram() use:

    Code:
    TurnRight().Histogram().TurnLeft()
    Name:  hist.png
Views: 48
Size:  73.2 KB

    I usually prefer VideoScope() but Histogram does mark the illegal luma areas (Y<16, Y>235) with yellow bars.
    Quote Quote  
  8. would be interesting to know if there's an automated option to do the identification (maybe using ffmpeg or something similar,..)

    I remembered something, how about calling: (with the path adjusted)
    Code:
    ffplay -i "PATH TO SOURCE"  -vf "split[a][b];[a]format=gray,histogram=mode=waveform:waveform_mode=column,vflip,split[c][d];[b]pad=iw:ih+256[padded];[c]geq=g=1:b=1[red];[d]geq=r=1:b=1,crop=in_w:220:0:16[mid];[red][mid]overlay=0:16[wave];[padded][wave]overlay=0:H-h"
    source: https://trac.ffmpeg.org/wiki/FancyFilteringExamples#waveform
    this should show a colored histrogram in waveform.
    green = colors are inside TV scale (15-235)
    red = colors are inside PC scale (0-255)

    this isn't automatic but it's may be more intuitive,...
    (does anyone know a way to output the histogram to the command line?)
    Attached Images  
    Last edited by Selur; 3rd Dec 2013 at 09:41.
    Quote Quote  
  9. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by Selur View Post
    would be interesting to know if there's an automated option to do the identification (maybe using ffmpeg or something similar,..)
    I don' t think there is an "automated" solution that scans the entire file.

    The waveform monitors only measure at a single point in time . So if you measure at time "x" there might be 16-235 Y' data, but at time "x+1" there might be 0-255 Y' data



    ffmpeg has -vf histogram , so you can use ffplay to see the chart in realtime . Unfortunately there are no markings . There is also a vectorscope mode, and a levels mode (like histogram("Levels") in avisynth)

    http://ffmpeg.org/ffmpeg-filters.html#histogram

    e.g
    Code:
    ffplay -i "input.ext" -vf "histogram='mode=waveform':'waveform_mode=column'"
    Or you can "print" it out using ffmpeg to a still image

    Most NLE's don't use a 0-255 scale, they measure by a 0-100 IRE scale



    EDIT: I didn't see your edit selur, that's a nice way to do it below the image
    Attached Images      
    Quote Quote  
  10. like I wrote in my post before (edited it before you had posted your post ), question is:

    Is there a way to output the histogram to the stdut or to a file?
    Quote Quote  
  11. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by Selur View Post
    like I wrote in my post before (edited it before you had posted your post ), question is:

    Is there a way to output the histogram to the stdut or to a file?

    Just use ffmpeg (instead of ffplay) to output an image sequence . Is that what you're asking ?
    Quote Quote  
  12. No, I want the histogram values not images.
    *gig* I thought about this before: http://forum.videohelp.com/threads/355566-Histogram-TV-PC-range-min-max

    If I got the values in a file or a command line I could write a small tool which:
    a. calls ffmpeg/ffplay/... to analyse the source and output the data
    b. take the data and output if the source is probably TV or PC scale

    Cu Selur
    Quote Quote  
  13. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    I see, as a text file or spreadsheet

    Maybe avisynth's coloryuv(analyze=true) with writefile() ? coloryuv(analyze=true) shows min/max/avg values . Maybe YPlane Min / Max with conditionalfilter() and writefile() ?

    Not sure if this will help
    http://forum.doom9.org/showthread.php?t=154414
    Quote Quote  
  14. Maybe avisynth's coloryuv(analyze=true) with writefile() ? coloryuv(analyze=true) shows min/max/avg values . Maybe YPlane Min / Max with conditionalfilter() and writefile() ?
    might work, but would prefer ffmpeg since that can be used cross platform
    Quote Quote  
  15. Personally, I wouldn't trust an automated solution that looks for high and low luma values. Too many 16-235 videos have overshoots that would make that unreliable. Even with ColorYUV's "loose" values.
    Quote Quote  
  16. Sure you would use some heuristic based on the number of luma values which are in PC and not TV range, but first thing would be to have some data to analyse.
    Quote Quote  



Similar Threads