VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hi

    Some time ago I made a HuffYUV 2.2 capture of some SD footage
    I want to reencode it for watching on my crt TV so I want a range of 16-235
    When I analyzed this capture, this is what I got:

    Frame 11488 [the other frames are very similar]

    ColorYUV(analyze=true)
    Min 0/25/83
    Max 246/168/219
    Loose Min 1/104/102
    Loose Max 236/160/176

    Virtual Dub ColorTools [clrtools.vdf] setting used: Standard Def, 0-255 range
    Notes re clrtools:
    "0-255 vs 16-235 - This is your normal range of black to white, in your RGB source. Black is either 0 or 16 and White is 255 or 235. If you pick 0-255, luma will be calculated and mapped to 16-235. This is the way most conversions from RGB to YCbCr would work. If you pick 16-235, luma will not be mapped when it is calculated. This may seem backwards, but trust me on this. 0-255 RGB source should be mapped to 16-235 YCbCr (which is what an mpeg encoder would need). 16-235 RGB source does not need to be mapped to 16-235 when it is converted to YCbCr."

    Min Max
    16 235
    0 255 Red
    0 255 Green
    0 255 Blue

    ColorYUV is telling me that the range is Min: 0 to Max: 246 with Loose Min:1 Loose Max: 236
    "There is Loose Minimum and Loose Maximum which ignore the brightest and darkest 0.4% (1/256) pixels."

    Color tools is telling me that the luma range is 16 - 235, while the chroma range is 0 - 255

    Why the difference?
    Also, what Avisynth Levels instruction should I use to get range of luma 16 - 235 and chroma 16 - 240?

    I am reluctant to post a 10 sec sample because of the personal nature of the content

    TIA
    Quote Quote  
  2. Well, you could do a ColorYUV(Levels="PC->TV"), but your situation could be worse than that. We'd need a sample to be sure. especially if the source was originally a VHS tape.

    I am reluctant to post a 10 sec sample because of the personal nature of the content
    Then why post at all? A 10 second sample is worth 1000 words.
    Quote Quote  
  3. ColorYUV(analyze=true) isn't very useful, especially with VHS caps. Edge overshoots and undershoots, and black borders, can contaminate the numeric reports. You don't care if those overshoots to over 235 or undershoots go under 16, or if the black borders go below 16. What you care about is the main picture having blacks at 16 and whites at 235. Use Histogram() or VideoScope() to check levels.
    Quote Quote  
  4. Or put on:

    ColorYUV(Analyze=True).Limiter(Show="Luma")

    If you get big blobs of green or red all over the place, then you should definitely do something about it. If you get the green and red only (or mostly) along edges, then you might not need to do anything at all. But a sample will tell the tale.
    Quote Quote  
  5. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hi

    Thanks for the ideas. I wasn't aware of Limiter(Show="Luma"). I will take a look at that as well as Histogram and VideoScope

    Any comments about VirtualDub's clrtools [Color Tools]?
    Since it is a VDub Filter, is there some sort of YUY2 to RGB conversion taking place? and is this why the chroma values show a range of 0 - 255?

    The original tape was made on a so-called "Professional" VHS camera - the original tape got damaged but I did a backup to a Sony Video8 camera - and this it what I captured.

    BTW - this is a video I made of a model back in 1992 - out of respect for her I do not want to make this public.
    Quote Quote  
  6. Histogram() is misnamed. The default view isn't a histogram it's a waveform monitor. Basically an overlay of a graph of the brightness of each pixel for all scan lines. I posted an explanation once before:

    https://forum.videohelp.com/threads/340804-colorspace-conversation-elaboration#post2121568

    I usually like to use it like: TurnRight().Histogram().Turnleft(). That gives the traditional horizontal waveform rather than the default vertical waveform. In fact I usually use it this way:

    Code:
    function HistogramOnBottom(clip vid)
    {
      TurnRight(vid).Histogram().TurnLeft().Crop(0, 0, -0, 256).ColorYUV(off_y=-16).ColorYUV(gamma_y=100).ColorYUV(off_y=16)
      StackVertical(vid, last)
    }
    That puts the waveform at the bottom (below the video image, similar to VideoScope()) and makes dark pixels in the waveform more visible.
    Quote Quote  
  7. Originally Posted by wiseant View Post
    Any comments about VirtualDub's clrtools [Color Tools]?
    Since it is a VDub Filter, is there some sort of YUY2 to RGB conversion taking place? and is this why the chroma values show a range of 0 - 255?
    Yes, the video is converted to RGB before Color Tools is called. Blacks below 16 and whites above 235 are crushed.

    By the way, at the bottom left of VirtualDub's Filters dialog you can enable the "Show Image Formats" option to see what format each filter is working in (shown in the list of added filters).

    This AviSynth script will create bars of increasing brightness from Y=0 to y=248 in steps of 8 (32 bars).

    Code:
    BlankClip(width=8, height=256) # RGB black
    ConvertToYUY2(matrix="pc.601") # full range
    StackHorizontal(last, last.ColorYUV(off_y=8))
    StackHorizontal(last, last.ColorYUV(off_y=16))
    StackHorizontal(last, last.ColorYUV(off_y=32))
    StackHorizontal(last, last.ColorYUV(off_y=64))
    StackHorizontal(last, last.ColorYUV(off_y=128))
    You can verify for yourself that Color Tools shows the superblack and superwhite pixels crushed.

    HistogramOnBottom():
    Image
    [Attachment 50224 - Click to enlarge]
    Last edited by jagabo; 19th Sep 2019 at 18:03.
    Quote Quote  
  8. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hi jagabo

    I used histogram() as is then cropped out the video: histogram().crop(688,0,0,0) so I have just a 20 second histogram display video - 256x480 in PicVideo mjpeg Quality 19 = 45.6 MB. Would it make sense to upload this for analysis?

    BTW I haven't looked at Videoscope yet - I just downloaded VScope12.zip - do you know if there a newer version for avisynth+?

    TIA
    Quote Quote  
  9. Originally Posted by wiseant View Post
    I used histogram() as is then cropped out the video: histogram().crop(688,0,0,0) so I have just a 20 second histogram display video - 256x480 in PicVideo mjpeg Quality 19 = 45.6 MB. Would it make sense to upload this for analysis?
    Better than nothing if you don't want to upload the video itself.

    Originally Posted by wiseant View Post
    BTW I haven't looked at Videoscope yet - I just downloaded VScope12.zip - do you know if there a newer version for avisynth+
    Not that I know of. That version works with AviSynth+ though (there are both 32 bit and 64 bit versions of it).
    Quote Quote  
  10. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    Hi jagabo

    OK - will do a bit later. I am going to take a look at Videoscope as well.

    BTW how do I use "Originally Posted by ..." ?

    TIA
    Quote Quote  
  11. Use the Quote button at the bottom right of each post.
    Quote Quote  
  12. Member
    Join Date
    Jun 2007
    Location
    Canada
    Search Comp PM
    For what its worth I uploaded a combination histogram-videoscope video: PicVideo mjpeg Quality 20

    https://files.videohelp.com/u/139027/histogram.videoscope.avi

    Here is a screen shot:

    Image
    [Attachment 50227 - Click to enlarge]
    Quote Quote  



Similar Threads