Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new blackbar detection mode for subtitles #821

Open
Jerroder opened this issue Apr 11, 2024 · 2 comments
Open

Add a new blackbar detection mode for subtitles #821

Jerroder opened this issue Apr 11, 2024 · 2 comments
Assignees

Comments

@Jerroder
Copy link

Feature request

What problem does this feature solve?

When watching a movie with blackbars, subtitles un-trigger the detection and top and bottom LEDs are turned of, except for white where the subtitles are.

What does the proposed API look like?

How should this be implemented in your opinion?

Instead of detecting blackbars based on the whole red area, the bottom zone should be split in the middle, something like the green area
subtitles

Are you willing to work on this yourself?

Sure I can write a little C++, but testing is a bit more complicated since HyperHDR is running on my webOS TV.

@awawa-dev awawa-dev self-assigned this Apr 11, 2024
@notjosh
Copy link

notjosh commented Aug 2, 2024

I was looking into this a little for myself, as I was having the same issue. I switched my blackbar detector to use letterbox mode and it solved (most) of my issues. (The only issue that remains is the case represented in your screenshot when there are 2 lines of subtitles - the bottom line is successfully ignored, but the top line will form part of the "image" and cause more white lighting than just the video content alone. This is a reasonable compromise though IMO.)

The original PR (here) that implemented the letterbox mode has a good screenshot to demonstrate how it works - at the top it checks points at 25%, 50%, and 75% across, and at the bottom only 25% and 75% (to avoid subtitles interfering, similar to how your screenshot suggests):

image

However I propose that the thresholds at the bottom should be user configurable - 25%/75% is a reasonable default, but I'd like to be able to use 15%/85% or 20%/80% for some content. And perhaps the documentation can clarify that it does actually make an effort to avoid the subtitle region.

I almost think there's an argument to rename letterbox mode to something like cinema (i.e. implying it's not just the letterbox black bars, but makes room for subtitles in TV/movies - which I think is a better default for most users), and default could get renamed to be more descriptive (like simple or naive). But that's a whole 'nother discussion out of scope of this issue.

@awawa-dev
Copy link
Owner

awawa-dev commented Aug 2, 2024

Sorry for the silence on the subject for now but currently I'm working on LUT calibration. I have this feature in mind with the fact that... why should we limit ourselves? let the user activate as many scanlines as he needs from the pool available (every 10%) at the top and bottom. this doesn't burden the processor so much even in the case of RPi. Blackborderdetection would have to be completely rewritten, but this is even better. Since I don't use this module I only have a doubt whether we should assume that the blackborder at the top has exactly the same height as the one at the bottom (+/- 2-3 pixels)? And if many vertical scan-lines (from top and bottom) are enough or oblique are still necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants