Repository navigation
Description
Same context as the reload-with-options ask filed alongside this one: closed-source tvOS Jellyfin client, pinned 6.60.0 (771d8592). AetherEngine is the shipped engine for VOD, live TV and the guide's picture-in-guide. TVVLCKit — the last engine we could hand a struggling session to mid-flight — is being removed this cycle. What remains beside AetherEngine is an AVPlayer rung (our HLS/fallback leg, multiview tiles) and Jellyfin's server-side transcode; both are demote destinations reached by tearing the session down and starting the item over, and for two of the three cases below AVPlayer rides the same VideoToolbox decoder and the same audio-compat set, so it is not an alternative decoder either. Every one of those answers costs the viewer a visible restart. These are three places where an IN-PLACE answer would have to come from your API.
What happens today. When a source's audio can neither stream-copy into fMP4 nor go through
the bridge, the session plays video-only and the host is never told as a typed fact. The
classification site logs before the cascade has decided ("[HLSVideoEngine] audio: codec id=… unsupported, video-only", Video/HLSVideoEngine.swift:1595); the real decision is inside
buildProducerWithAudioCascade (Video/HLSVideoEngine+AudioRoute.swift): any present audio stream
still gets a bridge attempt (:198), and an AudioBridge init failure that is not an
encoderNotFound with another encoder left to try breaks the cascade — "[HLSVideoEngine] ERROR: AudioBridge init failed (…), no working bridge encoder, falling back to SILENT video-only"
(HLSVideoEngine+AudioRoute.swift:231-232, break attempts :235; the header-write failure lands
in the same place) — and the tail clears the pipeline (audioPipelineDescription = nil,
HLSVideoEngine+AudioRoute.swift:294). state becomes .playing. No PlaybackErrorKind — by the
taxonomy's lights nothing failed.
That tail is #165's (closed, fixed in 5.15.4): the encoderNotFound branch now cascades to the
other encoder, and the drop was upgraded to a loud ERROR line "so a missing encoder is never
invisible". This ask is that fix's residual on two counts. (1) The other branches were
deliberately left non-cascading — your comment at :199-204: "Only encoder-absence cascades
(retrying a different encoder can help); every other init failure is source-specific and
re-attempting is pointless" — and they still land in the same tail: decoderNotFound
(Audio/AudioBridge.swift:238), an encoderNotFound on the last attempt
(HLSVideoEngine+AudioRoute.swift:220), the header-write failure, every other init error.
(2) Invisible-to-a-human and invisible-to-the-host are different problems: the ERROR line makes
it readable in a log pull; nothing crosses the API, so a host's ladder still cannot act on it.
What the host sees. audioTracks is published from the probe (AetherEngine.swift:3366), so
the picked track is listed and selectable and selecting it changes nothing. activeAudioDecoder
(:909) does go nil — a real signal, but only half of one: it is equally nil for a genuinely
video-only source, and its doc promises nothing about the difference (:907-908, "nil when no
audio or no session"). So the drop is INFERABLE today, not readable: a non-empty audioTracks
paired with a nil activeAudioDecoder at .playing is the dropped case. That is an undocumented
pairing of two publishers, one of them a String? label a host would also have to parse to tell
stream-copy from bridged, neither able to ride $errorInfo into a ladder, and it breaks in the
corner where the probe failed (:3253) and the list publishes empty while the session still found
and dropped audio. audioTapHasDeliverySource (AetherEngine+AudioTap.swift:79 → :90) knows the
truth, but reading it means installing an audio tap to learn a routing fact.
Why the asymmetry is the argument. The sibling kind exists and its doc says what a host like
ours needs: audioBridgeProducedNoOutput (PlaybackErrorInfo.swift:76 — "A host with a fallback
ladder should DEMOTE on this one") fails loudly when a bridge WAS built and decoded nothing. A
bridge that could never be built publishes nothing typed and plays silently. Same user outcome,
opposite host visibility.
The ask. Make the video-only drop host-readable as a typed, published fact — our
preferred shape a small published enum on the session (audioDelivery: .streamCopy | .bridged | .droppedNoPipeline | .noAudioInSource; the third state is the one a host must act on and today
can only reconstruct). A non-fatally surfaced PlaybackErrorKind would also do (failing the load
would be the wrong default — video-only is not an error for every host). For us it decides one
thing: demote the item to Jellyfin's server transcode (which re-serves the file with AAC) or
leave a silent picture. Scope honesty: an .unsupported compat classification does NOT itself
mean video-only — the cascade still attempts the bridge, so anything libavcodec decodes still
plays; the silent population is "no libavcodec decoder, or bridge init/header-write failed"
(AC-4 is the one we would expect to meet). Not hit on our library; found reading the cascade
while designing the post-removal ladder.
Filed as groundwork for the removal of our second engine (three related asks, filed separately so each can move on its own).
Activity
Merge feat/ae462-audio-delivery: a source that loses its audio says s…
superuser404notfound commentedon Sep 2, 2026
Shipped in 6.65.0 as
$audioDelivery, the published enum shape from the write-up.Seven cases rather than four.
.streamCopy,.bridged,.droppedNoPipelineand.noAudioInSourceare the ones named in the report; the other three exist because the four describe the loopback cascade and the engine has two more places where audio is served..decodedis the software path and the FFmpeg audio-only host, which decode straight to CoreAudio and are neither a copy nor a bridge..playerManagedis the remote-HLS bypass and the native audio-only host, where AVFoundation does its own media selection and the engine has no pipeline to classify. Reusing one of the four for either would have made the publisher say something untrue on a route that works perfectly well, and.noneis simply no session.Not a
PlaybackErrorKind, and the reason is structural rather than a preference. That taxonomy is terminal:publishErrorassignserrorInfoand movesstateto.error, anderrorInfois cleared by the state's own move away from it, so the two cannot drift. A non-fatally surfaced kind would have to sit outside that pairing, which is the invariant the taxonomy is built on. The right sibling relationship is the one the report already identified:audioBridgeProducedNoOutputis the same user outcome from the other end of the cascade, so.droppedNoPipelinecarries the same advice, demote, do not end the ladder.The analysis checked out line for line, including the reading of #165's residual:
encoderNotFoundon the last attempt,decoderNotFound, the header-write failure and every other init error all land in the same tail, and the tail clearssavedAudioConfig,audioBridge,audioHLSCodecsandaudioPipelineDescriptionbefore returning a producer that plays. Point (2) is the framing that decided the scope: readable in a log pull and readable by a host are different problems, and the ERROR line only solved the first.One thing in the report is too generous to the engine, and it is the half that matters most for a ladder. The inference recipe (non-empty
audioTracks+ nilactiveAudioDecoderat.playing) is undocumented on the loopback path, but on the software path it was not merely undocumented, it was wrong, and wrong in the dangerous direction.SoftwarePlaybackHostdrops audio at the same kind of point (AudioDecoder.openthrows, the audio index goes to -1, the session plays video-only,[SWHost] audio open failed (...); video-only), andactiveAudioDecoderthere was built from the PROBE's track list, not from the decoder that opened. So a software session that had dropped its audio still published"libavcodec AC3 → CoreAudio": a host applying the recipe would have read healthy audio over a silent picture. That is fixed in the same release, the label now comes from the host's own resolved index, which incidentally repairs the case it got wrong the other way (the #133 live-TS by-type fallback resolves an index the engine's pick does not know about). It is worth flagging in this context because 6.64.0 has just handed hosts a per-session lever onto exactly that path.Both arms of the same forced drop:
Derived, never assigned. The value is folded from
playbackBackend, the session's effective options and the live pipeline's own classification (thevideoRoutearrangement, #321), so it cannot drift from the session it describes, and it survives the corner named in the report: it does not readaudioTracksat all, so a probe that failed to list them changes nothing. Each pipeline classifies at its own point of decision, and a test pins that the routing bits can never produce.droppedNoPipelineon their own. The drop is only ever reported by the pipeline that dropped, about itself.The scope note in the report holds. An
.unsupportedcompat classification still does not mean video-only: the cascade attempts the bridge for any present audio stream, so anything libavcodec decodes still plays. The population that reaches.droppedNoPipelineis "no decoder in this build, or bridge init / header write failed", which on your side is AC-4.Measured on real media, one run per case:
streamCopy(AAC/MP4) andbridged(MP3/MKV) on the loopback,decodedon--swand on the FFmpeg audio-only host,noAudioInSourceon a video-only fixture on both paths,playerManagedon the native audio host, anddroppedNoPipelineon both paths. The tail also names itself in the log now, so a diagnostic pull answers the question without reconstructing it from the cascade's lines:Two limits, stated because they bound what was verified. The drop was observed through a new test hook (
aetherctl play --drop-audio, which makes every audio pipeline fail on both paths), not through a source this build has no decoder for: there is no AC-4 fixture here, and a plausible substitute would have proved less than the honest hook. The classification of a genuine no-decoder source is code-anchored the same way the report is. AndaudioTapHasDeliverySourceis unchanged: it still knows the truth and still costs a tap to read, which is why the fact is published rather than routed through it.Docs in
docs/api.mdunder "Reading whether the audio was delivered", including the point that$activeAudioDecoderstays the label to show and$audioDeliverythe value to classify on. Leaving this open until it has been tried on your stack. That closes out the three asks filed for the removal of your second engine; #464 is separate and untouched so far.cmcpherson274 commentedon Sep 2, 2026
Tried on our stack at 6.65.0 (
50a2d3ee). The value reaches the app, classifies cleanly, and — the part I did not expect — it had already been in our logs for free before we read it.What we wired. The wrapper subscribes to
$audioDelivery(dropping the.nonedip a teardown/reload passes through) and publishes it as an event; the app maps the seven cases onto two honesty surfaces — a Diagnostics "Last Playback" token (audio DROPPED/audio none/audio bridged/audio avplayer; the healthy pair stays silent) and, for.droppedNoPipelineonly, a chip clause (Direct Play · Aether · … · no audio, VoiceOver "No audio") plus a once-per-start toast..droppedNoPipelineis latched per start, exactly for the reason you gave: the value re-derives on every rebuild (an audio switch, a recovery reload, a #460 correction), so a transition-keyed toast would re-fire on every recovery of a persistently silent session. What the app DOES beyond saying so (an automatic server re-serve with converted audio) is an owner decision on our side and not wired.Measured (2026-09-02): every value we can reach on this stack, on both routes:
and the Diagnostics token on hardware, from the engine's own teardown line:
stats final aether 3 from Hell: dropped 0 stalls 0 startup 4.9s … audio bridged..droppedNoPipelineitself is unreachable here — no AC-4 / MPEG-H source on the dev server, and the negotiated profile never offers the engine a codec it cannot decode — so that branch ships review-verified with the mapping pinned in tests; youraetherctl play --drop-audioline is the bench evidence we cite..playerManagedand.noAudioInSourcelikewise unobserved — we never setnativeRemoteHLSourselves and never build the audio-only host, so.playerManagedcould only arrive via your AE#154/AE#246 reroute, which no leg took; and there is no video-only source in the library.One observation, offered for the taxonomy rather than as a bug. On the device TrueHD leg (lossless FLAC bridge, 8 ch) the engine published
AE#462: audio delivery = bridged(09:02:11.178) and, 21 ms later, logged:then cut its first segment carrying that track (
seg74: served 40402837 Bat 09:02:11.602;item.audioTrack codec='flac' enabled=true sr=48000 ch=8at readyToPlay, 09:02:11.999) — noAE#396 seg-<n>.m4s cut deferredline anywhere in the leg. The same line at the same phase sits in our 2026-08-28 device log at 6.55.0 (78735b04), so it predates this release. It isAudioBridge.noteSilentFeedIfNeeded()(AudioBridge.swift:850) firing on its 64-fed-packet threshold whileenqueued=2560is still below the FLAC encoder's block size, so no packet can have been emitted yet — a startup false positive on the lossless path, not a silent bridge. Since #462 now gives hosts the typed fact, the ERROR line is the only part of that story that still looks wrong from outside; if the threshold should be a first-emitted-packet (or first-cut) condition on the FLAC path, that is the whole ask — and if it is intended, ignore this.Thank you for the seven cases;
.playerManagedin particular is a reroute tell we would otherwise have had to reconstruct.feat(engine): a source that loses its audio says so, and says which s…
superuser404notfound commentedon Sep 3, 2026
Thank you for the wiring detail and for the measurement table; the latch reasoning on
.droppedNoPipelineis exactly right, and for the same reason the value re-derives on every rebuild rather than being assigned once..playerManagedand.noAudioInSourcebeing unreachable on that stack is the expected shape:.playerManagedonly arrives through the AE#154/AE#246 reroute or a host that setsnativeRemoteHLSitself, and neither is something a stack should have to arrange to prove a mapping.The AE#396 line is a bug, and a worse one than the report frames it as. Filed as #474 and fixed in
b2583f34(PR #475), merged, not yet released.The reading of the mechanism is correct line for line:
noteSilentFeedIfNeeded()fires on a 64-fed-packet threshold,enqueued=2560is below the FLAC encoder's block size, and no packet can have been emitted yet becausedrainFIFOIntoEncoder(requireFull: true)declines to encode belowframe_size. What the report treats as a startup race is deterministic, and the reason is a unit error rather than a threshold that is merely too low.The gate was counted in source packets; the thing that bounds it is one encoder frame. Its own comment named the two constants it was derived from, and both are false on the FLAC arm:
So on TrueHD the line fired at 64, a little over half way to the first frame the encoder could build. That is why there is no
cut deferredline anywhere in the leg and never could be: 116 access units are 97 ms of audio, and the first segment is seconds long, so the bridge has been producing for a long time before a cut asks it for anything. The ERROR line predicted a failure the same run contradicted 400 ms later.It is not confined to the lossless mode.
.surroundCompat, the default, encodes any source of two channels or fewer to FLAC, so a stereo TrueHD file reproduces it without opting into anything:ffmpeg -f lavfi -i testsrc=size=1280x720:rate=25:duration=90 -f lavfi -i sine=frequency=440:duration=90 \ -map 0:v -map 1:a -c:v libx264 -preset ultrafast -g 50 -pix_fmt yuv420p \ -c:a truehd -strict -2 -ac 2 -ar 48000 truehd2.mkv aetherctl play --seconds 20 file://$PWD/truehd2.mkvIdentical counters to the device log, on the default setting. The dating in the report holds and can be made exact: the FLAC mode landed in
ec4723dc(2026-05-22), the gate in9870892c(2026-08-18, released 6.31.0), so the gate was written after the arm that breaks it and every release from 6.31.0 has printed this.On the specific ask, a first-emitted-packet or first-cut condition on the FLAC path: neither, and the reason is what makes the fix general. Both would blind the gate to the shape it exists for. A bridge that never emits is exactly the population the line is about, so "wait for the first emitted packet" is a condition that is never met by the sessions worth reporting; and a first-cut condition would move the answer downstream to the muxer, which is precisely where AE#396 started, with movenc's -22 naming the muxer and the source and never the bridge. A path-specific special case would also only postpone the next one: the ratio between an encoder frame and a source packet spans a factor of 100 across arms this bridge already builds.
So each arm is now counted in the unit that actually bounds it. Where PCM reached the FIFO, the bound is the encoder's own
frame_size, four frames of it: the first is when output becomes possible, the second covers an encoder that holds it, and four is still inside the first half second of source audio on every arm (128 ms on E-AC-3, 384 ms on FLAC at 48 kHz), which is sooner in wall clock than the packet threshold it replaces. Where the FIFO never moved, packets are the only unit there is, and they are counted from the last accepted sample rather than from the start, so a decoder that answers for a while and then stops is the same shape as one that never answered at all, which the old gate could not express in either direction. The line also names the encoder it is talking about now (it said "AC-3/E-AC-3 sample entry" on a FLAC session) and the frame boundary it judged.Two limits, stated because they bound what was verified. The encoder arm is measured on media, before and after, on the fixture above. The decoder arm is pinned through the real bridge in tests rather than in a session, because no corruption that could be built here (the
noisebitstream filter at every byte, on MP3, AC-3 and TrueHD) makes libavcodec stop producing frames for a whole session; each of those sources decoded and played, which is a fair result for those decoders and a poor fixture for this. And nothing but the line was wrong: both sites that classify a silent bridge are gated on an actual failure (a pump death withmuxerFailed, an exhausted revive), so a healthy start-up never reached them, and$audioDeliveryis derived independently and readbridgedcorrectly throughout that leg, which the report's own table shows.Four tests cover it, all four failing against the old rule and passing against the new one. Full suite green on both runners.
Leaving this open for the rest of the #462 verification.
superuser404notfound commentedon Sep 3, 2026
The silent-bridge gate correction tracked in #474 (
b2583f34) is released in 6.67.0: a TrueHD or stereo-to-FLAC session no longer prints the AE#396 ERROR during a healthy start-up.$audioDeliveryitself is unchanged since 6.65.0.cmcpherson274 commentedon Sep 16, 2026
The rest of it. Pin: 6.81.0 (
c7e7adb5), measured 2026-09-12, posted today (09-16) — you are eleven releases ahead (6.82.0 → 7.1.0, the major among them); our next bump targets 7.1.0. Office2 (Apple TV 4K gen 3, tvOS 26.6 / 23L773) and its simulator. AE#474 is confirmed here, and$audioDeliverypublished four values on this stack — one more than we reported to you on 09-02.The TrueHD leg at the fixed engine
3 from Hell(HDR10 hevc + an 8-channel TrueHD track, lossless bridge → FLAC), device, clean slice:AE#396lines in that slice: 0. What 6.66.0 printed on the same fixture, 40 ms after the same init (2026-09-02-e5b/logs/DEV-E5-vod-hdr10-dts.log):Better than a ten-day A/B: that morning's baseline ran at 6.66.0 on the same box before the bump —
DEV-E6-hdr-before-{engine,matcher}.log, the ERROR at09-12 07:27:17.589and09-12 07:28:34.546, 54 ms and 37 ms after their inits, 2 of 2. After it, across twelve lossless-bridge starts at the new pin on that box (08:22:49 → 12:55:05 — nine on the TrueHD track, two on the same title's DTS track after an audio pick, one a 2-channel PCM source on a DV P8.4 clip): zero AE#396,bridgedpublished on every one, and the clean leg'sstarted (route loopback, 4.1s)is the figure the 2026-09-02 leg logged to the tenth. Nothing else in that arc moved. Your arithmetic is what our line carried:enqueued=2560is 64 TrueHD access units of 40 samples against the 4608 one FLAC frame needs — a little over half of one. We have never seen the corrected line itself, only the silence it keeps; its positive branch has no fixture here.The Diagnostics teardown token we quoted on 09-02 is captured at the new pin too, though not on the TrueHD leg (that slice ends before teardown: 0
stats finallines). Samebridged, on the PCM→FLAC start above:Every value we reach
bridgedDEV-E6-vod-hdr10-dts.clean.log12:14:29.328decodedDEV-E6-vod-hevc.clean.log12:10:34.187;SIM-E6-reserve-landed.log09:31:54.804streamCopyDEV-E6-vod-h264-tagged.clean.log12:11:46.566;SIM-E6-reserve-live.log09:34:28.213noAudioInSourceDEV-E6-dv-p81-dvhe.log12:52:40.023droppedNoPipeline.noAudioInSourceis reachable here after all, and that corrects our 09-02 report rather than anything you wrote. We said we held no video-only source; our DV conformance clips are exactly that —source probe: hevc 3840x2014 23.976fps dolbyVision dvP8 dur=110.1s (demuxed) audio=[] subs=[]. One source (a P8.1 test clip,dvh1anddvhetagged), three launches, all on the loopback path:Across every retained slice of that day — 07:25:39 to 14:03:31, both instruments, deduplicated by timestamp (the salvage pulls are supersets of the per-leg slices) — the engine logged 162
AE#462publishes: 4 at the 6.66.0 before-build (2decoded, 2bridged) and 158 at 6.81.0 — 13bridged, 67decoded, 75streamCopy, 3noAudioInSource. No other value, and not onedroppedNoPipelinethe engine raised itself. Our DEBUG guard checks yourAudioDelivery.allCasesrawValues against the literals Core pins (Core cannot link the engine); silent on every launch, so the seven spellings you shipped at 6.65.0 are unchanged at 6.81.0.What we do with the drop
.droppedNoPipelineis the one value we act on, and that action shipped since our last comment: the drop remembers the track, restarts, and the next negotiation serves the existing conversion remux (video copy + eac3), viewer told. On the device, rig-injected at our publish path:0.12 s, drop to the negotiation landing (
DEV-E6-reserve-landed.log; the Diagnostics token on that teardown reads… obs 1195.7Mbps audio DROPPED). It stands down where a re-serve would be futile or wrong, each with a line — live (SIM-E6-reserve-live.log09:34:37.715,re-serve stood down (not a full-screen VOD session)) and our A/B control (SIM-E6-reserve-control.log09:33:50.102); the chip clause and toast are the fallback behind it.Stated, not measured
.droppedNoPipelinehas no natural fixture here and stays rig-driven + Core-pinned. One correction to the scope note — ours first, then yours: AC-4 is not the population here, because an AC-4 track never reaches the engine.ac4is absent from the rung's audio vocabulary (Playback.swift:484), soconversionReasonanswers.undecodableSelectedAudioon the first start (:958-959) and the server converts before there is anything to drop. What is left is a codec that vocabulary lists and this build cannot decode or bridge; we hold none..playerManagedremains unreachable — we never setnativeRemoteHLSand never build an audio-only host (both code-read). Unchanged since 09-02.HLSVideoEngine+AudioRoute.swift:352-359) has printed here only on itsnoAudioInSourcebranch, the three launches above. ItsdroppedNoPipelinebranch: 0 occurrences, correctly.audioIsAtmosStreamCopy(HLSVideoEngine.swift:466): in the 6.81.0 API, not read by us yet — on our list, because we do read a channel count off the HDMI route.AudioBridge.swiftandHLSVideoEngine+AudioRoute.swiftbyte-identical file-for-file,PlayerState.swift:103andHLSVideoEngine.swift:466at the same lines, and inAetherEngine.swiftthe three sites shift +11 (:624/:642/:652→:635/:653/:663) with the bodies unchanged. Code-read at the tag, unmeasured — nothing in 6.82.0 → 7.1.0 touches the audio-delivery surface.From our side #462 can close. Say the word if you want the slices.
superuser404notfound commentedon Sep 17, 2026
Thank you for the full sweep, and for running the 6.66.0 build on the same box the same morning: two ERRORs before the bump and none across twelve lossless starts after it pins #474 more tightly than any A/B across ten days could. Closing this on that basis, the slices are not needed.
Two notes for the record.
The AC-4 correction stands, and the population it leaves is slightly wider than one shape. My scope note named AC-4 for your side, and your vocabulary refuses it before the engine ever sees the track, so the first negotiation already converts. What can still reach
.droppedNoPipelinethere is not only a codec the vocabulary lists and this build cannot decode: the same tail takes a bridge whose encoder fails to initialise or whose header write fails, on a source that decodes perfectly well. Neither has a natural fixture here either, which is whyaetherctl play --drop-audiofails the pipeline rather than picking a codec. The re-serve you shipped is the right answer to both, since the server's eac3 remux never asks the bridge for anything.The code-read up to 7.1.0 holds, and it still holds on current main. Between 6.81.0 and
mainthe only audio-side edit is the #351 renderer attach inAudioOutput(the synchronizer now takes the layer'ssampleBufferRendererdirectly, same behaviour), and the #461 change inSoftwarePlaybackHostpicks the video decoder only, never the audio index that.decodedand.droppedNoPipelineare derived from on that path.AudioBridge.swift, the audio-route file and theaudioDeliverysites inAetherEngine.swiftare unchanged, so the 7.1.0 bump carries the same seven values you measured.And thank you for finding
.noAudioInSourceon the DV conformance clips; that is the one case I had only seen on a synthetic fixture.