Hi, I'm into classic/older movies. Usually their quality isn't great, and there isn't a big enough market for them to do good restoration on them, usually. I can live with scratches, film grain, etc, but the one thing that bugs me to no end is contrast! I hate when a movie is supposed to be black and white, but it's gray on gray!
I've looked high and low for a media player with some sort of automatic contrast feature, with no luck. If anyone knows of one, let me know!
Anyway, after not being able to find one, I've been trying to implement an ffmpeg filter that will do it. What I've been able to do is:
ffmpeg -i in.mkv -vf extractplanes=y,histeq=strength=0.3:intensity=1 out.mkv
This extracts to luma channel and stretches it. Now I need to recombine it with the U and V chroma channels. Anyone know how to do that?
Thank you!
+ Reply to Thread
Results 1 to 7 of 7
-
-
-
I wasn't clear, what I'm wanting to do is fill the luma space, not turn everything black OR white. For example, if I have a movie where the luma is 64-192, I want to enchance the contrast to where the luma is 0-255, not "burn" it where it where the luma is 0 OR 255. I just want to make the blacks black and the whites white.
-
NOT ALL movies use the FULL RANGE of contrast. Sometimes it is because of technology, sometimes because of economics/logistics. Sometimes it is specifically done for artistic reasons (look up: "high key" and "low key").
If something was incorrectly transferred, that's one thing, but just because it doesn't happen to have a perfect standard bell curve of lightness distribution is a silly reason to adjust movies. That's like saying "if it's in color, how come there aren't all the colors of the rainbow in it?".
Scott -
I understand what you are saying, but why does luma need to fill up?
Imagine making a movie with one scene at night and the next at bright daylight would it make sense to stretch both from 0-255?
Look at this example:
Pretty darkish huh?
Exactly!
That's the mood that the director wanted!
Look at the scene:
http://www.youtube.com/watch?v=X5kq12xf1Uk
Now watch what happens when you want to get your 'full luma' bang for the buck:
The mood is gone!
-
Use the players proc amp controls or the graphics driver's proc amp controls. You'll have to adjust them for each particular video. Automatic brightness/contrast controls usually work frame by frame. That's definitely not what you want.
-
Automatically stretching contrast doesn't make sense, but you can increase contrast manually at playback when required. I do this using video player shaders that require no tinkering in typical cases. Increasing contrast will impact brightness. Contrast.10, expand10_240 (levels) and sCurve (midtone contrast boost) methods are available in A-pack.
The "moody darkish shot the director wanted" might also be unwatchable depending on your display and the brightness in the room. This can be adjusted too.