Repository navigation
Description
What should the engine do?
Render in-band CEA-608/708 closed captions (eia_608, carried in the H.264 SEI). Today such a track is exposed and selectable but produces no cues — the side-demuxer decode path can't open it and there's no native closed-caption passthrough — so a source whose only caption track is 608 shows nothing.
Motivating media or use case
Remote progressive MP4 streams: H.264 1080p + AAC + eia_608 (+ mjpeg cover). The 608 track is the only subtitles. With LoadOptions.preferredSubtitleLanguages: ["en"] (or a manual selectSubtitleTrack) the engine activates it, then can't decode it:
[Demuxer] stream[2] type=subtitle codec=eia_608 1920x1080
[AetherEngine] preferred-subtitle auto-select stream=2 langs=["en"]
[AetherEngine] embedded subtitle decoder open failed for stream=2
memprobe … subActive=true subCues=0 subTracks=1
EmbeddedSubtitleDecoder.init? returns nil — avcodec_find_decoder has no decoder for AV_CODEC_ID_EIA_608 (FFmpegBuild doesn't enable ccaption/cc_dec). The result is subActive=true / subCues=0: a track that's "on" but blank for the whole title. The same media shows captions in players that render in-band CC. (AetherEngine 4.5.1, macOS / tvOS, native loopback-HLS.)
Why the side-demuxer path can't serve this: CEA-608/708 data lives in the video stream's A53 SEI, not in independently-demuxable subtitle packets — a side demuxer opening only the subtitle stream has nothing to decode even if ccaption were built. The captions ride with the H.264 the engine already stream-copies into the loopback segments.
Suggested direction (and the one design caveat): since the SEI-bearing H.264 is already stream-copied into the segments, the lowest-cost route on the native path is to advertise an EXT-X-MEDIA:TYPE=CLOSED-CAPTIONS group (instead of the current hardcoded CLOSED-CAPTIONS=NONE) and let AVPlayer render the 608/708 itself — no decoder, no extra muxing, and it survives PiP/AirPlay/external display like the #55 mov_text path. This is purely additive: every other subtitle codec (SRT/ASS/VTT, PGS/DVB/DVD, mov_text) keeps using the side-demuxer / subtitleCues path unchanged; only in-band 608/708 uses the new route.
The caveat worth designing around: CLOSED-CAPTIONS is a master-playlist construct, and this path currently serves media.m3u8 directly (useMaster=false) — deliberately, since the media-playlist route is what avoids the tvOS 26 DV -11868 rejection. So the CC group should engage only when an eia_608/708 track is actually present, and ideally not force master mode onto DV/HDR sources (e.g. gate to SDR, or accept master only for CC-bearing SDR). That keeps it zero-impact for the vast majority of content that has no in-band CC. (A heavier alternative — decode A53 side data off the stream-copied video into subtitleCues — would unify rendering with the host overlay and enable dual-subtitle styling, but needs ccaption in FFmpegBuild plus SEI extraction without a full decode.)
Activity
DrHurt commentedon Jun 26, 2026
This is a niche use case and I would urge not messing with playlist routing.
I prefer the extraction & conversion pathway which ffmpeg seems to support via
lavfibut I don’t know how much overhead that would add to the engine & existing pipelines (probably full stream decode which is too much)Then there’s also architectural consistency, keeping subtitles handling separate.
If this proves difficult to implement via lavfi, I would consider cost vs benefit and suggest leaving this for hosts that really need it to implement in their own host-specific forks.
Ultimately not my call but just thinking out loud.
DrHurt commentedon Jun 26, 2026
Sounds good especially if you’re able to implement this in an efficient way that preserves the overall architectural consistency of the engine by externalising subtitles handling leaving existing pipelines intact.
Render in-band CEA-608 closed captions (#77)
Merge: in-band CEA-608 closed captions rendered through host overlay (#…
chore(release): prep 4.6.0 - in-band CEA-608 closed captions (#77)
superuser404notfound commentedon Jun 27, 2026
Fixed in 4.6.0 via #81 (by @reckloon). A demuxable CEA-608 caption track (
eia_608/ QuickTimec608) that previously sat active-but-blank (subActive=true / subCues=0) now renders through the host overlay, decoded in-house off the producer's existing source connection with byte-identical loopback output.Scope of this first cut: 608 field-1 / channel CC1. Closing as the reported failure (a 608-only source showing nothing) is resolved. Remaining as follow-ons, open a new issue if you hit them: CEA-708 (DTVCC) decoding, 608 field 2 / channels CC2 to CC4, and the SEI-only carriage (captions embedded in the H.264 bitstream with no separate caption track).
fix(captions): guard the CC tap against pump overlap, clear cues on C…
chore(release): prep 4.6.1 - harden the in-band CEA-608 closed-captio…
docs: document in-band CEA-608 closed captions (#77)
feat(subtitles): pump tap harvests text-subtitle cues from the produc…
fix(subtitles): tap stream set must reach the producer init, before t…
fix(captions): put A/53 caption timestamps back on the source axis (s…