VideoHelp Forum


Try DVD Fab Video Downloader and rip Netflix video! Or Try DVD Fab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 47 of 47
Thread
  1. Originally Posted by anachronon View Post
    There seems to be some confusion here. From what I have read, the darkest luma level (black) should be set around RGB=16. Correct?
    No. The darkest luma should be Y=16. When converted to RGB that becomes RGB=0. The brightest luma is Y=235. When converted to RGB that becomes 255. And all the luma levels in between are spread out equally. I explained this in post #16. And referenced it several times since then.

    Originally Posted by anachronon View Post
    But, the letterbox area of the battleship image needs to be 0? Yet, there is only a 4-5 RGB point difference between the letterbox black and the black of the active image. This would indicate that the letterbox black should be set around RGB=11. Which is it?
    The letterbox bars should be Y=16 and RGB=0.
    Last edited by jagabo; 4th May 2021 at 19:11.
    Quote Quote  
  2. There seems to be some confusion here. From what I have read, the darkest luma level (black) should be set around RGB=16 .....
    Hmmm confusion yes....
    The conversion YUV <-> RGB depends on the conversion matrix which is in effect.
    As I understand it:

    a. according to ITU-R BT-601 Studio encoding parameters of digital television for standard 4:3 and wide-screen 16:9 aspect ratios:
    Black: Y'CbCr(16,128,128) <-> RGB(16,16,16)
    White: Y'CbCr(235,128,128) <-> RGB(235,235,235)
    This seems to leave headroom for RGB also.

    b. according to Intel and some other documents (https://software.intel.com/content/www/us/en/develop/documentation/ipp-dev-reference/t...?language=en):
    Black: Y'CbCr(16,128,128) <-> RGB(0,0,0)
    White: Y'CbCr(235,128,128) <-> RGB(255,255,255)
    Last edited by Sharc; 5th May 2021 at 02:53.
    Quote Quote  
  3. Originally Posted by Sharc View Post
    a. according to ITU-R BT-601 Studio encoding parameters of digital television for standard 4:3 and wide-screen 16:9 aspect ratios:
    Black: Y'CbCr(16,128,128) <-> RGB(16,16,16)
    White: Y'CbCr(235,128,128) <-> RGB(235,235,235)
    This seems to leave headroom for RGB also.
    Limited range RGB is a special editing mode that retains out of gamut YUV on conversion to RGB. This allows you to make RGB adjustments without crushing out of gamut colors. You can get this conversion in AviSynth with ConvertToRGB(matrix="PC.601") or ConvertToRGB(matrix="PC.709").

    But when you view video and images on a computer monitor black is at RGB=0, white at RGB=255.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Originally Posted by Sharc View Post
    a. according to ITU-R BT-601 Studio encoding parameters of digital television for standard 4:3 and wide-screen 16:9 aspect ratios:
    Black: Y'CbCr(16,128,128) <-> RGB(16,16,16)
    White: Y'CbCr(235,128,128) <-> RGB(235,235,235)
    This seems to leave headroom for RGB also.
    Limited range RGB is a special editing mode that retains out of gamut YUV on conversion to RGB. This allows you to make RGB adjustments without crushing out of gamut colors. You can get this conversion in AviSynth with ConvertToRGB(matrix="PC.601") or ConvertToRGB(matrix="PC.709").

    But when you view video and images on a computer monitor black is at RGB=0, white at RGB=255.
    Ah this special editing mode explains it and makes sense. Thank you for clarification.
    Last edited by Sharc; 5th May 2021 at 07:03.
    Quote Quote  
  5. If you want to see actual YUV values on your computer screen use a script that looks like this:

    Code:
    AviSource("testXP4a.avi") 
    StackHorizontal(ColorYUV(cont_u=-256, cont_v=-256).Subtitle("Y"), UtoY().Subtitle("U"), VtoY().Subtitle("V"))
    ConvertToRGB(matrix="PC.601")
    Image
    [Attachment 58729 - Click to enlarge]


    You can then read YUV values directly off the screen with csamp, VirtualDub, or some other screen color tool.

    In VirtualDub add the crop filter and hold down a Shift key while moving the mouse cursor over the preview image:

    Image
    [Attachment 58730 - Click to enlarge]


    You can't see the mouse cursor in the screenshot but it was over the top letterbox bar. The RGB values in the image reflect the Y values in the Y portion of the image, the U values in the U portion of the image, and the V values in the V portion of the image. So the Y value of the top letterbox bar is 35.
    Last edited by jagabo; 5th May 2021 at 09:38.
    Quote Quote  
  6. Yes, this is craziness. I even found an entire web page, that is devoted to discussing this confusion:

    https://www.fourcc.org/fccyvrgb.php

    Then, there is the question of which standard a particular capture diver uses. PC.601 is the standard for old SD analog video, and PC.709 is the standard for HD. Does that mean that an analog SD capture device is using PC.601? Not necessarily! Which, gets into a lot of second guessing that could make one's brain explode.

    So, from what I see, it is best to ignore how YCbCr is being handled. The ultimate objective is to obtain the best RGB output. This gets back to doing test captures of the most problematic scenes, examining individual frames, and adjusting settings to yield the most acceptable RGB histograms:

    Image
    [Attachment 58734 - Click to enlarge]


    Note that in the top image, the "black" of the letterbox area is still around RGB 8. However, the heel of the histogram is at 0. Nothing is being crushed, other than a bit of noise and a few sharpening artifacts. The blacks of the second image still appear a little muddy---even though the histogram shows some details being crushed. Old analog video was never very good at handling darker areas.
    Quote Quote  
  7. @jagabo: Nice! Thank you for these tricks. I must bookmark this.
    Quote Quote  
  8. I fear that I am a bit lost, as to how to use scripts. I have seen scripts mentioned many times. But, I have never seen where they come into play.
    Quote Quote  
  9. Originally Posted by anachronon View Post
    Yes, this is craziness. I even found an entire web page, that is devoted to discussing this confusion:

    https://www.fourcc.org/fccyvrgb.php
    The first pair is technically YCbCr but many programs, including AviSynth, call it YUV. That's what you're dealing with here. limited range rec.601 standard definition video.

    Code:
    full range RGB to limited range YCbCr:
    
    Y  =      (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
    Cr = V =  (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
    Cb = U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
    
    limited range YCbCr to full range RGB:
    
    B = 1.164(Y - 16)                  + 2.018(U - 128)
    G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128)
    R = 1.164(Y - 16) + 1.596(V - 128)
    The others deal with unit values (Y = 0.0 to 1.0, Cb/CR -0.5 to +0.5) but are otherwise the same. MJPEG uses full range YUV internally. What comes out of the MJPEG decoder is full range RGB.

    Originally Posted by anachronon View Post
    Then, there is the question of which standard a particular capture diver uses. PC.601 is the standard for old SD analog video, and PC.709 is the standard for HD. Does that mean that an analog SD capture device is using PC.601?
    SD video cap will almost always be rec.601. Whether is full range or limited range depends on your proc amp settings. But you want your final output to be limited range YCbCr.

    Originally Posted by anachronon View Post
    So, from what I see, it is best to ignore how YCbCr is being handled.
    No. Limited range YCbCr (YUV) is universally used with DVD, BD, online streaming, etc. If you follow the rules for YCbCR/YUV you won't have problems with out of gamut RGB when the video is displayed (assuming you equipment is set up properly).

    Originally Posted by anachronon View Post
    The ultimate objective is to obtain the best RGB output.
    Only if you are doing the conversion correctly. If you are doing them incorrectly. And just because you think something looks better doesn't mean it is correct. People of like extreme contrast and saturation, even when it's far outside of spec and unrealistic. In some cases (hill/tree silhouette home video) it's up to you what you want it to look like. The LD presumably conforms to international video standards. The letterbox bars should be black, not dark grey.
    Last edited by jagabo; 5th May 2021 at 20:32.
    Quote Quote  
  10. Yes, I understand the formulas mentioned. My question involves how to apply scripts in software, like VDub. I have worked with programs capable of running scripts. However, I have yet to find this feature in either VDub or GraphStudio.

    Though I have an extensive background in both analog video production and TV/VCR repair, digital video capture is new to me. That said, I do have an extensive background in scanning and editing still images from film. It just took me a minute to comprehend all of the arcane and esoteric concepts being thrown around in digital video capture. For one, I had to realize that the YUV colorspace was not the same as the YIQ colorspace, with which I was familiar. YUV is the newer analog "component" output standard, used by digital devices like DVD players. YIQ is the older standard, still used in NTSC composite and S-video. Though 'Y' is the same in both standards, the I and Q color axes are not the same as the U and V axes. Everyone thoroughly confused now?

    Which, brings me to the confusion over 'Y' value numbers being thrown around. Previously, I had only seen the 'Y' component in analog form, on a waveform scope. I had to mentally convert the numbers into a visual image, to comprehend what was being described. "Black" is set to Y=16, so that the horizontal and vertical blanking could be set at Y=0 (below black). This was done to keep the electron gun retrace lines from becoming visible on the old CRT's. Y=235 is equivalent to the "yellow" on a VU meter in audio recording, and Y=255 is the red (though in setting video 'Y' levels, avoiding the "yellow" can be more critical, due to possible later effects of adding chroma).

    Finally, there is the question of the capture device's purpose in the workflow. Because the capture device is part of a video production, one tends to view it as a piece of studio equipment. In fact, the capture device is actually a television receiver! It converts an analog video signal into its RGB components, just as a TV would. So, I have to approach setting levels, as I would with a customer's set on the test bench. As a final step with any customer repair, I would calibrate the picture tube. I would connect the set to a colorbar generator, set on grayscale. I would then adjust the "screen" (brightness) to get a good black, and the "gain" (contrast) to get a good corresponding white. This had to be done visually.

    Luckily, with a digital RGB output, I now have an RGB histogram to work with. This merely involves exporting a video frame to any image editor. Here is where my experience with image editing comes into play. In image editing, a good "black" is defined as anything between 2 and 10, and a good "white" between 245 and 253---not 0/255! In fact, most pro-level film scanners will set black/white at 5/250. Many print houses require ranges no greater than 2/253 This is to avoid clipping the heel and toe of the histogram, where a few trailing values could reach 0 and/or 255. This may seem trivial. But, hard-smashing blacks/whites against the 0/255 limits produces a harshness clearly visible to the naked eye. Leaving the heel and toe of the histogram produces an image that seems much-more natural (note histograms in #36 above). I don't see why the same concepts shouldn't be applied to video.
    Quote Quote  
  11. By the way, if anyone has an old, working analog colorbar generator (NTSC capable) that they wish to sell for cheap, I would be interested. Preferably, one with S-video out, and the ability to display a step grayscale.
    Quote Quote  
  12. Originally Posted by anachronon View Post
    I fear that I am a bit lost, as to how to use scripts. I have seen scripts mentioned many times. But, I have never seen where they come into play.
    You can open AviSynth scripts direclty with VirtualDub as if they are video files, File -> Open Video File... VirutualDub2 has a built in AviSynth script editor. AVSPmod is a third part AviSynth script editor that provides a lot of hand holding. You need to install AviSynth and probably a lot of third party filters. I recommend AviSynth+ and VirtualDub2.

    https://www.videohelp.com/software/AviSynth-Plus
    http://avisynth.nl/index.php/AviSynth%2B
    https://www.videohelp.com/software/VirtualDub2

    One thing to beware of with VirtualDub (all versoin) is that all filtering used to work only in RGB. More recent versions allow filters to work in YUV but many filters have not been updated. So you may end up with a rec.601 conversion (crushing superblacks and superwhites) before many filters.
    Quote Quote  
  13. Thanks for that. I'll have to look into it. Eventually, I want to start editing, and putting together presentations from my master copies. Scripts may help with more complex tweaks.

    In my version VDub, YUV adjustments can be applied to the capture preview. But, all filters are disabled, once capture is started. I have been using GraphStudio to set my levels.
    Quote Quote  
  14. Here's a frame from a commercial DVD:

    Image
    [Attachment 58756 - Click to enlarge]


    The letterbox bars are at Y=16. The black level of the active picture is around Y=18 in this frame, the white level around Y=235. Obviously, not every shot will have full black and full white. But this is typical of the extremes.
    Last edited by jagabo; 7th May 2021 at 08:16.
    Quote Quote  
  15. That looks pretty good. Here are the resulting RGB histograms of the active image:

    Image
    [Attachment 58757 - Click to enlarge]


    Though the blacks and whites aren't being truly crushed, they are rather crowded. Mostly, it is the reds in the shadows, and the greens and blues in the sky. For making master copies, I would try backing-off the proc-amp contrast by one notch. However, proc-amp settings are rather course. So, if the new setting leaves too much space at the ends of the histogram, I would have to live with the current setting.

    For me, the idea of a master copy is to capture as much info from the tape as possible. I can always make minor tweaks to the blacks and whites in post, when I make scene-by-scene edited copies. Of course, if I leave too much space at the ends of the histogram, the resulting edited copies could look posterized. It's a compromise, no matter what.

    Which again brings up the question of the difference between DVD's and camcorder tapes. Do camcorder tapes have the same range of 'Y' as a commercial DVD? If the camcorder Y-range is slightly less, than the setting that you currently have, might be perfect. My reason for trying to set range with a DVD, is to avoid unnecessary wear on my old tapes.
    Quote Quote  
  16. i just realized another reason for calibrating levels by RGB output---the issue of "tolerances". Consumer analog components typically come with a 10% tolerance. A 10% tolerance could mean an error of as much +/- 25 RGB steps! Professional gear and test equipment may go with the pricier 5%. Still, even that could mean an error of +/- 12 steps. Just because the input is by-the-book, doesn't guarantee that the output will be right.
    Quote Quote  
  17. Originally Posted by anachronon View Post
    Which again brings up the question of the difference between DVD's and camcorder tapes. Do camcorder tapes have the same range of 'Y' as a commercial DVD?
    DVDs are digital of course. Whereas old consumer camcorders were analog. In theory they represent the same thing. In reality, analog devices are all over the place.
    Quote Quote  



Similar Threads