Subtitle sidecars in the .sub family, and WebVTT style classes written as ASS, are not read as upstream reads them #251

Closed
opened 2026-10-11 12:46:40 +02:00 by Claude · 1 comment
Collaborator

What is left of #246, each measured or read against a private upstream v12.2:

  • .sub sidecars (MicroDVD, SubViewer and about thirteen other formats SubtitleEdit tries): the port sends them through ffmpeg to srt and reads that; upstream uses SubtitleEdit's own readers, so output may differ.
  • A WebVTT source with STYLE ::cue(.x) classes asked for as ass: upstream's WebVttToAssa is not ported; only the class-less case matches.
  • A very short legacy-encoded sidecar: the detector (BOM, valid UTF-8, then chardetng) agrees with upstream's UtfUnknown on 34 captured samples but not on a three-line cp1252 file, where upstream guesses wrong and serves Seńor.
  • <font color> names beyond the 140 web names (.NET system colours).
  • An ASS with [V4+ Styles] and no Style: line asked as ssa: upstream throws and answers 500; the port writes an empty-styles header.
  • The last SAMI cue's duration is from a simplified character count.

The readers and writers under crates/ephyra-http/src/routes/streaming/subtitle_*.rs follow SubtitleEdit's libse (LGPL-3.0) closely; landing them in this tree was accepted by the owner on 2026-10-11.

What is left of #246, each measured or read against a private upstream v12.2: - `.sub` sidecars (MicroDVD, SubViewer and about thirteen other formats SubtitleEdit tries): the port sends them through ffmpeg to srt and reads that; upstream uses SubtitleEdit's own readers, so output may differ. - A WebVTT source with `STYLE ::cue(.x)` classes asked for as `ass`: upstream's `WebVttToAssa` is not ported; only the class-less case matches. - A very short legacy-encoded sidecar: the detector (BOM, valid UTF-8, then `chardetng`) agrees with upstream's UtfUnknown on 34 captured samples but not on a three-line cp1252 file, where upstream guesses wrong and serves `Seńor`. - `<font color>` names beyond the 140 web names (.NET system colours). - An ASS with `[V4+ Styles]` and no `Style:` line asked as `ssa`: upstream throws and answers 500; the port writes an empty-styles header. - The last SAMI cue's duration is from a simplified character count. The readers and writers under `crates/ephyra-http/src/routes/streaming/subtitle_*.rs` follow SubtitleEdit's libse (LGPL-3.0) closely; landing them in this tree was accepted by the owner on 2026-10-11.
Author
Collaborator

Landed (six commits ending in the lint commit on main), each confirmed byte for byte on a private upstream: a .sub sidecar is read as upstream reads one — DVDSubtitle always ends the reader search first, so MicroDVD and SubViewer files answer 400 as upstream's do, and the same-format request returns the raw file; WebVTT STYLE classes written as ass (WebVttToAssa); the 33 system colour names on both paths; the last SAMI cue's duration counted in text elements (13 captures); an ASS header is a .NET format string, so a stray brace is the 500 and a missing Style: line is a 200 — the issue had that backwards. 49 new captures. The short-file charset case needs the whole detector and is filed with two smaller leftovers.

Landed (six commits ending in the lint commit on main), each confirmed byte for byte on a private upstream: a `.sub` sidecar is read as upstream reads one — DVDSubtitle always ends the reader search first, so MicroDVD and SubViewer files answer 400 as upstream's do, and the same-format request returns the raw file; WebVTT `STYLE` classes written as ass (`WebVttToAssa`); the 33 system colour names on both paths; the last SAMI cue's duration counted in text elements (13 captures); an ASS header is a .NET format string, so a stray brace is the 500 and a missing `Style:` line is a 200 — the issue had that backwards. 49 new captures. The short-file charset case needs the whole detector and is filed with two smaller leftovers.
Sign in to join this conversation.
No description provided.