ReviewOS

home-lang/home-os

Subtitles: SRT/VTT/ASS(text-level styling)/PGS rendering into the OSD layer, timing against the master clock, font fallback, size/position settings

#86
Open chris opened this 8 days ago ·
8 days ago

Epic: #113 · Milestone: MC6 — Media engine

Why

Subtitles are a top-3 media-center feature. Parsers exist in the stdlib (video/src/subtitles/{srt,ass,vtt,ttml,pgs}.zig); rendering needs the TrueType stack (#76) and the compositor's alpha layer.

Tasks

  • Parser bindings for SRT, VTT, ASS/SSA (support bold/italic/colour/position/alignment; full ASS animation out of scope), PGS bitmaps (decode RLE → alpha bitmap).
  • Renderer: outline + shadow text, safe-area positioning, 2-line wrap, ASS \pos/\an; PGS scaled to the UI plane.
  • Timing: cue scheduling on the master clock; seek invalidation; external file discovery (movie.en.srt) and embedded tracks; charset detection (UTF-8/UTF-16/latin-1 fallback).
  • Settings: size, colour, background box, vertical offset, default language.

Acceptance

Subtitle conformance samples render matching golden frames in QEMU; on the Pi, subtitle changes never cause a full UI-plane repaint (dirty-rect counter).

Size: M · Depends on: #76, #85 · Blocks: —

Sign in to comment on this issue.