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
ffVDub Luminance offset -70
ffVDub Gamma Correction 0.40
ffVDub Levels input 80-255 Output 0-180
Internal Brightness/Contrast -30
CollorMill (some settings)
Near to desirable image
May you, guys, point me what I'm doing wrong, or suggest another tools/techniques?
.
+ Reply to Thread
Results 1 to 30 of 38
-
Thank you.
-
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 -
-
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()
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. -
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?
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 -
Thank you.
-
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 -
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. -
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) -
Thank you.
-
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 -
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. -
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.
-
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.Thank you. -
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. -
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
No useful data to recover
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. -
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.
-
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. -
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. -
Welcome, jagabo. Two single questions:
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. -
2 - in the video=>color depth , set to 4:2:0 YV12 for the decompression format (I mentioned this above in post #2)
-
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()
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. -
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 histogramLast edited by poisondeathray; 15th Aug 2011 at 20:12.
-
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. -
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):
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.Thank you. -
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.
-
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 -
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. -
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.
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.
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.
To create the 1st sample, I increased brightness and gamma in RGB, then I conveted back to YUV with full range matrixLast edited by poisondeathray; 16th Aug 2011 at 10:33.
Similar Threads
-
AvsPmod Seems Less Bright than Final Video
By VideoFanatic in forum RestorationReplies: 13Last Post: 22nd Apr 2012, 16:34 -
AVISynth function to darken an area
By kinglerch in forum EditingReplies: 13Last Post: 9th Apr 2012, 17:26 -
Vegas 8 showing image too bright on finished video
By stantheman1976 in forum EditingReplies: 4Last Post: 18th Aug 2008, 15:33 -
Bright horizontal random lines in 8 mm Camcorder Video
By axhack in forum RestorationReplies: 4Last Post: 11th Jan 2008, 21:05 -
Captured video is super-bright and washed out
By maskull in forum Capturing and VCRReplies: 1Last Post: 20th Nov 2007, 08:23