Quantcast Why is it so important to keep captures within range in the histogram? - digitalFAQ Forum
Go Back    Forum > Digital Video > Video Project Help > Capture, Record, Transfer

Reply
 
LinkBack Thread Tools
  #1  
02-25-2020, 01:52 PM
history1 history1 is offline
Free Member
 
Join Date: Aug 2014
Location: San Antonio, TX
Posts: 78
Thanked 4 Times in 2 Posts
Hello everyone. This is something that puzzles me. When capturing video (with VirtualDub), why is it so important to keep them in the range of y=16-235 of the histogram? Does it ensure details aren't lost? Why can't it be done in post-processing? I think colors are not as vibrant in that range and video looks more blah. Please somebody explain, thank you.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
02-25-2020, 07:23 PM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 1,101
Thanked 236 Times in 208 Posts
Rec.601 defines black at 16 and white at 235. This should look vibrant. Hollywood DVDs use this range. One thing you have to be careful of is to remember to crop the left and right Horizontal Blanking while setting up if you use VirtualDub's Histogram, or else you'll set the black level too high.

Capturing with your black ~16 and white ~235 gives you some "footroom" and "headroom" if some values exceed that range but don't clip to 0 or 255. Then you can do post-processing in the YUV space to place all important values within 16-235.
Reply With Quote
The following users thank msgohan for this useful post: history1 (02-26-2020)
  #3  
02-26-2020, 01:41 PM
Bogilein Bogilein is offline
Free Member
 
Join Date: May 2016
Location: Bavaria
Posts: 121
Thanked 30 Times in 23 Posts
Another point is, not every capture card could capture the full range (0-255).
Most USB capture cards could only capture from 16-255 and clip the super black part. For example the Pinnacle USB 500 is one of the cards who could only capture from 16-235 and clip the super black and super white part and what is lost during capture you couldn't make visible in the postproduction.
Reply With Quote
  #4  
02-26-2020, 02:13 PM
history1 history1 is offline
Free Member
 
Join Date: Aug 2014
Location: San Antonio, TX
Posts: 78
Thanked 4 Times in 2 Posts
Quote:
Rec.601 defines black at 16 and white at 235. This should look vibrant. Hollywood DVDs use this range. One thing you have to be careful of is to remember to crop the left and right Horizontal Blanking while setting up if you use VirtualDub's Histogram, or else you'll set the black level too high.
I know that depending on the scene a histogram can change dramatically. In an unforeseeable shot the levels can go into the red. I have read sanlyn's posts in Capturing with VirtualDub [Settings Guide] . There I see he has set the Brightness/Contrast settings in VDub to 147/106. Are these safe settings for the histogram?, to ensure that the histogram doesn't go into the red anywhere in a video?

Quote:
Then you can do post-processing in the YUV space to place all important values within 16-235.
This part here you gave me is over my head. Could you describe it in simpler terms please?
Reply With Quote
  #5  
02-26-2020, 04:48 PM
keaton keaton is offline
Premium Member
 
Join Date: Jan 2017
Posts: 86
Thanked 35 Times in 25 Posts
The settings in sanlyn's post in the capture guide are an example, which he used for his particular setup, which is dependent on all components in your capture chain. His choice of tape player, TBC, pass thrus, and capture card, or whatever else was in his video chain will have an effect on what you see in that preview histogram. Understanding that, everyone must adjust their settings on the capture card to their particular setup and even their particular tape they are playing. Reading on the forum, you'll see it written that you should use the crop settings in Virtualdub (temporarily) to remove any head switching noise at the bottom and any stuff on the top or side edges, while in Preview mode and previewing your tape before you actually start capturing. If you don't have that noise cropped out while previewing, it can give you poor capture card settings because all that edge noise can be darker or brighter than the video you actually care about.

You preview the tape, at least in parts that you think are brightest or darkest (not always obvious, but try your best), and adjust settings so histogram stays out of the red on left and right sides. Brightness shifts the histogram to the right. This is done to get things from being too dark and hitting the red on the left. You adjust the Contrast setting to shrink the histogram's width, so it does not go too bright and hit the red on the right side. You use both Brightness and Contrast together to strike the right balance. Don't worry about getting things maxed out necessarily. You can fix it later in post. It's most important to keep things out of the red so it is not clipped. Clipping causes the same and darker values to be the same level of darkness (i.e. 16 in YUV or 0 in RGB) and the same or brighter values to be the same level of brightness (i.e. 235 in YUV or 255 in RGB). Clipping causes details to be lost in shadows on the dark side and in the highlights on the bright side.

Before you actually capture, remove all the cropping settings (i.e. back to 0 on all sides). The histogram may look out of range now, but that should be due to the edge noise, and not a concern. This is why we preview and calibrate the capture settings with that edge noise cropped out. It is not a concern, because in post (i.e. modifying the video in Virtualdub and Avisynth) that edge noise will be replaced with a black mask so that it covers up any noise but keeps the 720 x 480 capture aspect ratio (assuming NTSC, adjust numbers accordingly for PAL).

In post, you can use virtualdub filters and/or avisynth plugins to adjust the contrast and color of video, among other things to make it look better, so that the video fills out as much of the video gamut as possible so that it doesn't look washed out or too dark. The "gamut" means either between 16 to 235 when in YUV color space, or 0 to 255 in RGB color space. You can read plenty about this on the forum. It's been discussed quite a lot. YUV is the "TV World" video color space. RGB is the "Computer World" video color space. So, when working with a lossless AVI that you captured, it has a YUV color space (whether it is YUY2, YV16, YV12, or whatever). Avisynth deals primarily in this color space, but also can convert to RGB and work in that space. Virtualdub works in the RGB color space. It takes a YUV AVI and converts to RGB if you are using Virtualdub Filters. So that means it converts from a legal range of YUV 16-235 and translates it to RGB range of 0-255. When done and saving the video back to something like YUY2, YV16, YV12 (i.e. YUV color space encoded), the conversion is done in reverse from 0-255 to 16-235. So you must think about whether you are dealing with YUV (TV) color space or RGB (Computer) color space. And, no, this is not simply chopping off 0 to 16 and 235 to 255 when converting. The detail/resolution of lightness and darkness is not lost or clipped when converting between YUV and RGB. They just use different numbering schemes. So you must know what color space you are working in at all times so you know what limits to work with. Usually, a histogram will show you the legal limits, and when you are crushing things to one edge or the other.

So if you are working in Avisynth with a YUV color space AVI, you can use things such as the Levels command (plenty of examples when doing a forum search) to stretch the contrast so it fills 16 to 235 if you want to utilize the entire gamut. You can do some RGB types commands in Avisynth as well, there you would be using 0 to 255. But you control this in Avisynth by using ConvertToXXXX type functions to make a change to the color space. Some avisynth commands require a specific color space before you can use them. So you shouldn't worry that the color space is changing without you specifying it. If you are using Filters in Virtualdub, they are likely in 0 to 255, because they are RGB. You can analyze video in post with Avisynth with the Histogram command (look it up on avisynth.nl or search forum for examples), or in Virtualdub Filters such as ColorTools. Those histograms either show a histogram including the Y channel (for 16 to 235) or the Red, Green, and Blue Channels (for 0 to 255).

This may sound very complicated, but it is essential knowledge to acquire. Keep reading until it sinks in. Search the forum and read. There's plenty of examples to help you be clear on this.

Last edited by keaton; 02-26-2020 at 04:59 PM.
Reply With Quote
The following users thank keaton for this useful post: BW37 (02-26-2020), captainvic (02-27-2020), history1 (02-26-2020), lordsmurf (02-26-2020)
Reply




Tags
histogram, virtualdub

Similar Threads
Thread Thread Starter Forum Replies Last Post
2-Pass VBR range limit for H.264 encoding? Winsordawson Encode, Convert for streaming 6 09-29-2018 12:32 AM
Need color range capture review spanak Project Planning, Workflows 1 10-05-2017 06:36 AM
VirtualDub level and histogram settings on captures? greeneagle Capture, Record, Transfer 2 07-13-2016 10:43 AM
Capturing full dynamic range (in terms of color) of VHS? JasonCA Capture, Record, Transfer 7 03-03-2013 08:10 PM
41.x.x.x Africa IP range blocked admin General Discussion 0 06-13-2010 10:33 PM

Thread Tools



 
All times are GMT -5. The time now is 08:38 AM