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 the code says. VTCapabilityProbe.canHardwareDecode fails open by design and says so
(Video/VTCapabilityProbe.swift:32-34; the four return true sites are :48 no extradata, :52
Annex-B, :61 no in-band parameter sets in the config record, :77 format-description build
failure). Right default; not asking for it to change. On a VOD load those four classes reach
VideoRoutingPolicy.forcesSoftwareForUndecodableFormat (Decoder/VideoRoutingPolicy.swift:113)
as "hardware-decodable" and the gate keeps the native path — consulted at most once per load,
at AetherEngine.swift:3698, behind the !useSoftwarePath, !options.isLive, probeOpened guard at
:3694 (a live load never reaches the gate at all; the native path is kept without a
classification step). Either way, if VideoToolbox then cannot build a decoder for what arrives,
the item reaches readyToPlay and renders nothing. The in-band-parameter-sets class (:61) is the
one where the deciding evidence genuinely is not present at load time.
Detection is not the gap. AVPlayerItemVideoOutput.hasNewPixelBuffer on the native path and
softwareHostFramesEnqueued on the software one (AetherEngine+Diagnostics.swift:446/:454) —
we already attach a video output for another feature and can see "ready, playing, no picture".
The escape is the gap — with one route that exists, priced. No LoadOptions field selects
the decode path (PlayerState.swift:208-572 is the whole struct; the nearest thing,
deinterlaceMode at :482, is the software path's filter, not the route). Two levers exist
today:
setForceSoftwarePathForTesting(_:)(AetherEngine.swift:1120, backing :1117, consumed :3744),
documented test-only — correctly: it is process-global, so on our stack it would drag the
guide's ambient engine and any concurrent tile to software with the one session that needs
it, and it fails DV Profile 5 outright (softwarePathCannotRepresent,
VideoRoutingPolicy.swift:135 → the throw at AetherEngine.swift:3774).- A per-session route that is not an API: a VOD source the demuxer cannot seek is forced to
software (:3729-3741, "source is forward-only, forcing software path"), which a host reaches by
presenting anIOReaderwhoseseek(offset: 0, whence: SEEK_SET)fails
(Demuxer/CustomIOReaderBridge.swift:92 makes seekability the host's answer; Demuxer.swift:230
carries it) —LoadOptions.sequentialOrigin(PlayerState.swift:384) exists precisely to opt
archives out of it. So the honest statement is not that we cannot get a session onto
SoftwarePlaybackHost; it is that the only way costs us the source: no seeking, no mid-play
audio switch (:5357) or title switch (:5397) on that session, andreloadAtCurrentPosition()
itself is gated off (guard customSourceIsSeekable, :4055) — so it also un-composes with ask
(a) — while DV Profile 5 still hard-fails on arrival (:3758-3774). The branch is VOD-only
(!options.isLive), so it does not exist for our live rung at all.
The START case is covered on our side (our 60/240 s start deadline → start timeout → our ladder
demotes the item off the rung for the next start). The MID-PLAY version — a stream whose in-band
parameter sets turn into something VideoToolbox cannot decode after the picture has been running
— has no in-place answer once the second engine is gone: the only route left is to tear the
session down and restart the item on the demoted rung (a server transcode), i.e. the viewer
watches the picture drop and rebuild mid-scene.
The ask. A per-session way to say "serve this source through SoftwarePlaybackHost",
scoped to the session and without lobotomising the source: a LoadOptions field
(preferredDecodePath / forcesSoftwareDecodePath; 6.58.0's forceDolbyVisionOnNonDVDisplay is
the precedent for adding one), composing with (a) into an in-place correction. An engine-side
detector would be better still but is a bigger ask; the lever is the piece a host cannot build
without paying the seek axis for it.
What we have and have not measured. No mid-play wall reproduced on our stack (our Apple TV
4K hardware-decodes what we own; the High 4:2:2 / Rext material in the library is small). This
is code-anchored plus an engine we are removing, not a field repro — say so if you want a
fixture first (an hev1 remux with in-band parameter sets over a Rext stream is the shape we
would aim at). For calibration: the engine we are dropping detected this class off libVLC's error
stream (20 decoder-module error lines within 1.0 s of each other) and answered with an in-place
rebuild with hardware decode off — a heuristic that only ever ran while libVLC was the decoder.
We are not asking for that heuristic — only for the lever.
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/ae461-software-decode-escape: a session can be told to dec…
superuser404notfound commentedon Sep 2, 2026
Shipped in 6.64.0 as
LoadOptions.preferredDecodePath(.automatic/.software).Thank you for separating the detection from the escape in the write-up. That framing is what made the scope obvious:
hasNewPixelBufferagainstsoftwareHostFramesEnqueuedwas never the gap, and pricing theIOReaderroute honestly (rather than calling it impossible) is what showed that its cost is the source's whole seek axis, including the reload it would have to compose with.Not VOD-only. The lever sits outside every
!options.isLiveguard, so it applies to the live rung too. That was the deciding argument for placing it where it is rather than next to the #2 gate: a live load never reaches a classification step at all, so live had no escape, no probe verdict, and nothing to correct.One-way, and the missing case is the guarantee.
DecodePathhas no.native. Every route the engine sends to software it sends there because the native path cannot serve it (AV1 without hardware decode, VP9, a forward-only source, MVC carriage, a format VideoToolbox cannot hardware-decode), so a native preference would only ever buy a black screen. A host's evidence is always "this native session is not decoding" and never the reverse. A test pins that the type stays two-cased, so if a.nativeis ever added the one-way claim has to be revisited with it rather than quietly lost.It does not suspend what the software path cannot represent, and it should not. Forcing software on a source whose only signal is IPT-PQ-c2 (HEVC P5, AV1 P10.0) still fails the load with
dolbyVisionUnplayableOnSoftwarePathinstead of decoding as YCbCr and rendering green/purple. A demuxed-audio live source still fails rather than playing silent. An override says which host serves the session, not what that host can do, and there is a test on exactly that, because it is the change one would most plausibly have written straight through those guards.One case where it does nothing, stated because it would otherwise look applied: on
nativeRemoteHLSthe engine demuxes and decodes nothing (AVPlayer plays the remote playlist), so there is no decode path to prefer. The engine logs that it ignored the preference.Measured on a 300 s H.264 fixture, all three arms, including the composition with #460:
A native session became a software session at its own playhead, no restart. Note the one shape where that composition does not re-route:
reloadAtCurrentPositionon a customIOReadersource rebuilds on the backend it was already on, so a decode-path correction there takes effect at the nextload. URL sources re-run the full routing and switch in place.Two things I did not do, both deliberate. No engine-side detector, as offered: the heuristic worth having is not the one being replaced (counting libVLC error lines only ever worked while libVLC was the decoder), and an engine-side one wants a real fixture to calibrate against rather than a plausible threshold. If an
hev1remux with in-band parameter sets over Rext turns up on your side, that is the input that would make it a measurement. And no repro from here either: the change is code-anchored the same way the report is, verified end to end on the routing and on the composition, not on a mid-play VideoToolbox wall.aetherctl play --swnow drives this option instead of the process-global test hook, so the harness exercises what a host calls;--reload-applying decode-path=softwaredrives the correction. Docs indocs/api.mdunder "Overriding the decode path". Leaving this open until it has been tried on your stack. #462 next.cmcpherson274 commentedon Sep 2, 2026
Tried on our stack at 6.65.0 (
50a2d3ee): we scripted the arc the ask targets — our start-patience detector driven by our own first-frame latch on a healthy H.264 source — and the composition with #460 did the thing on hardware. We have no real member of the population on the bench (our one damaged-head fixture decodes by concealment and starts normally), so this measures the composition mechanics, not the fix on a damaged head.Where it plugs in. Our wrapper already had the detector: the damaged-head "start patience" arc (a native session that is provably alive — clock advancing,
.playing— but has painted nothing past the normal start window defers its terminal to a 240 s cap). #461 gave the escape: at the moment patience engages (60 s) the wrapper corrects the session topreferredDecodePath = .softwarein place throughreloadAtCurrentPosition(applying:). VOD full-screen only for now (arming any "not decoding" evidence on live is an owner call on our side, since a dead channel would otherwise wait up to 240 s), once per wrapper, never when already on software / on the remote-HLS bypass / on a DV P5 or AV1 P10 source (we refuse those before asking, from the probe'sdvProfile— over-refusing all AV1 P10.x because the probe carries no BL-compat id, which is free on this silicon).Measured on an Apple TV 4K (3rd gen, tvOS 26.6), an SDR H.264 MKV, with our first-frame latch held for 75 s to script the frameless start (the source itself painted natively at t+0.22 s):
Native → software at the playhead in 117 ms, same engine instance; the software host enqueued its first frame 0.28 s after the correction and presented at .715. Our own
startedbreadcrumb waited out the scripted 75 s latch (started (route software, 75.1s)) — that is the rig, not the engine. A second run of the same leg earlier in the day read 116 ms.On the simulator, whose VOD route is already software, two separate legs: our policy stands the escape down before asking (
09-02 09:18:06.508 [Aether] decode-path escape stood down — already software, patience having engaged at .506), and a separate rig that drives the #460 correction directly gets your honest no-op (09-02 09:00:18.926 [AetherEngine] #461: host asked for the software path; the routing had already chosen it). The device leg is the only one that flips a route. All three are retained.Two things we did not do, deliberately. No engine-side detector — ours engaged unaided at 60 s of wrapper life and the escape issued in the same millisecond; and no live arming yet — the escape is D4-compatible on our side (same engine, same tuner stream, same rewind window, no renegotiation), the trigger on live is the open question.
One note that belongs to the docs rather than the code. A mid-play
preferredDecodePathcorrection on a custom-IOReadersession is accepted and takes effect only at the nextload():preferredDecodePathis read at exactly three sites inSources/AetherEngine, all insidepublic func load((AetherEngine.swift:3207/:3824/:3836), while the custom-source rebuild picks its host fromwasOnSoftwarePath(AetherEngine+Loading.swift:1931, branch at:2030) — and on a live custom source that reopen lands at the reader's own byte 0 (LiveReloadPolicy.resumePositionis nil for live). Your shipping comment on #461 does say the custom-source rebuild stays on its backend;docs/api.md's "Where a correction lands" (:139-146) does not listpreferredDecodePathamong the install-for-next-load fields while "Overriding the decode path" (:153) recommends the pairing. On our spool arm that combination would be accepted, destructive and inert; we guard it host-side. If you would rather have it refused by name before teardown (aSessionReloadRefusalcase reached fromreloadAtCurrentPosition(applying:)when the proposal changespreferredDecodePathon a custom source), that is the spelling we would consume; a docs line is fine too.feat(engine): a session can be told to decode in software, and only i…
Merge fix/ae461-custom-source-decode-path: let a decode-path correcti…
superuser404notfound commentedon Sep 3, 2026
Thank you for running it on hardware and, more than that, for the last paragraph. The docs note was the actual finding here, and it was worse than you put it.
Confirmed, and it was not a documentation gap.
preferredDecodePathis read at three sites, all insidepublic func load(, exactly as you traced. The custom-source rebuild picks its host fromwasOnSoftwarePathand never reads the option, so the correction is written intoloadedOptions, named in the reload's own "applying" log line, and then ignored. That is the one outcome #460's rules forbid: a correction either lands or is refused by name, never three quarters of the way. Anddocs/api.md's "Where a correction lands" did not merely omit the field, it said "the routing, probe-budget, live-join, deinterlace and subtitle-preparation fields all apply there".preferredDecodePathis a routing field, so the paragraph asserted the opposite of what the code did.The destructive half is already gone on main. You measured on 6.65.0, where the reopen of a live custom source did land at the reader's byte 0. That is fixed in the #460 follow-up (
6626b1f7, merged, not yet released): a live reopen leaves the reader alone and moves the AVIO axis onto its cursor instead. On the harness the same run went from a playhead of 41.5 s falling to 1.9 s with the whole delivered window re-read, to a reach-back of 0.0 MB. So on your spool arm the combination was accepted, destructive and inert; from that commit on it is accepted and inert, and from this one it simply lands.I did not build the spelling you offered, and the reason is your own stack. A
SessionReloadRefusalthat fires whenever a proposal changespreferredDecodePathon a custom source is honest, cheap and exactly wrong for the population #461 exists for: a spool-backed live source reading through anIOReader, with no second engine to hand a struggling stream to. Refusing there would have documented the gap rather than closed it, and it would have left your wrapper permanently guarding host-side against a lever it cannot use. So the rebuild now asks the same pure routing policyloadasks, seeded with the backend the session is on, and the correction lands on both source shapes.The one-way type is what makes re-routing that path safe. The comment guarding it warned that
loadNativeon a software-routed AV1 source throwsunsupportedCodec, which is the reverse direction.DecodePathhas no.native, so the only flip the reopen can make is native to software, and the software path is the general one. That asymmetry is now load-bearing rather than decorative: the dangerous direction is unreachable by construction instead of by a comment asking the next reader not to write it.keepNativeHostand the two post-load fixups (the native-only live watchdog, the software-only track republish) follow the target route rather than the previous one.Your refusal does exist, narrower. What the software path cannot REPRESENT is refused before any teardown, with two new cases:
SessionReloadRefusal.softwarePathCannotRepresentSource(IPT-PQ-c2, so HEVC P5 and AV1 P10.0) and.demuxedAudioLiveIsNativeOnly. Both guards live after the routing decision insideload, so on a correction they would have failed a session that was already torn down, which is not a refusal that costs nothing. Deciding them early needs the base-layer compatibility id to outlive the probe, so it is now retained besidesourceDVProfile. Note this covers the URL branch too, which had the same shape: a correction onto software on a P5 source used to tear the session down and only then throw.That also means your over-refusal of all AV1 P10.x is no longer the only option available to you. The engine refuses P10.0 by compatibility id and lets P10.1 / P10.2 / P10.4 through, so you can ask and read the refusal rather than pre-filtering on a profile number the probe cannot fully qualify.
Measured.
customiogained--reload-decode-path, because the existing--reload-atcorrection is anhttpHeadersprobe that is inert on a custom source by design and therefore could never measure this field. Seekable custom VOD source and the live spool reader:The same run with only the routing change reverted, which is the state you measured:
#460: reload applying preferredDecodePath, thenbackend native -> native, decoder=VideoToolbox H264 (HW).On the live arm the rebuild keeps the 0.0 MB reach-back. One number there needs reading carefully, so I will state it rather than quote it: the harness anchors its retention slope at 60 s to skip the load step, and
--reload-at 60puts a second step exactly on that anchor. A 100 s run reads ratio 1.31 and means nothing by it. Over 260 s the footprint steps from 25 to 66 MB across the switch, then sits flat at 67 for 140 s and falls to 60, ratio 0.18 and still falling. That is the software pipeline's baseline, not a session retaining anything.The refusal arm is measured on the Dolby browser test kit, which carries its own control, the same material and grading cut two ways:
On your two deliberate omissions, both are the right call from here. Your detector engaging unaided at 60 s and issuing the escape in the same millisecond is the part I could not have built: an engine-side detector still wants a real fixture to calibrate against rather than a plausible threshold, and a native session that is provably alive with no picture is a fact only a host holds. The live trigger genuinely is the open question, and it is yours rather than the engine's: the escape is D4-compatible, but "not decoding" and "the channel is dead" look identical from in here, and a 240 s patience cap is a viewer-facing decision.
Merged in
d6f7c7d6(PR #473), not released yet; it collects with the #460 follow-up and two other unreleased changes. Leaving this open for your run on a session that actually needs the escape, rather than a scripted one. And if thathev1remux with in-band parameter sets over Rext ever turns up on your side, that is still the input that would turn the detector into a measurement.fix(routing): let a decode-path correction reach a custom source (sup…
superuser404notfound commentedon Sep 3, 2026
The follow-up (
07347cf4: a decode-path correction reaches a customIOReadersession, and.softwarePathCannotRepresentSource/.demuxedAudioLiveIsNativeOnlyrefuse before any teardown) is released in 6.67.0. What is still open here is a run on a session that actually needs the escape.cmcpherson274 commentedon Sep 16, 2026
Here is that run, plus three staged ones.
Pin: 6.81.0 (
c7e7adb5), measured 2026-09-12, posted today (09-16). Upstream is 7.1.0 today — eleven releases past it (6.82.0 → 7.1.0, the major among them); our next bump targets 7.1.0.We deleted our pre-filter. At E-5 the wrapper refused the escape itself for HEVC P5, and over-refused every AV1 P10.x because our probe carries no BL-compat id — a guess we only made because before 6.67.0 your answer arrived after the session was down. Yours is raised before any teardown, so the guess is worse than asking:
AetherDecodePathEscapePolicy.dolbyVisionUnrepresentableand its stand-down case are gone, and the wrapper printsrefusal.rawValueverbatim. AE#532 is the second reason: a P5 record its own RPU corrects is representable in software and is not refused (AetherEngine+ReloadWithOptions.swift:86-89) — which our guess would have.Four escapes on Office2 (Apple TV 4K gen 3, tvOS 26.6 / 23L773). Three carry
JF_AETHER_FRAMELESS=75, which suppresses our first-frame latch and nothing else, so astarted (route …, 75.Ns)is the rig releasing, not a decoder's first frame — and the P8.1 leg never reaches one. The fourth has no rig.1. Native h264 (
DEV-E6-escape-native.log): the E-5 flip, unchanged — our escape line at 12:41:09.198,dispatch: codec=27 → softwareat .255,option correction doneat .305. 107 ms, against 117 ms at 6.65.0 on this box.2. The real damaged head, no rig (
DEV-E6-escape-real2.log)The First 9½ Weeks,source probe: h264 1920x1080 23.976fps sdr, product path,start patience engagedat 14:06:52.939:Sixty seconds alive with no picture on the native route, then a picture 253 ms after that patience mark. (No engine mirror:
TEVEMATE_AETHER_LOG=1's h264 concealment warnings rotated our first attempt's log twice.)3. DV P5 — your refusal, measured (
DEV-E6-escape-dv-p5.log,prepared: codec=dvh1.05.03,ec-3 … DV=profile5 …)Ours in the same millisecond reads
option correction refused (softwarePathCannotRepresentSource) — session kept (preferredDecodePath=software), and it was:started (route loopback, 75.3s)at the rig's release. That is what the deletion rests on.4. The finding — DV P8.1 (
DEV-E6-escape-dv-p8.log)T1 - DV P8.1 HDR10 - DV8 Lake dvh1,prepared: codec=hvc1.2.4.L153 supplemental=dvh1.08.06/db1p … range=PQ DV=profile81 … duration=110.1s. The native loopback session was healthy —#361 startup 8/8 presenting (gen 1)at 12:42:18.179,#1 timeControlStatus=playing reason=- t+1.30sat .228 — and the rig escaped it 60 s in:The reading, with no blame in it. Your gate covers representability and P8.1 passes it correctly (
decodePathRefusal,AetherEngine+ReloadWithOptions.swift:203-243). It fails one stage later, after the teardown. The software host re-consults the probe that "FAILS OPEN by design (four classes it cannot classify keep the native path)" (PlayerState.swift:756-762) and keepsHardwareVideoDecoderfor HEVC when it answers yes (Native/SoftwarePlaybackHost.swift:705-719). That decoder is VideoToolbox with no software fallback:VTDecompressionSessionCreateunderkVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder: true(Decoder/HardwareVideoDecoder.swift:157-162) answered −4, and the throw at:193-204leavestry videoDecoder.openuncaught (SoftwarePlaybackHost.swift:746). So the escape's destination can decline to be software — for the formats the probe deliberately cannot classify.The probe answered from one of those keep-native returns — a code read: it returned yes (the host would not have picked
HardwareVideoDecoderotherwise) and logged nothing, while its only logging exit is the one that builds the throwaway session. The P8.1 leg carries no[VTProbe] canHardwareDecodeline at all; the h264 leg carries one before each of its twodispatch:lines (canHardwareDecode codec=27 1920x1080 -> true (status=0), 12:40:09.194 and 12:41:09.255), from the routing gate — the host's own consult (SoftwarePlaybackHost.swift:711-713) is HEVC-only. Your comment on the in-band-parameter-set guard already names the class — "the common Dolby-Vision MP4 recipes" — and the number: "VideoToolbox has no SPS to configure a decoder and fails the session with -4" (Video/VTCapabilityProbe.swift:56-60). We have not read this file's hvcC to confirm that is its shape, and could not match −4 to a VideoToolbox status constant; it is reported as your log printed it.All anchors are 6.81.0 and every cited region is byte-identical at 7.1.0 (
SoftwarePlaybackHost:706-720,:747;HardwareVideoDecoder:189-200;VTCapabilityProbe:52-56;PlayerState:814-820;decodePathRefusal:242-282), bar the require-hardware spec, which 7.0.0's floor flattened out of its#available(:156-158), key unchanged.Two shapes, your pick. A VT dry-run on that branch before the teardown, so a creation failure joins
softwarePathCannotRepresentSourceamong the refusals that cost nothing; orSoftwarePlaybackHostcatchingsessionCreationFailedand falling back toSoftwareVideoDecoder— the same fail-open one stage later, keeping the session. Or tell us to pre-filter P8 host-side.Our call is to keep the pre-filter out, held lightly — this is the first P8.1 escape measured on any pin. A pre-filter would trade "error card at +60 s, Retry" for "capsule to the 240 s cap, then the same card": 180 s more black, same destination. What made it benign is ours: the E8 demote is
@Stateon our player view, so a fresh launch of the same title ten minutes later tuned clean (started (route loopback, 3.6s), 12:53:54.007). That its nextstart()lands the title on our AVPlayer rung is a code read — no Retry was pressed.Live arming is still owner-gated here, and still ours rather than yours. #461 can close once you have read the P8.1 arc; the question needn't hold it open.
Merge PR #542: the software host opens the VT decoder only on a prove…
superuser404notfound commentedon Sep 17, 2026
Thank you for the real damaged-head run, and for reading the P8.1 arc down to the decoder. Your reading is right, and it reproduces on the Mac without your file.
The defect is one consult, not the escape.
SoftwarePlaybackHostaskedVTCapabilityProbe.canHardwareDecode, the routing gate's question, and read its answer as "openHardwareVideoDecoder". That probe fails open on purpose for routing: no extradata, Annex-B extradata, in-band parameter sets and a format-description failure all answer "keep native", because AVPlayer's decoder finds the parameter sets in the stream.HardwareVideoDecoderbuilds its format description from the hvcC alone and requires hardware with no software fallback, so every one of those four classes is a format it can never open. The same ignorance means "native is safe" to the router and "libavcodec is safe" to the software host, and a Bool cannot say both.Neither of the two shapes you offered, and no host-side pre-filter. A VT dry-run before the teardown would have refused a correction that software can serve, and a catch that falls back to
SoftwareVideoDecoderwould undo the reason the hardware decoder refuses to fall back at all (a 4K stream silently decoding on the CPU). The probe now returns a verdict,.supported/.unsupported/.unclassifiable(reason:). The routing gate reads it exactly as before and keeps native unless the verdict is.unsupported. The software host opensHardwareVideoDecoderonly on.supportedand hands everything else to libavcodec. The four unclassifiable returns were silent, which is why your P8.1 leg carries no[VTProbe]line; they now log their reason:So your next log names the shape of that file, which neither of us has confirmed yet.
Measured. The Dolby browser test kit's P8.1 UHD asset carries its parameter sets in the hvcC and does not reproduce, so I built the two shapes from it: rewritten with
MP4Box -add ...:xps_inband(numOfArrays 0), and remuxed to MPEG-TS (Annex-B extradata). The control is anhvc1encode with parameter-set arrays.play --sw, in-bandLOAD FAILED: sessionCreationFailed(status: -4)play --sw, TSLOAD FAILED: sessionCreationFailed(status: -4)--reload-applying decode-path=softwareat 5 s, in-bandsession ended in error: Decoder session failed (-4)play --sw, controlHardwareVideoDecoderopenedThe before arm of the correction is your 12:43:15 sequence line for line:
#460: reload applying preferredDecodePath,dispatch: codec=173 → software,selected HardwareVideoDecoder (VT HEVC), then -4.One thing this does not answer, stated before it gets quoted. On that population the escape now lands on libavcodec, and whether libavcodec holds a 4K Main10 stream in real time on an Apple TV 4K (3rd gen) is unmeasured. The M1 arms kept their clock but say nothing about that: the drop counter
playprints scatters more between two runs of one arm than between arms. If your retest shows the escape landing and then dropping frames, the next step is teachingHardwareVideoDecoderto take its parameter sets from the first keyframe, which is the hardware path for exactly these files, rather than anything on your side.Merged in
722e6aea(PR #542), not released yet. Leaving this open for your P8.1 leg on the release.superuser404notfound commentedon Sep 17, 2026
Released in 7.1.1 (
755cc21c), and Sodalite pins it as of413bfd4a, so the next Sodalite TestFlight build carries the fix for the P8.1 leg.fix(decode): the software host opens the VT decoder only on a proven …
cmcpherson274 commentedon Sep 21, 2026
Here is the P8.1 leg on the release. The verdict names the shape of our file, two of your four classes turn out to be on this box, the escape takes — and the endurance arm ran, with a result that is not the one it set out to get.
Two pins, each measurement labelled with its own: the shape-of-the-file answer and the escape arc were measured at 7.1.3 (
13a86172) on 2026-09-17 and reproduce line for line at 7.7.1 (fa67d586) on 2026-09-19; the endurance legs are 7.7.1 only. Office2, Apple TV 4K (3rd gen) —AppleTV14,1, 5 active CPUs, 3.88 GB, read off the tvOS report quoted below — tvOS 26.6 (23L773), our app rebuilt on Xcode 27.0 / Swift 6.4. Four releases have landed since the last of these legs ran (7.8.0 → 7.10.0); no figure below is from any of them. Prefixes trimmed, tails and inner clauses elided (…); the rest verbatim. Bare:Nare lines in the named log. Engine source line numbers are at 7.7.1;VTCapabilityProbe.swiftandVideoRoutingPolicy.swiftare byte-identical 7.1.3 → 7.7.1, so theirs hold at either pin.The shape of the file
In-band parameter sets — your first synthesised arm:
configRecordCarriesParameterSetsreadingnumOfArraysas the 23rd byte (VTCapabilityProbe.swift:148) and returning false into theunclassifiable("in-band parameter sets")at:94.DEV-E8-escape-dv-p8.log:61at 7.7.1; the same line atDEV-E7-escape-dv-p8.log:62,09-17 15:23:17.147, at 7.1.3. The routing gate on the native load. It fires twice more in the same leg at both pins — on the correction's reload, and between[SWHost] session startand[SWHost] HDR mode ON, which is the consult you changed — and on the opening load of each of our two ordinary P8.1 legs, which need no escape and both start on loopback in 3.7 s at 7.7.1 (DEV-E8-dv-p81-dvhe.log:59,DEV-E8-dv-p81-dvh1.log:59). Those two are separate items whoseprepared:lines are identical (hvc1.2.4.L153 supplemental=dvh1.08.06/db1p, 3840x2014, 110.1 s); we have not read the sample entries ourselves, so we claim only that the config record answers identically for both.And a second class on the same bench, on ordinary library titles rather than test assets:
DEV-E8-axis-seek-4200.log:58andDEV-E8-axis-cues-pgs.log:71: two different feature-length 4K HEVC titles (hvc1.2.4.L153, 5972.3 s and 5737.7 s, SDR), bothdispatch: codec=173 → nativeand painting in 1.0 s and 1.9 s (started (route loopback, …)) — the gate's fail-open doing its job. Census over every 7.7.1 device log of that day — 66 slices, two further legs of the day excluded because they ran on our 7.1.3 control build: 93 probe consults logged — 85 classifiable, every one-> true(67 codec=27, 18 codec=173) and 8 unclassifiable (6 in-band across our two P8.1 assets, 2 Annex-B on the two titles above), beside 66 of the separatecodec=av01 hwSupported=false. Two of your four classes on one box, and no.unsupportedanywhere in the 93.The escape takes, where 6.81.0 threw
play:b8d16b7a…;t=30withJF_AETHER_FRAMELESS=75, which suppresses our first-frame latch and nothing else — so this is a staged escape on a native session that was healthy (#361 startup 8/8 presenting (gen 1)at17:34:59.327,#1 timeControlStatus=playing reason=- t+1.33sat.356), not a damaged head.DEV-E8-escape-dv-p8.logat 7.7.1, one arc:The slot between
session startandHDR mode ONheld[SWHost] selected HardwareVideoDecoder (VT HEVC)at 6.81.0; at 7.1.3 and at 7.7.1 it holds the verdict, and the decoder that opens two lines later is libavcodec. Picture 1.21 s after the escape line; the75.1sinstarted (route software, 75.1s)is our rig's latch releasing, not the decoder. The 7.1.3 arc is the same lines at15:24:14.956→15:24:16.155(DEV-E7-escape-dv-p8.log:158–:209), and that leg'sstats finalreads the samedropped 0 stalls 0 … obs 8.3Mbps— at75.0sof rig latch against75.1shere, which, apart from the wall-clock stamps, is the only number in this section that is not the same at both pins.At 6.81.0 (
c7e7adb5) — same title, same box, byte-identical route and rig (screen=play:b8d16b7a…;t=30 env=JF_AETHER_FRAMELESS=75in all three drivers' own stdout),DEV-E6-escape-dv-p8.log, 09-12. The other difference is the toolchain: that build is Xcode 26.6 / Swift 6.3.3. We name it rather than claim it cannot matter:The last five of those six lines are 0 at 7.1.3 and 0 at 7.7.1; only
dispatch: codec=173 → softwaresurvives, and there it is followed by the verdict and[SWDecoder] Openedinstead of by the VT selection. The 6.81.0 leg carries nohardwareDecodeVerdictline at all, and nostats final.The endurance arm — and the thing it measured is not libavcodec
We ran it, and the first thing to say is that our fixture was in the wrong population.
The title is a feature-length UHD remux — 3840x2160, 23.976 fps, DV profile 8.1, mkv,
File size: 83394264790 bytesover 7486.5 s, the served variant advertisingAVERAGE-BANDWIDTH=89114526, video ~81 Mbps by our server's own probe. Two runs at 7.7.1, both forced onto the software path withJF_AETHER_FRAMELESS=75from two different positions in the film (;t=600and;t=3000):DEV-E8-escape-dv-p8-endurance.logandDEV-E8-endurance-sw-t3000.log. Its config record is classifiable, so the probe answerscanHardwareDecode codec=173 3840x2160 -> true (status=0)and the software host does exactly what you wrote it to do::336/:338/:339, and the same three at:328/:330/:331of the second run. So these two legs measureSoftwarePlaybackHostend to end — demux, AC-3 decode, clock, enqueue, display layer — with VideoToolbox doing the video. They are not a libavcodec reading, and we are not presenting them as one. Your sentence is about that population, and the only leg we have on it is the conformance clip above — a 110.1 s asset whose last 25 s ran on the software path.What the two runs show, from
[SWHost] session startto the firstrebuf=y:;t=600);t=3000)[SWDiag]ticks inside itdispper wall secondlost/rate/rebufin that stretch0(+0)·1.00·non all 219 ticks0(+0)·1.00·non all 238 tickslayerDropacross that stretchaLead·parkedPktsat start → enddroppedtotal (stalls)lostacross every tick of the leg0(+0)on all 3640(+0)on all 384AE#549's
rate=is what made the stopped-clock seconds legible, the day after it shipped: adclk=0.00tick that also readsrate=0.00is the host parking its own clock, not a timebase stalling under it. The feed goes first —aLeadandparkedPktscollapse whilevLeadstays inside 0.42–0.62 (run 1) and 0.45–0.61 (run 2) right up to the end, falling only on the last two ticks of run 1 and the last one of run 2 (the closing three readings are 0.42 · 0.29 · 0.08 and 0.53 · 0.49 · 0.16) andlostis still 0, and the host says so itself ([SWHost] audio lead exhausted (0.15s); pausing clock for rebuffer→rebuffered to 2.01s audio lead; resuming clock, run 1:1311/:1320and 18 more pairs).Two facts bound what this can mean. tvOS filed a
cpu_resourcediagnostic against our process in both runs —Tevemate-tvOS.cpu_resource-2026-09-19-174201.ipsand…-210633.ips— each reading "90 seconds cpu time over 119 seconds (76% cpu average), exceeding limit of 50% cpu over 180 seconds", Action taken: none, each window opening within 42 ms of[SWHost] session startand closing 101.0 s and 120.2 s before that run's first rebuffer. And the native-route control — the same file, the same;t=600, no rig — ran the identical stretch for 421 s with onetimeControlStatus=playingatt+1.04sand nowaitingToPlayafter it, 0 ERROR, nostats Δ10sline at all, its reader sustaining 90.8 Mbps across the whole of it, against the title's own 89.1 Mbps container rate (avioFetchedMB949 → 5171 from t=30 s to t=420 s, and that field is bytes ÷ 1024², so 4,222 MiB in 390 s;DEV-E8-endurance-native-control.log). Its segment fetches run seg149 → seg255, which the engine's own producer ledger puts at item596.513s→1021.270s, so that control did cover run 1's whole degradation, 875.0 s → 965.3 s on the same clock.So: time-dependent, not content, not the network feed — two different scenes degrade at 220 s and 239 s, and run 1's own stretch of the film streams cleanly on the native route for 421 s. The cause is not proven. The CPU report is a strong candidate and it is only a candidate: it is four microstackshots covering 8.6 s and 8.8 s of a 119 s window (ending 1.0 s and 3.8 s before the window itself does), its heaviest stack enters an unsymbolicated non-system image in our own process at the fourth frame with no VideoToolbox or CoreMedia frame anywhere in it, and its window precedes the degradation rather than coinciding with it. A thermal-state read beside
[SWDiag], and the same leg on a lower-bitrate feature-length P8.1 title, are the two that would split it; both are cheap and both are ours to run. The one comparable clean reading we have isDEV-E8-escape-real2.log— libavcodec on 1080p H.264 through the same host, 64 ticks, 0 rebuffers,lost=0,layerDrop=0,aLeadflat at 4.0 — which says nothing about 4K.If either run's whole
[SWDiag]series is useful to you, say so and we will post it; we have kept both, 364 and 384 ticks. One sentence on 7.9.0, which we have not measured: since a CoreMedia-domain failure now hands the session to this host once per session, this host's endurance is presumably a thing that path inherits.Your conditional next step is not triggered. On the population it is scoped to — in-band parameter sets, Annex-B extradata — the escape lands on libavcodec and drops nothing:
dropped 0 stalls 0, andlost=0(+0),rebuf=n,rate=1.00and alayerDropdelta of(+0)on all 26 ticks of the clip — cumulativelayerDropreads-1on the opening tick, before the layer is readable, and0on the other 25 — clock 84.39 → 109.39 over 25.001 s of wall, and it ends at[SWHost] end of media: clock parked at 109.408srather than at a teardown. The frames that were dropped in this reply were dropped by a session whose decoder was VideoToolbox, on a file whose parameter sets are already in itshvcC. So "teachingHardwareVideoDecoderto take its parameter sets from the first keyframe" stays unopened on our evidence.The P5 control, unchanged
DEV-E8-escape-dv-p5.logat 7.7.1 (prepared: codec=dvh1.05.03,ec-3 … DV=profile5 …):Refused before any teardown, session kept and playing on. Escape line to
session kept: 1 ms here, 2 ms at 7.1.3 (15:26:18.536→.538) and 2 ms at 6.81.0 (12:45:19.579→.581) — the same two lines at all three pins. That leg carries no verdict line, and the engine says why:DV Profile 5: VT probe skipped, native dvh1 path is the only correct decode (#176)(emitted atAetherEngine.swift:4358), which isVideoRoutingPolicy.swift:119-120returningfalsebefore thecanHardwareDecodeclosure at:122is ever called. The probe fix did not widen the software path onto P5, which is the correct outcome.Closeable on our side whenever you like; the endurance arm is ours to finish, not a reason to hold it open.
superuser404notfound commentedon Sep 22, 2026
Thank you for this. The census in it is the first field reading this gate has ever had: 93 consults, 85 classifiable and every one of them
-> true, 8 unclassifiable across four assets, and no.unsupportedanywhere in the set. That last part is worth saying out loud, because it means the routing gate's fail-open is carrying the entire real-world burden of the question and the strict answer has yet to be needed on a shipping box.Closing this. The escape does what it was built to do, on both classes you found, at both pins.
Confirmed against the source
Every one of the five code claims holds, and two of the files are frozen:
VTCapabilityProbe.swiftandVideoRoutingPolicy.swiftare byte-identical from 7.1.3 through 7.10.0 and on to main, so the 7.7.1 line numbers hold at every pin anyone is likely to test.record[22]asnumOfArraysatVTCapabilityProbe.swift:148with the doc line above it saying so in words, thein-band parameter setsverdict at:94, and the gate that decides the software host's decoder at:41:So
.unsupportedand every.unclassifiable(reason:)fall through to libavcodec, which is the whole of the fix and exactly what your escape arc shows in the slot where 6.81.0 selected VT and then threw.Two precisions
The
DV Profile 5: VT probe skippedline is at 4359 in 7.7.1, which is what you read, and at 4428 on main. The string is unchanged;AetherEngine.swiftgrew above it by about seventy lines. Worth knowing before anyone diffs a future capture against your numbers.The second one is a genuine caveat on "the probe is never called for P5". True of
VideoRoutingPolicy.forcesSoftwareForUndecodableFormatin isolation, which matches the P5 case first and returns before the closure. Not true of the engine, because the call site does not pass the raw profile:A P5 source reaches the probe when the base layer is being presented on its own, or when the RPU-corrected profile is not 5 (AE#532, a Profile 5 record the RPU corrects). Your P5 control has neither, which is why it logged no verdict, and the refusal it took is the correct outcome either way.
The conditional step stays unopened, and for the reason you give
Agreed, and the discriminator is the one you named rather than the drop count: the frames dropped in the endurance arm were dropped by a session whose video decoder was VideoToolbox, on a file whose parameter sets are already in its
hvcC. TeachingHardwareVideoDecoderto take its parameter sets from a keyframe would not have touched a single one of them. It is strictlyhvcC-driven today (HardwareVideoDecoder.swift:130-152is the only place a format description is built, and it throwsnoExtradatawithout one), and it stays that way until something measured asks otherwise.The endurance arm has its own thread now
#592, with your two runs as its opening measurement, because your reading of it is right and the conclusion follows: your fixture was in a different population, and the leg measures
SoftwarePlaybackHostend to end with VT doing the video.Two things came out of following it into the source. The software route stops sharing the native route's read path one line after
Demuxer.readPacket: it inserts a producer thread and an on-disk packet spool, every packet crossing it through a binary property list, which is roughly five to seven copies of every compressed byte plus twoPropertyListcodings, all serialised through one lock pair. At 81 Mbps that is about 10 MB/s each way; at 5 Mbps it is 0.6. And the one bound in that path expressed in bytes rather than seconds,min(2 GiB, free / 4), is compared against a residency figure that includes consumed-but-retained history, so it fills purely as a function of elapsed session time. 2 GiB at your file's rate is 211 s. Your two runs held for 220 s and 239 s.That is a match on the clock and not yet on the magnitude, and I have written it up as a candidate with the test that kills it: if the spool budget is what turns over, then the lower-bitrate feature-length title you already planned has to run clean for proportionally longer, and if it breaks at 220 s again the candidate is dead. Details and the two cheaper confirmations are on #592.
One more thing came out of it that is entirely ours, unrelated to your report except that reading around the refusal is what surfaced it: since 7.8.0, a correction that gets refused was ending a running recording on its way out, which is precisely the rule #461 round 2 was built to keep. PR #591.
The
[SWDiag]series stays welcome on #592 whenever convenient; the fields I would read first aredelay=andparkedPktsduring the rebuffer episodes, and whether[SWHost] releasing rebuffer holdappears at all.fix(engine): a correction that does not rebuild costs no recording
feat(overlay): a reload that moves a session to the software decode m…