You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support the preserveASSMarkup option when loading external ASS subtitles #48
Currently, the preserveASSMarkup option supports only embedded subtitles. It would be very helpful if loading an external subtitle with selectSidecarSubtitle also preserved ASS markup and returned the ASS header.
Motivating media or use case
swift-ass-renderer can render external ASS subtitles, not only embedded ASS subtitles.
selectSidecarSubtitle(url:) now honours the session's LoadOptions.preserveASSMarkup for external .ass / .ssa files, exactly like embedded tracks:
Cues carry the raw libavcodec event line (override tags, style references, escapes intact) instead of stripped plain text.
The script header ([Script Info] + [V4+ Styles]) extracted from the sidecar's subtitle-stream extradata is surfaced on the new published engine.sidecarASSHeader (the sidecar analogue of TrackInfo.assHeader).
Wiring for swift-ass-renderer is unchanged from the embedded path: feed each cue's raw text + startTime / endTime into ASSScriptBuilder(header: engine.sidecarASSHeader), then hand builder.script() to loadTrack(content:). SRT / VTT sidecars and the text-only secondary channel are unaffected (no ASS payload, header stays nil).
Verified off-device by a new test that decodes a real ASS file through FFmpeg and asserts the override tags survive and the header feeds ASSScriptBuilder. It will ride the next tagged release.
Activity
feat(subtitles): preserve ASS markup for external sidecars (#48)
Merge feat/issue48-sidecar-ass-markup: preserve ASS markup for extern…
superuser404notfound commentedon Jun 17, 2026
Shipped on
main✅selectSidecarSubtitle(url:)now honours the session'sLoadOptions.preserveASSMarkupfor external.ass/.ssafiles, exactly like embedded tracks:[Script Info]+[V4+ Styles]) extracted from the sidecar's subtitle-stream extradata is surfaced on the new publishedengine.sidecarASSHeader(the sidecar analogue ofTrackInfo.assHeader).Wiring for swift-ass-renderer is unchanged from the embedded path: feed each cue's raw text +
startTime/endTimeintoASSScriptBuilder(header: engine.sidecarASSHeader), then handbuilder.script()toloadTrack(content:). SRT / VTT sidecars and the text-only secondary channel are unaffected (no ASS payload, header staysnil).Verified off-device by a new test that decodes a real ASS file through FFmpeg and asserts the override tags survive and the header feeds
ASSScriptBuilder. It will ride the next tagged release.Thanks for the clear request!
superuser404notfound commentedon Jun 17, 2026
Released in 3.10.0. Closing.
feat(subtitles): overlay fed by the pump tap; instant enable on remot…