VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. Hi

    Someone put too much brightness on a video I'm working on. It's the movie Long Day's Journey Into Night (1986). I don't have the original anymore and I need to bring it back to the nearest appearance as its original brightness/contrast/colors.

    I'm trying with VDub filters, but the result isn't satisfatory. The light areas refuses to get darken. Also, the balance of the whole colors looks wrong and crap.

    Below are some samples:

    Original bright image
    Name:  sample_00-50%.png
Views: 2820
Size:  89.8 KB

    ffVDub Luminance offset -70
    Name:  sample_01-50%.png
Views: 2724
Size:  97.1 KB

    ffVDub Gamma Correction 0.40
    Name:  sample_02-50%.png
Views: 2802
Size:  106.2 KB

    ffVDub Levels input 80-255 Output 0-180
    Name:  sample_03-50%.png
Views: 2679
Size:  98.2 KB

    Internal Brightness/Contrast -30
    Name:  sample_04-50%.png
Views: 2696
Size:  85.6 KB

    CollorMill (some settings)
    Name:  sample_05-50%.png
Views: 2757
Size:  109.9 KB

    Near to desirable image
    Name:  sample_06-50%.png
Views: 2765
Size:  123.6 KB

    May you, guys, point me what I'm doing wrong, or suggest another tools/techniques?

    .
    Thank you.
    Quote Quote  
  2. It might be possible, if the original YUV video retains superbrights Y' > 235 (someone might have clipped it when making their adjustments. You can't tell from the screenshot, because the screenshot is in RGB)

    If you use vdub and just input the video as is, it will clip the highlight/superbrights because of the rec601 conversion when converting YUV => RGB

    Either color correct in YUV (eg avisynth) or convert to full range RGB before attempting to recover superbright information

    (I think newest versions of vdub have some filters that work in YUV, but you have to make sure you are working in YUV in the color depth options)


    It's easy to determine if it's clipped (you can use histogram() in avisynth for example). If you see hardline at Y = 235 and no values greater than that, you will not be able to recover that information
    Quote Quote  
  3. Hi Poisondeathray

    My version of VDub is 1.9.9 Build 32817. How to know if it's able to handle YUV color space?

    So, as you said, I neet to use histogram and look for Y=235. How to input in YUV? I'm using this code:

    Code:
    Loadplugin("DGDecode.dll")
    Mpeg2Source("movie.d2v")
    ConvertToRGB()
    Ommiting the last line is enough to get there?

    Also, may you be more specific when you say color correction in YUV with Avisynth?

    Your are saving me hours of trying and error I spent so far, and will spend more after that. thx.
    Thank you.
    Quote Quote  
  4. Heck54

    Thnak you for your suggestion. I'll buy a copy, for sure. But the point here is to learn a little bit more about color spaces and Avisynth scripts too.
    Thank you.
    Quote Quote  
  5. No, if you are converting to RGB, you have to use PC matrix, otherwise it will clip , just like vdub

    ConvertToRGB(matrix="PC.601")

    This means YUV 0-255 => RGB 0-255 , the full range is preserved

    If you don't specify a matrix, or let vdub do it, this means YUV 16-235 => RGB 0-255 . This means Y 0-15 and Y 236-255 are missing




    Also, may you be more specific when you say color correction in YUV with Avisynth?
    I mean stay in YUV space, using filters that work in YUV, like smoothlevels or smoothcurve or levels . If the superbrights values are preserved in the video then you can access them.


    It won't make a difference eitherway if the values have been already clipped - it looks like somebody screwed up the video, so the chances that they stayed in YUV are very slim. If you do the simple check above, it tell you right away
    Quote Quote  
  6. Poison,

    if I put histogram() before ConvertToRGB(matrix="PC.601"), I get an error (YUV data only).
    When I put histogram() after, the graphic stays on the right side:

    Click image for larger version

Name:	sample_07-50%.png
Views:	1720
Size:	143.7 KB
ID:	8161

    Where is the hardline and Y axis? How to work the color correction?
    Thank you.
    Quote Quote  
  7. If you used

    MPEG2Source()
    Histogram()

    Then it's clipped

    Histogram() is turned over on it's side 90 degrees clockwise rotation. Do you see the hard white line? That is clipping at Y=235

    A video that had superbrights and superdarks retained would have values in those brown areas. Those brown areas are Y' 0-15 and Y' 236-255
    Quote Quote  
  8. I understand. Good to learn new stuff when we're working and applying the advices at the same time.
    The conclusion: it is clipped. I cannot access superbright values... That is?
    Is there another way to improve the video?
    Thank you.
    Quote Quote  
  9. Originally Posted by jairovital View Post
    I understand. Good to learn new stuff when we're working and applying the advices at the same time.
    The conclusion: it is clipped. I cannot access superbright values... That is?
    Is there another way to improve the video?
    Basically yes.

    Because it's clipped, there is data missing and if you attempt to bring some values down there will be an imbalance, causing weird colors and "burn" like in your screenshots.

    You can improve it slightly if you used non linear changes like curves or 3-way color corrections, or more selective CC filters with other software. But any "repair" will not be ideal, no matter what software you use because of the clipping (there will be no separation or detail in the bright areas)
    Quote Quote  
  10. Originally Posted by poisondeathray View Post
    You can improve it slightly if you used non linear changes like curves or 3-way color corrections, or more selective CC filters with other software.
    Thank you poisondeathray. Do you mean Gradation Curves? Final Cut and 3-way are unavailable for me. I'll try Gradation and later I'll bring some results.
    Thank you.
    Quote Quote  
  11. Yes, in vdub it's called gradation curves. You will not get very good results. When the information is clipped, that means it's gone forever.

    If this is just for learning purposes, use a full range YUV test video. You will see you can recover superbright values if you stay in YUV, or use a full range conversion, but clip data if you let vdub do the RGB conversion, it will be impossible to recover. jagabo posted some test videos and explanations but I don't have the links handy. If you can't find them PM him, or if he's not around I can make one for you
    Quote Quote  
  12. Yes, just for learning purposes.
    I searched for "yuv test clip data jagabo range" here but I couldn't find those YUV test videos you said. I think you mean it isn't this one:
    https://forum.videohelp.com/threads/333661-YCbCr-16-235-to-RGB-0-255-and-PAL-NTSC-diffe...-%287-5-IRE%29

    May you, please, explain how to use a full range YUV test video? Or the meaning of "stay in YUV", once I am already using matrix="PC.601".
    And, if I'm not asking too much, the lines of the script to get a video not too burned like I'm getting using my poors filter settings.
    Thank you.
    Quote Quote  
  13. Originally Posted by jairovital View Post
    Yes, just for learning purposes.
    I searched for "yuv test clip data jagabo range" here but I couldn't find those YUV test videos you said. I think you mean it isn't this one:
    https://forum.videohelp.com/threads/333661-YCbCr-16-235-to-RGB-0-255-and-PAL-NTSC-diffe...-%287-5-IRE%29

    May you, please, explain how to use a full range YUV test video? Or the meaning of "stay in YUV", once I am already using matrix="PC.601".
    And, if I'm not asking too much, the lines of the script to get a video not too burned like I'm getting using my poors filter settings.


    Before I go into a long winded explanation, jagabo has explained it thorougly in several posts. (you can go step by step and follow along with the test video) . Try PMing him, he probably has the links handy. It's very good for learning and he explains it very well.

    You want to use a full range YUV test video, because it has values that aren't clipped - Some of his prepared test videos have numbers, so it will help your understanding of what is going on.

    In real life, even retail DVD's, raw footage from cameras usually have superbright data (Y' > 235), so it's not a pointless exercise. It's just easier to learn the basics with prepared test video so you can clearly see what is going on. Once you go through the exercises, You can try it on real footage.

    When you use ConvertToRGB(matrix = "Pc.601"), you are no longer in YUV, that is for YUV to RGB conversion. (maybe you want to use other programs or filters that work in RGB, like vdub. You don't want to use that if you want to stay in YUV)
    Last edited by poisondeathray; 15th Aug 2011 at 14:18.
    Quote Quote  
  14. Originally Posted by poisondeathray View Post
    Try PMing him, he probably has the links handy. It's very good for learning and he explains it very well.
    He replyed me few minutes ago. He pointed me two links:
    https://forum.videohelp.com/threads/316906-Player-s-color-profiles?p=1961703&viewfull=1#post1961703
    and
    https://forum.videohelp.com/threads/326496-file-in-Virtualdub-has-strange-colors-when-o...=1#post2022085

    I found grayblocks2.m2v at the first one and some explanations to adjust players and monitors at the second one. No guide or exercises...

    When I PMed him, I quoted this thread to show what we're talking about. But no guide or exercises link was given. Or I missed some thing?

    I'm not so close to him to ask more explanations via PM. Then, I'm back to find out how to use that grayblocks2.m2v and see what is going on along the video I'm trying to fix.

    You want to use a full range YUV test video, because it has values that aren't clipped - Some of his prepared test videos have numbers, so it will help your understanding of what is going on.
    Yes, I want to understand and see what I can improve, even if just a little bit.
    Thank you.
    Quote Quote  
  15. Originally Posted by jairovital View Post
    When I PMed him, I quoted this thread to show what we're talking about. But no guide or exercises link was given. Or I missed some thing?
    I'm certain there are some other threads, he's explained this stuff many many times over the years.

    Anyways you can still use those videos, they help explain what is going on in a general sense (you still won't be able to improve your video very much because it's clipped)

    If your monitor is calibrated, then look at the screenshots. You should see 235-255 as a big white bar (there are no demarcations between 235-255). The reason is when you view something, it has been converted to RGB using a standard range matrix (you're not looking at YUV, you're looking at a RGB converted representation of it).

    If you preview in vdub or avspmod, any media player, they will use rec601 or rec709 to convert to RGB for display. This means Y' 16-235 gets converted to RGB 0,0,0 - 255 ,255,255. White is at RGB 255, black at RGB 0. But what happened to all that data from 0-15 and 235-255 - it's gone

    If you look at your screnshots, there are "folds" in the shirt, but all that detail is gone in the bright picture. It's the same thing, there are no separation becaues all that data has been clipped . It all resides at Y=235 now, where that line is a straight white line on the histogram

    Open the full range yuv file and use histogram(), and you will see data in those brown regions. So although the preview you are seeing only shows Y' 16-235, there is data in those ranges. Compare to your video, there is nothing in those ranges.
    AVISource()
    Histogram()

    Now try converting to RGB
    AVISource()
    ConvertToRGB()
    - because no matrix was specified, you see the exact same thing, 0-15 is a bar, 235-255 is a bar (no detail). It's clipped just like your video. Not recoverable. If you open the video directly in vdub, same thing happens. Nothing you can do to return those demarcations - go ahead and try - (unless you work in YUV, or use full range RGB conversion)

    Now try convert to RGB using full range
    AVISource()
    ConvertToRGB(matrix="pc.601")
    - because you are now "mapping" Y' 0-255 to RGB 0,0,0 - 255,255,255 , you see all the information. It's not clipped.
    Quote Quote  
  16. Once again, thank you for the great lesson.

    Now, I guess I'm a little bit less dumb than before.
    Converting to RGB drives me to loose some superbright and superdark data, because the video already has none.

    Arrows shows data < 15 and > 235
    Click image for larger version

Name:	sample_08-50%.png
Views:	1672
Size:	8.3 KB
ID:	8164

    No useful data to recover
    Click image for larger version

Name:	sample_09-50%.png
Views:	1728
Size:	126.5 KB
ID:	8165

    But, reaching the end of our lesson, what do you suggest to use to kill that excessive brightness. Color Mill, Levels, Gradation Curves? Any suggestion for settings?
    Thank you.
    Quote Quote  
  17. Originally Posted by jairovital View Post
    But, reaching the end of our lesson, what do you suggest to use to kill that excessive brightness. Color Mill, Levels, Gradation Curves? Any suggestion for settings?
    It wasn't a good explanation; jagabo does a much better job if you can find those threads

    But you understand the basics, of what was said above - you will know why I don't recommend anything. It can't be done - it will still look like crap no matter what you do.

    All the remaining data (that hasn't been clipped) in the "highlights" regions resides in that thin line now (it's all 1 big block), instead of being spread out. It's all squished together. Compare all the folds in the shirt in the "good" picture - all that is pure white now instead of being separated and visible - it's been clipped. Just like the "white bar" from 235-255 when you view the test video with a normal range matrix. There is nothing to recover

    You can improve on it slightly using curves and more expensive CC suites, because of secondary color correction. You have more control and fine tuning with better software. You can narrow in on specific ranges. But nothing can change the fact of the clipping - that data is gone.
    Last edited by poisondeathray; 15th Aug 2011 at 18:10.
    Quote Quote  
  18. Ok, Poison. Everything was said. It's much more clear for me after your last post. Maybe I find those jagabo's thead another day and try to duplicate his exercises. But it's OK for now. You're right: nothing good can be done. Once you lost your coins, it's time to earn more, because those ones had gone...
    Thank you.
    Quote Quote  
  19. VirtualDub's Brightness/Contrast filter can work in YUV. Use it as the first filter in your processing. Enable the "Show image format" option in the Filters dialog to verify the image is in YUV at that filter.

    But I think your source (the very fist image) is too far gone.
    Quote Quote  
  20. Welcome, jagabo. Two single questions:
    Originally Posted by poisondeathray View Post
    I'm certain there are some other threads, he's explained this stuff many many times over the years.
    1 - Where are those threads/guides/exercises about YUV/RGB conversions? I'm using your grayblocks2.m2v, but poorly, ignoring some useful informations you already gave.
    2 - How to open the video in Vdub in YUV space? Even if I omit ConvertToRGB in script, "Show image format" option in the Filters dialog shows RGB32. My source is d2v index (from a M2V file).
    Thank you.
    Quote Quote  
  21. 2 - in the video=>color depth , set to 4:2:0 YV12 for the decompression format (I mentioned this above in post #2)
    Quote Quote  
  22. First make sure your source is being decoded in YUV: add Info() right after WhateverSource() in AviSynth. That will print information about the video source on the frame.

    AviSource("filename.avi")
    Info()
    Click image for larger version

Name:	info.jpg
Views:	1675
Size:	36.1 KB
ID:	8190

    If you see YUY2 or YV12 then check VirtualDub's Video -> Color Depth settings. I usually force the input to YUY2.

    I don't have links to my best descriptions of YUV/RGB conversion but here are a few:

    https://forum.videohelp.com/threads/315041-Best-luma-brightening-filter-for-VirtualDub?...=1#post1948921

    https://forum.videohelp.com/threads/301048-Virtualdub-output-to-mpg?p=1842969&viewfull=1#post1842969

    https://forum.videohelp.com/threads/322676-grainy-dark-video-Help?p=1998090&viewfull=1#post1998090

    https://forum.videohelp.com/threads/336508-Fraps-output-less-contrast-faded-problem?hig...b+yuv+contrast

    You can use the advanced search feature here to search for posts specifically from me.
    Quote Quote  
  23. I prepared some test videos from your "good" image for you to play with. They are xvid in YUV. Just 1 frame long.

    1- some clipping, see the hard line at Y=255. But has recoverable "superbright" data in Y=235-255
    2- bad clipping like the video you wanted to fix, no recoverable superbright data

    with the 1st video, you should be able to improve significantly more than video #2 with the proper workflow . You should at least be able to recover some of the details in the shirt instead of it looking like a "white blob". Give it a try. The 2nd video will give you similar issues to what you have with in post #1 when you try to improve it. Neither will be as good as the original image because both are clipped.

    If you don't use the proper workflow for video #1 (e.g. you let vdub do the RGB conversion), your results will be worse

    Notice that both previews look identical in the RGB screenshot - why? As I tried to explain above, you're only seeing part of the picture, and the RGB preview only represents 16-235 of Y'. It doesn't "see" the data in the 236-255 range. But video 1's contains more Y' data in that 235-255 range, this is depicted in the histogram
    Image Attached Thumbnails Click image for larger version

Name:	_1.png
Views:	972
Size:	102.9 KB
ID:	8186  

    Click image for larger version

Name:	_2.png
Views:	971
Size:	99.3 KB
ID:	8187  

    Image Attached Files
    Last edited by poisondeathray; 15th Aug 2011 at 20:12.
    Quote Quote  
  24. I'll make some tests. Tomorrow, we'll have news.
    Last edited by jairovital; 15th Aug 2011 at 20:06. Reason: Later questions (after read previous posts)
    Thank you.
    Quote Quote  
  25. Thanks, jabago for the links. I'm reading them and learning your tricks as opening source in YUY2 and using internal Brighness/Contrast before Levels or other filters.

    Poison, I couldn't use your samples. AvsPMod and plain script in Vdub returned "Could not decompress frame 0" error. Opening directly in Vdub I got just a green screen and the following levels (color deph 4:2:0 YV12):
    Click image for larger version

Name:	levels.png
Views:	1700
Size:	10.0 KB
ID:	8201

    I want to give a try and use the proper workflow, but what do you mean with that?

    Attached is a small clip with some different scenes and light settings.

    I would ask you to take a look in it and return a sample with some, let say, "improvement", if it's possible. I do know the most of the useful data had gone, but I think there are a minimum there and we can use it to get a better look, or even just make the video a little bit dark.
    Image Attached Files
    Thank you.
    Quote Quote  
  26. That video is hard clipped at Y=235 (except for a little noise). You can darken it but you won't be able to bring out any more details in the bright areas.
    Quote Quote  
  27. Originally Posted by jairovital View Post
    Poison, I couldn't use your samples. AvsPMod and plain script in Vdub returned "Could not decompress frame 0" error. Opening directly in Vdub I got just a green screen and the following levels (color deph 4:2:0 YV12):
    Sorry , not sure why? Maybe it was corrupted upload, or you have problems with xvid? I'll upload it as huffyuv




    I want to give a try and use the proper workflow, but what do you mean with that?

    By "proper workflow" , I mean you don't inadvertently clip it in your workflow. That's the one of the reasons for these exercises. If you just import the video as is and work in vdub, the superbright information will be clipped in the YUV => RGB conversion. Even something like Premiere or After Effects will clip the information if just import it as is - they don't handle XviD or HuffYUV as YUV ,they treat it as RGB and clip the information. Either 1) Your software and filters have to be able to access YUV or 2) you use full range in your RGB conversion if you are working in RGB



    Here is another example. Someone in another forum was asking questions about exposure and lighting, and how he could have controlled the exposure better (maybe with lights, reflectors) - but let's say you can't reshoot it and it's all you have . It's a bit more challenging because of different exposure in the frame. The background is overexposed, but the foreground isn't. So a linear correction that improves the background will make the foreground too dark. More selective color correction technique would help here, like curves, secondary color correction etc... because you can target different areas separately. Traditional 3-way color correctors would target highlights, midtones , and shadows.

    You should be able to improve the background detail . The building on the left is supposed to be red brick, the lights are supposed to be yellow/orange, you should be able to see the water in the fountain, the outlines of the buildings are obscured as well, you should be able to improve them.

    This was originally a youtube video , but link is down. I converted a few frames to Huffyuv and labelled them clip 3 and 4: (3) with superbrights preserved, (4) clipped
    Image Attached Thumbnails Click image for larger version

Name:	3.png
Views:	292
Size:	357.6 KB
ID:	8209  

    Image Attached Files
    Quote Quote  
  28. Poison, we almost there. Now I did can see precisely what I'm loosing when I open the video as is. I think, for my learning purposes, Vdub is enough. I have no access to 3-way or After Effects.

    In 1.superbrights.test.huffyuv.avi I can see more details of the clothes at the input video pane than the output. I adjusted Color Depht to 4:2:0 as you said, but it is the same as "autoselect" setting. Left pane has more details.

    Thank you for the second example (Youtube), about fore and background lighting problems. Using Photoshop I know how to handle that, but video is something different.

    As jagabo had affirmed before, Internal Bright/Contrast works on YUV. My idea is to do just some Levels after Bright/Contrast.

    So, I have just 2 questions:
    1 - Why input pane has more details than output? YUV x RGB?
    2 - How to input as YUV? Just set Color Depht to 4:2:0? How did you create the sample without clipping superbrights? I want to do the same and accept as a happy-end.
    Thank you.
    Quote Quote  
  29. In 1.superbrights.test.huffyuv.avi I can see more details of the clothes at the input video pane than the output. I adjusted Color Depht to 4:2:0 as you said, but it is the same as "autoselect" setting. Left pane has more details.
    there should be no difference between panes if you just open the video in vdub (no filters)

    disable direct x : options => preferences => display => uncheckmark use direct x for display panes



    Thank you for the second example (Youtube), about fore and background lighting problems. Using Photoshop I know how to handle that, but video is something different.
    Actually it's exactly the same, if you are working in RGB . If you know how to use RGB levels in photoshop it's the same in vdub, in avisynth, in ae, etc... input white, input dark, gamma, output white, output dark

    RGB Curves in photoshop is the same in vdub, in Ae, in premiere etc...

    The difference here is your video is starting out in YUV, and most color correcting filters work in RGB . If you're not careful, you can clip information even before you start



    2 - How to input as YUV? Just set Color Depht to 4:2:0? How did you create the sample without clipping superbrights? I want to do the same and accept as a happy-end.
    Only some filters work in YUV for vdub, most of them work in RGB . To input as YUV, make sure you are frameserving YUV if using avisynth (use info() ) . File=> file information may also report what vdub is "seeing" . You may have to use color depth option as well, then check the filter list (show image formats is checkmarked)


    To create the 1st sample, I increased brightness and gamma in RGB, then I conveted back to YUV with full range matrix
    Last edited by poisondeathray; 16th Aug 2011 at 10:33.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!