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
Good shout for anime users though I would prefer this to be an opt in via load option to preserve the current lightweight & customisable rendering pipeline.
Obviously not my call but I’m just thinking out loud.
Good shout for anime users though I would prefer this to be an opt in via load option to preserve the current lightweight & customisable rendering pipeline.
Obviously not my call but I’m just thinking out loud.
Partial step shipped in 3.0.0: LoadOptions.preserveASSMarkup emits raw ASS event lines (override tags, style refs, escapes intact) and TrackInfo.assHeader exposes the script header, so hosts can render authored styling themselves today (@strangeliu's suggestion, opt-in as @DrHurt proposed).
Full libass rendering stays on the roadmap and is a bigger lift than it looks: libass plus freetype, fribidi, and harfbuzz need cross-builds for tvOS/iOS/macOS in FFmpegBuild (with the CoreText font provider instead of fontconfig), and animated ASS (karaoke, \move, \t) doesn't fit the engine's cue-based CGImage model, it needs a per-frame render surface synced to the playback clock. Keeping this issue open to track that work; it will land as an opt-in load option to preserve the current lightweight pipeline.
I’m inclined to say this type of implementation should be for host apps to implement not aether engine. So rendering remains the responsibility of host apps like it currently is.
So basically opt in via engine load options + host app renderer plugin.
I will need to do more reading to see what it would take for aether to output something that can be consumed by the above library!
I suspect the above lib would also need to be forked and modified to meet aether halfway (incremental subtitles instead of full file upfront).
Maybe one day an aether compatible fork of the above renderer can become a part of the aether project for hosts that want to implement it.
Full styled ASS/SSA rendering is now live in Sodalite, host-side via swift-ass-renderer exactly as proposed here, and the engine ships everything a host needs for the same integration (on current main, will be in the next tagged release):
The host contract
LoadOptions.preserveASSMarkup: true makes ASS/SSA cues carry the raw libavcodec event lines (ReadOrder,Layer,Style,...,Text, tags intact); timing is on the cue (startTime/endTime, source-PTS seconds).
TrackInfo.assHeader carries the track's script header; engine.fontAttachments carries the container's embedded fonts (write them to a directory and point FontConfig(fontsPath:) at it).
ASSScriptBuilder (engine utility) reassembles the incrementally streamed events plus the header into a complete script for loadTrack(content:)/reloadTrack(content:)-style whole-file renderers. It absorbs the real-world quirks we hit during device testing so hosts do not have to rediscover them: MKV CodecPrivate usually lacks the [Events] section (the builder synthesizes it), is frequently NUL-terminated (libass parses C-string-style and silently stops there; the builder strips NULs), and ReadOrder is hardcoded to 0 on every line in real files (dedupe is content-based, not ReadOrder-based).
Drive renderer.setTimeOffset from engine.clock.$sourceTime (same source-PTS coordinate as the cue times) and batch reloadTrack(content:) while events stream in; the side demuxer paces ~90 s ahead of the playhead, so a few seconds of batching costs nothing.
Verified on device (Apple TV 4K, tvOS 26) against anime MKVs: authored styling, fonts, and positioning render via libass, memory stays flat, and the engine remains rendering-free.
Thanks @DrHurt for steering this toward the host-plugin shape and pointing at swift-ass-renderer, @strangeliu for the raw-output suggestion that became the engine contract, and @edde746 for the original request. Closing as shipped; if a host integration hits something the contract does not cover, comment here and we will reopen.
exoplayer on Android flattens ASS into plain text by default similar to aether.
Android apps based on exoplayer often implement the libass plugin under an “enable ASS styling” toggle.
I have no strong feelings either way but I suggest Sodalite follows this as well. Default lightweight text rendering with a settings toggle for advanced rendering.
Rationale: ASS styling with libass is very good but isn’t perfect and forcing it on by default will cause issues sometimes. Also allowing plain text mode allows text customisations to apply (fonts, size, position, colour etc) when styling isn’t required.
Good instinct, and it is in already: Sodalite now has a "Styled ASS Subtitles" toggle in the playback settings (shipped right after the rendering itself). When it is off, ASS/SSA tracks go through the lightweight plain-text path and all the user's text customizations (size, color, background, position) apply, exactly the exoplayer-style split you describe.
One deliberate deviation: it defaults to ON rather than off. Reasoning: when a track ships authored styling, that styling is what the author intended viewers to see (positioning and styling often carry meaning in anime subs, signs, speaker colors), so it felt wrong to hide it behind a setting most users never open. The escape hatch for the cases where libass output is imperfect or someone simply prefers their own text settings is one switch away. Easy to revisit if real-world reports suggest the default should flip.
On the engine side, the host contract is now tagged: everything from the comment above (preserveASSMarkup, assHeader, fontAttachments, ASSScriptBuilder with the real-world MKV hardening) shipped in 3.1.0.
Activity
DrHurt commentedon Jun 9, 2026
Good shout for anime users though I would prefer this to be an opt in via load option to preserve the current lightweight & customisable rendering pipeline.
Obviously not my call but I’m just thinking out loud.
strangeliu commentedon Jun 10, 2026
maybe an option to output the raw ass output text
feat(subtitles): opt-in raw ASS event lines + TrackInfo.assHeader
superuser404notfound commentedon Jun 10, 2026
Partial step shipped in 3.0.0:
LoadOptions.preserveASSMarkupemits raw ASS event lines (override tags, style refs, escapes intact) andTrackInfo.assHeaderexposes the script header, so hosts can render authored styling themselves today (@strangeliu's suggestion, opt-in as @DrHurt proposed).Full libass rendering stays on the roadmap and is a bigger lift than it looks: libass plus freetype, fribidi, and harfbuzz need cross-builds for tvOS/iOS/macOS in FFmpegBuild (with the CoreText font provider instead of fontconfig), and animated ASS (karaoke,
\move,\t) doesn't fit the engine's cue-based CGImage model, it needs a per-frame render surface synced to the playback clock. Keeping this issue open to track that work; it will land as an opt-in load option to preserve the current lightweight pipeline.DrHurt commentedon Jun 10, 2026
There is an open source libass renderer for AVPlayer already available.
https://github.com/mihai8804858/swift-ass-renderer
I’m inclined to say this type of implementation should be for host apps to implement not aether engine. So rendering remains the responsibility of host apps like it currently is.
So basically opt in via engine load options + host app renderer plugin.
I will need to do more reading to see what it would take for aether to output something that can be consumed by the above library!
I suspect the above lib would also need to be forked and modified to meet aether halfway (incremental subtitles instead of full file upfront).
Maybe one day an aether compatible fork of the above renderer can become a part of the aether project for hosts that want to implement it.
superuser404notfound commentedon Jun 10, 2026
Full styled ASS/SSA rendering is now live in Sodalite, host-side via swift-ass-renderer exactly as proposed here, and the engine ships everything a host needs for the same integration (on current main, will be in the next tagged release):
The host contract
LoadOptions.preserveASSMarkup: truemakes ASS/SSA cues carry the raw libavcodec event lines (ReadOrder,Layer,Style,...,Text, tags intact); timing is on the cue (startTime/endTime, source-PTS seconds).TrackInfo.assHeadercarries the track's script header;engine.fontAttachmentscarries the container's embedded fonts (write them to a directory and pointFontConfig(fontsPath:)at it).ASSScriptBuilder(engine utility) reassembles the incrementally streamed events plus the header into a complete script forloadTrack(content:)/reloadTrack(content:)-style whole-file renderers. It absorbs the real-world quirks we hit during device testing so hosts do not have to rediscover them: MKV CodecPrivate usually lacks the[Events]section (the builder synthesizes it), is frequently NUL-terminated (libass parses C-string-style and silently stops there; the builder strips NULs), and ReadOrder is hardcoded to 0 on every line in real files (dedupe is content-based, not ReadOrder-based).renderer.setTimeOffsetfromengine.clock.$sourceTime(same source-PTS coordinate as the cue times) and batchreloadTrack(content:)while events stream in; the side demuxer paces ~90 s ahead of the playhead, so a few seconds of batching costs nothing.Sodalite's
ASSRenderCoordinatoris the reference implementation of this contract (about 150 lines): https://github.com/superuser404notfound/Sodalite/blob/main/Sodalite/Player/Subtitles/ASSRenderCoordinator.swiftVerified on device (Apple TV 4K, tvOS 26) against anime MKVs: authored styling, fonts, and positioning render via libass, memory stays flat, and the engine remains rendering-free.
Thanks @DrHurt for steering this toward the host-plugin shape and pointing at swift-ass-renderer, @strangeliu for the raw-output suggestion that became the engine contract, and @edde746 for the original request. Closing as shipped; if a host integration hits something the contract does not cover, comment here and we will reopen.
DrHurt commentedon Jun 10, 2026
That was incredibly fast.
exoplayer on Android flattens ASS into plain text by default similar to aether.
Android apps based on exoplayer often implement the libass plugin under an “enable ASS styling” toggle.
I have no strong feelings either way but I suggest Sodalite follows this as well. Default lightweight text rendering with a settings toggle for advanced rendering.
Rationale: ASS styling with libass is very good but isn’t perfect and forcing it on by default will cause issues sometimes. Also allowing plain text mode allows text customisations to apply (fonts, size, position, colour etc) when styling isn’t required.
Again no strong feelings, just thinking out loud.
superuser404notfound commentedon Jun 10, 2026
Good instinct, and it is in already: Sodalite now has a "Styled ASS Subtitles" toggle in the playback settings (shipped right after the rendering itself). When it is off, ASS/SSA tracks go through the lightweight plain-text path and all the user's text customizations (size, color, background, position) apply, exactly the exoplayer-style split you describe.
One deliberate deviation: it defaults to ON rather than off. Reasoning: when a track ships authored styling, that styling is what the author intended viewers to see (positioning and styling often carry meaning in anime subs, signs, speaker colors), so it felt wrong to hide it behind a setting most users never open. The escape hatch for the cases where libass output is imperfect or someone simply prefers their own text settings is one switch away. Easy to revisit if real-world reports suggest the default should flip.
On the engine side, the host contract is now tagged: everything from the comment above (
preserveASSMarkup,assHeader,fontAttachments,ASSScriptBuilderwith the real-world MKV hardening) shipped in 3.1.0.feat(subtitles): overlay fed by the pump tap; instant enable on remot…
fix(swplayback): name a software session that decodes into nothing (s…