HandBrake icon indicating copy to clipboard operation
HandBrake copied to clipboard

Filters - Levels Adjust

Open fuzzzeee opened this issue 3 years ago • 11 comments

Description of the feature or enhancement you'd like to see in HandBrake

Is it easy to add a filter to the Filters tab for expanding limited range videos to full range?

Many files are incorrectly encoded (sometimes because the original source material is) and it would be great to expand their range from 16-239 to 0-255 when compressing them with handbrake

What Operating System are you running?

Windows 10

What version of HandBrake are you running?

1.5.1 (2022011000)

Where did you download HandBrake from?

handbrake.fr

Activity Log, Crash Log or any other details

No response

fuzzzeee avatar Jul 03 '22 06:07 fuzzzeee

Trying to put a purpose to your proposal. Are you saying that the source is actually encoded with 0-255 but is incorrectly tagged as 16-239, or that it is 16-239 and you would like to convert it to 0-255 as part of the encode?

woodstockathbf avatar Jul 04 '22 04:07 woodstockathbf

I'm not sure if there's any tags or metadata involved. I've just come across several videos that are incorrectly encoded so that blacks appear gray (what should be 0 is actually 16). If there was an option to expand the range back out to full range they could be fixed while being re-compressed.

fuzzzeee avatar Jul 04 '22 06:07 fuzzzeee

MPC-HC has built-in shaders called "16-235 to 0-255" which make the video look normal again, but it would be great not to have to use these shaders.

fuzzzeee avatar Jul 04 '22 06:07 fuzzzeee

While it would be nice to have an option to override the color range in HandBrake, make sure your player is actually displaying these file properly. Unfortunately there are many broken things out there, for example: https://github.com/HandBrake/HandBrake/issues/2859#issuecomment-1132358051

galad87 avatar Jul 04 '22 07:07 galad87

The player is fine. This has even happened to Blu-ray releases like The Arrival (1996) Reviews of that disc only seem to think blacks look a little off.. when it's very off (the screenshots on the blu-ray dot com review clearly show the ranges have been accidentally stuffed up) I just figured it would be a very easy filter to add - all good if you don't think it's worth the effort. Admittedly very few videos suffer from using the wrong range

fuzzzeee avatar Jul 04 '22 07:07 fuzzzeee

Well it's not hard, it just needs someone to write the code and find a nice way to expose it in the UI.

galad87 avatar Jul 05 '22 17:07 galad87

I'm not sure whether we have an open issue that encapsulates this, but previously we've discussed adding a way to override the input range to the video tab (not filters).

bradleysepos avatar Jul 05 '22 17:07 bradleysepos

For which codec do you want to expand to full range? If this is for x265, will it help you, if you add range=full to the encoding options?

Nomis101 avatar Jul 14 '22 16:07 Nomis101

For which codec do you want to expand to full range? If this is for x265, will it help you, if you add range=full to the encoding options?

Yeah I use x265. How would you apply that option? I tried putting "--range=full" and "range=full" into the advanced options textbox but neither affected the range

fuzzzeee avatar Jul 14 '22 20:07 fuzzzeee

Oh yes, this does not work at all. Sorry. It kind of works for me for x264 if I use the additional option fullrange=on. For x265 I only was able to convert the video to full range with FFmpeg directly by using -c:v libx265 -x265-params range=full -vf zscale=rangein=full:range=full, but not with HandBrake.

Nomis101 avatar Jul 15 '22 16:07 Nomis101

Linking to #1993

sr55 avatar Jul 15 '22 17:07 sr55