Levels - what is Output Black and Ouptut White for?

When to use Output Black and Output White in the video filter Levels?
When I apply them, the image becomes softer - ok. But it loses the full depth of the dark tones and the bright white.
Could it be that Output Black Output White is only used to turn a 0-255 video into the 16-235 color space?

Hi @Micha! Changing the output levels produces a lower contrast image, as you noted. This is usually done for creative reasons. If it isn’t a style you like, then you don’t need to use it.

It can also be used on a grayscale (desaturated) copy of a clip to cleverly set up some bright/dark zones which are saved and then brought back in as an alpha mask for compositing.

To switch between 0-255 and 16-235, a better place to change that is the Range option on a clip’s properties.

1 Like

Hello @Austin
Do you mean: Color range: Broadcast Limited (MPEG) or Full (JPEG)?

Well, you can use Levels to do fade-transitions and soften camera footage to achieve a more Filmic look.

1 Like

Correct. Full is 0-255. Broadcast Limited is 16-235.

1 Like

Hello @david.lyon
What is the point of using Input White and Output White at the same time? Don’t they cancel each other out?

Which of the settings is the correct one then? I publish in tube.tchncs.de, so something similar to youtube.

This flag is a setting on every individual clip. The correct setting is whatever matches the camera that made the footage in that clip.

Most camera sources will be Limited. However, screen capture footage from a computer is sometimes Full range. Shotcut normally auto-detects the correct setting for each clip (it is usually embedded in the clip metadata), but the option is there for you to manually override if Shotcut guesses wrong or the clip is flagged wrong.

As for export, Shotcut will export video in Limited range unless it is told to do otherwise on the Advanced export page. This is industry standard.

1 Like

There is a strange phenomenon:
If you enter the same value in Output White as in Input White, then these settings neutralize each other completely.
Whereas the Input Black setting is not neutralized by Output Black.
Does this make sense or is this a bug?

It is inconsistent, for sure. :grin:

In GIMP, setting black levels to the same thing will cause no change to the image, just like you are noticing with white levels. However…

In the Shotcut (frei0r) Levels code, black is zero and white is one, and gray values in between them are a decimal number. When white input is set, the tones above the white input are still retained in the “headroom” area above 1.00 which allows the white output level to pull them back down to normal range. But for black, values that get pulled below zero by the black input slider are being clamped at zero (presumably to avoid negative numbers), meaning there is no “headroom” for the black output level to recover. Raising black output just raises the floor of the waveform.

This could be fixed, although I suspect it could marginally impact the performance of the Levels filter to accommodate negative numbers (unless the whole filter has its values shifted).

@shotcut Do you consider the black level implementation to be a bug, or would you prefer to leave it as is? This could make a good low-hanging fruit project for someone wanting to get familiar with the code base.

1 Like

By the way, in Vegas Pro, they also completely annul two opposite values in black.

Because the filter works well otherwise, this inconsistency doesn’t really need to be fixed - the main thing is to know (through your brilliant explanation) why it is so.

1 Like

I have used it before contrast. Contrast seems to affect the highlights more than shadows. Reduce the output black white to avoid contrast clipping either side. Using the two modules in combination like this seems to increase midtone contrast without blowing out white or crushing black. Use the waveform scope while I’m using both to see what I’m doing.

This sounds very interesting, but unfortunately I can’t relate to your experience.
Maybe you can describe your observation again.

For me, it is so that both sliders of Black never cancel each other out. Whereas both White settings completely cancel each other out in the image, whereas differences can be seen in the Waveform or Histogram.

Black outpug raises the black point, no matter what was done by other settings before. There are no darker pixels than the set value. This means that there is no real black in the image anymore.

@andrewk89 was responding to your opening question of when and why to use the Output sliders in the first place. He uses it as a pre-filter to the Contrast filter to control the affected range of contrast adjustment. The Contrast filter has a fixed pivot point where any tones above it are raised, and any tones below it are lowered. The Levels filter lets you control which tones are above and below that pivot before using Contrast to stretch them. In DaVinci Resolve, this can be done with the Contrast filter alone because it has an adjustable Pivot control.

1 Like

Would that be a way to lift the shadows? I did use grading previously but it’s not giving me what I need.

Hello @PaulusMaximus
Not sure now what you are asking for. With what did you want to lift the shadows?
Output Black does not lift the shadows first, but mainly the Blackpoint and thus of course also the shadows, softens the middle tonal values, the bright ones very little, white not at all.
I think it is better to raise the shadows with Gamma, then possibly bring back the deep shadows with Black Input.

With grading, pure black pretty much stays pure black. The dark tones that are above black will be raised into a lighter gray, but black itself is largely unaffected.

With levels, the black point gets lifted to dark gray. There will be no more solid black in the image anymore. If the goal is to reduce contrast or the apparent dynamic range of the image, then slightly raising the black point by using the output black level may help.

Thanks @Micha @Austin. I was trying to reduce some heavy shadows. It ultimately comes down to a small sensor with low dynamic range which I’m trying to fix. It does have a cine-like mode which I will try next time. I will experiment with your ideas. Thanks

Which grading do you mean?

When I mentioned grading I was referring to colour grading, I assumed that is what Austin meant

1 Like