Repository navigation
fix(subtitles): keep tvOS styled text size constant across content aspect ratios - #56
Conversation
…ratios libass keys font scaling to the video area (frame minus letterbox margins), so on tvOS — where the overlay is full-frame with margins marking the picture — wide-aspect (letterboxed) content rendered noticeably smaller subtitles than full-frame content. This read as '1080p vs 4K HDR' differences since mastering (bars cropped vs baked in) correlates with those libraries. Compensate the renderer font scale by frameHeight / videoAreaHeight so Silo-styled text is keyed to the full frame height regardless of the content's aspect ratio. Native ASS tracks stay uncompensated so authored typesetting keeps tracking the picture. No-op (factor 1.0) when margins are zero, i.e. everywhere the overlay is video-rect sized (iOS/macOS).
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Conflict in AVPlayerBackend.pumpSubtitleOverlay: kept this branch's text/bitmap split (textOverlayMayHaveFrame + pumpBitmapCues) and grafted in main's videoInsets plumbing to renderOnSessionQueue. Semantic follow-through: main's a8fd931 makes the tvOS subtitle overlay full-frame (video rect communicated via videoInsets), which broke this branch's assumption that overlay bounds == videoRect for bitmap cue placement. pumpBitmapCues now maps normalized PGS/DVD cue rects into the video rect derived from the insets (zero on iOS/macOS, so unchanged there), and the render key tracks the video rect instead of raw bounds. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0146hwg1Q15YdeUhd9f37NWA
Summary
libass keys font scaling to the video area (frame minus letterbox margins). On tvOS the subtitle overlay is full-frame with margins marking the picture, so letterboxed (wide-aspect) content rendered ~25% smaller subtitles than full-frame content. This read as "1080p vs 4K HDR" size differences in practice, since mastering (black bars cropped vs baked into the frame) correlates with those libraries.
SubtitleRenderernow compensates the renderer font scale byframeHeight / videoAreaHeight, re-keying Silo-styled text to the full frame height regardless of the content's aspect ratio. Details:1.0whenever margins are zero, so iOS/macOS (video-rect-sized overlays) are unaffected.Test plan
Notes
Split out from #55 (tvOS size-ladder rebase) so the two changes land independently. Best reviewed/merged alongside it.