VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 54 of 54
Thread
  1. As I pointed out in your other thread, with most devices and software, contrast controls the gain (Y' = Y * contrast) and brightness controls the offset (Y' = Y + brightness). In other words, contrast controls the spread between darkest and brightest portions of the video, brightness moves everything lighter or darker.

    For example, lets start with two greyscale charts:

    Click image for larger version

Name:	null.png
Views:	20
Size:	15.4 KB
ID:	42560

    As you can see the greyscale bars increase in brightness in equal increments from left to right, from 0 to 255.

    Increasing the contrast and brightness gives us:

    Click image for larger version

Name:	more.png
Views:	19
Size:	18.9 KB
ID:	42562

    The contrast increase is on the left. The zero bar is still zero and the other bars have increased proportionally by about 1.5x. The brightness increase on the right has increased the brightness of all bars by the same amount, 128. So the 0 bar has increased to 128, the 17 bar has increased to 145, etc. In both cases the brightest bars are clamped at 255 because that's the highest value that can be represented in 8 bit YUV/RGB.

    Decreasing the contrast and brightness gives us:

    Click image for larger version

Name:	less.png
Views:	18
Size:	18.8 KB
ID:	42563

    With decreasing contrast the black bar has remained at zero and the rest of the bars have reduced in intensity by about 1/2. With decreasing brightness all bars have reduced in intensity by ~133 units. At the dark end all values have been crushed at zero because you can't have negative values in 8 bit YUV/RGB.

    Since the original chart has illegal YUV values (Y<16, Y>235) the contrast needs to be reduced (the range of intensities needs to be reduced from 0-255 to 0-219) then the brightness needs to be increased by 16 to raise the blacks to 16 and the brights to 235.

    If you want to play with this interactively, download the attached demo. Unzip the folder then open bc.avs with VirtualDub and scrub around.
    Image Attached Files
    Last edited by jagabo; 3rd Aug 2017 at 10:14.
    Quote Quote  
  2. Awesome, thanks a lot for the advice and all the info. I really feel like Im getting the hang of this now.

    The best way I could avoid any crushed blacks or whites is to set my brightness aaaaalllllll the way up to 150, and contrast at 85. Heres a link of the capture:
    https://mega.nz/#!ZTpUlZJQ!GBD76nb6Bzfc_TAmwnH5h7goP0HsL5Wvwe4TzjaRPGc

    Heres a screenshot:


    Do I want my loose minimum/loose maximum to be as close to 16-235 without breaking these limits? That capture is basically 20-231 throughout, (ignoring the crushed blacks on the edges) so is that ok or should I keep messing with it?

    Raising the contrast just 2 points to 87, while keeping brightness at 150, results in slightly crushed whites.


    Do you guys think I should keep messing with it, or do you think that those values will probably result in a safe range of luma for most tapes now? I could maybe raise contrast by 1 point and be ok. I will monitor different tape sources like you said, but am trying to find a good general range to start with. Thanks for all the help people.
    Quote Quote  
  3. I recommend you crop away the black borders before analysis. Use something like Crop(16,16,-16,-16). You don't care what's going on out there. If you do that you'll see that your blacks aren't black enough now. You also don't care about tiny areas like the area between the blue and white pants of the people in front.

    Look through some other shots. Shots with large areas of black and white, over-bright and over-dark shots.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    I recommend you crop away the black borders before analysis. Use something like Crop(16,16,-16,-16). You don't care what's going on out there. If you do that you'll see that your blacks aren't black enough now. You also don't care about tiny areas like the area between the blue and white pants of the people in front.

    Look through some other shots. Shots with large areas of black and white, over-bright and over-dark shots.
    Damn, youre totally right. Just when I thought I had it figured out lol.

    I took some samples like that from a different, 25 year old tape. I know Ive said this before, but I think this is suitable for all scenes. The ProcAmp settings are at brightness 134, contrast 93, sharpness 0.

    Out of over an hour of watching tape, I took samples of the darkest and brightest scenes. These are the most extreme examples showing illegal levels.

    Link to over-dark sample:
    https://mega.nz/#!pSoUCL5R!qwi9Np_AS3NWGZEL3q_zbFJxqboMs8zRoebV5aR4P2k

    Even in this very dark scene, there are hardly any illegal levels. Looks pretty good right?



    Link to bright sample:
    https://mega.nz/#!ZSwECR7C!P1eJc_KG3X1yFDafBlXHejriJmhJofLI7mRgweu_Rag



    Another bright sample:
    https://mega.nz/#!FHwSEaYD!9v_zRmDObJW1ZKAjOONt3Nqj_eynvFsoIB1LDSPMtN4



    Even in these bright samples, the illegal levels seem to be just a few points above 235. So I dont think its too important. What do you guys think? Again, these are the most extreme examples of over an hour of sampling. Thanks a lot for your input.

    As a side question, Im curious about how you all got to be involved in this forum. Are you professional video editors who do this for a living? Or seasoned hobbyists?
    Last edited by videon00b; 8th Aug 2017 at 17:30.
    Quote Quote  
  5. Those levels look ok. Look for a shot with a significant amount of full black and full white and make sure both are legal.

    You can use TurnRight().Histogram().TurnLeft() to get the traditional horizontal waveform rather than vertical.
    Quote Quote  
  6. Ive been really busy the last couple months and haven't been able to dedicate my time to this project, but have some now to work on it.

    I've found the ideal settings to be brightness 134, contrast 92(and sharpness 0), as opposed to my previous samples at brightness 134 contrast 93. Setting it to that changes the clipped hot spots over 235, like 238, 239 to be right at 235. It also sets the lows to be just above 16. I sampled the tape I did previously again and all of the green spots that were solid before just have a few sparse pixels of green now, if any.

    A funny observation Ive noticed is that I uploaded a tape 2 months ago with brightness 134, contrast 93. Then yesterday I sampled the exact same tape from the exact same videocamera with identical procamp settings, and compared the exact same frames to each other, and the values were slightly off from each other. I guess it's somewhat predictable given the fact its not digital but analog, so the tapehead reads the particles on the tape a little differently each time. Just an interesting thing to me. Thats normal right? (dont mind the frame number, different sized samples)

    Original:


    2 months later:


    I have 2 questions:

    1. I have some dark shot samples like this one.

    My AVSPmod will say there aren't really many illegal colors in here, but it still looks too dark. I think I know the answer to this already, but will playing with the procamp allow me to make this shot better at all, or would that just distort the true colors there, which would wash out the shot? It probably won't be too helpful to adjust the procamp since the original shot had such poor lighting. There's still the few odd red pixels sprinkled in here or there in most of my darkshots but it seems to stay that way even when lowering the contrast. Whats important is there arent any blocks of clipped reds or greens.

    2. Is the goal of adjusting my procamp settings to make 255 analog the new 235 digital, and 0 to 16?? Because thats what Ive been doing the last few hours. I think it's been pretty successful. I'm just curious how important it is to get as close to 235 without going over in any significant shots. I suppose that is the goal, otherwise colors would be distorted, but I am pretty new to this. Thank you.
    Last edited by videon00b; 6th Oct 2017 at 18:10. Reason: added 3rd pic
    Quote Quote  
  7. Your third image isn't showing up. But, in general, you can use the proc amp to adjust levels for a dark shot. Or you can do it later in software. You may want to use a gamma adjustment instead of brightness/contrast -- that will keep any brights from blowing out. If colors get too washed out you can adjust the saturation.

    The goal when capturing is to get a video with reasonable levels. Without crushed brights or darks. You can then manipulate the data later if necessary.
    Quote Quote  
  8. Originally Posted by jagabo View Post
    Your third image isn't showing up. But, in general, you can use the proc amp to adjust levels for a dark shot. Or you can do it later in software. You may want to use a gamma adjustment instead of brightness/contrast -- that will keep any brights from blowing out. If colors get too washed out you can adjust the saturation.

    The goal when capturing is to get a video with reasonable levels. Without crushed brights or darks. You can then manipulate the data later if necessary.
    OK good. That will save me a lot of time capturing, since Im not going to be in front of my computer the whole time while capturing everytime. I want to start this project tomorrow, I will briefly see if my procamp settings are OK for the tape in bright and dark scenes, then just let it rip for a couple hours at a time. Then skip around after I record it to make sure theres no major errors or blown out colors. Then when all the tapes are done I can worry about post-processing.

    I have a 4TB internal hard drive with good reviews. I recently got a 20 year old computer to fire up after sitting in a closet for 13 years unused, with all the data and original components intact. I think hard drives going bad after 5 or 6 years, and bit rot, is mostly overstated, especially for a hard drive that isnt turned on and off very much. If I can do 6-8 tapes per day I may finish up in just a couple weeks.
    Quote Quote  
  9. double post please delete.
    Last edited by videon00b; 6th Oct 2017 at 23:01.
    Quote Quote  
  10. Originally Posted by manono View Post
    Better, but I think I'd lower the contrast more. Some of this is somewhat subjective, I think. It might depend on what other scenes look like as in this one you have a bright sky and a white horse. The picture below shows another way to aid in setting up the proc amp. Red shows black levels below 16 and I don't really see where the green is showing white levels above 235. The black bars will either be cropped away or replaced with 'fresh black", I assume, as well as the head switching noise along the bottom.

    It also depends on how the end result is to be viewed as what looks 'normal' on a computer screen might look way too 'bright' on a television. Here's the script used:

    AviSource("amarec(20170802-2135) b133 c94.avi")
    ColorYUV(Analyze=True).Limiter(Show="Luma")
    Hey, so revisiting this scene, Ive been trying to find the best default setting. I took your advice (lower contrast) to try and eliminate all those red pixels below 16, and lowered the contrast some more. However this didnt help the red spots at all for some reason! No idea why, can someone explain this?

    In that original image, there was brightness 133, contrast 94. (pictured below)



    I lowered the contrast 10 whole points down to 84, but raised brightness by 1 point (insignificant), yet still, the red pixels remain at 1! Notice how lowering the contrast this much made values which were at 254 on the original tape (and should be 234 on digital if adjusted correctly) fall all the way down to 217.



    And below is my new default setting for procamp. Notice how close the spectrum of values are to 16 and 235, even on this different tape. Makes me think this is a good default setting, right?



    So...what do you make of this? It appears as though nothing can be done about those red pixels. They refuse to budge. It isnt much but Im baffled at why this is.
    Quote Quote  
  11. On most devices contrast is gain (Y' = Y * N), and brightness is offset (Y' = Y + N).

    Original image:

    Click image for larger version

Name:	source.png
Views:	9
Size:	2.5 KB
ID:	43301

    Contrast (gain) 0.5:

    Click image for larger version

Name:	contrast(gain).png
Views:	9
Size:	2.5 KB
ID:	43302

    Brightness (offset) 50:

    Click image for larger version

Name:	bright(offset).png
Views:	9
Size:	2.3 KB
ID:	43303
    Quote Quote  
  12. Thanks for posting that chart again, helps illustrate it for me. On my device though, contrast is a seperate slider from gain. Its at the bottom of this procamp. Should I mess with that slider too now? (those are the factory default settings, my default setting is bright 134 contrast 92 sharpness 0)


    Originally Posted by jagabo View Post
    Since the original chart has illegal YUV values (Y<16, Y>235) the contrast needs to be reduced (the range of intensities needs to be reduced from 0-255 to 0-219) then the brightness needs to be increased by 16 to raise the blacks to 16 and the brights to 235.
    Is this the approach I should've taken all along? I guess I did, in a round-a-bout way, since I lowered the contrast and raised the brightness. I may be starting to over-think this...
    Quote Quote  
  13. Originally Posted by videon00b View Post
    Thanks for posting that chart again
    LOL. I forgot I posted similar examples before.

    Originally Posted by videon00b View Post
    On my device though, contrast is a seperate slider from gain.
    Wow. I've never seen a proc amp dialog with that many controls. I'm not sure what the difference between contrast and gain is there. Maybe gain is an analog adjustment before digitizing, contrast a digital adjustment after? You'll have to play with them to see what the differences are.

    Originally Posted by videon00b View Post
    Originally Posted by jagabo View Post
    Since the original chart has illegal YUV values (Y<16, Y>235) the contrast needs to be reduced (the range of intensities needs to be reduced from 0-255 to 0-219) then the brightness needs to be increased by 16 to raise the blacks to 16 and the brights to 235.
    Is this the approach I should've taken all along? I guess I did, in a round-a-bout way, since I lowered the contrast and raised the brightness. I may be starting to over-think this...
    Yes, that's essentially what you did.

    You might be able to preview the proc amp settings with a histogram live, while making adjustments. To do this you'll need to use GraphEdit or GraphStudio to build a capture graph, an AviSynth script that calls DirectShowSource() to open the graph and add the histogram, then open that AVS script with a media player. Then open the capture filter in GraphEdit/Studio and adjust the proc amp settings. You should be able to see the results in the media player.

    Or simpler, since most capture programs don't let you change the proc amp settings while previewing, open the capture filter in GraphEdit/Studio (while previewing in the capture program) and adjust the proc amp there. You won't have a histogram but you should see the picture change as you adjust the proc amp.
    Quote Quote  
  14. Originally Posted by jagabo View Post
    Originally Posted by videon00b View Post
    Thanks for posting that chart again
    LOL. I forgot I posted similar examples before.

    Originally Posted by videon00b View Post
    On my device though, contrast is a seperate slider from gain.
    Wow. I've never seen a proc amp dialog with that many controls. I'm not sure what the difference between contrast and gain is there. Maybe gain is an analog adjustment before digitizing, contrast a digital adjustment after? You'll have to play with them to see what the differences are.

    Originally Posted by videon00b View Post
    Originally Posted by jagabo View Post
    Since the original chart has illegal YUV values (Y<16, Y>235) the contrast needs to be reduced (the range of intensities needs to be reduced from 0-255 to 0-219) then the brightness needs to be increased by 16 to raise the blacks to 16 and the brights to 235.
    Is this the approach I should've taken all along? I guess I did, in a round-a-bout way, since I lowered the contrast and raised the brightness. I may be starting to over-think this...
    Yes, that's essentially what you did.

    You might be able to preview the proc amp settings with a histogram live, while making adjustments. To do this you'll need to use GraphEdit or GraphStudio to build a capture graph, an AviSynth script that calls DirectShowSource() to open the graph and add the histogram, then open that AVS script with a media player. Then open the capture filter in GraphEdit/Studio and adjust the proc amp settings. You should be able to see the results in the media player.

    Or simpler, since most capture programs don't let you change the proc amp settings while previewing, open the capture filter in GraphEdit/Studio (while previewing in the capture program) and adjust the proc amp there. You won't have a histogram but you should see the picture change as you adjust the proc amp.
    Haha no worries, the charts do help, but I just have some trouble absorbing it all.

    I tried to do that last night but Im not the greatest with these programs. Ill look up a tutorial here shortly. But since Im not sure what to look for anyway, I have some captures here, if you wouldnt mind taking a look at it.

    Factory default 128 brightness, 105 contrast


    Same settings as above, but with Gain turned up to 140 rather than 128


    Gain turned back to 128, brightness turned up to 138



    See if you could make out what the difference is please.

    Also one more thing that troubles me slightly is the slight difference in color of the factory default vs. the default setting I came up with (134 brightness 92 contrast)



    compare that with the original factory default. (128 brightness, 105 contrast)



    theres a lot more illegal values, but the 134 brightness 92 contrast one looks minutely washed out. Its a subtle difference, but do you notice this too? I see the shadows get lighter, and the red wagon looks less vibrantly red. Maybe I should turn the brightness down a little bit and the gain up, and lower the contrast a little? What do you think? I could take some other shots on another tape, maybe a darker scene to compare to. Thank you.
    Quote Quote  
  15. Gain is a multiplication. Say the gain value you picked results in a multiplier of 1.1. A dark pixel at Y=12 becomes 12*1.1=13.2, which rounds to 13. So it has changed very little and is still an illegal value. On the other hand Y=230 with that same gain becomes 253. That's a much larger change and Y has changed from a legal value to an illegal value.

    Brightness is an addition. Say the Brightness value you picked adds 10. That too dark pixel at 12 becomes 22 and becomes a legal value. The bright pixel at 230 becomes 240, an illegal value.

    What you want to compare is gain vs. contrast in your proc amp.

    Regarding the lower color saturation with brighter caps -- that's normal. If you think the more saturated colors are correct you can turn up the saturation control in the proc amp.
    Quote Quote  
  16. Ah ok. You said that the first time, not sure why I posted brightness vs gain lol.

    OK, standard factory default 128 brightness 105 contrast, 128 gain



    Gain at 140 now



    Gain back to 128, contrast raised 12 pts to 117



    One thing I noticed in the procamp, is all the controls above sharpness are noticeably changed when I play with them in the procamp with the video player paused. So maybe those are digital adjustments while the ones beneath them are analog adjustments. I didnt see a noticeable change with Gamma, White Balance, Backlight Comp, or Gain when I slid those values around.

    Lastly, a shot I took of a possible contender for a default capture setting: brightness 132 contrast 91. Thanks a lot for your help.

    Last edited by videon00b; 10th Oct 2017 at 00:05.
    Quote Quote  
  17. There must be something wrong with your post. The factory default (128 brightness 105 contrast, 128 gain) and gain 140 images are identical.
    Quote Quote  
  18. Woops, how did I mess that up? I've been staring at these images too long, can barely think straight anymore haha. I fixed it above.

    Heres a comparison of saturation. In this bright scene I think it makes it a little more accurate.

    Saturation up to 132:



    unsaturated



    The paint on the wagon seems to pop out more. But you can barely tell a difference anyway. I just want to start capturing already, like I said before, I may be starting to overthink these things. Looking at it on a computer screen does differ from the TV screen, though.
    Quote Quote  
  19. Looks OK to me.

    You might want to check for illegal YUV combinations. I wrote a quick script a while back called HighlightBadRGB().

    https://forum.videohelp.com/threads/360935-Capturing-Correct-Chroma-and-Hue-Levels-Fro...gb#post2289672

    Earlier in that thread is a more accurate function by Gavino -- but it is very slow to start up. Expect to see some illegal colors with any cap. Just watch out for big areas of illegal colors.

    By the way, using Histogram() after Limiter(show="luma") will mask super darks and super brights in the histogram. Call Limiter before Histogram.
    Last edited by jagabo; 10th Oct 2017 at 07:35.
    Quote Quote  
  20. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    What happens if you have illegal YUV combinations? Do the police come to your door? Do they take away your FCC license?
    Quote Quote  
  21. Cool, thank you again for the help.

    I tried to do that script, does it work in AVSPmod? I tried to do it in Avisynth but could never get avisynth to work. You just replace clip vid with the "source on comp" in a text editor and open it with a media player and it should work right? VLC and WMP dont even run the most basic of scripts for me so I think its a media player issue, which one do you run it with?
    Quote Quote  
  22. Originally Posted by videon00b View Post
    I tried to do that script, does it work in AVSPmod?
    It should. It does require AviSynth 2.6 or newer though.

    Originally Posted by videon00b View Post
    I tried to do it in Avisynth but could never get avisynth to work. You just replace clip vid with the "source on comp" in a text editor and open it with a media player and it should work right?
    Your full script will look like:


    Code:
    #This creates the function
    function HighlightBadRGB(clip vid, int "color")
    {
      color = default(color, $ff0000)
    
      badcolor = BlankClip(vid, color=color)
      Subtract(ConvertToYV24(vid), ConvertToYV24(vid).ConvertToRGB().ConvertToYV24())
      absY = Overlay(ColorYUV(off_y=-126), Invert().ColorYUV(off_y=-130), mode="add")
      absU = Overlay(UtoY().ColorYUV(off_y=-128), UtoY().Invert().ColorYUV(off_y=-128), mode="add")
      absV = Overlay(VtoY().ColorYUV(off_y=-128), VtoY().Invert().ColorYUV(off_y=-128), mode="add")
      Overlay(absU,absV, mode="add")
      Overlay(last,absY, mode="add")
      ColorYUV(gain_y=65000)
      Overlay(vid,badcolor,0,0,last)
    }
    
    AviSource("filename.avi")
    HighlightBadRGB() # this executes the function

    Originally Posted by videon00b View Post
    VLC and WMP dont even run the most basic of scripts for me so I think its a media player issue, which one do you run it with?
    Those two players don't work with AviSynth scripts. I recommend you use VirtualDub (or one of the variants) to preview your AviSynth scripts. Players that I know work include MPCHC, KMPlayer, PotPlayer, SMPlayer. Note that you must use a 32 bit player with 32 bit AviSynth, or a 64 bit player with 64 bit AviSynth.
    Quote Quote  
  23. Oh ok, it works now. Nice.

    If I plan on watching these tapes on my computer, and sending it out through the internet, should I really contract the range to 16-235? I think computers will only get more popular as time goes on. Maybe TV's will switch to 255 one day too. As minor as it is, I want to keep these tapes as close to how they were shot as possible, and I do see a slight difference. These illegal values are only illegal if theyre viewed on a TV, right? And I could always convert them later...I've spent at least 12 hours doing this, so I don't want that time to go to waste, but these tapes were shot on a range of 0-255, right? So wouldnt it be truest if I converted them to 0-255, and my monitor would see it.
    Quote Quote  
  24. Originally Posted by videon00b View Post
    If I plan on watching these tapes on my computer, and sending it out through the internet, should I really contract the range to 16-235?
    Yes, that is the ITU rec.601 international standard for all video distribution systems. DVD, Blu-ray, Youtube, Netflix, etc.

    https://en.wikipedia.org/wiki/Rec._601

    Originally Posted by videon00b View Post
    I think computers will only get more popular as time goes on. Maybe TV's will switch to 255 one day too.
    They already do. A properly set up device will convert YUV 0-235 to RGB 0-255 when displaying the video (what you see on-screen is always RGB). Conversely, when you convert RGB to YUV you compress the range from RGB 0-255 to YUV 0-235, 0-240.

    Originally Posted by videon00b View Post
    these tapes were shot on a range of 0-255, right?
    Your tapes are analog and have no numeric values. The standard for converting them to 8 bit numbers (digitizing) defines full black as Y=16, and full white as Y=235. The colors, U and V, range from 16 to 240. But most combinations of Y, U, and V, even within those limits, are not legal. If you look at the RGB cube inside the YUV cube (actually, YUV is being used here as shorthand for YCbCr)

    Click image for larger version

Name:	ycbcr.jpg
Views:	5
Size:	29.5 KB
ID:	43353

    from: https://software.intel.com/en-us/node/503873

    you'll see that only about 1/6 of the 16 million YUV colors map to legal RGB colors. For example, at full white, Y=235 there is only one legal U and V value, 128.
    Quote Quote  



Similar Threads