Repository navigation
Description
Split out of #461, where @cmcpherson274 ran an endurance arm on SoftwarePlaybackHost and reported it in full: #461 (comment)
The measurement is his and the fixture turned out to be in a different population than #461's, which is why this is its own thread. It is worth one regardless of what caused the degradation, because of what the code says in the middle of it.
The measurement
Apple TV 4K (3rd gen), tvOS 26.6, engine 7.7.1 (fa67d586). A feature-length UHD remux, 3840x2160 23.976 fps, Dolby Vision profile 8.1, AC-3 5.1, 7486.5 s, video around 81 Mbps, forced onto the software path from two positions in the film. Its hvcC is classifiable, so the host opened HardwareVideoDecoder (VT HEVC) for video and libavcodec decoded only the AC-3.
From [SWHost] session start, both runs:
| run 1 | run 2 | |
|---|---|---|
| clean playback | 220.0 s | 239.0 s |
| clock over wall in that stretch | 1.0000 | 1.0000 |
aLead start → end |
4.03 → 0.20 | 4.01 → 0.29 |
parkedPkts start → end |
81 → 0 | 78 → 0 |
vLead through the whole stretch |
0.42 to 0.62 | 0.45 to 0.61 |
lost on every tick of the leg |
0(+0) on 364 |
0(+0) on 384 |
| then | 19 rebuffer episodes, 2.15 to 3.11 s, median 7.4 s apart | 20 episodes, 2.41 to 2.84 s, median 7.6 s apart |
| clock over wall after that | 0.627 | 0.635 |
The same file over the same stretch on the native route ran 421 s clean with its reader sustaining 90.8 Mbps, so the source can be read faster than real time on this box.
What the code says
AudioLookaheadPolicy.clockAction takes an atRingEnd flag, and that flag is the whole discriminator. AudioLookahead.swift:53:
Only a DRY ring at the edge is a source underrun. A low lead with packets still in the ring is decode lag; the next pump pass refills it without touching the clock.
The DVR arm feeds it honestly, SoftwarePlaybackHost.swift:2049:
atRingEnd: audioLookahead.current >= ring.seqBounds.end,The VOD arm, which is the one in these two runs, hardcodes it, SoftwarePlaybackHost.swift:2456:
atRingEnd: true,with its own note above it at :2441:
In this loop there is no ring to distinguish decode lag from a dry source, so a sub-threshold lead IS treated as source-starved.
So on VOD, [SWHost] audio lead exhausted (0.15s); pausing clock for rebuffer is a statement about the lead and not about the source. On a local file that the native route reads at 90.8 Mbps, "the source ran dry" is the less likely of the two readings, and it is the one the host acts on.
There is a second thing in the same loop. applyAudioClockAction sets the rebuffer hold; waitForRenderer releases the same hold twelve hundred lines later with the reason "the renderer needs a running clock to take parked video" (:2431), because a stopped synchronizer never drains the renderer and this thread is the only one that could lift it. Two arms of one loop with opposite policies on the same flag.
The arithmetic
Over the clean stretch the lead erodes 3.83 s in 218.007 s of clock, which is a 1.76 % delivery deficit (run 2: 3.72 s in 237.003 s, 1.57 %). After the transition, clock over wall reads 0.627 and 0.635.
Those two numbers cannot both describe the same pipeline capability. A pipeline that can only source 63 % of real time does not hold clock over wall at 1.0000 for 218 consecutive seconds with lost=0 on every tick; a 4 s cushion in front of a 37 % deficit is gone in eleven seconds, not two hundred and eighteen. So either the capability collapsed at t=220 s, or the 37 % is manufactured by the response to a deficit that stayed small.
I am not claiming which. That is the question this issue is for.
Why it is not just a test rig
Since 7.9.0 this host is on a user-facing recovery path. AetherEngine+SoftwarePathEscalation.swift hands a session to SoftwarePlaybackHost once per session when AVPlayer refuses the media itself (a CoreMedia-domain failure), via reloadAtCurrentPosition { $0.preferredDecodePath = .software }. The population that trips that rung is 4K remuxes, which is exactly the population measured here. Whatever this host's endurance is at 4K, that rung now inherits it.
What would split it, at no cost to anyone's evening
Three reads of logs that already exist, no new device run:
- Does
[SWHost] releasing rebuffer holdappear in either endurance log? It fires only when the demux read gate holds, and on this arm the gate holds only atparkedVideoCap = 256. If it appears, the refill was competing with a held read and the oscillation is partly self-inflicted. If it never appears, the read was never gated and the slowness is real. - What does
parkedPktsdo DURING the rebuffer episodes? The clock is stopped, so the renderer drains nothing and parked depth should climb. Flat or falling during a pause says something else is holding the loop. delay=anddpts=across both phases.delayis accumulated render delay and it is the only field in the line that shows frames displayed LATE; a session that stalls and catches up drops nothing and enqueues on pace, and only that field grows.dptsgives the spacing of the timestamps the frames carried. Both are already in all 364 and 384 ticks.
Separately, and this one is ours: a thermal-state reading beside [SWDiag] is cheap and would retire the CPU hypothesis in one run rather than leaving it as a candidate.
Not in scope here
The #461 escape itself is fine and that issue is closed. On the population it is scoped to, sources the probe cannot classify, the escape lands on libavcodec and drops nothing: dropped 0 stalls 0, lost=0(+0), rebuf=n, rate=1.00 on all 26 ticks of the conformance clip. The frames dropped in the endurance arm were dropped by a session whose video decoder was VideoToolbox.
Activity
superuser404notfound commentedon Sep 22, 2026
Following the code from the
[SWDiag]fields back to the read path. There is a candidate with a number on it, and the number is a wall-clock one.The SW path is not the same read path past
Demuxer.readPacketThe native route and the software host share
AVIOReaderand the demuxer, which is why the same file read at 90.8 Mbps on the native control. They diverge one line later,SoftwarePlaybackHost.swift:2556-2566:readAheadis built for every remote seekable VOD source (:944,if !isLive, dem.isSourceSeekable, !dem.readsSourceDirectly), so it is on for this session and off for afile://one. It is a producer thread plusSoftwarePacketDiskFIFO, an on-disk packet spool, and every packet crosses it as a binary property list (SoftwareStoredPacket.swift:21-29):At 81 Mbps and 23.976 fps that is roughly 425 KB per video packet, about 10.2 MB/s encoded to disk and 10.2 MB/s read back and decoded, plus five to seven full copies of every compressed byte before it reaches VT, all serialised through the
operationslock and the FIFO's own lock. At 5 Mbps the same machinery moves 0.6 MB/s. This is the part of the path whose cost scales with the compressed bitrate, and it exists only on the software route.That is a plausible shape for a small, constant, from-the-first-second deficit. The measured one is 1.76 % (run 2: 1.57 %).
The one bound in that path measured in BYTES
SoftwarePlaybackHost.swift:964builds the spool withretainConsumed: true, and in that mode apop()advances the reader cursor without reclaiming. The quantity the read-ahead parks on isSoftwarePacketDiskFIFO.swift:31-34:So the spool grows at the source bitrate for the whole session, independent of how far ahead the producer is running. Its ceiling is
HLSVideoEngine.sessionRetentionBudgetBytes(HLSVideoEngine.swift:820-825),min(2 GiB, free / 4).Nothing trims until that ceiling is actually reached. Both trim calls are
while diskBytes > budgetloops (SoftwarePacketDiskFIFO.swift:255), one on every produced packet (SoftwarePacketReadAhead.swift:413) and one on every consumed packet (:292), and both return at the loop condition until the budget is crossed. At the crossing they start doing real work on both threads: anlstatand a synchronousFileManager.removeItemof a 4 MiB chunk file, inside the FIFO lock, on the demux thread that is also decoding the audio and feeding VT.Time to that crossing is a byte budget divided by a byte rate:
The two runs turned over at 220 s and 239 s.
What that is and is not
It is the only quantity in this path that produces a wall-clock cliff which moves with bitrate, and it lands within 5 to 13 % of both measurements. It is not proof: I have not found a mechanism at the crossing that by itself accounts for losing 36 % of real time, and roughly 2.4 chunk deletions per second is not obviously that expensive. So the clock matches and the magnitude does not, yet.
The prediction that settles it, at no extra cost
The next arm already proposed on #461 is the same leg on a lower-bitrate feature-length P8.1 title. That run is now a pre-registered test rather than a second data point:
budget / bitrate. Half the bitrate has to buy roughly twice the clean stretch. A 40 Mbps title should run clean for around seven minutes, not three and a half.Two cheaper confirmations from material that already exists:
cachedBytesin the 30 s memprobe (AetherEngine+Diagnostics.swift:519-533) climbing linearly and plateauing at the tick the firstaudio lead exhaustedfires. That is the crossing, seen directly.min(2 GiB, free / 4), so under 8 GiB free the turnover has to come earlier than 211 s, proportionally.Two corrections to how the line reads
While tracing the fields:
vLeadis the minimum over the interval ofrenderer.newestEnqueuedPtsSeconds - clock, and the renderer is hard-bounded byisReadyForMoreMediaData, which is exactly whatdrainParkedVideoNonblockinggates on. So a flat 0.42 to 0.62 is the display layer's own queue target and says nothing about upstream headroom. Andlostis_untimedFramesDropped + _sampleBuildFailures, frames the decoder produced that never reached the layer, not a render-deadline counter.aLeadis the only field in the whole line that can see read-path headroom, which is why it is the only one that moved.Ours to run
This does not need the Apple TV. The spool, the budget and the bitrate are all the same on macOS, so
aetherctl play --swagainst a high-bitrate source over HTTP should show the same crossing at the same place, with the temp directory as a direct readout. That is the next thing I will do here.superuser404notfound commentedon Sep 22, 2026
Ran it here. The clock half reproduces exactly. The cost half does not, and I am retracting it.
Harness
M1, 8 cores, 16 GB.
aetherctl play --reload-applying decode-path=software --reload-applying-at 500against a threaded range origin on loopback. Fixture built to be cheap to decode and expensive to spool, which is what separates the spool from the decoder: 960x540 lossless x264 over a noise filter, AC-3 5.1, 105.8 Mbps = 13.2 MB/s, 170 s. Spool depth read once a second from$TMPDIR/aether-software-packets-*.Free space was 4.00 GiB at load, so the budget was
free / 4rather than the 2 GiB cap. Prediction written down before the run: plateau at 1074 MB, reached at t ≈ 41 s.The spool behaves exactly as read from the source
And the shape is the one the code implies rather than the intuitive one. The first 2 seconds put 505 MB on disk, which is the 40 s forward window at this bitrate (predicted 529 MB). Everything after that is retained history, climbing at 12.7 MB/s against the source's 13.2, until it stops dead at the budget. So the spool's size is a function of elapsed session time, not of how far ahead the producer is running, and the crossing is
budget / bitrateaway from the start.That part is settled.
The crossing is free, on three arms
aLeadsits at 4.00 to 4.03 for the entire 120 s, straight through the crossing.dclk=1.00,rate=1.00,lost=0(+0),delay=0.00(+0.00), and zeroaudio lead exhausted,rebuffered toorreleasing rebuffer holdlines in any run.Then I measured the cost directly rather than its consequences, sampling the process's CPU time each second:
Flat at 0.41 core before and after. Deleting a 4 MiB chunk every 0.3 s, plus the two
while diskBytes > budgetloops now evaluating on every packet instead of returning at the condition, costs nothing measurable. Repeating the run with seven CPU burners against it (load average 8.8) changed nothing either:aLeadstill pinned at 4.00.So the budget crossing is real, it is elapsed-time-keyed, and by itself it is not expensive. My earlier comment offered it as the candidate for the degradation. On this evidence it is not, and the 211 s arithmetic matching 220 s and 239 s has to be treated as a coincidence until something else supports it.
What the failure of that hypothesis sharpens
Working through the rebuffer cadence properly, the transition is a bigger step than I gave it credit for, and that matters for whatever does explain it.
In phase 2, each cycle is a pause of about 2.6 s and then about 4.8 s of playing, during which the lead falls from the 2.0 s resume target to the 0.15 s pause threshold. That is 1.85 s of content lost in 4.8 s, a 38 % deficit, and it predicts clock over wall of 0.65 against the 0.627 measured. Phase 1's deficit was 1.76 %.
So the pipeline's delivery really does change by a factor of about twenty at the transition. It is not a small deficit amplified by the response; the amplification argument in my first comment was wrong about magnitude too. Something genuinely steps.
The refinement I would put money on now, and cannot test here
The spool is a temp-directory file that the whole system's unified buffer cache sits in front of. On this Mac the budget was 1.0 GiB against 16 GB of RAM, which is nothing. On an Apple TV 4K (3rd gen) with 3.88 GB total and plenty of free storage, the budget is the full 2 GiB cap, which is more than half of physical memory, written at 10 MB/s and read back at 10 MB/s.
That gives a step at exactly the same place for a different reason: while the spool is growing, reads of just-written chunks are page-cache hits; once it plateaus at a size the box cannot hold, they are not. The cost would appear only on a memory-constrained box, which is precisely why three arms on a 16 GB machine see nothing, and it would be invisible to a CPU sampler because the cost is a stall, not cycles.
It also makes a design point that stands on its own regardless:
sessionRetentionBudgetBytesbounds a temp spool by free storage (min(2 GiB, free / 4)) and never by physical memory, so the tighter the box's RAM the closer its spool gets to the size of RAM, which is backwards.The discriminator from the earlier comment is unchanged and now carries both hypotheses: the lower-bitrate title has to buy proportionally more clean time. A memory-keyed crossing scales with
budget / bitrateexactly as a cost-keyed one would.Two new things worth reading off the runs already on disk, both free:
jetsamnote in the same window as the first rebuffer. Acpu_resourcereport was already filed; a memory event alongside it would be decisive.superuser404notfound commentedon Sep 22, 2026
Reproduced the degradation here, answered my own three questions off my own logs, built the obvious fix, and measured it into the ground. Posting all of it because the dead direction is the useful part.
The shape reproduces on a Mac
Harness: 4K H.264 at 164 Mbps, AC-3 5.1, over the threaded loopback origin, on the software path. H.264 is the right codec for this because the software host's VideoToolbox branch is HEVC-only, so video is libavcodec and the loop is the thing under test. Raw decode of that file runs at 2.28x real time using about 3 cores, so the session starts with margin, exactly as yours did.
Then the load lands mid-session, at t=14 s, as two more concurrent decodes of the same file. That ordering is the whole experiment: the
everHadLeadlatch only arms once the lead has genuinely reached 2.0 s, so a session that starts starved never arms the rebuffer at all. An earlier arm that loaded the box from t=0 droveaLeadto -43 s with the clock running atrate=1.00and produced not one rebuffer line, which is worth knowing on its own.With the load applied after a healthy start:
0.653 against your 0.627 and 0.635. Same signature.
The three questions, answered on my rig
[SWHost] releasing rebuffer holdappear? Yes, 15 times against 25 pauses. Only 10 of the 25 holds ended by reaching the 2.0 s refill target. The other 15 were cancelled by the read gate.parkedPktsdo during the episodes? It climbs, 83 → 100 → 193 → 250, and then pins at the 256 cap for the rest of the run.shouldHoldDemuxReadcloses the read gate on the very loop that has to pull the audio the rebuffer is waiting for, andwaitForRendererhas to lift the hold to make any progress at all. Once parked pins at the cap the rebuffer mechanism is effectively disabled, and the session just grinds.So the pathology I described is real and now measured rather than argued.
The fix I proposed does not work, and I am withdrawing the reading behind it
The proposal was that the VOD arm's hardcoded
atRingEnd: trueis a lie, because since AE#512 that loop does have a store to ask:SoftwarePacketReadAhead's unread depth is the same fact the DVR arm reads offring.seqBounds.end. I wired it up, with the conservativetruekept for the direct loop that has no read-ahead, and ran the identical arm:parkedPktsaLead/vLeadat the endlayerDropThe clock runs at 96 % of wall and the content is fifteen seconds behind it, with the layer still dropping at the end of the run where the unfixed arm had settled at zero. That is precisely what
AudioLookaheadPolicywarns about in its own comment: a free-running clock permanently ahead of the stream, every later sample landing in the clock's past, continuous chopping that never recovers.And that means my reading of the code was wrong. On VOD the source is never "produced but not yet arrived"; the bytes always exist. So a low audio lead on VOD always means the session cannot consume at real time, and stopping the clock is the correct answer to that, not a misdiagnosis of it. The hardcoded
trueis a deliberate mapping of that fact, and the comment above it says as much. The discriminator the DVR arm needs is one this arm genuinely does not.Branch discarded.
What that leaves
If the rebuffering is correct behaviour, then the defect is upstream of it: the session should not have been under real time in the first place. Your native control read the same file at 90.8 Mbps on the same box while the software route could not sustain 81.
One number toward that, with a caveat attached. On the same fixture and the same machine, the engine's own process costs about 0.10 core on the native route and 0.41 core on the software route. The caveat matters: AVFoundation decodes out of process, so the native figure excludes its decode entirely while the software figure excludes nothing. It is not a total-cost comparison. It is a fair comparison of what the ENGINE spends, and that is where the per-packet property-list round trip and the five to seven copies live.
So the question this issue should now answer is not "why does the clock stop", it is "why does this route need so much more of the box than the other one to move the same bytes". The lower-bitrate arm still splits it cleanly, and a lower per-byte cost would move the whole curve rather than one threshold.
[-]SoftwarePlaybackHost cannot tell decode lag from a dry source on VOD, and the answer it picks is expensive[/-][+]The software path needs far more of the box than the native path to move the same bytes on VOD[/+]superuser404notfound commentedon Sep 22, 2026
Retitled, because the old title stated the reading the comment above withdraws, and a title outlives every correction under it.
To save the next reader the three screens: the
atRingEnddiscriminator is dead and should not be re-proposed. On VOD the bytes always exist, so "produced but not yet arrived" is not a possible state, a low audio lead can only mean the session cannot consume at real time, and stopping the clock is the correct response. The hardcodedatRingEnd: trueon the VOD arm is a deliberate and correct mapping rather than a lie. Wiring the discriminator up measured 0 clock pauses and a clock fifteen seconds ahead of the content, still chopping at the end of the run. The spool-budget crossing died one comment earlier, on three arms that showed the crossing costs nothing.What is left is the question in the new title, and the pre-registered discriminator for it is unchanged: the same endurance leg on a lower-bitrate feature-length P8.1 title. If turnover scales as
budget / bitrate, half the bitrate buys roughly twice the clean stretch; if it turns over at around 220 s regardless of bitrate, both byte-keyed hypotheses die and thermal or CPU owns it.The leading mechanical candidate for the per-byte cost, to be specified only after that leg: every compressed byte crosses a
PropertyListEncoder/Decoderround trip per packet on the way to an on-disk spool (SoftwareStoredPacket.swift:21-29), roughly 425 KB per video packet at around 10 MB/s written and read back, plus five to seven copies, all through the FIFO locks, and existing on the software route only.One design finding in here is worth naming independently of the bug:
sessionRetentionBudgetBytesbounds that spool by free storage and never by physical memory (HLSVideoEngine.swift:820-825,min(2 GiB, available / 4)). On a 3.88 GB Apple TV the cap is more than half of RAM, which is backwards for a RAM-constrained box whichever way this issue lands.superuser404notfound commentedon Sep 22, 2026
The per-byte candidate is dead, and on the reported codec the routes cost the same CPU
Two measurements on an M1, taken because the endurance leg is device-bound but the per-byte cost is not.
1. The envelope is not the cost
SoftwareStoredPacket'sPropertyListEncoder/Decoderround trip, own payload per round so an encoder copy is a copy the number contains (PR #603 carries the instrument):At the session's roughly 10 MB/s that is about 24 packets per second, so
24 x 427 usis around 1% of one core. Five times slower on an A15 still leaves 5%.The 395 us for 425 KB is about four to five full copies, so the "five to seven copies" reading above was accurate. The inference that they are expensive was not, and the envelope adds 0.07% to the payload so nothing is base64 inflated. Dead candidate, not to be re-proposed or optimised.
2. With the same decoder, the software route does not cost more CPU
The 0.41-against-0.10-core figure further up was taken on a 164 Mbps H.264 fixture, where the software arm had libavcodec decoding the video and the native arm did not. That gap was the decoder, not the route.
Repeated on the codec the report actually ran, 4K HEVC at 40 Mbps with AC-3 5.1, so
HardwareVideoDecoder (VT HEVC)handles video on both routes,aetherctl playwith and without--sw, 30 samples of steady state per arm, two passes:bufahead of the playheaddropat t+59CPU is level, and the software route is the lighter one in memory by a factor of about 2.6.
What that leaves, and it is a different question
The asymmetry that survives both measurements is runway.
engine.bufferedPosition, the same published field on both routes, sits 47 seconds ahead of the playhead on native and 0.41 seconds on software, on the same local file on a machine with ample headroom. A route that runs on 0.41 s of runway has no margin for any perturbation at all, which is the shape of a session that plays clean until something disturbs it and then oscillates rather than recovers.So the question this thread has been asking, "why does this route need so much more of the box", does not survive its own measurement on the reported codec. The one worth asking instead is why the software route never builds a buffer where the native one builds forty-seven seconds of it.
Caveats, so none of this is read wider than it was taken: M1 rather than an Apple TV, a local file rather than a network source, and a CLI run binds no render surface, so the
dropcounter deserves care even though the 0-against-350 gap is far outside the run-to-run variation this harness is known for.The pre-registered bitrate leg is unaffected and still splits the endurance question. Two fixtures for it are built, 4K HEVC with AC-3 5.1 at 80 and 40 Mbps, six minutes each, which brackets both hypotheses' predicted turnover inside one file.
superuser404notfound commentedon Sep 22, 2026
Correcting the comment above: it was taken on the wrong path, and the corrected arm reverses its conclusion
A
file://source never takes the spooled path.SoftwarePlaybackHostgates the read-ahead onif !isLive, dem.isSourceSeekable, !dem.readsSourceDirectly, with the reason in the comment beside it: "A local path is left on the direct loop: the spool exists to avoid a second trip to a SOURCE, and re-reading a file is a page-cache hit."So the CPU parity and the "0.41 s of runway" in the comment above describe the direct loop, which touches neither the spool nor the envelope. The reported case streams from Jellyfin over HTTP and takes the spooled path. Verified rather than assumed: with 5.6 GiB free and no
packet cache unavailableline, that session created noaether-software-packets-*directory at all.Re-run over
Scripts/slowrange.pyat 400 Mbps with 5 ms of latency, so the spool is live. 4K HEVC at 40 Mbps with AC-3 5.1,VT HEVCon both routes, 30 steady-state samples per arm, two passes:bufaheadSo the thread's premise holds after all, at about 1.8x rather than the 4.1x further up. That earlier figure was taken on an H.264 fixture where only the software arm had libavcodec decoding the video, so it was measuring the decoder. This pair holds the decoder fixed and still separates.
The envelope is not where it goes, which the first comment got right for the wrong reason. The profile agrees with the benchmark at about 1 to 1.5% of a core, and it also names why that cost exists at all:
The binary plist encoder hashes the whole 425 KB payload to deduplicate objects in its table, for a blob that can never be a duplicate. That is free to remove and worth removing on its own, but it is 1.5% and not 80%.
Two things the corrected arm does NOT settle, stated because the numbers invite it:
samplecounts wall presence in a stack, not CPU, so the demux loop showing 7442 of 8334 samples insidewaitForRenderer -> NSThread.sleepForTimeIntervalmeans that thread is mostly asleep, not that it burns CPU there. What the stack does show is the shape: the renderer wait is a sleep-poll rather than a condition variable, and the sleep returns throughcerror_nocancelon 255 of those samples. Naming where the 1.8x actually goes needs a CPU-attributed profile, not this one.And the runway asymmetry survives the correction but has a plain explanation rather than a defect behind it:
bufis 47.3 s on native and 0.51 s on software, but the software spool's lookahead is onlyahead=8.5 to 15.6 MB, about two to three seconds, with the 456 MB being mostly retained consumed history (retainConsumed: true).bufferedPositionis reporting honestly; the route simply runs on a short runway.Fixtures for the pre-registered bitrate leg are built, 4K HEVC with AC-3 5.1 at 40 Mbps, six minutes, with the 80 Mbps twin reproducible from the same command.
superuser404notfound commentedon Sep 22, 2026
Released in 7.13.0 (
18a18aac). Both consumers are pinned to it.cmcpherson274 commentedon Sep 23, 2026
Three reads, off logs that already existed, and then the pre-registered bitrate leg itself, run on the same Apple TV on 2026-09-22. The three reads answer the same at both pins, and two of them are not the answer the question expected. The leg rules out a turnover at ~220 s and a turnover set off by the spool budget's crossing on its own; what it leaves open is in §7. And the reference title itself, run once more through the same leg on a 7.13.0 build, did not turn over in 364 s of software session: one run, and a reading of 7.13.0 rather than of its frontier search alone (§8).
Two pins for §§1-7, each measurement labelled with its own: 7.7.1 (
fa67d586) on 2026-09-19 — the two runs this issue opens with — and 7.8.1 (b89240af) on 2026-09-21, a third run of the same leg on the same title from the same position, and again on 2026-09-22 for the four legs in §7. Apple TV 4K (3rd gen)AppleTV14,1, tvOS 26.6 (build23L773, the one the box's ownAppleCoreMediauser agent carries in every slice quoted here), app built on Xcode 27.0 / Swift 6.4. Prefixes trimmed; bare:Nare lines in the named log. Engine source line numbers are at 7.7.1 unless said otherwise — and they are read at those two tags deliberately, sinceSoftwarePlaybackHost.swiftmoves again at 7.13.0 for AE#595's lazy still extractor, which is nowhere near this loop. Everything in §§1-7 ran on engines without 7.13.0's frontier search (7.7.1 and 7.8.1, §6); §8 is the one reading taken at 7.13.0, and it is labelled so.1.
[SWHost] releasing rebuffer hold— it never appears. Not once, at either pin.;t=600);t=3000);t=600)audio lead exhaustedrebuffered toreleasing rebuffer holdCounted in Python over the whole slice, not with
grep -c— thegrepon this Mac is ugrep 7.8.4 and has mis-matched substrings on us before.The absence is real rather than a logging artefact, and that was checked rather than assumed. All three come out of the same loop through the same two-argument
EngineLog.emit(_:category:)—SoftwarePlaybackHost.swift:2335for the release,:2427-2431for the exhausted and:2435-2439for the rebuffered, allcategory: .swPlayback— and that overload delivers at.info(EngineLog.swift:55-57), which is the level our host handler receives. The two siblings are in all three endurance slices; the third would have been too. (They are absent from the four control slices, which have no pauses at all.) The literal also exists at both pins (:2335at 7.7.1,:2371at 7.8.1).So on this rig the read gate never held while a rebuffer hold was up, and
waitForRenderernever waited under one — the release sits insidewhile stillWaiting()(:2383, the call at:2395), so a call that finds the gate already clear runs no body and logs nothing, and the zero is a count of waits rather than of calls. Your reading of what that means stands: the read was not gated, and the slowness is not self-inflicted by the gate.2.
parkedPktsduring the episodes — it climbs, and it never gets near the capIt does exactly what you predicted a stopped clock would make it do, and the ceiling it climbs toward is nowhere near 256.
Run 3 (7.8.1), the tick immediately before each pause, the ticks inside the hold, and the first tick after the resume:
before=0on every one of the 19 / 20 / 17 episodes across the three runs. The FIFO is empty at the moment the clock stops and fills while it is stopped — the per-episode peak inside a hold runs 19–37 over the three runs (run 1 24–37, run 2 19–34, run 3 20–36) — and it is back to empty before the next pause, on all 56. At one-tick resolution the drain is not instant: the first tick after a resume is higher than the last in-hold tick on 28 of the 55 closed episodes, lower on 25 and equal on 2, because the resume lands mid-tick.ratereads the same loop from the clock's side: exactly1.00at the tick before every one of the 56 pauses and exactly0.00on every tick inside every hold — stopped, not slowed, with no deceleration ramp into it — so withparkedPkts=0at those same 56 ticks, the loop is entirely healthy on the tick before it stalls.Whole-leg maxima, over 364 / 384 / 364 ticks: 84 · 85 · 84.
parkedPktsisparkedVideo.count(:2963), which is precisely the quantityshouldHoldDemuxReadcompares againstparkedVideoCap = 256(:664-672,:2282). It reaches a third of the cap at its highest point in any of the three runs, which is the same fact as §1 from the other side.vLead, since your own table carries it. The median is0.50in every run and in both phases, and the whole-leg range is 0.01–0.62 / 0.05–0.63 / 0.03–0.62. Phase 2 moves that median by about 0.10 — 0.51 / 0.52 / 0.51 in phase 1 against 0.41 in all three in phase 2 — whileaLeadover the same boundary falls by a factor of two — the video lead barely moves where the audio lead collapses, which is what a rebuffer decision keyed on the audio lead alone would do. The one place our material differs from your rig is the floor: our phase-2 minimum reaches 0.01 / 0.05 / 0.03 against the 0.42 and 0.45 you published, and all three of those ticks are inside a hold. It discriminates neither hypothesis — you have already read the field as the display layer's own queue target rather than a measure of upstream headroom — and it is here because it was in your table.The two clean software-host controls on the same box behave as the other end of the same scale:
escape-real2(1080p H.264, libavcodec, 64 ticks) holdsparkedPkts68–79 at 7.7.1 and 70–79 at 7.8.1, withaLeadpinned at 4.00–4.03 at 7.7.1 and 3.99–4.03 at 7.8.1, and zero rebuffers; and a fourth, shorter software run on the 81 Mbps title itself (133 ticks, 7.8.1 + a host-side fix of ours) is clean throughout at 76–84 — it simply ended before 220 s.3.
delay=anddpts=across both phases —delaynever moves, in either phasedelay=reads0.00(+0.00)on every tick of every run — 364, 384 and 364 of 364, 384, 364, in phase 1 and phase 2 alike. One distinct value in each slice. It is available rather than absent (-1would print as-, andlayerDropfrom the sameloadRenderMetrics()call moves in the same ticks), so this is a measured zero.That is the field you named as the only one that shows frames displayed LATE, and it says none were.
lost=is likewise0(+0)on every tick of all three runs, andenq == dispin 363 / 383 / 363 ticks of 364 / 384 / 364.dpts=reads41.0/42.0on every tick of phase 1 in all three runs — dead on the 41.71 ms cadence of 23.976 fps — and takes exactly two values over a whole leg:41.0/42.0, and-on the 84 ticks where nothing was enqueued at all, every one of which carriesenq=+0and so has no min/max spacing to report. Eighty-two of those 84 are inside a rebuffer hold and two are not — run 2:2024(clk=3372.11 … aLead=2.07 … rebuf=n enq=+0 disp=+0 … dpts=-) and run 3:1850(clk=947.97 … aLead=1.95 … rebuf=n enq=+0 disp=+0 … dpts=-) — which is the right way round: the-tracks the empty enqueue, not the hold. It never widens and never shifts.So the picture in phase 2 is stopped, not late. Nothing arrives behind its deadline; the clock simply spends 37 % of the wall stationary — that figure being
1 − dclkfrom your own field, meaning the meandclkover the phase-2 ticks, which reads 0.6228 / 0.6319 / 0.6230 against the 0.627 and 0.635 you published for the first two runs.4. The two cheaper confirmations
cachedBytesis not in our logs, and the reason is worth a sentence. The 30 s memprobe line does not carry it at either pin:AetherEngine+Diagnostics.swift:319-367builds the line, andcachedBytes(:524-528) reachesLiveTelemetrythrough the sampler (LiveTelemetrySampler.swift:402, at 7.7.1) and nothing else. What the memprobe prints on a software session iscacheMBandcacheCount, which come fromnativeVideoSession?.diagnosticStats()and therefore read 0 the whole way through.But the memprobe does carry a byte series for the software route, which we had not read either.
pumpFetchedMBissoftwareHost.demuxer.avioBytesFetched / 1024 / 1024(AetherEngine+Diagnostics.swift:448-467readerWindowFragment, fed at:305-309;SoftwarePlaybackHost.swift:41-43) — the producer's own lifetime fetch, in MiB, every 30 s. It does not plateau; it climbs to the last sample of every run. Run 3:Free space, which sets the budget, is in every one of our endurance slices already. The engine logs it from the native session that precedes the escape:
[HLSVideoEngine] segment retention budget: 2048 MiB (volumeAvailable=100041 MiB, forwardWindow=10 seg)(run 3:93; run 1101579 MiB:94, run 2101361 MiB:95). Both callers read the sameNSTemporaryDirectory()volume through the samesessionRetentionBudgetBytes(HLSVideoEngine.swift:813-819at 7.7.1, which is the:820-825you quoted at a later pin;SoftwarePlaybackHost.swift:936-941), so the free/4 clamp does not bind here: ~98 GiB free, quarter of free ~25,000 MiB, and the spool's budget is the full 2 GiB cap.Which lets the crossing be located on the device, and it is not where the turnover is. In
retainConsumed: truethe spool grows with everything produced, sopumpFetchedMBis a proxy for its residency — imperfect in both directions (it counts container bytes the demuxer read rather than plist-encoded packet payload), which is why it is offered as a bound and not a measurement. Interpolating 2048 MiB on that series:audio lead exhaustedBoth rows are wall seconds from that run's own
[SWHost] session start, and the crossing is linear interpolation between the two 30 s samples that bracket 2048 MiB. That matters to the last figure. The memprobe'st=label is its own nominal grid and drifts from the session clock across a leg: +0.05 s at the first software sample, +0.99 s byt=360 s, and +0.16 to +0.42 s at the two samples that bracket 2 GiB. Reading the crossing off the label while reading the exhaust off the clock moves run 3's gap from 78.4 to 78.6 — a tenth that crosses a rounding boundary. One axis, both rows.And nothing happens at the crossing. Over the 20 ticks within ±10 s of it, in all three runs:
dclk1.00,rate1.00,aLead3.95–4.03,parkedPkts79–85,layerDropflat,delay=0.00(+0.00),lost=0(+0). That is an independent confirmation of your retraction, on the hardware rather than on a Mac, and from a different direction: the crossing on our box lands 58 to 78 seconds before the turnover — the read-ahead front-loads its 40 s forward window, so 883 MiB have already been read at t=30 s — and costs nothing when it happens. Read, not resident:pumpFetchedMBisdemuxer.avioBytesFetched, which is the caveat above the table and the reason the crossing is offered as a bound.Thermal: there is no reading in any device slice, and the reason is structural rather than an omission. The engine does have one —
[LagDiag] … thermal=nominal,LiveTelemetrySampler.swift:441-459at 7.7.1 (:444-462at 7.8.1 — the file shifted by three lines, so quote the pin with the anchor) — but it is emittedlevel: .verbose, which reaches OSLog debug and never a host handler, and its only caller is gatedif let readings = nativeReadings(:386-387at 7.7.1), so the software host does not produce it at any log level. We have it on the simulator only, off alog stream --level debugcapture of a native session. Your own note that a thermal state beside[SWDiag]would be cheap is exactly right, and today's line cannot stand in for it.No memory event in the window. The device carries exactly one jetsam report —
JetsamEvent-2026-08-28-083632.ips, three weeks before any of these legs — and it is present, unchanged, in the crash census taken before and after every E-8 hold, so nothing in this campaign added one. No memory-pressure note appears in any 2026-09-19 or 2026-09-21 device slice, and the twocpu_resourcereports we hold (Action taken: none) carry no storage and no thermal field at all.5. The bytes, since that is what the new title asks about
Same box, same title, same starting position (
;t=600), same stretch of film, both routes, 30 s samples of the same field family (pumpFetchedMBis software-first, native-second —pumpBytesFetched,AetherEngine+Diagnostics.swift:512-514):Three caveats on that table, all in the direction of not over-reading it. The two columns are at different pins — the software column is run 3 at 7.8.1 and the native control is at 7.7.1, so the 90.8 Mbps that agrees with your own figure stays a 7.7.1 reading and the pair is a route comparison across a pin rather than within one. The title is VBR (its master manifest declares
BANDWIDTH=178229052,AVERAGE-BANDWIDTH=89114526), so a 30 s byte count is the local content rate as much as a capability; and the two sessions cover slightly offset media windows, because the software arm played about 57 s on the native route before the escape (presenting (gen 1):152 19:21:21.720 →dispatched (gen 2):283 19:22:18.676, and on the media axisstartPosition=600.00s:94 → the software session's firstclk=657.04:362). What survives all three: the software route's own reader was observed sustaining 91.4 Mbps for a 30 s window early in the session, and averaged 58.2 Mbps across the degraded phase with the consumer blocked on it 63.7 % of the wall andreservoir=0.0son 135 of its 138 starvation lines (the other three read0.2s). It is not topping out below the container rate; it stops being able to reach it.The reservoir is the thing that drains, and
aLeadis not.aLeadholds at or above 3.90 on 196 of the 219 pre-pause ticks in run 1, 216 of 238 in run 2 and 209 of 238 in run 3 — the last such tick at +196 s, +226 s and +227 s — and then decays to the pause threshold in 23.1 s, 12.1 s and 11.8 s. What moves under it the whole time is the read-ahead's own forward window, 20.1 s → 10.0 s, with the producer promoting itself back touserInitiatedat the second reading:producer qos -> utilityreservoir=20.1s20.0s20.1sproducer qos -> userInitiated10.0s9.9s10.0sqos=userInitiateduserInitiateduserInitiatedreservoir=0.0sPhase 1 is
[SWHost] session startto the firstaudio lead exhausted; phase 2 is that first exhaust to the lastconsumer starvedline, and the blocked seconds are the difference of the cumulativeblocked=counter across each span. Taking phase 2 to the last[SWDiag]tick instead moves them to 53.3 / 67.3 / 63.5, which is the size of the choice.6. What moved above our pin, and the arms as registered
Written before your last three comments, re-cut after them, and re-cut again after the legs in §7 and §8 ran. We read the envelope retirement, the
file://correction that took the asymmetry back to ~1.8x on a live spool, and 7.13.0. Sections 1-5 stand as readings — sections 1-3 are the three reads you asked for, section 4 the two cheaper confirmations, section 5 a byte series off the same device — and none of them touches the envelope. The CPU question is where 7.13.0 moved.7.13.0's frontier search is the one change above our pin made for this issue, and it lives in the producer §5 is about.
3e9188bd(PR #604) turnsSoftwarePacketCoverage.frontierSeconds(containing:timeBaseNumerator:timeBaseDenominator:)from a walk over the coverage's ranges into a binary search, +29 −6 in that file (:79-99at 7.8.1;:79-122at 7.13.0, and at 7.14.0, where the file is unchanged). Its per-packet caller is the read-ahead producer's park check —shouldParkLocked(SoftwarePacketReadAhead.swift:444-460, evaluated by the produce loop at:355) falls through tofrontierLocked(:305-321), for the video and the audio coverage both — in a file that is byte-identical from 7.8.1 through 7.14.0, and that producer is the one whoseconsumer starvedlines are counted in §5's second table. Your release note puts the fix at 15.25 % → 14.17 % process CPU on a 4K HEVC 40 Mbps AC-3 5.1 session over an HTTP origin with the spool held at 460 MB, and the commit's own pair is 14.71 / 15.28 % → 13.97 / 13.02 %. (The other 7.13.0 commit on this issue,f4dd999d, is the test that priced the envelope.)Every reading in §§1-7 ran on engines without it (7.7.1 and 7.8.1), and none of our logs can say how the walk was doing. §§1-5 are 7.7.1 and 7.8.1, and so is §7, which ran on 2026-09-22 at 7.8.1 because 7.8.1 is the engine we ship.
rangeCountexists on both coverage types (SoftwarePacketCoverage.swift:22, andSoftwareVideoPacketCoverage.swift:43, which forwards it), but nothing inSourcesreads it beyond that forwarding definition, at 7.8.1 or at 7.14.0 — at 7.14.0 its only readers areIssue592CoverageFrontierTests.swift:57and:70— so the island count of our sessions is in no slice we hold, and we make no claim about it. 7.13.0 also differs from 7.8.1 in more than the search (48 commits, 36 engine source files, the reader and the demuxer among them), so the reading in §8 is a reading of 7.13.0 and not of the search alone.What also moved is that you have a fixture of your own: the 40 Mbps one, 4K HEVC with AC-3 5.1, six minutes, with its 80 Mbps twin reproducible from the same command. Ours are a different experiment rather than the same one, and both differences are in the direction of your predicted turnover: feature-length real library titles, streamed from Jellyfin over HTTP on the Apple TV, on a box with ~98 GiB free so the retention budget is the full 2 GiB cap rather than the
available / 4clamp. But 40 Mbps sits between our two arms (31.3 and 25.7 Mbps) and the reference (89.1), which is exactly where §7 has nothing, and yours carries AC-3 5.1, the reference's own audio family. If you are willing to publish the 40 Mbps file and the command that builds its 80 Mbps twin, we would run both through the same rig on this Apple TV, started at the head of the file rather than at our leg's 600 s, so that your bench and ours would be reading the same bytes. Every endurance title in this reply — the reference and both arms — is Dolby Vision profile 8.1; if yours is not, that is a variable of its own, and we would report it beside the reading.One piece of arithmetic on those two rates, offered as a question rather than a correction. Six minutes at 40 Mbps is 1.80 GB = 1.68 GiB, and six minutes at 80 Mbps is 3.60 GB = 3.35 GiB. Against a 2 GiB budget the 80 Mbps twin would cross at 215 s, 4 to 24 s before the reference turned over (219.1–238.9 s); the 40 Mbps file never reaches 2 GiB inside itself. On a box where
available / 4binds instead — the 5.6 GiB free you report in the correction would clamp the budget to 1.4 GiB — the same two cross at 150 s and 301 s. §7 finds the crossing free on this box at two more rates, and §8 at the reference's own rate on 7.13.0; thesegment retention budget:line is still worth printing beside any reading of them. And on our rig a six-minute file leaves about five minutes of software session after the minute the escape spends on the native route, which would cover the 80 Mbps twin's turnover if turnover scales with the rate from the reference (244–266 s), and not the 40 Mbps file's (488–532 s).Our arms, with the predictions written down first. Two lower-bitrate arms rather than one, both feature-length 2160p Dolby Vision profile 8.1 like the reference, both Matroska, and both carrying an E-AC-3 default track — the same decoder family as the reference's AC-3, so the audio bridge is not introduced as a second variable:
Each software session was to be held past its own byte prediction — ~630 s for A and ~770 s for B — and they ran 644.1 s and 785.1 s (§7); each arm is paired with a native control from the same position, so a byte series like §5's exists for both routes on both titles rather than on one. A ~44 Mbps midpoint exists in the library and was deliberately not used: its default track is TrueHD 8-channel, which changes the audio decode cost on the very host whose cost is one of the two surviving hypotheses.
One change to the arms before they ran, stated with its reason. Arm B was first a
DOVIWithHDR10Plustitle, where the reference and arm A areDOVIWithHDR10, and on the software host the decode callback carrieshdr10PlusDataper frame straight intorenderer.enqueue(SoftwarePlaybackHost.swift:813and:818at 7.8.1, with the per-session first-detection hook at:852-853) — the same class of second variable as the TrueHD one, on the same host. We swapped it for aDOVIWithHDR10title before the run. 26 of the 41 P8.1 2160p titles in our retained probe responses whose video rate falls in the 24.4–25.7 Mbps band areDOVIWithHDR10with an E-AC-3 6-channel English default (24 of 27 by source rate); the one we ran is Matroska, 130 minutes, at a source rate 0.785 % below the first choice's, which moved the byte prediction from 664 s to 669 s, the video-rate one from 691 s to 690 s and the scaled one from 551 s to 555 s — the table above carries the arm as run. Its HEVC level is 5.0 where arm A's and the reference's are 5.1; we note that rather than claim it is inert. No prediction had been posted here, so nothing already public moved.The separation was the point: 548 s and 669 s against a time hypothesis of ~220–239 s, on a box where the cap binds. The predictions above are the ones written down before the run; §7 is what it measured.
It ran on 2026-09-22 between 18:01 and 18:43 EDT: the two software arms and their native controls, four legs in one hold, all at 7.8.1.
7. The pre-registered bitrate leg, run 2026-09-22 at 7.8.1
Same Apple TV, same rig and same engine as run 3, 7.8.1 (
b89240af), in a newer build of our app: start at 600 s, with our test latch holding the first-frame signal for 75 s so that the #461 escape moves each session onto the software path at 60 s alive with no picture. The escape ran as it does in run 3 — arm Adecode-path escape … (#461):281→option correction done (preferredDecodePath=software):359, arm B:266→:332— after 57.5 s and 57.6 s on the native route (presenting (gen 1)→dispatched (gen 2); run 3's was 57.0 s). Both sessions opened[SWHost] selected HardwareVideoDecoder (VT HEVC) for codec_id=173and[AudioDecoder] Opened: 48000Hz, 6ch, codec=eac3, the same decoder family as the reference's AC-3 (both tracks are Atmos E-AC-3,[JOC=Atmos]at arm A:114and arm B:101, which the reference's AC-3 is not), and the budget line puts both on the full 2 GiB cap (segment retention budget: 2048 MiB (volumeAvailable=100266 MiB, …)arm A:111,100241 MiBarm B:98). Each software arm was followed by a native control from the same position for 420 s. Every figure below is counted in Python from the four leg logs, and time is on one axis throughout: wall seconds from that session's own[SWHost] session start(arm A:345, arm B:319).audio lead exhaustedselected HardwareVideoDecoder (VT HEVC):347started (route loopback, 3.1s):194selected HardwareVideoDecoder (VT HEVC):321started (route loopback, 3.2s):180selected HardwareVideoDecoder (VT HEVC)Source is the served manifest's
AVERAGE-BANDWIDTH(arm A:14031339911, arm B:12725673639, the reference89114526as in §5). The reference rows repeat §2's and §4's figures.Both software sessions, on every tick:
rate=1.00(644 of 644, 785 of 785),rebuf=n,delay=0.00(+0.00),lost=0(+0),corrupt=0.audio lead exhausted,rebuffered toandreleasing rebuffer holdoccur 0 times in both slices, and so does the bare substringreleasing.aLead3.97–4.03 on both.parkedPkts74–85 on A after its first ten ticks (the first reads 12, the session filling) and 74–86 on B throughout, close to the 68–84 that §2's clean controls held.vLeadmedian 0.51 and 0.52, 0.43–0.64 and 0.41–0.65 after the first ten ticks.dpts=41.0/42.0on 785 of 785 B ticks and on 641 of 644 A ticks, the other three being A's first seconds (two-withenq=+0, one41.0/41.0);enq == dispon every tick but each session's first;layerDrop0 → 16 over A and 2 → 2 over B.Where the reference turned over — 219.1, 238.2 and 238.9 s — both arms were unremarkable: the 60 ticks between 200 and 260 s of session read
rate1.00 anddclk1.00 on every one,aLead3.99–4.03 (A) and 3.97–4.03 (B),parkedPkts77–83 and 74–81,rebuf=n.The read-ahead said two things in each session and then nothing for the rest of the leg: the start-of-session
consumer starved: waits=1 blocked=0.01s reservoir=0.0s qos=userInitiatedat +0.1 s (A:363, B:336— the same line, to the character, that all three reference runs open with) andproducer qos -> utility (now=utility reservoir=20.1s …)at +0.8 s and +0.9 s (A:377, B:348). Neither has aproducer qos -> userInitiatedline, so the reservoir never came back down to the 10 s boost point, and neither has a starvation line after the first tenth of a second.pumpFetchedMB, the software host's own reader (§4), and its native counterpart on the controls, with the windows taken on the wall clock between consecutive 30 s samples::441→:2047, 30.3 → 631.3 s):250→:693):418→:2083, 30.3 → 781.4 s):232→:760)AVERAGE-BANDWIDTHArm A's reader ran above its title's average over the stretch it played, and so did its native control over an overlapping one (600 s to about 1,020 s of the film, against the software session's 654 s to 1,297 s); the title is VBR, as §5 said of the reference. Neither control reaches 2 GiB inside 420 s.
On the same series, interpolated exactly as in §4, 2048 MiB is crossed at 439.6 s on arm A (between
:1484, 1,962 MiB at 421.0 s, and:1566, 2,101 MiB at 451.0 s) and at 613.9 s on arm B (:1683, 2,005 MiB at 601.2 s, to:1751, 2,106 MiB at 631.2 s) — both earlier than the 548 s and 669 s predicted, because the read-ahead front-loads its window (238 and 253 MiB were already read at 30 s, as 883 MiB were on the reference) and, on A, because its reader ran above its title's average. A then played 204.5 s past its crossing and B 171.2 s; the 20 ticks within ±10 s of each crossing readrate1.00,aLead3.98–4.02 and 3.99–4.03,parkedPkts77–82 and 74–81,delay=0.00(+0.00),lost=0(+0). The reference turned over 57.7 to 78.4 s after its own crossing. §4's caveat applies unchanged:pumpFetchedMBis bytes read, so each crossing is a bound, not a residency.Your pre-registration, as you put it on 2026-09-22 at 09:04 UTC:
The second branch did not happen. Neither session turned over at around 220 s, or at all: 644.1 s and 785.1 s of software session at 35 % and 29 % of the reference's source rate,
rate=1.00on every tick. So on this box at 7.8.1 thermal or CPU does not own it as a clock.The first branch, as the mechanism it was registered with, did not happen either. Both byte-keyed hypotheses put the clock at the spool budget; the budget was crossed at 439.6 s and 613.9 s and the sessions ran 204.5 s and 171.2 s clean past it, more than twice as long as the reference ran past its own (57.7–78.4 s). That is your retraction of the crossing as a cost, on the hardware, at two more rates: the crossing on its own does not turn a session over at 26 or 31 Mbps on this box. A crossing-keyed cost that only bites at the reference's rate is not ruled out by this; it belongs to the rate question below.
What the legs do not rule out, and we would rather say it than have you find it, is the first branch's bare arithmetic. Scaled from the reference's own 219.1–238.9 s by source rate,
budget / bitrateputs arm A's turnover at 623–679 s and arm B's at 761–829 s, and the legs ended at 644.1 s and 785.1 s, inside both windows (by video rate the windows are 582–634 s and 714–778 s, which the legs clear by 10 s and 7 s — not a margin to lean on). We sized the legs against the crossing, not against that. The one handle on it is bytes: on §4's series the reference turned over at 2,508 and 2,628 MiB read at 7.7.1 and 2,687 MiB at 7.8.1, and arm A read past 2,889 MiB (:2047, 631.3 s) with nothing moving, which a trigger keyed to the bytes the path has moved would not allow; arm B ended at 2,570 MiB (:2083) and does not test it.So, in your terms: the ~220 s clock is gone; the spool budget, on its own, is not what turns a session over at 26 to 31 Mbps; and a turnover that scales with the bytes moved is contradicted by arm A, by 202 to 381 MiB, and untested by arm B. What remains, at 7.8.1, is chiefly what the two arms and the reference differ on — the rate the software path has to carry (they also differ in content, in audio codec and, for arm B, in HEVC level). §5 is what the reference looked like at its rate, in run 3 at 7.8.1: the reader at 91.4 Mbps in its first window and 58.2 Mbps averaged across the degraded phase, the reservoir at 20.1 s at +3.0 s and at 10.0 s at +171.4 s,
reservoir=0.0son 135 of its 138 starvation lines. One ordering is worth adding to that: the first starvation line after the start of the session comes at +225.8 s in run 2 and +226.7 s in run 3, before those runs' first exhausts at 238.2 s and 238.9 s, but at +246.4 s in run 1, twenty-seven seconds after its first exhaust at 219.1 s — so the reader was not yet starving the consumer when run 1 began to turn over. The two arms never came near any of it: no boost, no starvation line after the first tenth of a second, readers averaging at or above their titles' rates over the whole leg (1.18x and 1.01x).One reading fits all three titles, and it is an inference, not a finding: that what the software path on this box can carry at 7.8.1 lies somewhere above what arm A asked of it — its reader held 37.0 Mbps for 601 s without the reservoir once falling to the boost point — and below what the reference asked of it. This leg does not measure where that line is, because nothing between 31 and 89 Mbps ran, and it does not say what the line is made of: a per-byte cost the box carries at 37 Mbps and not at 89 would look exactly like this, so what it retires is CPU as a clock, not CPU. The run-1 ordering above is a reason not to assume the line is the reader's alone.
The discriminator for both open questions is one more rate, between the two populations, held as long as these were. A ~45 Mbps title puts the scaled
budget / bitratewindow at about 434–473 s, well inside a leg of this length, so one run would place a point between 31 and 89 Mbps and settle the bare arithmetic too. Every title of this class near that rate that we have probed, six of them from 43.6 to 46.0 Mbps source, has a TrueHD or DTS 8-channel default, the class of confound §6 declined, and the library's others at that rate are unprobed; your 40 Mbps fixture has the right audio family, and on our rig its six minutes are enough for the rate question — the reference turned over inside its first four minutes of session at 7.7.1 and 7.8.1 — and not for the arithmetic one (§6). Running A or B again past about 680 s or 830 s of session would settle the arithmetic without placing the point.All four legs ran at 7.8.1, and both software legs ran with the frontier walk that 7.13.0 removed. Whatever the island count was on these two titles — it is in no log (§6) — the walk did not turn either session over, 644 s at 31 Mbps and 785 s at 26 Mbps. Whether it is part of what turned the reference over is the question §8 puts to 7.13.0: the reference title, from the same position, through the same rig.
8. The reference title again, run 2026-09-22 at 7.13.0
One leg, on a build of our app whose only change from §7's is the engine pin and the strings that name it: AetherEngine 7.13.0 (
18a18aac), with FFmpegBuild 3.4.0, the same FFmpeg libraries as 7.8.1, so between this build and §7's the engine source is the only variable, and every figure this leg produced is a 7.13.0 reading; the figures from runs 1 and 3 and from earlier sections set beside them keep their own pins. Runs 1 and 3 ran on earlier builds of our app, as §7 says of run 3, and from a different place in their hold: each ran third after the app was installed, following two escape legs of about two minutes each on other Dolby Vision titles, where this one ran first, straight after the install, so the box's state going into the leg was not matched, and it was not recorded. Same Apple TV, same title, same position and same recipe as runs 1 and 3: start at 600 s, the 75 s latch, the #461 escape at 60 s alive with no picture —decode-path escape … (#461):283→option correction done (preferredDecodePath=software):351, after 56.7 s on the native route (presenting (gen 1):155→dispatched (gen 2):286; 56.9 s in run 1, 57.0 s in run 3). The session opened[SWHost] selected HardwareVideoDecoder (VT HEVC) for codec_id=173:340,[HardwareVideoDecoder] opened HEVC 3840x2160 10-bit:342and[AudioDecoder] Opened: 48000Hz, 6ch, codec=ac3:343, as runs 1 and 3 did, on the full 2 GiB cap (volumeAvailable=100125 MiB,:97);started (route software, 75.1s):460is our latch releasing. Time is wall seconds from[SWHost] session start(:338), the axis of §4 and §7.audio lead exhaustedOn every one of the 364 ticks:
rate=1.00,rebuf=n,delay=0.00(+0.00),lost=0(+0),corrupt=0,dpts=41.0/42.0, anddclk1.00 on every tick after the first.audio lead exhausted,rebuffered toandreleasing rebuffer holdoccur 0 times; the bare substringreleasingoccurs once, in#597 background teardown: releasing the video pipeline(:2077), logged when the app was sent Home to end the leg.aLead3.94–4.03,parkedPkts75–85,vLeadmedian 0.52 (0.37–0.62),enq == dispon every tick but the first,layerDrop2 → 7, and the memprobe'sswDroppedat 2 of 8,647 frames by the last sample (run 1: 125 of 7,360; run 3: 113 of 7,561). The 126 ticks from 239 s to the end of the session, which ran 145.0 s past run 1's onset and 125.2 s past run 3's, readrateanddclk1.00,aLead3.94–4.03,parkedPkts76–84.The read-ahead said two things and then nothing, as on §7's arms: the start-of-session
consumer starved: waits=1 blocked=0.01s reservoir=0.0s qos=userInitiatedat +0.1 s (:355) andproducer qos -> utility (… reservoir=20.0s …)at +3.1 s (:378). There is noproducer qos -> userInitiatedline (runs 1 and 3: +169.7 s and +171.4 s, reservoir 10.0 s) and no starvation line after the first tenth of a second (runs 1 and 3: 118 and 137 of them, the first at +246.4 s and +226.7 s).pumpFetchedMBon the same stretch of film, in Mbps on the wall clock between consecutive 30 s samples:The three agree to within 6 Mbps over the first two windows. From the third on, runs 1 and 3 read 53–77 Mbps, and the fall began while their clocks still ran at 1.00, before the producer's boost at 169.7 s and 171.4 s and well before either turned over; this leg read 86–95 Mbps to the end, 91.0 Mbps first sample to last (3,585 MiB over 330.4 s,
:535→:2056), 1.02x the title'sAVERAGE-BANDWIDTHand about what the native route's reader sustained on this title in §5 (90.8 Mbps, at 7.7.1). 2048 MiB is crossed at 136.3 s (:954, 1,870 MiB at 120.3 s, to:1095, 2,205 MiB at 150.3 s), earlier than in runs 1 and 3 because this reader did not slow, and the 20 ticks within ±10 s of it readrate1.00,aLead3.95–4.02,parkedPkts75–81. By 219.1 s and 238.9 s of session, where runs 1 and 3 first exhausted at 2,508 and 2,687 MiB read, this reader had read 2,958 and 3,172 MiB, and it ended at 4,476 MiB (:2056, 360.6 s) with nothing moving. §4's caveat applies: bytes read, a bound, not a residency. The spool is the same code at both pins:SoftwarePacketReadAhead.swift,SoftwarePacketDiskFIFO.swiftandSoftwareStoredPacket.swiftare byte-identical from 7.8.1 to 7.13.0, the host builds the spool with the same block (SoftwarePlaybackHost.swift:941-976at 7.8.1,:935-970at 7.13.0), andsessionRetentionBudgetBytes(HLSVideoEngine.swift:820) is unchanged. No#561line appears, so 7.9.0's escalation played no part.What this is. One run at 7.13.0, against three on this title at 7.7.1 and 7.8.1 that all turned over inside 240 s (runs 1-3; runs 1 and 3 from this position). A 364 s session, so the reading is no turnover before ~364 s, not no turnover at all. And 7.8.1 to 7.13.0 is 48 commits in 36 engine source files, the reader and the demuxer among them (§6), so this is a reading of 7.13.0 and not of the frontier search on its own.
What it says, within that. A clock set by the title alone, one the engine cannot move, would have turned this session over inside 240 s, where all three earlier runs turned over; it did not. A clock set by the box is not ruled out as cleanly, because the box's state going into this leg was not matched (above) and there is no thermal reading on either side (§4); what argues against it, at a lower rate, is §7's arm B, which ran 785 s clean at 7.8.1 as the third leg of its own hold. The spool budget's crossing is free here at the reference's own rate, on the same spool code and the same 2 GiB cap, and a turnover keyed to the bytes the path has moved, which arm A contradicted at 31 Mbps on 7.8.1, is contradicted at 89 Mbps on 7.13.0, whose reader went 1,789 to 1,968 MiB past the bytes at which runs 1 and 3 turned over: neither byte-keyed reading of the crossing, the cost one or the memory one, is enough on its own at this rate on this engine. What the leg does show is where this run at 7.13.0 parts from runs 1 and 3 at 7.7.1 and 7.8.1. None of what accompanied the turnover in runs 1 and 3 appears in this one: the reader falling off from about 90 s into the session while the clock still ran, the boost at 169.7 s and 171.4 s, the starvation lines from 246.4 s and 226.7 s. That is the producer your frontier search sits in, and it is the shape your commit gives the walk, cheap early and expensive later; but the reader and the demuxer moved in the same span, and one run cannot tell the search from them. Nor does it measure how much of the box the software route needed to do it: there is no CPU reading here.
What would firm it up. A second 7.13.0 run of this leg, held past 364 s and run third after the same two escape legs as runs 1 and 3: a second sample, a matched start, and the way to see a later onset if 7.13.0 moved the turnover rather than removed it. And a ~45 Mbps title (§7), with its audio confound, still places a point between 31 and 89 Mbps: at 7.8.1 it settles §7's arithmetic, and at 7.13.0 it says whether anything between the two rates still turns over.
superuser404notfound commentedon Sep 23, 2026
Thank you, this settles more than it asked. Taking the readings as given: the read gate never held under a rebuffer hold (§1), the FIFO is empty at every pause and fills during it (§2), nothing is late (§3), and the spool budget's crossing is free at three rates on the hardware (§§4, 7, 8). The ~220 s clock is gone at 26 and 31 Mbps. That leaves the rate question, and one run at 7.13.0 that did not turn over.
§8 cannot be read as the frontier search yet, and the reason is on our side
The search only buys something if the coverage has many islands. I measured that today instead of assuming it, with a temporary counter in the producer (the instrument your §6 noted nothing reads), and the answer depends on the muxer, not on the engine.
On HEVC the read-ahead keeps its video coverage from
pts + duration. The reorder-aware presentation coverage is built for H.264 only (SoftwarePlaybackHost.swift:948,videoReorderDepthis32for H.264 andnilotherwise), so every other codec gets the plainSoftwarePacketCoverage, which merges touching ranges and deliberately tolerates no gap, not even one tick.My fixture fragments because of how FFmpeg muxed it. Its video packets carry
duration=41against PTS deltas of 41 and 42 ms, so every 42 ms step leaves a 1 ms hole:Same ratio from both sides. At 0.70 islands per frame and 23.976 fps, the 4096-range cap is reached after about 241 s of stored video. That is arithmetic, not a measurement. It is also what made the walk visible in the profile behind
3e9188bd, and it is why that commit's "cheap early, expensive later" described that fixture.A title muxed by mkvmerge or MakeMKV should not fragment at all. Those write
DefaultDurationas 41708333 ns, andmatroskadecturns that into a packet duration withav_rescale_q, which rounds to nearest: 42 ms. With 42 ms against 41/42 ms deltas every range touches its successor, the coverage stays one island, and a binary search over one range changes nothing. I have not verified your reference title; this is what the demuxer does with the value such muxers write.So whether §8 can be about the search comes down to one read on your reference, the Mac only, no device round:
0 gapsmeans one island, the walk was never expensive on that title, and §8 has to be something else in those 48 commits or the box's state. Your write-up already names both, and the unmatched start (first after install against third in the hold) is the stronger candidate. Many gaps would make the search a real candidate, and arms A and B would need the same read before anything is concluded from them. They ran 644 and 785 s at 7.8.1 with the walk in place, so if they fragment too, the walk alone cannot be what turns a session over.Two things the counter found that stand regardless of your title
Both only apply where the coverage fragments. They are real on any file muxed like my fixture, and neither explains your turnover.
insertreturnsfalseand nothing reads that result, so the coverage stops describing new packets. What reads the frontier afterwards sees nothing: cached-seek eligibility (SoftwarePacketReadAhead.swift:170,:233) andbufferedPosition(SoftwarePlaybackHost.swift:113).bufferedPositionon a fragmented HEVC session is the end of the current island, not the end of the buffer. That is thebuf0.41 to 0.51 s I reported further up, and I read it there as "the route simply runs on a short runway". That reading was wrong. The runway is the reservoir, 20 s at theproducer qos -> utilityline on every one of your sessions. The frontier stops at the next rounding hole.I will take both up separately, since they are coverage defects and not endurance ones.
The fixture
The file from yesterday was not kept, so there is nothing to publish as is. The recipe I used today is below. It does not give you the file you asked for: VideoToolbox's rate control undershoots on this source (
-b:v 40Mlands at 28.6 Mbps), it is not Dolby Vision, and it is FFmpeg-muxed, so it fragments exactly as described above. That last point makes it the wrong bench for your rig: it would add the variable your titles probably do not have.For the rate question, one of your own titles near 45 Mbps still says more than this, TrueHD confound and all. If you run one, the gap read above on it and on arms A and B would tell us which of the three sessions carried a fragmented coverage.
Your "what would firm it up" stands as written: a second 7.13.0 leg on the reference, held past 364 s and run third after the same two escape legs. Together with the gap read, it either separates the engine from the box's state or it does not.
cmcpherson274 commentedon Sep 23, 2026
The gap read you asked for, on the reference and both arms. Mac-only, no device round.
A property of the files, with no engine pin: ffprobe 8.1.2 (Homebrew, unpatched) over the Jellyfin static stream, 2026-09-23 12:22 EDT, with stderr empty on all three. Counted with your snippet unchanged, each saved CSV on stdin. Writing application and DefaultDuration are mkvinfo v100.0 on each file's first 2 MiB, 12:24 EDT.
duration· pts deltas6350f1ce…3fdd8378…5f246460…All three are mkvmerge titles and all three fragment. The reference matches your fixture to the frame, so by your test §8 can still be about the search.
The two 23.976 titles declare the 41708333 ns you named, and every packet still reads 41 ms. Where a block has no BlockDuration of its own,
libavformat/matroskadec.c:4209sets it todefault_duration * laces / time_scaleinuint64_t(:273,:397), so 41708333 / 1000000 truncates to 41, 1000000 ns being the 1 ms timestamp scale of these pts. It reachespkt->durationat:4097through:4216, with noav_rescale_qon the way and nothing that reads the writing application. Those lines are n8.1.2: the release this ffprobe is built from, and the FFmpeg that 7.8.1 and 7.13.0 ship through FFmpegBuild 3.4.0, whose one matroskadec patch adds a warning. The file is unchanged at n8.1.3. The timestamps round to nearest: all 719 pts are n × 41.708333 ms (41.666666 on arm A) rounded to the nearest ms. So each 42 ms step leaves a 1 ms hole, and each title's gap count equals its count of 42 ms deltas.Arms A and B fragment like the reference. At 7.8.1 (
b89240af) they ran 644.1 s and 785.1 s with the walk in place:rate=1.00on every tick, noaudio lead exhausted, and no starvation line after the first 0.1 s (our §7). By your own test, "the walk alone cannot be what turns a session over". If the walk is part of the reference's turnover, it needs something the arms lacked, and they differ from the reference chiefly in rate (our §7). The rest of the 48 commits from 7.8.1 to 7.13.0 and the box's state remain candidates. This read separates none of them. The second 7.13.0 leg is the one you named to separate the engine from the box's state.Not in this post: the ~45 Mbps title and the second 7.13.0 leg. Neither has run, and both need Apple TV time. Our Apple TV time before its development signing expires (2026-09-24 06:22 EDT) goes first to the 7.15.1 device battery. The 7.13.0 (
18a18aac) leg on the reference, held past 364 s and run third after the same two escape legs, has its build ready and waits behind it. No ~45 Mbps leg is scheduled. The 7.13.0 leg goes here, with its pin, once run.cmcpherson274 commentedon Sep 24, 2026
A short note at 7.15.1, to keep this thread current. It is not ask 4, and it adds nothing about §8's frontier walk.
Ask 4 has not run. That is the second 7.13.0 (
18a18aac) leg on the reference, held past 364 s, third after the same two escape legs. Its build is ready and its driver has only been dry-run; neither has touched the Apple TV. Our device time went to the 7.15.1 battery, and the leg will not run before the box's development signing expires (2026-09-24 06:22 EDT). Once the box is re-signed and back on the bench, the leg stays on our list with the same 7.13.0 build. It goes here with its pin when it runs, or we say here that we dropped it. No ~45 Mbps leg is scheduled.What 7.15.1 does say: session length at its own pin (Debug device build, two runs, 2026-09-23, not a reading about the frontier walk). Same recipe on the reference (
6350f1ce…, 2160p Dolby Vision Profile 8.1, Matroska), same Apple TV: start at 600 s, the 75 s latch, our #461 escape to the software path at 60 s, our Dolby Audio Bitstream setting off, then 364[SWDiag]ticks from[SWHost] session start.rate=1.00rebuf=yaudio lead exhaustedfa67d586, 2026-09-19 17:40)b89240af, 2026-09-21 19:22)18a18aac, 2026-09-22 19:46)b93f9c4b, 2026-09-23 16:14b93f9c4b, 2026-09-23 17:25In both 7.15.1 sessions
rebuf=nis on every tick, the software host again selectedHardwareVideoDecoder (VT HEVC), and the read-ahead logged only its start-of-sessionconsumer starved(+0.09 s, +0.06 s): noproducer qos -> userInitiated, no later starvation line. There is no#561line in any of the five slices. Each session is 364 s, so the reading is no starvation before ~364 s, not none at all.On your unmatched-start candidate, one 7.8.1 run. At 7.8.1, on a later build of our app (
61e07564), a run of the recipe placed first after a fresh install, as the 7.13.0 leg was, first exhausted the audio lead at 235.9 s, against run 3's 238.9 s from the third place. A stall net of our own, new in that build, ended it at 269.0 s, so only its onset is the engine's. That is one run, on a different build of our app, and it says nothing about 7.13.0 from the third place, which is what ask 4 measures.What these runs cannot separate. The 7.15.1 runs carry 7.13.0's frontier search (
3e9188bd) and 7.15.1's #613 fix (51eb95fb, PR #614), with everything else from 7.8.1 to 7.15.1, FFmpeg n8.1.3 (FFmpegBuild 3.5.0) among it, and our own app changes since runs 1 and 3 (build1a1779c4, whose stall net armed on both runs and counted nothing). They cannot tell the search from #613/#614, or either from the rest. The 7.13.0 run read clean without #613/#614 and on FFmpegBuild 3.4.0; whether it was representative is ask 4's question. Atb93f9c4bHEVC is on your successor-PTS coverage (SoftwarePlaybackHost.swift:14-24, used at:960), so by the code these sessions' video coverage does not split at the 1 ms holes the gap read counted, and neither the walk nor the search has islands to cross in them (we log no island count). That is why none of this bears on §8, and why ask 4 stays a 7.13.0 leg.One fact we had not said here. Every run above, at every pin, is a Debug build of our app (
Debug-appletvos), and the two device build logs we still hold that compile AetherEngine (the 17:25 run's, and the 7.13.0 build ready for ask 4) both compile it at-Onone. The rows compare Debug with Debug. We have not measured what-Ononecosts the software path.Bare
:Nare lines in that run's log; every count in Python. Run 1: session start:334, ticks:366–:2014, firstaudio lead exhausted:1311, reader:543–:1993. Run 3::332,:362–:2051,:1404,:538–:2031; one tick atrate=0.00readsrebuf=n(:1758). 7.13.0::338,:367–:2073, reader:535–:2056. 7.15.1 16:14::340,:369–:2118, decoder:342, starvation:357, reader:535–:2102, net armed:462. 7.15.1 17:25::338,:367–:2117, decoder:340, starvation:355, reader:531–:2101, net armed:457, profile:96. 7.8.1 on61e07564: session start:334, firstaudio lead exhausted:1390, the net's end:1569. The 17:25 and61e07564launches also carryJF_AUTO_RETRY=6, which acts only on an error card: the 17:25 slice has no ERROR line, and on61e07564it fired at:1598, after the net's end. Engine lines atb93f9c4b.superuser404notfound commentedon Sep 24, 2026
Thank you for both. The gap read corrects me, and the 7.15.1 runs answer the question ask 4 was for.
The matroskadec correction is right
I read
matroskadec.con FFmpeg's main branch, not on the tag we ship. Theav_rescale_qI described is642ae726ff("rescale default duration derived block durations to stream timebase", 2026-07-21), which is on main only. At n8.1.2 and n8.1.3 the line is the truncatingtrack->default_duration * laces / matroska->time_scaleat:4209, exactly as you quoted. So mkvmerge titles fragment on every FFmpeg we have shipped, and my "should not fragment at all" was wrong for all three of your titles.What the two posts settle together
Sorted by pin and by place in the hold:
61e07564)The place in the hold does not separate anything: 7.8.1 turns over from both places, 7.15.1 runs clean from both. I called the unmatched start the stronger candidate, and your two runs contradict it from both sides. What separates the sessions is the pin. The usual limits hold: one run per cell, sessions of 364 s, your app builds differ between the rows, and there is no thermal reading.
What changed between 7.8.1 and 7.13.0 on this path
I went through the 7.8.1..7.13.0 source diff for what runs in a VOD software session after load. FFmpegBuild is 3.4.0 on both. Of the commits:
3e9188bd, the frontier search, is on the steady-state path: it runs on every produced packet.ed04abf2(AE#595) makes the still extractor lazy, and on 7.8.1 it was only ever built for live.8ac5c256(AE#585) holds the file head during the index pass, which ends before playback starts.da3576ea(AE#551) picks request headers per request instead of per hop, which is the same work at a different place.#561line), and lifecycle (The engine cannot tell that the media server went away underneath it, and never recovers from it #597).By elimination, the frontier search is what the 7.13.0 leg points at. That does not make the walk the cause on its own, and your gap read shows why. Arms A and B fragment at the same rate per frame (0.66 and 0.71). Their packet rates also match the reference's: 23.976 or 24 fps of video, and AC-3 or E-AC-3 at 31.25 packets/s. So the walk cost them what it cost the reference, second for second, and they ran 644 s and 785 s clean.
The reading that fits all seven sessions: the walk is a cost that grows with the length of the session, a box with headroom absorbs it, and the 89 Mbps session is the one without headroom. A revert A/B would prove it, and nothing here does. It is also moot on 7.15.1: with the successor coverage HEVC has no islands, so there is nothing to walk and nothing to search.
Ask 4 and the ~45 Mbps leg
From my side, neither is needed any more. Ask 4 was there to separate the engine from the box's state, and the 7.15.1 third-place run does that at a later pin. A 7.13.0 leg now could only separate the search from the other 7.8.1..7.13.0 commits, and 7.15.1 has removed what the search sped up. Please drop both unless you want them for your own reasons. The device time is better spent elsewhere.
-OnoneThank you for stating it, it matters. Every number in this thread, including all five rows of your table, is a Debug build with the engine at
-Onone. The software path is where the per-packet Swift work sits: the frontier, the coverage, the stored-packet copies. That is the work unoptimised builds slow down the most. TestFlight and App Store builds compile the engine optimised. So the turnover is established at-Onone, and whether an optimised 7.8.1 build ever turned over on this title is unknown. For any future comparison of what the software path costs against the native one, which is still what this issue's title is about, an optimised build is the one to measure.Where this leaves the issue
The turnover no longer reproduces on 7.15.1 at your reference's rate, from either place in the hold. The open question from the title, why the software route needs so much more of the box than the native route for the same bytes, is engine work on my side and does not need more device runs from you. I will leave the issue open for that, unless you would rather it be tracked separately.
superuser404notfound commentedon Sep 24, 2026
One more round on my side, all on the Mac. None of it needs your device.
-Ononeis not what moved your sessionsI measured one 4K HEVC + AC-3 5.1 fixture at 91.6 Mbit/s, the reference's rate, on 7.15.1:
aetherctl play --sw, a range origin at 1 Gbit/s with 20 ms latency.-Onone)-Ononedoes not touch those. So the Debug builds behind every row of your table cost little, and they do not explain the turnover at 7.7.1 and 7.8.1.VTDecoderXPCServicecosts about 0.035 cores on both routes, so the gap between the routes is entirely in the engine process.No run of any arm rebuffered, and
aLeadstayed at or above 3.98 s throughout.One cost that should not have been there, now fixed (#618)
The profile of the Release software route had one clear outlier. It was the largest active frame outside the decoder:
SoftwareStoredPacket.encoded(), the envelope every packet crosses into the read-ahead spool.Set, so it hashed the whole payload of every packet, about 475 KB per frame at this rate.8710a245, not yet in a release.8710a245That is 6.8 % less, with no overlap between the arms. The encode subtree fell from 204 profile samples to 2. It closes about a quarter of the gap to the native route, not more.
The rest of the software route's profile is mostly by design. The spool's own
writeandreadare about 22 % of the active samples, and that spool is what serves cache-local seeks and scrub stills. The remainder is VT decode, render sync and audio. One more copy, in the source reader, is not specific to this route and is now tracked as #619.Where this leaves the issue
superuser404notfound commentedon Sep 24, 2026
A short addendum, because it bears on the memory-pressure reading earlier in this thread.
The source reader's copy I mentioned (#619) is fixed in #620, merged as
e7b22047and not yet in a release. On CPU it is in the noise, about -0.003 cores on both routes. On memory it is not. Peak footprint from/usr/bin/time -l, on the same 91.6 Mbit/s fixture and M1 Air as above, 45 s sessions, three runs per arm:The old reader allocated a fresh 12 to 18 MB buffer on every 4 MB trim and grew it on every append, and much of that stayed resident. That is roughly 420 MB off the software route and 330 MB off the native one. These are Mac readings, not Apple TV ones, but on a 3.88 GB box that is the larger of the two changes this round. It needs nothing from your side. It will be in the next release.
superuser404notfound commentedon Sep 24, 2026
Both changes from this round are released in 7.15.2: the packet envelope (
6887a2b7, #618) and the read-window copy (a8506c04, #620). Nothing else is waiting on this thread from my side.cmcpherson274 commentedon Sep 24, 2026
Ask 4 ran on 2026-09-24, with one difference from how we described it: it is not held past 364 s. It kept the wait that runs 1 and 3 and §8 used, so like them it covers 364 s of software session. Here it is with its pin, as our last note promised. You said it is no longer needed; it asks nothing of you.
The leg. 7.13.0 (
18a18aac, FFmpegBuild 3.4.0), a Debug build of our app with the engine at-Onone, the same Apple TV, the reference on the same recipe as runs 1 and 3, session start 2026-09-24 13:45 EDT. It ran third after the same two escape legs, and the start matched run 3's: the P8.1 leg escaped to the software path, and the P5 leg's escape was refused assoftwarePathCannotRepresentSourceand it stayed on loopback, the same two arcs as in run 3's hold, with our 75 s latch releasing at 75.1 s and 75.0 s (run 3's hold: 75.2 s and 75.2 s).rate=1.00/rebuf=yaudio lead exhaustedThis leg's reader in all eleven windows, in Mbps: 93.4, 90.3, 89.7, 92.0, 92.3, 92.7, 92.2, 91.1, 92.9, 89.0, 85.9. Its only starvation line is the start-of-session one (+0.05 s), the host selected
HardwareVideoDecoder (VT HEVC), and there is no#561line. That fills the empty cell in your table: at 7.13.0 the session ran clean to 364 s from both places in the hold.The islands. At
18a18aacHEVC takes the plain coverage (SoftwarePlaybackHost.swift:948) and the reference leaves a 1 ms hole at 169 of its first 240 frames (our gap read), so by the code and the file this session had islands and the search (3e9188bd) to cross them.What it cannot show.
3e9188bd.:Nare this leg's log lines; counts in Python. Session start:336, ticks:368–:2087, decoder:338, starvation:353, reader:534–:2070. Escape legs' own logs: P8.1:231, P5:252,:271. In run 3's log one tick atrate=0.00readsrebuf=n(:1758). Other rows: the logs our §8 and 02:51Z note cite.On closing: agreed. The 7.15.1 runs answer what ask 4 was for, this 7.13.0 leg adds nothing that argues against it, and we have no further reason of our own to hold the thread open. Thank you for the reads.
superuser404notfound commentedon Sep 24, 2026
Thank you for running it anyway, and for the pin and the limits next to it.
It fills the last cell the way the rest of the table pointed: 7.13.0 ran clean to 364 s from both places in the hold, with islands present by the code and the file, so the search was doing the crossing. That fits the reading from before (the walk before
3e9188bdgrew with the session and this title had no headroom for it) without proving it, for the reasons you list: no revert, one run per cell, nothing past 364 s.The cost question from the title is answered as far as I can take it on the Mac (about 1.35x in process, less since #618 and #620 in 7.15.2), so I am closing this as agreed. If a session at the reference's rate turns over again on 7.15.2 or later, a new issue with the pin is the right place, and I will link it back here.