Repository navigation
Description
What we can't show
Our stats overlay has a Network section — throughput, bytes transferred, buffer depth, dropped frames. On the native and loopback paths we read all of it from AVPlayerItem.accessLog(). On the software path there is no AVPlayerItem, so the whole section is blank, and there is nothing on the public diagnostics surface to put there instead.
Measured on the same build, same test bed, back to back:
raw .ts -> backend=native (loopback, so an AVPlayer exists)
downloadBps 5891396 bytesLoaded 2369074
bufferedMs 4961 droppedFrames 0
VP9 -> backend=software vDecoder "libavcodec VP9 (SW)"
codec / decoder / colour all present
nothing under Network at all
Same overlay, same code path in our host — the only difference is which backend the engine dispatched to.
The request
Somewhere on the public surface, for the software path:
- bytes read (cumulative, from the source reader)
- throughput, or just the bytes counter if you'd rather we derive the rate ourselves — a monotonic counter is honestly the more useful primitive, since a host can window it however it likes
- buffer runway in seconds — how far ahead the reader has pulled, distinct from decoded frames queued
- optionally frames dropped / late, to match
droppedFrames
softwareHostFramesEnqueued and segmentCacheDiskBytes are the only two diagnostics exposed today, and neither answers "is the network keeping up".
What we tried first, and why it's wrong
bufferedPosition looks like the answer and isn't. On a healthy VP9 session it reads 20 ms — about one frame at 30 fps — so it is the decoded-frame queue, not network runway. Publishing that under a heading called Network would report a near-stall on a stream that is playing perfectly, so we left the rows blank instead. Blank says "unknown"; 20 ms says something false with confidence.
We also noticed 6.7.0's release note that the software path now reports its read-ahead (#303). If that value already exists internally, this request may be mostly "publish what you already compute" rather than new measurement.
Why it matters to us
The software path is where our exotic content lives — VP9, AV1 without hardware decode, MPEG-4 Part 2 — and it is also where a user is most likely to be near the edge of what their connection or device can sustain. That is exactly when someone opens the stats overlay, and it is currently the one path that can't tell them whether the problem is the network or the decoder. On the native path we can answer that in a glance.
No urgency from our side. Happy to test against a branch, and happy to be told the counters aren't cheap to thread through the reader — in that case a buffer-runway figure alone would still be most of the value.
This issue was auto-generated by Claude on behalf of @kskchaitanya1993.
Activity
Merge pull request #320 from superuser404notfound/feat/issue-306-soft…
superuser404notfound commentedon Aug 7, 2026
Shipped in 6.9.0. Thanks for measuring both backends side by side in the same build: that comparison is what separated the two defects behind the blank section, and one of them was not a missing feature.
The counter was broken, not absent.
demuxerBytesFetchedresolved through the native HLS session, which a software session does not own, so it returned 0 for the entire session. Everything derived from it went with it:instantBitrateMbps,averageBitrateMbps,networkThroughputMbps,networkTransferredBytesandLiveTelemetry.demuxerBytesFetched. Worth knowing for the overlay: those fields were not nil, they were zero, so a host rendering them showed 0.0 Mbps on a stream playing perfectly rather than a blank. It now reads software first and native second, the precedence the memory probe has always used.The read-ahead is published now. Three fields on the 1 Hz snapshot:
displayCushionSecondsreaderWindowAheadBytesaccumulatedFrameDelaySecondsdroppedFrameCountis populated on the software path too now, fromAVSampleBufferVideoRenderer.videoPerformanceMetrics.On
bufferedPositionreading 20 ms. That reading was correct, and the decision to leave the rows blank rather than publish it was the right call, but the number is not a defect either. The software demux loop reads on renderer back-pressure, so that path holds a fraction of a second of decoded video by construction. On real hardware a healthy session sits around 0.2 to 0.5 s, and a fresh VP9 run here measured 0.19 to 0.48 s. It is a cushion, not a buffer, which is why it now has a name of its own instead of being folded intoforwardBufferSeconds.That field stays nil on the software path on purpose. There is no seconds-deep reservoir of arrived-but-unplayed media there to report, and the same magnitude problem would apply to anything published under a name a host reads as the native forward buffer.
The runway ships in bytes, per the request.
readerWindowAheadBytesis the undrained forward extent of the reader window, so it is the quantity that answers "is the network ahead of the demuxer". Seconds would need a bitrate estimate baked into the engine; dividing by the throughput in the same snapshot keeps that choice on the host side.Verified against a real VP9 session over a rate-limited logging origin (30 ms latency, 8 Mbps), the numbers now visible on
aetherctl play:Every one of those was zero or absent before. The drop count climbs there because the CLI binds no render surface, so it is not a playback verdict; on a bound layer it stays near zero after startup.
Leaving this open for the retest. The interesting confirmation is whether the Network section now reads sensibly on a session that is genuinely struggling, not only on a healthy one.
feat(diag): a software session reports its own network telemetry (sup…
Merge pull request #317 from rrgomes/fix/310-backpressure-dormancy
kskchaitanya1993 commentedon Aug 7, 2026
Retested on 6.12.0. The Network section populates on the software path, and it degrades the way it should.
Two runs of the same VP9 source, same build, differing only in the origin.
Healthy — served from a local file server:
Struggling — same file behind a 2 Mbps paced origin with 30 ms latency:
Every one of those was absent before. The buffer draining 3.4s → 1.4s → nothing as throughput collapses is the shape we wanted out of this section, and it is legible without knowing anything about the engine's internals.
Why the healthy run still shows blanks, and why I think that is right. Over localhost the fetch is instant, the reader is never behind, and there is genuinely no rate to report — so
networkThroughputMbpsandreaderWindowAheadBytesare zero, not unavailable. That was worth establishing before reading anything into the throttled numbers: it means blanks there are "nothing to measure", not a second defect hiding behind the first. It is also the reason our original report only ever saw an empty section — every fixture we had was local.Your note that the counters returned zero rather than nil changed our code. We guard on
> 0rather than on non-nil now, precisely because a host trusting nil-ness would have rendered a confident0.0 Mbpsover a stream playing perfectly. That is a worse failure than a blank, and we would have shipped it — our overlay renders any non-nil number it is given.On
readerWindowAheadBytesshipping in bytes: the right call for us. We divide by the source bitrate rather than by throughput, because the question our Buffer row asks is "how long will the fetched-but-unconsumed bytes last at playback rate", not "how far ahead is the network right now". Both are derivable from the snapshot; having the raw extent meant we did not have to argue with a baked-in choice.On
displayCushionSeconds: we are not surfacing it, and your explanation is why. Under a heading called Network a 0.2-0.5s figure reads as a permanent near-stall, whatever it is actually measuring. It is genuinely useful — just not as a buffer, and not in that section. If we surface it later it will be next to the decoder, named as a decode cushion.Also carried in this bump, all relevant to live IPTV even though none were ours: bounded reconnects for error-ended zero-byte connections (6.8.0), the pinned redirect target on a metered origin (6.11.0), and noticing a silently dead connection on wall-clock time (6.12.0).
Regression on our side across the bump: 4K50 HDR HEVC-in-TS held 59s on the native path, a five-channel live zap all staying on Aether, and 28/30 of our fixture matrix rendering a real picture — unchanged from 6.7.0, with the same two non-players (an MP2-audio channel and a deliberate origin 403).
Happy for this to close.
This comment was drafted and posted automatically by Claude, working on behalf of @kskchaitanya1993.
Merge pull request #328 from superuser404notfound/fix/306-observed-tr…
superuser404notfound commentedon Aug 7, 2026
Thanks for the two-arm retest, and in particular for establishing the healthy baseline before reading anything into the throttled numbers. Reproducing that baseline here turned up one more thing, so it is worth being precise about what the blanks in your healthy run were.
They were not "nothing to measure". They were a zero, and it was the same kind of zero as the original one. Measured with
aetherctl playagainst a 42 MB / 2.8 Mbps VP9 source over a plain local range origin, on 6.12.0:23 consecutive ticks of a confident
0.00 Mbpson a session playing perfectly.networkThroughputMbpswas a wall-clock mean over a 10 second window, and the reader fetches a large range and then parks on backpressure until low water, so on a fast link most ticks of that window carry no bytes at all. Your> 0guard is what turned that into a blank on your side. Without it you would have rendered a dead link over a healthy stream, which is exactly the failure the counter defect caused before.Fixed on main in 4187b7e (PR #328): the rate is measured over the seconds bytes actually arrived in, and it is nil rather than zero when nothing arrived in the window at all. That makes it the same quantity the native path reports, since
observedBitratein the access log is also the rate observed during a transfer, and the sampler already drops it when it is not positive. Publishing the gap keeps the choice on your side, the same reasoning as shipping the runway in bytes: a host that wants a held reading keeps the last non-nil value, while a host handed a zero cannot tell a parked reader from a dead link.Your throttled arm is unchanged, which matters, because that is the arm the section was already legible on. With a 2 Mbps paced origin every tick carries bytes, so both formulas agree:
A 2.8 Mbps stream over a 2 Mbps link, with
ahead=0andcushion=0throughout. That pairing, a link rate below the stream rate with no runway and no cushion, is the starvation signature, and it survives the change intact.One note on your own numbers while you are looking at that section again: in your throttled run
rxsat at 1.49 MB in all four samples, so no bytes arrived after the first couple of seconds. The buffer draining 3.4s to 1.4s to nothing is that fetch being consumed rather than a link degrading, which for a 1.5 MB fixture is expected. It reads the same either way, but a fixture larger than one reader window is what makes the difference visible.Two smaller things from your comment:
displayCushionSecondsnext to the decoder rather than under Network is the right home for it, for exactly the reason you give.instantBitrateMbpsis deliberately left as a wall-clock mean on both paths: that is what makes it the stream rate rather than the link rate.Closing this, as you offered. The follow-up ships in the next release, and it needs no change on your side, the
> 0guard is simply no longer load-bearing.fix(telemetry): measure software throughput over the seconds bytes ar…