Go Back    Forum > Digital Video > Video Project Help > Capture, Record, Transfer

Reply
 
LinkBack Thread Tools
  #1  
12-12-2021, 07:35 PM
priya69 priya69 is offline
Free Member
 
Join Date: Mar 2019
Posts: 32
Thanked 1 Time in 1 Post
Hi all
i followed sanlyn capture setting guide for vhs
After capture
checked Levels for histogram using a script LevelsCheck by sanlyn
reading range y=1-207
lower range always stays at 1 never goes to 16
tested without Histogram adjusted: levels same as posted above.

my capture card = ATi Wonder USB2.0 (works great no drop frames or other issues)
OS= Windows XP SP2
using Vdub 1.9.11 for capture
vcr= JVC s7600U (settings adjust according to Lordsmurf)
tbc using Panasonic dvd player ES15


Attached Images
File Type: jpg Levels_check023141.jpg (47.6 KB, 43 downloads)

Last edited by priya69; 12-12-2021 at 07:40 PM. Reason: misspelling
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
12-13-2021, 04:10 PM
priya69 priya69 is offline
Free Member
 
Join Date: Mar 2019
Posts: 32
Thanked 1 Time in 1 Post
ok my mistake...i did some more test...the issue was my brightness and contrast levels is why y=1 never changed
but i have a few questions in regards to histogram
1. if i adjust the brightness and contrast levels to stay within y=16-235 the video looks worse
2. if i adjust the brightness and contrast levels, so video looks good, i go out off the histogram range
Do i stay in range and fix the quality off the brightness and contrast after capture along with other improvements
3. is their a way to see what the levels are for histogram in vdub with out saving the video clip and checking with script
4. it takes along time just to get the levels right...checking clip after clip...before starting final capture

Last edited by priya69; 12-13-2021 at 04:13 PM. Reason: misspelling
Reply With Quote
  #3  
12-13-2021, 04:51 PM
timtape timtape is offline
Free Member
 
Join Date: Sep 2020
Location: Perth, Western Australia
Posts: 550
Thanked 104 Times in 94 Posts
Quote:
Originally Posted by priya69 View Post
...1. if i adjust the brightness and contrast levels to stay within y=16-235 the video looks worse
2. if i adjust the brightness and contrast levels, so video looks good, i go out off the histogram range
Do i stay in range and fix the quality off the brightness and contrast after capture along with other improvements ...?
I would capture within the safe zone because I want to capture everything on the tape, not losing anything. But I might choose to change brightness, contrast etc in post for final presentation. Those changes might need to vary from shot to shot, and can be somewhat subjective, so better to have the luxury of not locking in changes at capture which we or others else might later regret.
Reply With Quote
  #4  
12-13-2021, 04:59 PM
lollo2 lollo2 is offline
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
Quote:
checked Levels for histogram using a script LevelsCheck by sanlyn
Remove the black borders and the switching head noise before any Histogram analysis
Reply With Quote
  #5  
12-13-2021, 05:14 PM
keaton keaton is offline
Premium Member
 
Join Date: Jan 2017
Location: USA
Posts: 191
Thanked 90 Times in 64 Posts
Here's a thread with a similar question which I replied to. http://www.digitalfaq.com/forum/vide...histogram.html This explains that anything below 16 or above 235 in the Luminance for YUV is going to map to the same values of 0 and 255 in RGB, which translates to crushed shadows and highlights.

Some ATI capture devices can capture with histogram enabled in Virtualdub Preview mode (http://www.digitalfaq.com/forum/vide...html#post45238). Some only capture in Overlay mode, which doesn't have the histogram active. If capturing doesn't work in Preview mode, then previewing before hand the darker and brighter scenes is the best you can do. Give yourself some cushion when capturing. Avisynth can be used to maximize your 16 to 235 range later. If you have an occasional burst out of range, that can still be fixed with Avisynth Levels without having to start all over.

A similar opinion was had by the poster in the thread I referenced above, that the picture looked better initially when capture was out of gamut (below 16 and/or above 235 in YUV). This thread goes into some possible reasons why he had that initial impression, but came away with a different view of things once the details were understood. It could be that you have a similar change of perspective after reviewing this thread and trying similar things for yourself. Your focus is likely on the midrange, and not as focused on shadow or highlight. If you allow shadow and highlight to go out of range, you may have a fuller midrange. However, if you focus on shadow and highlight, you'll likely find the details are lost due to the previously mentioned crushing of levels. The solution is to use something like Avisynth Levels or Tweak, or a luminance level/curve (in a Virtualdub filter like ColorMill or Gradation Curves, or the equivalent in other video tools) to 1.) keep levels within 16 to 235, and 2.) adjust the distribution of luminance by either shifting values higher or lower to make shadow lighter or highlight darker (as an example, if the 2nd value passed to Levels is below 1, it's shifts darker, if above 1 it shifts brighter).

As lollo2 said, it's important to crop off head switching at the bottom and any left/right side edges that might influence the histogram for the rest of the video. That goes for both previewing in Virtualdub before capture and afterward in Avisynth when adjusting your Luminance. As mentioned in the Capturing with VirtualDub [Settings Guide] thread mentioned before, doing a preview with the head switch and left/right edges cropped before capture can help find what your actual darkest and brightest areas are. Sometimes they are in those regions that should be cropped off and replaced with borders anyway.
Reply With Quote
The following users thank keaton for this useful post: lollo2 (12-13-2021), lordsmurf (12-14-2021)
  #6  
12-13-2021, 05:31 PM
lollo2 lollo2 is offline
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
In addition, I would capture the full 0-255 range if possible (without crushing blacks or whites, of course: the histogram must not have a "peak" at 0 or at 255) and then shrink the range to 16-235 later when doing AviSynth processing.

But only few cards are capable of capturing the full range (assuming that it exists on the tape). If you do not have one of them, better tune procamp to capture in your card valid range (i.e. 16-25X).

A channel on S-VHS / VHS capture and AviSynth restoration https://bit.ly/3mHWbkN
Reply With Quote
  #7  
12-13-2021, 07:27 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 398
Thanked 75 Times in 68 Posts
I believe anything below 16 and above 235 was clipped when the videotape was made and cannot be recovered. Yes, when you expand the histogram to 0-255, the video looks nice in a way, but it's not faithful to the original recording.
Reply With Quote
  #8  
12-14-2021, 05:58 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,654
Thanked 2,460 Times in 2,092 Posts
Quote:
Originally Posted by traal View Post
I believe anything below 16 and above 235 was clipped when the videotape was made and cannot be recovered.
This was my thought as well.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #9  
12-14-2021, 03:26 PM
RandomMixTape RandomMixTape is offline
Free Member
 
Join Date: Oct 2021
Posts: 5
Thanked 0 Times in 0 Posts
Please forgive my ignorance if I have misunderstood, but it appears to me that Keaton and Lollo2 are saying opposite things.

It is my understanding that when capturing to HuffYUV in VirtualDub, the brightness and contrast levels should be adjusted to keep the luminance values within the blue range of the histogram (i.e. 16-235?) because luminance in the YUV domain is constrained to values between 16-235. Is this correct?

If this is correct, I am struggling to understand Lollo2’s argument that if a capture card is capable of capturing the full 0-255 luminance range then it is acceptable for the histogram to display luminance values in the red ranges. Wouldn’t luminance values above 235 be clipped and values below 16 be crushed when captured in the YUV domain?
Reply With Quote
  #10  
12-14-2021, 04:49 PM
lollo2 lollo2 is offline
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
Quote:
to keep the luminance values within the blue range of the histogram (i.e. 16-235?) because luminance in the YUV domain is constrained to values between 16-235. Is this correct?
This is correct if your card cannot capture full range.
For example, my Hauppauge USB Live2 can only capture 16-254 range, so i try to stay inside that range.

If you have a rare card that can capture full range, you can choose to capture without any shrink to 0-255, or you can tune the procamp to capture 16-235. I would do the first.

The time where you need to have proper 16-235 level is in post-processing.

Quote:
Wouldn’t luminance values above 235 be clipped and values below 16 be crushed when captured in the YUV domain?
No.

hist.jpg

Quote:
Keaton and Lollo2 are saying opposite things
Keaton meant that the tape being captured apparently has no full range in its Y component, as it is often the case.



A channel on S-VHS / VHS capture and AviSynth restoration https://bit.ly/3mHWbkN
Reply With Quote
  #11  
12-15-2021, 10:29 PM
keaton keaton is offline
Premium Member
 
Join Date: Jan 2017
Location: USA
Posts: 191
Thanked 90 Times in 64 Posts
Quote:
Originally Posted by RandomMixTape View Post
Please forgive my ignorance if I have misunderstood, but it appears to me that Keaton and Lollo2 are saying opposite things.

It is my understanding that when capturing to HuffYUV in VirtualDub, the brightness and contrast levels should be adjusted to keep the luminance values within the blue range of the histogram (i.e. 16-235?) because luminance in the YUV domain is constrained to values between 16-235. Is this correct?

If this is correct, I am struggling to understand Lollo2’s argument that if a capture card is capable of capturing the full 0-255 luminance range then it is acceptable for the histogram to display luminance values in the red ranges. Wouldn’t luminance values above 235 be clipped and values below 16 be crushed when captured in the YUV domain?
In short, I think you've clearly understood what I've written. I operate in 16-235 Y values from capture phase onward. On rare occasion, if in post I find an out of range value, I often decide to adjust it back to within 16-235 to avoid starting over. That's just my choice. I understand that I may have lost a bit of detail by doing so. But if I don't find a noticeable aesthetic difference, I do it to avoid a redo.

I know this can be difficult to understand from the volume of posts over the years about this topic. Each time, I try to repeat what was said before. Maybe if I say it a bit differently, it will finally "click" in someone's mind. I understand and appreciate that this is not a simple thing for many, and I am not here to disparage. I, like everyone else I think, have had to read or have something explained multiple times before it became crystal clear to me.

When working in a YUV domain in Avisynth (e.g. YUY2, YV16, YV12, etc.) the AVI file can store Y values outside 16-235. However, as stated before, when trying to display that value either on TV (YUV) or PC (RGB), they would be crushed/clipped. This is the reason why 1.) in Virtualdub capture histogram you see Red for values below 16 or above 235, and 2.) the output of Histogram("levels") in AviSynth shows Y values below 16 and above 235 in a similar zone that represents what would be crushed/clipped values when you try to display them.

If you do any Filter work in Virtualdub (i.e. Full Processing Mode), it automatically converts from YUV to RGB (regardless of whether you call ConvertToRGB32 at the end of your avisynth file). Of course, you can save the file back to HuffYUV or another YUV file format with Virtualdub settings. But there is a translation from YUV to RGB and back to YUV in all of that which is unavoidable. So a value of 15 or 236 would be converted to an RGB value that would have at least one of the R, G, or B values at 0. When converting that 0 value back to YUV, it is now at 16 or 235. So the conversion has lost the resolution. This is another reason why you want to keep Y between 16 and 235 in any Avisynth scripting you may do before going to RGB domain.

If you don't use Virtualdub filters (e.g. Fast Recompress or Normal Recompress mode), you can skip a conversion to RGB domain and tell Virtualdub to save to a YUV format of your choice. So the file never left YUV domain. However, TV domain still does not display Y values below 16 or above 235 any differently than 16 or 235. On a PC or similar device of any kind, I believe you have the same issue, because it converts to the native domain of that device, which is RGB.

If you choose to capture Y values outside 16-235 and move them into 16-235 with Levels function, for example, it will now be compliant for display. However, the key to note is that you have already compressed the shadow or highlights somewhat by doing so. If you adjust the gain of the proc amp before it is digitized so that it is within range to begin with, I consider that a more natural way of doing things. That is the theory, of course. If you don't find any aesthetic issues doing it the other way, that is an individual's choice. I will say that would not be my choice.

Another important point is that all of the tapes and equipment we work with are uncalibrated. The broadcast or reference material master copy may have been calibrated. But after it enters a VCR or exits a VCR, various levels of video circuitry can increase or decrease signal values. Other things in the video chain such as a TBC or proc amp (whether an external box, or the internal Level controls in Virtualdub capture card settings), also change the signal values. So it's possible that what's on the tape has already been clipped, but it may not be. It's VCR dependent, because all of these things are not calibrated to some broadcast/industry standard. Regardless of what's stored on tape, there's plenty of video circuitry that the signal passes through before it is digitized. So, unless you go into the world of direct RF capture, nothing can attempt to capture exactly what was on the tape (which, again, may already be different from the master source material that it is derived from). The goal of digital capture with a video capture card is to try to keep things legal, so you don't remove detail. The post production we do with scripts and filters is to try to make things as aesthetically pleasing as possible. It will never be the same as the original source material. We're so many stages removed from that when it comes to something like VHS. Any restoration is an artistic endeavor. Whenever I photoshop an image, it's the same thing. Just trying to make it as aesthetically pleasing as possible. And the person doing the restoration decides what that standard is. This is not like when a studio restores a film, it's a generational video tape copy. It's not the original camera negative and we don't have the original cinematographer to supervise the "correct" aesthetic of the color and contrast. We're just trying to make this tape look as pleasant as we can. So, an important part of that includes being aware of what's being done and ensuring shadow and highlight are not clipped. I think we're only differing over whether to make things legal in Avisynth before it leaves YUV for the first time, or to do it with proc amp adjustment before it is ever committed to YUV.

Last edited by keaton; 12-15-2021 at 10:52 PM.
Reply With Quote
  #12  
12-16-2021, 02:26 AM
lollo2 lollo2 is offline
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
Quote:
If you choose to capture Y values outside 16-235 and move them into 16-235 with Levels function, for example, it will now be compliant for display.
This is what I do.

Quote:
However, the key to note is that you have already compressed the shadow or highlights somewhat by doing so. If you adjust the gain of the proc amp before it is digitized so that it is within range to begin with, I consider that a more natural way of doing things. That is the theory, of course.
The theory is different: by adjusting the levels with the card procamp, in general you rely on a (mediocre) 8-bit digital "fake" procamp, and introduce banding and posterization.
On the other hand, while using AviSynth functions you can implement the shrink function in a more effective way.
The card procamp should only be used to prevent crush at XX and clipping at YYY according to the range of the capture card.

In a discussion we had in the past on a similar subject (spikes in the histogram) https://forum.videohelp.com/threads/...n what happens, a small video experiment was produced, thanks to jagabo, explaining what happens: output.mp4
x.png

Extract of my considerations: "...if the main player is the brightness/contrast reduction that we all use to avoid crushing black/white levels, than this means that every time we introduce a spike and we won't be able to reproduce the exact data later"


About post processing:
- when using VirtualDub to process AviSynth scripts, levels should be 16-235, but for PC display you can expand the levels at 0-255 full range at the end when saving in YUV colorspace.
- be careful that some largely used filters, such as TemporalDegrain2 or SMDegrain, internally performs a luma expansion TV->PC to be more effective, so the effort to be inside 16-235 can be overwritten. For serious restoration, I always check the levels after each filtering, and act consequently.
- at the end of an AviSynth processing using complex filters, the levels are 0-255, meaning that the full range is generated and used for the best output generation (no need then to limit the capture range).
- if you do not use VirtualDub, but for example feed ffmpeg to produce a h264/265 stream, whatever lossless or compressed, and always stay in YUV colorspace, you do not need level adjustement.

Thanks for your post, having different points of view is always constructive!


Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
VirtualDub histogram, blacks never go red? kingbean Capture, Record, Transfer 9 06-07-2021 07:03 AM
Capturing in VirtualDub and histogram levels? rick_s Capture, Record, Transfer 10 04-28-2021 08:51 PM
VirtualDub, Histogram and encoding levels WarbirdVideos Capture, Record, Transfer 7 12-10-2019 07:38 PM
Capture whole tape with one set levels, or different levels per scene? stevevid Capture, Record, Transfer 5 08-22-2018 11:29 PM
Avisynth histogram vs. ColorYUV for calibrating levels? CyborgHyena Restore, Filter, Improve Quality 3 12-28-2015 04:13 PM




 
All times are GMT -5. The time now is 09:43 AM