Skip to content

feat(playback): measure baked-in letterbox so clients can keep subtitles on the picture - #483

Closed
RXWatcher wants to merge 8 commits into
Silo-Server:mainfrom
RXWatcher:feat/letterbox-crop-detect
Closed

RXWatcher wants to merge 8 commits into
Silo-Server:mainfrom
RXWatcher:feat/letterbox-crop-detect

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A 2.39:1 image mastered inside a 1920x1080 frame — routine on WEB-DL sources — is a 16:9 video as far as the container, the probe, SourceDescriptorV3.Width/Height, and every client's video layer are all concerned. The black bars are pixels, not geometry anyone declares.

The consequence lands on subtitles: a client anchors cues to the bottom of the video rect, the video rect covers the full frame, and the cues render inside the baked-in bar instead of over the picture. There is no client-side fix, because nothing the client can see distinguishes this source from a genuine 16:9 one.

Approach

Measure it server-side and publish it. internal/playback/letterbox_detect.go runs ffmpeg's cropdetect at four points spread across the runtime and intersects the results, keeping the smaller bar per edge — one frame cannot tell a bar from a fade to black, a night exterior, or titles over black, but a real baked-in bar is in every frame, so the minimum converges on the truth while transient dark frames drop out. Each edge is measured independently; symmetry is not assumed.

Results are published as fractions of frame height, so a client insets its overlay without knowing the frame's dimensions:

  • SourceDescriptorV3.letterbox_top_fraction / letterbox_bottom_fraction (v3 plan)
  • the same two fields on the v2 playbackSessionResponse — the Apple clients do not speak v3, and this is the response they decode

Both are additive and omitempty. Absent means "not measured", which is exactly what a failed measurement reports, so every existing client keeps doing what it already did.

Guardrails

  • Never blocks a playback start. Detection decodes frames. LetterboxCache returns what is already known and warms the measurement in the background, detached from the request context so a client disconnect cannot cancel it. The first play of a file plans without geometry — today's behavior — and later plays carry it.
  • The planner stays a pure decision function. PlannerInputV3.Letterbox is supplied by the caller; nothing under internal/playback planning shells out.
  • Absurd measurements are refused rather than guessed at. Under 2% per edge is rounding noise; over 25% would leave half a frame and would put cues mid-picture if acted on. Both collapse to "not measured". Clients clamp independently as well.
  • A zero result is cached. "Measured, no bars" must not re-probe on every play of a normal 16:9 file.
  • Replaced files re-measure. The cache key is path + file size, so an in-place upgrade or re-encode cannot keep serving the old file's bars.
  • The cache is bounded at 4096 entries, evicted oldest-first.

Known limits / follow-up

  • In-memory, so cold after a restart. The natural home is a column on the media file row, written by the scanner/probe rather than lazily at playback. Deliberately out of scope here — that is a migration and a scanner change, and this PR is meant to be one concern. Worth an issue if the approach is accepted.
  • Only sources with a known frame height and duration are measurable; anything else returns zero.

Testing

  • 11 unit tests in internal/playback/letterbox_detect_test.go covering the parse (including malformed and self-contradictory output), the intersection, the sanitising thresholds, sample placement, cache-key invalidation, eviction, and the nil/unmeasurable-input paths.
  • go test ./internal/playback/ ./internal/api/handlers/ green apart from three pre-existing NVENC-probe failures that also fail on a clean main (they probe for NVIDIA hardware and this is a Mac).
  • make lint and make verify-local-paths clean for the touched files.
  • Verified end to end on real content. A build of this branch ran on my server against the Android TV client: a 2.39:1 title measured 12.78% per edge — matching (1080 − 1920/2.39) / 2 / 1080 — and the subtitles moved off the bar and onto the picture.

Client side

AI-use disclosure

Written by Claude Opus 5 (Claude Code) working with @RXWatcher, who directed the approach, reviewed the change, and ran the end-to-end verification described above.

Summary by CodeRabbit

  • New Features

    • Playback now detects baked-in black bars in video content.
    • Playback responses include optional top and bottom letterbox measurements.
    • Detected measurements are used to improve playback planning across alternate sources.
    • Measurements are cached and warmed in the background to reduce delays during playback.
  • Bug Fixes

    • Improved handling of inconsistent or transient dark frames by validating measurements across multiple samples.

Maintainer remediation AI disclosure

  • Tool(s): Codex in T3 Code
  • Model(s): gpt-5.6-sol
  • Involvement: AI-assisted
  • Adversarial review: Independent Standards and Spec reviews found unbounded background FFmpeg measurement work and acceptance of incomplete four-point sampling. The maintainer-assisted commit bounds work to two non-blocking measurements, preserves retry eligibility, and requires all four samples. Final independent Standards and Spec reviews found no new remediation defect; architecture-, API-design-, author-process-, and Fowler-heuristic observations were left report-only.

Verification evidence for the maintainer-assisted commit:

go test -race ./internal/playback -run 'TestIntersectLetterboxSamplesRequiresEveryPoint|TestCacheBoundsConcurrentMeasurementsAndRetriesDroppedWarm' -count=20
PASS

golangci-lint run --new-from-rev e338f9ebd54176a769ae8b9e5743b88dcb8f045c
0 issues.

go vet ./internal/playback ./internal/api/handlers
PASS

go build ./cmd/silo
PASS

make verify-local-paths
PASS

git diff --check
PASS

cd web && pnpm run build && pnpm run format:check
PASS

cd web && pnpm run lint
PASS (158 existing warnings, 0 errors)

make lint
BASELINE FAILURE (306 findings unrelated to this PR)

Configured dev-backend deployment under the shared backend lock:
/api/v1/ready -> {"status":"ok"}
three distinct playback starts -> HTTP 201, HTTP 201, HTTP 201
first wave -> exactly two concurrent cropdetect measurements
overflow source -> retried after a slot freed; total measurements advanced to three
measurement durations -> 2126 ms, 1983 ms, 1525 ms
post-deploy panic/migration/readiness scan -> clean

Maintainer merge-conflict resolution AI disclosure

  • Tool(s): Codex in T3 Code
  • Model(s): gpt-5.6-sol
  • Involvement: AI-assisted
  • Adversarial review: Independent Standards and Spec refreshes confirmed that the resolutions retain both sides of each overlap: DVRPUStrippable plus Letterbox in all planner calls, and VideoCopyUnsafe plus both letterbox fields in SourceDescriptorV3. No new Standards or Spec finding was introduced; the six prior report-only Standards observations remain unchanged.

Verification evidence for merge commits 4c3b636d and a95766e2:

git merge-tree --write-tree HEAD <live-main-sha>
exit 0

patch-scoped golangci-lint against the live base
0 issues.

focused letterbox, Dolby RPU, copy-safety, and planner race tests (-count=20)
PASS

focused protocol-v3 start/replan handler tests (-count=20)
PASS

go vet ./internal/playback ./internal/api/handlers
PASS

go build ./cmd/silo
PASS

make verify-local-paths
PASS

git diff --check
PASS

Configured dev-backend deployment under the shared backend lock:
/api/v1/ready -> {"status":"ok"}
two protocol-v3 playback starts -> HTTP 201/playable, HTTP 201/playable
letterbox measurements across both starts -> 1 (cached on the second start)
panic/migration/readiness errors -> 0
probe sessions cleaned -> true

RXWatcher and others added 4 commits July 26, 2026 07:34
…ys on the picture

Some sources encode a 2.39:1 image inside a 1920x1080 frame — Disney+ and
Netflix WEB-DLs routinely do. The container, the video track and every
metadata field then describe a full-height 16:9 video, and only the pixels
reveal the black bars. A client anchoring subtitles to the bottom of that
frame draws them inside the bar instead of over the image, which is exactly
what Silo's TV client does today.

Measure the bars with ffmpeg cropdetect and publish them on the plan's
source descriptor as fractions of the frame height, so a client can inset an
overlay without knowing the frame's dimensions.

Sampling is what makes this trustworthy. One frame cannot tell a bar from
the content: a fade to black, a night exterior, or titles over black all
look identical to a letterbox. Four samples spread across the runtime are
intersected by keeping the SMALLER bar per edge, which is the one present in
every frame. Measured on a real 2.39:1 episode, the four samples were 12.78%
/13.52%/12.78%/12.78% and the intersection lands on 12.78% — matching
(1080 - 1920/2.39) / 2 / 1080 exactly, with the dark-scene sample discarded.

Detection never blocks a playback start: a start reads whatever has already
been measured and warms the rest in the background, so the first play of a
file plans exactly as it does today and later plays carry the geometry.
Failure, an unmeasurable source, and "no bars" are all the same absent
value, so nothing regresses when ffmpeg is unavailable.

Bars below 2% are rounding noise and above 25% are likelier a bad read than
a real letterbox; both are refused rather than acted on.

Additive per the v1 API rules: new omitempty fields on an existing response,
no field renamed, removed or retyped.

Follow-up: silo-apple needs the same client-side inset to benefit.
Verifying the feature end to end needs to tell 'measured, no bars' apart
from 'never measured'. One line per source, at Info: it fires once per file
for the process lifetime, and it carries the fractions and how long the
measurement took (580ms on a 1080p WEB-DL over network storage).
The v3 plan already carries the baked-in letterbox on its source
descriptor, but the Apple clients do not speak v3 — they decode
`playbackSessionResponse`. Without the fractions there, tvOS keys its
subtitle overlay to `AVPlayerLayer.videoRect`, which covers the full
frame on a 2.39:1-inside-1080p source, and cues land in the black bar.

Additive fields on an existing response, omitted when nothing was
measured, so older clients are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Db4dSxN9tH8yN7uUP549tK
Two problems with keying measurements on the file path alone.

Replacing a file in place — a release upgrade, a re-encode — keeps the
path, so the old file's bars would be served forever with nothing a user
could do to clear them. The key now includes the file size, which changes
on any real replacement.

And the map grew one entry per file ever played, which on a long-lived
server with a large library is a slow leak. Bounded at 4096 entries,
evicted oldest-first: the cost of a wrong eviction is one re-measurement
of something nobody has watched in a long time.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Db4dSxN9tH8yN7uUP549tK
@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds FFmpeg-based letterbox detection with asynchronous caching, then propagates measured top and bottom bar fractions through v3 planning and legacy playback responses.

Changes

Letterbox playback integration

Layer / File(s) Summary
Detection and cache implementation
internal/playback/letterbox_detect.go, internal/playback/letterbox_detect_test.go
Samples FFmpeg cropdetect output, sanitizes and intersects measurements, caches results by file identity, limits concurrent warmups, and tests parsing, caching, eviction, and concurrency behavior.
Planner and source contract
internal/playback/plan_v3.go, internal/playback/protocol_v3.go, internal/playback/letterbox_detect_test.go
Adds caller-supplied letterbox geometry to v3 planning and optional source JSON fields, with tests for propagation and omission of unmeasured values.
Playback handler propagation
internal/api/handlers/playback.go, internal/api/handlers/playback_v3.go
Lazily initializes the cache, supplies measurements during initial and alternate planning, and includes fractions in legacy playback responses.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant PlaybackHandler
  participant LetterboxCache
  participant DetectLetterbox
  participant FFmpeg
  Client->>PlaybackHandler: Start playback
  PlaybackHandler->>LetterboxCache: Lookup media path and size
  LetterboxCache->>DetectLetterbox: Warm cache miss asynchronously
  DetectLetterbox->>FFmpeg: Run cropdetect samples
  DetectLetterbox-->>LetterboxCache: Store measured fractions
  PlaybackHandler->>PlaybackHandler: Plan playback with letterbox geometry
  PlaybackHandler-->>Client: Return playback source and fractions
Loading

Possibly related PRs

Suggested labels: v1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: detecting baked-in letterbox bars so clients can place subtitles correctly.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot added the v1.0 Silo v1 scope - auto-adds to the Silo v1 project label Jul 26, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
internal/playback/letterbox_detect.go (1)

270-320: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Background measurement is untethered from shutdown and unguarded against panics.

Warm()'s goroutine derives its context from context.Background() (line 291), so background ffmpeg processes are never cancelled on server shutdown/restart — a rolling deploy could leave orphaned ffmpeg child processes behind. There's also no recover() around the goroutine body: an unhandled panic here (e.g. from a future edge case in parsing or exec) terminates the entire process, not just this goroutine, since it runs detached in the background for every uniquely-sized file played.

Consider accepting a caller-supplied lifecycle context (so the handler can plumb through an app-shutdown context) and adding a recover() to keep inflight cleanup safe and the process alive.

♻️ Suggested hardening
-func (c *LetterboxCache) Warm(key, inputPath string, durationSeconds float64, frameHeight int) {
+func (c *LetterboxCache) Warm(ctx context.Context, key, inputPath string, durationSeconds float64, frameHeight int) {
 	if c == nil || strings.TrimSpace(inputPath) == "" || durationSeconds <= 0 || frameHeight <= 0 {
 		return
 	}
 	...
 	go func() {
+		defer func() {
+			if r := recover(); r != nil {
+				slog.Error("letterbox measurement panicked", "component", "playback", "input", inputPath, "panic", r)
+			}
+		}()
 		// Detached from the request that triggered it: the answer is for the
 		// NEXT play, so a client disconnecting must not cancel the measurement.
-		ctx, cancel := context.WithTimeout(context.Background(), sampleTimeout*sampleCount)
+		detachedCtx, cancel := context.WithTimeout(context.WithoutCancel(ctx), sampleTimeout*sampleCount)
 		defer cancel()
 		...
-		value := DetectLetterbox(ctx, inputPath, durationSeconds, frameHeight, ffmpegPath)
+		value := DetectLetterbox(detachedCtx, inputPath, durationSeconds, frameHeight, ffmpegPath)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/playback/letterbox_detect.go` around lines 270 - 320, Update
LetterboxCache.Warm to accept and use a caller-supplied lifecycle context
instead of context.Background(), preserving the timeout while allowing shutdown
cancellation. Add panic recovery around the background goroutine so inflight
cleanup always occurs and a panic is logged without terminating the process;
ensure the key is removed from c.inflight on both normal completion and panic.
internal/playback/letterbox_detect_test.go (1)

170-180: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

This test doesn't exercise the planner it describes.

The comment states "the planner must pass a measurement through to the client contract verbatim," but the test only assigns fields directly on a bare SourceDescriptorV3{} and reads them back — that's tautological (Go field assignment), not a check of PlanPlaybackV3's actual wiring at plan_v3.go lines 90-91. Consider replacing this with a test that calls PlanPlaybackV3 with a PlannerInputV3.Letterbox set and asserts the resulting result.Plan.Source fields.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/playback/letterbox_detect_test.go` around lines 170 - 180, The test
TestPlannerPublishesLetterboxOnTheSource currently verifies only direct field
assignment instead of planner wiring. Replace it with a call to PlanPlaybackV3
using PlannerInputV3.Letterbox populated with the top and bottom measurements,
then assert result.Plan.Source preserves both values verbatim.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/playback/letterbox_detect_test.go`:
- Around line 170-180: The test TestPlannerPublishesLetterboxOnTheSource
currently verifies only direct field assignment instead of planner wiring.
Replace it with a call to PlanPlaybackV3 using PlannerInputV3.Letterbox
populated with the top and bottom measurements, then assert result.Plan.Source
preserves both values verbatim.

In `@internal/playback/letterbox_detect.go`:
- Around line 270-320: Update LetterboxCache.Warm to accept and use a
caller-supplied lifecycle context instead of context.Background(), preserving
the timeout while allowing shutdown cancellation. Add panic recovery around the
background goroutine so inflight cleanup always occurs and a panic is logged
without terminating the process; ensure the key is removed from c.inflight on
both normal completion and panic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c93c9dd5-96f6-433d-9bb4-375f0180d1a9

📥 Commits

Reviewing files that changed from the base of the PR and between 02203d9 and 82658d0.

📒 Files selected for processing (6)
  • internal/api/handlers/playback.go
  • internal/api/handlers/playback_v3.go
  • internal/playback/letterbox_detect.go
  • internal/playback/letterbox_detect_test.go
  • internal/playback/plan_v3.go
  • internal/playback/protocol_v3.go

The background measurement deleted its inflight key only on the success
path. Any early return or panic left the key behind, and Warm treats a
present key as "already running" — so that file would never be measured
again for the life of the process. Released in a defer instead.

An unrecovered panic there would also take the server down: the
goroutine is detached, so nothing upstream would catch it. A subtitle
overlay is not worth that.

Also replaces a tautological planner test — it assigned struct fields and
read them back — with one that calls PlanPlaybackV3 and asserts the plan
carries the measurement. Verified it fails when the wiring in plan_v3.go
is removed. Adds a companion test that an unmeasured source omits the
fields from the wire entirely, so "not measured" stays distinguishable
from a real zero.

Reported by CodeRabbit on Silo-Server#483.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Db4dSxN9tH8yN7uUP549tK
@RXWatcher

Copy link
Copy Markdown
Contributor Author

Both nitpicks were fair. Addressed in e338f9e.

1. Background goroutine — fixed, and there was a worse bug underneath it than the one reported.

The inflight key was deleted only on the success path. Any early return or panic left it behind, and Warm treats a present key as "a measurement is already running" — so that file would never be measured again for the life of the process, silently. It's released in a defer now, which also covers the panic case.

Added the recover() as suggested. The goroutine is detached, so nothing upstream would catch a panic there and a subtitle overlay is not worth taking the server down for.

2. Shutdown context — skipped, with a reason.

The suggested context.WithoutCancel(ctx) only helps if the caller supplies an application-lifecycle context, and the only context the handler has is the request's — which is precisely the one that must not cancel this work, since the measurement is for the next play. Plumbing a real lifecycle context down to the cache is worth doing, but it's a change to how the handler is constructed rather than to this file, and it belongs with the persistence follow-up already noted in the PR description (the measurement wants to live on the media file row, at which point the cache's lifetime question changes shape entirely).

Meanwhile the exposure is bounded: each ffmpeg sample is a CommandContext with a 20s timeout, and container teardown kills the process group regardless. Happy to do it here instead if you'd rather not carry it.

3. Tautological test — replaced.

Correct, that test asserted Go's assignment operator works. It now calls PlanPlaybackV3 with PlannerInputV3.Letterbox set and asserts result.Plan.Source carries both fractions. I checked it isn't vacuous by deleting the two wiring lines in plan_v3.go and confirming it fails:

--- FAIL: TestPlannerPublishesLetterboxOnTheSource
    plan did not carry the measurement: {... LetterboxTopFraction:0 LetterboxBottomFraction:0}

Added a companion test that an unmeasured source omits the fields from the wire entirely, so a client can distinguish "not measured" from a real zero without a sentinel.

go test ./internal/playback/ is green apart from four NVENC/hwaccel tests that fail identically on a clean upstream/main worktree here — they probe for NVIDIA hardware and this is a Mac.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/catalog/provider_id_repo.go (1)

102-116: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Detect slug-form IDs during cross-item ownership checks.

The local comparisons now accept 1931-slug, but the owner query still requires tmdb_id = "1931". A second item can therefore be assigned 1931 while another item retains 1931-slug, creating duplicate logical ownership.

  • internal/catalog/provider_id_repo.go#L102-L116: make the owner lookup recognize the same normalized numeric ID (or canonicalize legacy values before enforcing ownership).
  • internal/catalog/provider_id_tmdb_match_test.go#L9-L41: add a repository-level regression creating another item with 1931-slug and assert that attaching 1931 fails without mutation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/catalog/provider_id_repo.go` around lines 102 - 116, Update the
owner lookup in the repository method around sameTMDBID so it compares the
normalized numeric TMDB ID, allowing slug-form values such as 1931-slug to
conflict with 1931; preserve transactional failure without mutation. In
internal/catalog/provider_id_tmdb_match_test.go lines 9-41, add a
repository-level regression that creates a second item with 1931-slug, attempts
to attach 1931, and asserts the operation fails and makes no mutation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@internal/catalog/provider_id_repo.go`:
- Around line 102-116: Update the owner lookup in the repository method around
sameTMDBID so it compares the normalized numeric TMDB ID, allowing slug-form
values such as 1931-slug to conflict with 1931; preserve transactional failure
without mutation. In internal/catalog/provider_id_tmdb_match_test.go lines 9-41,
add a repository-level regression that creates a second item with 1931-slug,
attempts to attach 1931, and asserts the operation fails and makes no mutation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 79a15730-bf0a-47ff-b8ec-e56d06290f8d

📥 Commits

Reviewing files that changed from the base of the PR and between 82658d0 and 39069a5.

📒 Files selected for processing (4)
  • internal/catalog/provider_id_repo.go
  • internal/catalog/provider_id_tmdb_match_test.go
  • internal/playback/letterbox_detect.go
  • internal/playback/letterbox_detect_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • internal/playback/letterbox_detect_test.go
  • internal/playback/letterbox_detect.go

@RXWatcher
RXWatcher force-pushed the feat/letterbox-crop-detect branch from 5e87027 to e338f9e Compare July 26, 2026 14:11
@RXWatcher

Copy link
Copy Markdown
Contributor Author

Force-pushed to trim this branch back to the letterbox concern only. Two unrelated fixes had accumulated on it while I was testing against my own deployment; they are now separate PRs:

No letterbox commits changed; the previously reviewed content is intact.

@zZebrahz

zZebrahz commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Wondering how this will work for sources where the letterbox changes mid-video? There are multiple occasions where letterbox is used as a visual tool in the media itself. There are others, such as ones filmed in IMAX that have certain scenes that expand to fill the 16x9 frame while other scenes remain 2.39.

@zZebrahz

zZebrahz commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Also want to ensure that this only affects Lower Third placement and not Bottom placement

@Quick104

Copy link
Copy Markdown
Contributor

Closing after review because baked-in matte detection should be client-owned. Clients can inspect the actual decoded frames, handle changing aspect ratios, and apply platform-specific video and subtitle layout without adding a lazy process-local server probe or API contract. Android already follows that model; Apple work should do the same. Thanks for exploring and documenting the case.

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

Labels

v1.0 Silo v1 scope - auto-adds to the Silo v1 project

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants