Skip to content

External PGS sidecar files load and render (sup demuxer + bitmap cue decode) - #163

Merged
superuser404notfound merged 3 commits into
mainfrom
fix/sidecar-pgs
Jul 20, 2026
Merged

superuser404notfound merged 3 commits into
mainfrom
fix/sidecar-pgs

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Two compounding gaps made external PGS (.sup) subtitle files a silent no-show on every path: FFmpegBuild lacked the sup demuxer (fixed in 2.1.3, now pinned), so avformat_open_input rejected the file with AVERROR_INVALIDDATA; and the sidecar decode loop extracted only text rects, dropping bitmap rects. The loop now routes bitmap rects through the embedded path's imageForSubtitleRect into .image cues with PGS end semantics (an open composition ends at the next composition event's PTS instead of the flat 5 s fallback). Also fixes the frame compositor's bitmap placement (SubtitleImage.position is normalized against its canvas; the compositor treated it as absolute pixels). SidecarPGSDecodeTests decodes a real .sup fixture (local-only, skip-when-absent) and reproduced the exact field failure before the demuxer landed; full suite 794 green, tvOS sim build clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw

Vincent Herbst and others added 3 commits July 20, 2026 16:27
…contract

Positions are normalized against the canvas (or the frame when the
canvas is unknown); the compositor treated them as absolute canvas
pixels, which would have misplaced every bitmap cue.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw
External .sup/PGS sidecars decoded only text rects (silently empty). The
loop now routes bitmap rects through the embedded path's
imageForSubtitleRect and applies PGS end semantics: an open composition
is clamped to the next composition event's PTS instead of the flat 5 s
fallback. Test reproduces the field failure (openFailed INVALIDDATA)
until FFmpegBuild ships the sup demuxer.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw
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.

1 participant