Skip to content

feat(tv-settings): opt-in True Black Bars for grey HDR letterbox bars - #477

Merged
Quick104 merged 2 commits into
mainfrom
fix/issue-475-true-black-bars
Oct 6, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/issue-475-true-black-bars

Conversation

@Quick104

@Quick104 Quick104 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On some Android TV devices, the letterbox bars of a Dolby Vision title whose picture is narrower than 16:9 glow dim grey instead of black. On an OLED they are clearly lighter than the bezel. The report came from an Onn 4K Pro (Android TV 14) on an LG OLED. HDR10 and SDR bars are black there, and the same files show black bars on an Nvidia Shield.

The TV player sizes the video surface to the picture, so the bar rows contain only the player's own opaque black. On that device the hardware composer puts the app layer above reference black while Dolby Vision is on. Bars that are part of the video stay black. Other players on the same box behave the same way.

Leaving the bars transparent fixes it on some devices but causes it on others. Kodi and NuvioTV report that transparent bars fix Sony TVs and some Amlogic boxes, while Fire TV devices (MediaTek MT8696 and the Amlogic Fire TV Cube 3) and the Google TV Streamer need opaque black. No SoC field or platform API separates the two groups, which is why Kodi and NuvioTV also ended up with a manual override.

Solution

  • Add a True Black Bars toggle to Android TV Settings → Playback → Streaming, off by default, with a footer line saying when to try it and when to turn it off again. It is stored locally for the server, profile and device, like Force HDR Passthrough. It never syncs to the server, and Reset Playback Overrides clears it.
  • With the toggle on, once the first video frame has rendered and no navigation fade is running, the player clears its area to transparent instead of painting it black. The bars then come from the output's own black. The fade draws the player into a layer, where clearing would let the other screen show through, so the black plate stays during fades in and out.
  • The player clears rather than just skipping the plate. Skipping it left the controls' pixels behind in the bars after they hid, because nothing else repaints that area. Clearing also removes the theme's window background underneath.

Android TV only. tvOS draws its own letterbox and has no report of this, and the phone app doesn't send Dolby Vision over HDMI.

Closes #475

Validation

Tested with an R8 release build of the PR head against a disposable Silo dev deployment (silo-server main at c7621772d) on an Android TV emulator (API 36), using a 1920×816 movie and a 1920×800 series.

  • Not verified on affected hardware. The emulator composites in SDR and shows black bars whether the toggle is on or off, so it can't reproduce the grey bars. The reporter is testing this build on the Onn.
  • The toggle defaults to off, turns on and off, and keeps its value across restarts.
  • With the toggle on, the bars sample pure black with the controls hidden. The controls draw over both the picture and the bars, and the bars are clean again after the controls hide. Results with the toggle off are identical.
  • Up Next and auto-advance to the next episode look the same with the toggle on. The Up Next check used the debug build of the same commit, which allows seeking over adb.
  • ./gradlew testDebugUnitTest: pass (shared 1598, android-shared 1679, androidApp 803, androidTvApp 1199).
  • :android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug :androidTvApp:lintVitalRelease: pass, with no new errors over the baselines.
  • :androidTvApp:assembleDebug, :androidTvApp:assembleRelease: pass.

Validation tasks: unknown; the validation board couldn't be read for this PR.

Evidence: https://evidence.siloserver.org/r/silo-android/issue-475/

Risks

  • On a device that composites the other way (Fire TV, Google TV Streamer), turning the toggle on makes the bars grey. The footer tells people to turn it off if the bars get lighter.
  • Some devices show a thin bright line where transparent bars meet the picture (NuvioTV saw this on a Xiaomi TV Stick 4K). Turning the toggle off removes it.
  • The toggle is per profile, so each profile on a box turns it on separately.

Follow-ups

AI disclosure

  • Harness: Claude Code, with the T3 Code host
  • Model: claude-opus-5-5
  • Tools: shell, adb, Gradle, an Android TV emulator, a disposable Silo dev deployment
  • Involvement: Fully AI-generated at the maintainer's request
  • Adversarial review: a multi-agent Claude Code review (finders on correctness, callers, contract and failure, and conventions; a verifier; and a sweep) checked the diff. It found a one-frame lag in an earlier window-background design, show-through during the navigation cross-fade, and inaccurate settings copy. All three were fixed, partly by redesigning around the first-frame gate. An emulator check after that review found the stale controls in the bars, which led to the clear. A cross-provider review by Codex (gpt-6.1-sol) then checked compositing with BlendMode.Clear, the first-frame latch across playback paths, lifecycle, settings plumbing, copy, product exposure, and whether the setting could be a detected default. It found one low-severity issue: a first frame during the navigation fade let the outgoing page show through the bars. That was fixed by keeping the plate until navigation settles. It found nothing else.

🤖 Generated with Claude Code

Note

Add opt-in True Black Bars setting for TV player

  • Adds a per-profile TrueBlackBars playback setting, defaulting to false, with a toggle in the TV playback settings pane. The key is local-only and excluded from DeviceSettings (PlaybackSettingsKeys.kt).
  • TvPlayerScreen keeps its black root background until the first rendered frame, during navigation transitions, and while the setting is off. When enabled and navigation settles, it clears the root drawing with BlendMode.Clear so letterbox areas become transparent instead of grey HDR black.
  • Adds trueBlackBarsFlow and setTrueBlackBars to PlayerSettingsStore with no-op defaults, implemented in AndroidPlayerSettingsStore; the stored value is also removed when profile playback preferences are cleared.
  • Behavioral Change: the player root background is now conditional in TvPlayerScreen.kt; implementations of PlayerSettingsStore that do not override the new members report false and no-op.

Macroscope summarized 389f3c5.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7567322d-f211-44a3-be92-ba5e4ba6b13c
📥 Commits

Reviewing files that changed from the base of the PR and between 535ddda and 389f3c5.

📒 Files selected for processing (8)
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/AndroidPlayerSettingsStore.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/PlayerSettingsStore.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsViewModel.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/settings/PlaybackSettingsKeys.kt
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-kody

silo-kody Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 1 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Validate download ownership before publishing subtitle bytes

@Quick104
Quick104 marked this pull request as ready for review October 6, 2026 00:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T00:51:36.118771Z 389f3c5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Quick104 and others added 2 commits October 5, 2026 20:45
On some Android TV devices, such as the Onn 4K Pro, the letterbox bars of
a Dolby Vision title narrower than 16:9 glow grey. The bar rows hold only
the player's opaque black, and the device composites that black above
reference black while Dolby Vision is on. Other devices do the opposite,
and no platform signal tells them apart.

Add an off-by-default, device-local True Black Bars toggle under Settings
> Playback > Streaming. When it is on and the first frame has rendered,
the player clears its area to transparent instead of painting it black,
so the bars come from the output's own black. Reset Playback Overrides
clears it, and it never syncs to the server.

Refs #475

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The navigation fade draws the player into a layer, so clearing it there
let the other screen show through the bars. Clear only after the first
frame and once the transition has settled. Found in cross-provider review.

Refs #475

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebc7411904

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

.background(Color.Black)
.then(
if (clearBars) {
Modifier.drawBehind { drawRect(Color.Transparent, blendMode = BlendMode.Clear) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose a transparent host surface before clearing the bars

When True Black Bars is enabled, this Clear draw still targets an opaque activity surface: Theme.SiloTv inherits the non-translucent Material theme and sets android:windowBackground to the fully opaque #FF141417. Android therefore discards the cleared alpha outside the SurfaceView's own transparent region, leaving black pixels in the app layer rather than exposing the output beneath it. On the affected HDR devices, the toggle consequently cannot change the compositing path that produces grey bars; the player must first provide a genuinely transparent window/surface region for the letterbox area.

Useful? React with 👍 / 👎.

@Quick104
Quick104 force-pushed the fix/issue-475-true-black-bars branch from ebc7411 to 389f3c5 Compare October 6, 2026 00:49
@silo-kody

silo-kody Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 merged commit 81e9206 into main Oct 6, 2026
6 checks passed
@Quick104
Quick104 deleted the fix/issue-475-true-black-bars branch October 6, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Android TV shows grey letterbox bars on Dolby Vision titles narrower than 16:9

1 participant