Skip to content

After a restart whose gate re-aimed below its boundary, the clock runs ahead of the picture by the re-aim — captions early, and further out after each such restart (6.40.0 early-opening gate, loopback-HLS VOD, native path) #418

Closed

Description

@rrgomes

Same asset as #408 (h264 MKV, Matroska Cues on non-random-access points), PGS subtitles on, engine 6.41.0 and 6.42.0 (6.42.0 is on our pin; nothing in it touches this path), Apple TV 4K 3rd gen / tvOS 26.6. Two sessions on 2026-08-25, heard on the couch and then read out of the log; the second with AVPlayer's own loaded ranges in the log.

What the viewer sees. Resume from 354.0 s: lip sync fine, captions about four seconds ahead of the dialogue — both sessions. A burst of far seeks, further ahead: in the first session "much more than four seconds" after a landing whose restart re-aimed 14 s; in the second, about eight seconds at 699 s after restarts that re-aimed 3.1 s and 5.0 s. Seeks that landed without a restart did not change it, and no restart put it back.

What the producer did at each restart (#65 ledger, sourceStart − planSource):

session 1
resume 354.0   boundary 352936 not a random-access point; re-aimed 4s → gate actual=349891   seg-88  itemAxis=349.891 planSource=352.936 drift=-3.045s shift=0.000s
seek → 622.0   restart idx=154, gate actual=616074 (no re-aim)                                seg-154 itemAxis=616.074 planSource=616.074 drift= 0.000s
seek → 682.0   boundary 676134 re-aimed 4s, 8s, 16s → gate actual=662078                      seg-169 itemAxis=662.078 planSource=676.134 drift=-14.056s
seek → 992.0   boundary 972847 re-aimed 4s → gate actual=969802                               seg-243 itemAxis=969.802 planSource=972.847 drift=-3.045s
seek → 1102.0  boundary 1084375 re-aimed 4s → gate actual=1083332                             seg-271 itemAxis=1083.332 planSource=1084.375 drift=-1.043s
session 2
resume 354.0   as above                                                                       seg-88  drift=-3.045s shift=0.000s
seek → 519.3   boundary 512053 (first sync sample 0.96s later); re-aimed 4s → actual=508925   seg-128 itemAxis=508.925 planSource=512.053 drift=-3.128s shift=0.000s
seek → 609.3   gate actual=604896 target=604521 (a late opening: shift=375 applied)           seg-151 itemAxis=604.521 sourceStart=604.896 drift=0.375s shift=0.375s
seek → 689.3   boundary 684809 re-aimed 4s, 8s → gate actual=679762                           seg-171 itemAxis=679.762 planSource=684.809 drift=-5.047s shift=0.000s

Every landing read seek#N programmatic landed rendered≈target, VOD shift published: 0.000s … foldShift=0.000s at each re-aimed seam, and the host's 4 Hz sample read frameAhead=0.000 producerShift=0.000 hostShift=0.000 with t == avpClock — except after the one LATE opening, where the shift machinery engaged as designed (producerShift=0.375 hostShift=0.375). The host places each PGS cue at its source time against sourceTime.

Where AVPlayer put the re-aimed segment. At the resume, before playback started, the clock sat on the plan boundary, not on the media the segment carries: t=352.936 avpClock=352.936 … loaded=[352.9-…] while seg-88 itemAxis=349.891 sourceStart=349.891. And the loaded range then grew by the playlist's planned durations, not the media's: +3.6 / +4.5 / +3.2 / +4.8 / +3.5 s as seg89…93 loaded, against plan durations 3.587 / 4.547 / 3.211 / 4.838 / 3.462 s and media durations 2.544 / 4.713 / 2.002 / 5.797 / 5.965 s. So the player's timeline is the manifest axis, and a segment whose media begins 3.045 s before its manifest position is presented 3.045 s later than its timestamps say. Audio and video sit in the same segment, so lip sync survives; the cues are on the file's real axis; and the clock every consumer reads — currentTime, sourceTime, and for a synced-playback host the position it reports to the room — is on the other one. On 6.39.0 the same restarts applied the shift and the clock was consistent (the landing was what was wrong then). In-window seeks in the second session also landed past their targets (seek#2 target=397.30 landed rendered=399.27, seek#5 449.27 → 449.87), which reads as the same disagreement seen from the seek side.

Whether the error is the latest restart's re-aim or accumulates across restarts I cannot say from ears alone (about 4 s → about 8 s over restarts of −3.0, −3.1, +0.4 shifted and −5.0); happy to measure whatever would settle it.

Incidental, from the same run on 6.42.0: the resume start logged landingWithheld=1 on the #357 subtitle-delivery line and no caption overstayed a landing — the #416 refusal doing its job here.

I don't have a view on the right fix. Re-applying the shift for an early-opening gate puts the clock back on the manifest axis and reopens the landing error #408 fixed; the alternatives are a manifest that tells the truth about where the re-aimed segment starts and how long it runs, or a map that carries the re-aim into sourceTime and the landing. Happy to run any of them against this asset on both devices.

Activity

  1. superuser404notfound commented on Aug 25, 2026

    @superuser404notfound
    Owner

    Read out of the picture rather than reasoned about, and the reading says the third of the three options, with one correction to it. Thank you for the loaded ranges: they are what made it worth building the instrument instead of arguing from the ledger.

    What AVPlayer does with the segment

    aetherctl play --picture-probe now attaches an AVPlayerItemVideoOutput to the running item and decodes the source time out of the frame itself. The fixture states its own frame number in the picture (12 blocks on one pixel row, bit k of the frame index, Scripts/timecode-fixture.sh), so pic is what is on screen, picItem is AVPlayer's own itemTimeForDisplay for that same frame, and their difference needs no tolerance to interpret. Every other axis observable here, MuxedVideoFrameTime included, describes what the engine WROTE.

    On a fixture carrying your shape (Cues injected at non-sync positions, a 12 s keyframe drought at 43 s), resuming at 53 s so the gate re-aims three times and opens at 38.417:

    t=02 cur=54.80 pic=41.250 picItem=54.833 axisErr=-13.583 capErr=-13.550
    t=12 cur=64.80 pic=51.292 picItem=64.875 axisErr=-13.583 capErr=-13.508
    

    axisErr is exactly the re-aim (52.000 - 38.417), constant for the whole run, across three segment boundaries. So: AVPlayer presents a segment at the position the playlist gives it, not at the tfdt it carries, and then plays continuously from there. Your loaded ranges said it; this says it with the picture in hand. The assumption 6.40.0 shipped on, that keeping the segment's own timestamps leaves the item axis where the plan puts it, is simply false, and nothing in the engine could see that at the time.

    Worth putting next to it, the same fixture with the re-aim disabled, which is the pre-6.40.0 arm:

    video gate open: actual=55000 target=52000 desired=52000 shift=3000
    t=02 cur=57.80 pic=57.875 picItem=54.875 axisErr=+3.000 capErr=+0.075
    

    The picture is three seconds off the item axis there too. What differs is that the shift was published, so sourceTime described it correctly. The machinery was never wrong; 6.40.0 switched it off for the one case that needed it most.

    The fix

    Your option (c), with the correction that the map belongs to the decode RUN and not to the timeline.

    The offset a consumer folds is measured against the segment's ADVERTISED start, never against where the gate opened. A pinned (late) gate makes those two identical, which is exactly why publishing the muxer's shift held for years and broke the moment a gate that opens early existed. The muxer's own shift is untouched: it is the source-to-item offset for the bytes, and moving it is what would re-open the landing error.

    That offset stops applying when AVPlayer starts a fresh run. This half was not obvious and the measurement forced it. Only an epoch's first segment can carry an offset (every segment cut after it starts on its own boundary), a run carries it across every boundary it plays through, and a seek that leaves the loaded region without provoking a restart lands on a sequentially cut, axis-true segment where the old offset must be dropped. With only the first half in, a seek out of the region read capErr=+0.892 where the defect had been -0.875: the same error mirrored. The provider now reports the index each fresh run begins on, and the axis is republished from that segment's own worth:

    [HLSVideoEngine] #418 decode run re-anchored at seg11 (advertised 44.000s): axis shift -0.875s -> 0.000s
    

    Measured, source time decoded from the picture:

    arm published shift picture vs item axis picture vs sourceTime
    before 6.40.0 (pinned) +3.000 +3.000 +0.075
    6.40.0 as shipped 0.000 -13.583 -13.550
    with this change -13.583 -13.583 -0.009

    and for the seek that leaves the loaded region, +0.892 before, +0.017 after. The control fixture, identical except that its Cues ARE its sync samples, is untouched on both arms: no re-aim, no seam, axisErr 0 on every tick.

    Your open question, whether it accumulates

    It does not. The error is the offset of the segment the CURRENT run began on, and a new run replaces it rather than adding to it. What reads as accumulation is a later restart with a deeper re-aim: your second session ended on -5.047 at 689.3 s, and about eight seconds by ear at 699 s is that restart, not the sum of the four. The prediction the fix makes is checkable in a log without the fixture: after each re-aimed restart the VOD shift published line should now carry that restart's own drift, and a seek that leaves the buffer should be followed by a #418 decode run re-anchored line naming the segment it landed on.

    Two things to say plainly

    The clock will now read LOWER than the target after a resume or seek into a drought, by the re-aim. That is not a new landing error and not the one 6.40.0 fixed coming back: the picture was already there, it is only being described honestly for the first time. Nothing about which frame is on screen changed in this commit.

    And the landing itself is worth its own issue rather than a sentence here: the re-aim's 4 / 8 / 16 / 32 s backoff opens on the first sync sample above where it landed, not on the nearest one below the boundary, so the resume above went to 38.417 when 43.0 was available and would have cost 9 s less. That is now visible because the clock stopped hiding it.

    PR #420, not merged yet. A release note follows when it ships. Retest whenever it suits, and the same thanks as last time for keeping the asset available.

  2. added 2 commits that reference this issue on Aug 25, 2026
  3. superuser404notfound commented on Aug 25, 2026

    @superuser404notfound
    Owner

    Released in 6.43.0, with both consumers on the new pin. Leaving this open for the retest.

  4. superuser404notfound commented on Aug 25, 2026

    @superuser404notfound
    Owner

    One thing to know before that retest, because it will move the numbers in the table above and I would rather it not read as a discrepancy.

    6.43.0 carries #423 alongside this fix, and the two touch the same restarts. #423 changes the re-aim's backoff from doubling (4, 8, 16, 32) to even steps (4, 8, 12, ... 32), because each attempt opens on the first sync sample at or above where it aimed and everything above the previous aim is already proven empty, so the DISTANCE between two attempts is the worst case by which the gate can overshoot the sample that would have covered the boundary. On the fixture that moved the gate from 38.417 to 43.000 against a boundary at 52.0, with the same three attempts.

    So on your asset expect the drifts to be SMALLER than the ones you tabulated, not equal to them. The -14.056 row is the one most likely to change, since it took three doublings; a run of even steps should find something the 16 s jump flew over. The prediction worth checking is therefore not a number but three relations:

    • presentedShift= appears in the video gate open line whenever the gate opened early, and is no longer 0 there. It should equal sourceStart - planSource, whatever that distance turns out to be now.
    • VOD shift published carries that same value, with seamAt= on the segment's ADVERTISED start rather than on where the gate opened.
    • #418 decode run re-anchored at segN (advertised …) appears after a seek that leaves the loaded region without provoking a restart, and puts the shift back to 0 for that run.

    And the part that is easiest to misread as a regression: after a resume or seek into a drought the clock will now read LOWER than the target, by the re-aim. The picture was always there; before 6.43.0 the clock claimed the target while showing content that far back. Captions matching the dialogue is the reading that settles it, not the position readout.

    If any of the three relations fails on real media, the log lines above are enough to say which half of the fix it fell out of.

  5. rrgomes commented on Aug 25, 2026

    @rrgomes
    ContributorAuthor

    Retested on 6.43.0, same asset (h264 MKV, lying Cues, PGS on), Apple TV 4K 3rd gen / tvOS 26.6. The resume into the re-aimed start is fixed — captions on the dialogue for the first time in three builds, and the clock reading below the target read exactly as you describe, not as a regression.

    Your three relations, on real media: (1) holds — presentedShift equals sourceStart − planSource at every early gate (three this run: −3.045 at the 352.936 boundary, −2.044 at 536.995, −14.056 at 676.134). Worth reporting against your prediction: none of the three got smaller under #423. The two 4 s ones open on the first attempt, which both ladders share. The −14.056 one took four attempts instead of three (4, 8, 12, 16 rather than 4, 8, 16), and the extra 12 s attempt at 664.134 found nothing at or below the boundary, so both ladders converge on the same aim of 660.134 and the same sample at 662.078. On this asset the drought is real rather than an artifact of the doubling: there is no sync sample between 662.078 and the boundary at 676.134.

    (2) holds — VOD shift published carries that same value with seamAt= on the advertised start. (3) is the one that failed, in a case the fix did not anticipate: it fired for a seek that had NOT left the re-aimed run.

    A fast forward-seek burst (six programmatic seeks in ~6 s, 391 → 721, the transport-bar drag our UI issues):

    seek#5 → 680.96  restart idx=169, re-aim 4/8/12/16s,  presentedShift=-14056  landed 680.96
    seek#6 → 720.96  #418 decode run re-anchored at seg179 (adv 716.591): -14.056 -> 0.000
                     landed rendered=739.28 target=720.96   (no producer restart)
    

    Through the burst AVPlayer lagged badly — its currentTime was still 541 while the engine's clock stood at 683, and our seek-age counter reached 6.3 s — so when it moved, the provider saw a fetch that did not follow its predecessor and called seg-179 a fresh decode run, and the shift went to 0 while AVPlayer was still inside the re-aimed seg-169 run. From there every internal axis agreed at the wrong place (avpClock == currentTime == sourceTime == 740.4), applySubtitleEvent placed the 739-742 cue there, and the captions ran about 14 s ahead of the picture until the next restart — the pre-fix shape, re-entered through the burst.

    The reading I can offer: "fetch does not follow predecessor" is not a reliable fresh-run signal during a seek burst, because a burst produces exactly that pattern without AVPlayer having left the re-aimed run. What I cannot show from here is the picture itself — avpClock follows the playlist, so it is fooled the same way, and frameAhead read 0.000 throughout. Your play --picture-probe with a burst on the lying-Cues fixture should reproduce it directly. Happy to run whatever would settle it, on this asset and both devices.

  6. superuser404notfound commented on Aug 25, 2026

    @superuser404notfound
    Owner

    Relation (3) was right to fail, and the burst was right to be the thing that broke it. It reproduces on the fixture without a burst at all, which is the more useful news: the trigger was not merely unreliable under load, it was the wrong question.

    Reproduced

    tc-cues-lie.mkv, resume at 53 s so the gate re-aims and opens 9 s below its boundary, then one seek:

    aetherctl play --seconds 17 --start-position 53 --seek-every 12 --seek-count 1 \
        --seek-pattern 80 --picture-probe file:///tmp/tc-cues-lie.mkv
    
    t=13 cur=89.90 pic=80.917 picItem=89.917 axisErr=-9.000 capErr=-8.983
    

    axisErr never moved. The picture is exactly where it was, the run carried straight on, and the only thing that changed is that the engine stopped describing it. Same shape at seek targets 80 and 85, none at 75 (no out-of-sequence fetch, nothing to trigger on). So no lag and no burst are needed; one forward seek is enough, and the burst on real hardware just made it easy to hit.

    What the fetch order actually is

    The reading offered here holds, and the fixture says why. Two things AVPlayer does that a fetch-order signal cannot tell apart:

    • On a seek it asks for a segment below its target. Measured repeatedly: seek to 30 fetched seg5 while seg7 covered the target, seek to 48 fetched seg10 against seg12, and the reported seg179 against a target in seg180 is the same move.
    • It asks out of order while continuing the run it is already playing, which is the case above.

    Both look identical from the provider: an index that does not follow its predecessor.

    The rule underneath, measured

    The picture probe answers this one directly, and it is not the rule 6.43.0 shipped. Re-aims of 0.5, 0.875, 1, 3, 5, 7, 9 and 11 s, on two fixtures:

    AVPlayer places a segment at its advertised start read through the mapping its timeline ALREADY carries. So the offset is not a property of a run that starts and ends. It composes.

    case true axis 6.43.0 published
    resume, gate 9 s below its boundary -9.000 -9.000
    then a seek onto an axis-true segment -9.000 0.000
    then a seek that re-places that same segment -18.000 0.000
    then a seek whose restart re-aims 5 s more -14.000 -5.000
    tiered fixture, -11 re-placed -22.000 0.000

    Row 3 is the one worth pausing on: re-fetching the overlong segment adds its offset a second time, exactly, at every magnitude tested. Which means the answer given here to the accumulation question was wrong in one direction. It does not accumulate across restarts the way it appeared to, that part holds. It does accumulate when AVPlayer re-places the same overlong segment, and 6.43.0 could not see that because it published zero for those cases anyway.

    One more thing fell out, and it is why 6.43.0 looked right on small re-aims: AVPlayer discards a sub-second axis at a seek and snaps back to the playlist. -0.500 and -0.875 read axisErr=0.000 after one; -1.000, -1.083, -1.292, -1.500, -3, -4, -7, -9 and -11 all survive unchanged. The boundary sits between -0.875 and -1.000. The -1.043 row of the ledger is just above it; the +0.375 late one is below.

    The change

    The axis moves when AVPlayer places a segment, by exactly what that segment carries below its advertised start, and the seam sits at that advertised start read through the axis in effect before it landed. The single anchor pair becomes a record keyed by index, because several epochs can leave an overlong segment in the cache at once, and a new epoch drops the entries at and above its own index (it rewrites those axis-true). A gate no longer publishes on its own: it records what its segment is worth and the placement publishes it, so an epoch AVPlayer never fetches from cannot move the clock. The VOD seek path publishes the sub-second snap from the landing forward.

    Thirteen arms of the fixture matrix, including the four that read capErr=-8.983, now read +0.017, which is one frame at 24 fps. The control fixture (Cues that ARE its sync samples) is untouched on both arms.

    On the #423 prediction

    That prediction was wrong on the reporting asset and the measurement of it explains why better than the prediction did: with no sync sample between 662.078 and the boundary at 676.134 the drought is real, both ladders converge on the same aim, and the even steps only cost one extra attempt that found nothing. Worth having stated, since it separates "the ladder flew over a sample" from "there is nothing there" for good on that asset.

    What to look for on retest

    The decode run re-anchored line is gone; there is nothing left that re-anchors. In its place:

    • [HLSVideoEngine] #418 segN placed (advertised …s, worth …s): axis shift …s -> …s from item …s on every placement that moves the axis, and only on those. A seek onto an axis-true segment now prints nothing, which is the fix: seg179 in the burst above should produce no line at all and leave the shift at -14.056.
    • [HLSVideoEngine] #418 axis …s discarded at the seek landing …s where a sub-second axis snaps.
    • presentedShift= and VOD shift published are unchanged in meaning, except that VOD shift published now carries the composed value and its seamAt= is read through the previous axis rather than being the raw advertised start.

    If the captions still run ahead after a seek, the placed lines say which placement the engine credited and by how much, which is enough to tell a missing composition from a spurious one.

    Released in 6.45.0, both consumers on the new pin. Leaving this open for the retest, and thanks again for keeping the asset and both devices available. Round 1 would have shipped as correct without that burst.

  7. rrgomes commented on Aug 26, 2026

    @rrgomes
    ContributorAuthor

    Retested on 6.45.0 (Apple TV 4K 3rd gen, same asset). The resume is right and the in-window seeks print nothing, as designed. The burst now overshoots in the other direction: after it the captions run 2-3 seconds BEHIND the picture, and the composition is why.

    seg88  placed (advertised 352.936s, worth -3.045s): axis 0.000 -> -3.045   [resume]
    seg187 placed (advertised 748.122s, worth -2.043s): axis -3.045 -> -5.088  [seek 748, restart]
    seg197 placed (advertised 788.204s, worth -5.589s): axis -5.088 -> -10.677 [seek 788, restart]
    

    At t=800.123 the host's 4 Hz sample reads avpClock=810.868 and loaded=[791.2-816.6], so the engine is subtracting 10.745 while the segment being presented opened 5.589 s below its advertised start. The loaded range holds only the current epoch: the segments seg88 and seg187 belong to are long gone from the timeline.

    None of the three is a re-placement of the same overlong segment, which is the case the composition rule was measured on. Each is the first segment of a new epoch after a far seek, and each epoch replaced what AVPlayer had buffered. Composing them charges the clock for content that is no longer in the timeline; the run being played is worth -5.589 on its own.

    What I cannot say from here is whether the right rule is "the current placement replaces the axis when its epoch replaced the buffer" or something narrower about what survives a flush — play --picture-probe with two successive far seeks, each provoking a restart that re-aims, should separate them. Happy to run whatever helps on this asset and both devices.

  8. superuser404notfound commented on Aug 29, 2026

    @superuser404notfound
    Owner

    The reading you offered is testable, so I tested it first, and it is not the rule. The answer turned out to be in your own log, in a line that was already there.

    The composition survives an epoch that replaced the buffer

    play --picture-probe on tc-cues-lie.mkv: resume at 53 s so the gate re-aims and opens 9 s below its boundary, then a far seek whose restart re-aims 1.667 s below a different boundary. The old epoch's bytes are gone from the timeline by then, exactly the case for "the current placement replaces the axis".

    #418 seg13 placed (advertised 52.000s, worth -9.000s): axis  0.000 ->  -9.000
    #418 seg3  placed (advertised 12.000s, worth -1.667s): axis -9.000 -> -10.667
    t=13 cur=24.13 pic=24.208 picItem=34.875 axisErr=-10.667 capErr=+0.075
    t=19 cur=30.23 pic=30.250 picItem=40.917 axisErr=-10.667 capErr=+0.017
    

    axisErr is the composed value, constant for the run. Three placements deep it still composes. So the rule holds, and the flushed buffer is not what decides it.

    What your log says instead

    At the failing moment your host sampled loaded=[791.2-816.6], and seg197 is advertised at 788.204. AVPlayer places a segment at its advertised start read through the axis its timeline already carries, so that lower bound inverts the placement:

    788.204 - 791.2 = -3.0    the base it composed onto
    788.204 + 3.045 = 791.249 where the resume axis puts that segment
    788.204 + 5.088 = 793.292 where the published axis would have put it
    

    It composed onto -3.045, the RESUME axis. The middle placement never moved anything. So the honest axis was -8.634 rather than -10.677, and the 2.043 s between them is the lag you heard, to within what an ear can call "2 to 3 seconds".

    Which names the defect precisely, and it is not the composition: a fetch is not a placement. In a burst AVPlayer asks for a segment and seeks away before the bytes are used. Nothing about its timeline moves, this side had already folded that epoch's worth into the axis, and every placement after it composed onto a base that never existed. Round 2 replaced "the fetch order says where a run begins" with "every fetch is a placement", and the second is wrong in the one case the first was wrong in too, which is why your burst found both.

    The fix: the axis stops being predicted

    AVPlayerItem.loadedTimeRanges is an on-device account of where AVPlayer PUT a run, and it needs no capture card. The engine now reads the range holding the playhead after every VOD seam and measures the base rather than assuming it. Validated against the picture probe, which is the only other oracle for this:

    arm predicted seam loaded range read back
    resume, gate 9 s below its boundary 52.000 [52.000-64.958]
    far seek, restart re-aims 1.667 s 21.000 [21.000-38.622]

    Exact on both, and on the control fixture (Cues that ARE sync samples) there is no seam and no line at all.

    Two guards, because a live buffer is being read: the measurement only ever collapses onto an axis this session published, so a range read before the bytes landed or after eviction has trimmed its start is refused rather than believed; and the sub-second snap clears the record, since AVPlayer discarded that offset and a check against a run now sitting on the raw playlist would hand the discarded axis straight back.

    The correcting case cannot be built on this harness, which would need a device slow enough to lag its own seek burst, so it lives in the test suite instead, built from the three placements above and asserting -8.634 with the seam at 791.249. The three fixture arms are the no-false-positive control.

    What to look for on the retest

    Every re-aimed epoch now prints a second line after the placement:

    #418 segN placement confirmed: AVPlayer holds it from item Xs, base Ys as published
    #418 segN placed on base Xs, not Ys (AVPlayer holds it from item Zs, clock Cs): axis A -> B
    

    The first says the composition was right, the second is your case being caught and corrected, within about a second of the placement. A third, ... a base of Xs, which is no axis this session published; keeping ..., means the reading described something other than that placement and nothing was changed; if that one shows up on every burst, the check cannot see your timeline and I would want the surrounding loaded= samples.

    One thing that will otherwise confuse the measurement

    While measuring this I found a separate defect on the same arm and filed it as #448: after a seek whose restart opens a fresh epoch, the reported clock sits about 1.7 s ABOVE the frame on screen for about seven seconds before settling, with the axis honest throughout. It is the landing value, not the axis. On your asset every seek in a burst opens such a window, so a caption error read inside those seven seconds can be that one rather than this one. The two have opposite signs, which helps: this defect ran the captions BEHIND the picture, #448 runs them EARLY.

    On main (edf9db41), not released yet. Retest whenever it suits, and thanks for the loaded ranges again. They are what turned this round from an argument into a subtraction.

  9. superuser404notfound commented on Aug 29, 2026

    @superuser404notfound
    Owner

    Shipped in 6.56.1 (edf9db41).

    Worth capturing on a retest, on the same six-seek burst that produced the 2 to 3 s caption lag: the #418 seg N placed lines and whether each one reads as a confirmation or a correction. The axis is no longer predicted from a fetch, it is read back out of AVPlayerItem.loadedTimeRanges after every VOD seam, so a placement AVPlayer never carried can no longer move it, and a placement it did carry is checked against the base this side composed onto. If captions still trail after the burst, the line names which placement disagreed and by how much, which is what the earlier rounds had no way to show.

  10. 19 remaining items

  11. superuser404notfound commented on Sep 3, 2026

    @superuser404notfound
    Owner

    Answering the question first, because the code says it plainly and then says something the log could not.

    A confirmation does teach, and there is a third case

    learnPlacementDisplacement runs before the confirm-or-correct branch, on every own-run reading, so the reading offered here is right: those three placement confirmed lines taught 0.000 silently, and the sat line only prints when the value moves.

    What the log could not say is that a THIRD outcome prints the same lines and teaches nothing. A reading taken off a timeline AVPlayer rebuilt (round 7's second admissible answer, where the segment opens on its advertised start itself) corrects the axis like any other and is refused the parameter on purpose, because where a rebuilt timeline puts a segment is a statement about the rebuild. On tc-wide-cues-lie.mkv that reading corrects by 28.000 s:

    #418 seg12 placed on base 0.000s, not -28.000s (... residual +28.000s): axis -36.000s -> -8.000s
    

    Under round 8 that line was indistinguishable from one that had just taught a 28 s lesson. So the ambiguity named here was wider than the two cases it was possible to see.

    Every verdict line now ends in one of three clauses:

    ... base -32.667s as published; taught the standing distance 0.000s again
    ... axis -31.542s -> -31.584s; taught the distance 0.042s
    ... axis -36.000s -> -8.000s; taught nothing, read off a rebuilt timeline; the distance stays 0.000s
    

    The terminal numbers refute what I predicted, and the reason given here is the right one

    I said the frame-scale residue was the reading's own resolution rather than the composition's prediction, and predicted a wash. 0.065 to 0.024 over 33 compositions says otherwise, and the sentence that explains it is the one in this report: my fixture's chain was three placements deep.

    So here is a ten-placement chain, over an origin with 100 ms of latency and a shared 3200 kbps, byte-identical across three runs:

    aetherctl play --seconds 62 --start-position 53 --picture-probe --seek-every 2 --seek-count 24 \
      --seek-pattern 65,60,70,58,75,50,85,45,90,40,95,35,100,30,105,25,110,22,64,59,69,57,74,49 \
      http://127.0.0.1:8871/tc-cues-lie.mkv
    
    # seg advertised worth axis after distance read
    1 13 52.000 -9.000 -9.000 0.000
    2 13 52.000 -9.000 -18.000 0.000
    3 12 48.000 -5.000 -23.000 0.000
    4 10 40.000 -1.583 -24.583 0.000
    5 9 36.000 -1.792 -26.375 0.000
    6 8 32.000 -1.500 -27.875 0.000
    7 7 28.000 -1.875 -29.750 0.000
    8 5 20.000 -1.792 -31.584 0.042
    9 4 16.000 -1.083 -32.667 0.000
    10 3 12.000 -1.667 -34.334 0.000

    Nine readings say 0.000 and one says 0.042. What follows it is arm 1, on a fixture:

    #418 seg5 sat 0.042s below the axis it composed on, not 0.000s
    #418 seg5 placed on base -29.792s, not -29.750s (residual -0.042s): axis -31.542s -> -31.584s
    #418 seg4 placed (advertised 16.000s, worth -1.083s, sitting 0.042s below its axis): -31.584s -> -32.709s
    #418 seg4 placed on base -31.584s, not -31.626s (residual +0.042s): axis -32.709s -> -32.667s
    #418 seg3 ... placement confirmed
    

    One reading deviates by a frame, the composition after it is a frame out, and the reading after that puts it back. -0.036, then +0.004, then a pair one frame out is that shape.

    Why round 9 adds no rule for it

    Because the two sources want opposite rules, and each candidate was checked against the numbers in this report rather than against the fixture's:

    • The median (round 7's rule). Right on the fixture: 0.042 is one sample against nine and never moves the standing value, so placement 9 composes correctly. Wrong here: an even count holds what the odd before it gave, so seg589 would have composed on 0.000 and predicted a base of -6.341 against the measured -6.298. Round 8 predicted -6.300. A median lags a genuine step by exactly one reading, and this asset has a genuine step.
    • Hold until a second reading agrees. The same failure, larger. Reading the arm-1 pair back through the sitting 0.004s it carried puts its axis at -2.927, so holding -0.036 would have predicted -2.891 against the measured -2.971. Two frames out where round 8 was one.
    • Damping toward a new reading. Costs the step here and saves nothing on the fixture, whose deviation is a single reading either way.

    What separates the two is whether a reading is a quantity or a blip, and neither instrument answers it. -0.041 and -0.043 two placements apart, twice, on the same segment in two arms, is a quantity. 0.042 once in ten is a blip. And the picture probe quantises at one frame, so it cannot arbitrate a one-frame question from either side. Last-wins stays, and the arm above is written into Scripts/timecode-fixture.sh so that the next proposal has to run it.

    One thing about arm 1 the code does explain

    Each placement cancels its predecessor's verification task, so a placement that is superseded produces no reading and teaches nothing. With 13 of 33 superseded, the standing value at any composition is not the previous placement's, it is that of the last placement which survived long enough to be read. Between seg574 and seg602 that can be several, which is why three readings can look like a march when only three of the placements in that stretch ever spoke at all.

    The rest

    Nothing else to act on. The coefficient is settled from both sides now, superseded at 13 of 33 is the accounting working, and a rollback reclaiming 6.970 s on a placement carrying sitting 0.004s is exactly the case round 7 was built for. Also worth noting for later: seven FreezeDiag stalls of 3 to 4 s inside the seek storms, all self-recovered, belong to a different thread than this one, so if they ever fail to recover they are worth their own issue.

    Merged as fa00825e, not released yet. A release note follows when it ships, and the same thanks as before for repeating the arms three times and for re-measuring 6.62.3 alongside, which is the only reason the round-8 claim could be checked at all.

  12. superuser404notfound commented on Sep 3, 2026

    @superuser404notfound
    Owner

    Released in 6.67.2, tag 52a1da53, with Sodalite and AetherPlayer on the new pin, so the next TestFlight or DMG build from either carries it.

    It changes no arithmetic, only what the reading lines say, so there is nothing here to retest against the picture. What it buys on the next log is telling a placement confirmed that taught 0.000 from one that was never allowed to teach, which is the question that could not be answered from the round-8 logs.

  13. rrgomes commented on Sep 3, 2026

    @rrgomes
    ContributorAuthor

    Ran 6.67.2 anyway, three arms, same asset and same three bursts — not to re-measure the picture, but because the third case was the one thing the new clauses could tell us that we could not see before.

    It does not occur on this asset: 0 of 36 placements read off a rebuilt timeline. Every reading was an own-run one. So the 28s correction that teaches nothing is real but not something this content produces, at least not in this arm shape.

    The clauses read exactly as described, and the three arms are identical:

    arm 1  #418 seg524 placement confirmed: ... base 0.000s as published; taught the standing distance 0.000s again
    arm 1  #418 seg559 placed on base -2.962s, not -3.003s (residual +0.041s): axis -6.382s -> -6.341s; taught the distance -0.041s
    arm 2  ... seg524 ... taught the standing distance 0.000s again
    arm 2  ... seg559 placed on base -2.962s ... (residual +0.041s) ... taught the distance -0.041s
    arm 3  ... seg524 ... taught the standing distance 0.000s again
    arm 3  ... seg559 placed on base -2.962s ... (residual +0.041s) ... taught the distance -0.041s
    

    Same segment, same measured base, same axis transition, three independent runs. With round 9's -0.041, -0.043, -0.041, that is five readings of -0.041 ± 0.002 on this asset against one outlier pair — which is the evidence for your quantity-versus-blip call, from the side you did not have. 36 placements, 36 verdicts: 12 superseded, 10 holds those bytes, 8 never reached, 3 confirmed, 3 corrections, 0 is still being served.

    One correction to my own round-9 number, since you are relying on it. These arms end at 0.038, 0.043 and 0.040 against round 9's 0.023, 0.030 and 0.018. 6.67.2 changes no arithmetic, so that spread is run-to-run noise on this arm, and six arms now put the terminal error between 0.018 and 0.043. The 6.62.3 comparison survives it — 0.065 mean is outside that band, and the two 6.62.3 arms at 0.071 and 0.081 are outside it individually — but "0.065 to 0.024" overstated the precision, and "0.065 to 0.018-0.043" is the honest form.

    Nothing else. No PlayerError, no route fallback. Twelve FreezeDiag stalls of 3-4s inside the storms, all self-recovered; noted as yours-to-ignore here and ours to file separately if one ever fails to.

  14. superuser404notfound commented on Sep 4, 2026

    @superuser404notfound
    Owner

    Taking the correction first, then the one place where I read the same numbers differently.

    The band replaces the mean

    0.065 to 0.018-0.043 is the honest form and it is what goes into the notes from here. 0.024 was three arms of one sitting quoted to a precision three arms cannot carry, and the correction lands before it reached anything but this thread.

    The build is provably out of it, which is what makes the rest interesting

    6.67.2 is one commit against 6.67.1 (fa00825e). The only source file it touches is HLSVideoEngine.swift, and inside it the only behavioural edits are a return value on learnPlacementDisplacement and a clause appended to two log lines. The write the parameter is taught by (lastPlacementDisplacement = sample) still happens before the epsilon guard, exactly where round 8 put it, and the new .rebuiltTimeline branch does nothing but read the standing value. So identical arithmetic is not an assumption here, it is in the diff.

    That makes "run-to-run noise" right about the build, and I think it understates the data. Six arms, and the three from the later sitting are the three largest: under exchangeability that is 1 of the 20 arrangements, p = 0.05, the single most extreme one. And the two sittings are not the same experiment, which the accounting says out loud. Same three bursts from the same reset point:

    6.67.0 6.67.2
    placements 33 36
    read (corrections + confirmations) 8 6
    holds those bytes 5 10
    never reached 7 8
    stalls 7 12

    holds those bytes is the outcome that decides a terminal number. It means the segment's bytes merged into a run already in the timeline, so no run opened at the seam, so the composition is kept and never checked. Each one leaves its own prediction error in the axis, at the size the read placements print: +0.002 on the tight pair from round 9, one frame on the loose one. Ten unchecked compositions instead of five, on a chain three placements longer and a read fraction of 6 of 36 against 8 of 33, is the right order for the 0.016 s between the two means. So the reading I would defend is that the terminal error is a function of how much of the chain got read, and the sitting that stalled twelve times read less of it.

    The check that decides it, if those logs are still on disk

    Per arm rather than per session: placements, read, holds those bytes, terminal error. If the six arms line up on the read fraction, a cross-sitting A/B at 0.02 s is not resolvable without matching that density, and only interleaved arms in one sitting say anything at that scale. Which is exactly why the 6.62.3 anchor survives: it was measured alongside, and 0.065 is outside the whole band from either side. If those 6.62.3 arms were in fact a separate sitting, say so and I will treat that comparison the same way.

    The third case is the geometry, not the arm shape

    0 of 36 is worth more than an absence. The gate is two-step: a run opening within 0.5 s of the seam the composition predicts is the placement's own run, and only when nothing opens there does the reading fall to a run opening within 0.5 s of the advertised start itself, which is what a timeline AVPlayer rebuilt looks like. On an axis tens of seconds from zero those two seams cannot be confused, so the case was distinguishable in all 36 and simply did not occur.

    What produces it on the fixture is tc-wide-cues-lie.mkv, a 60 s keyframe drought, seeking 35 s back out of the buffer: nothing to land on near the target, AVPlayer discards the timeline it carried, and the segment opens on its advertised start. Content with ordinary segment geometry re-aims the producer instead and the reading stays an own-run one. So that 0 of 36 is a statement about the asset, not about the arm shape or the build, and it says the clause will stay silent on this content however many arms it runs.

    The quantity, from the side I did not have

    Five readings of -0.041 ± 0.002 on one segment across three independent runs, against the fixture's one-in-ten 0.042, is the evidence the last-wins call was missing. My half could show that a median or a hold-until-confirmed rule breaks on one of the two shapes; only a repeat across runs shows that the shape it breaks on is the real one. Thanks for running three arms on a release that was not supposed to change the picture, which is the only reason that evidence exists.

    FreezeDiag

    Agreed, different thread. The shape worth opening one for is a stall whose clock stays flat past the end of the storm, or one that needs a seek or a route change to come back. Twelve that self-recover inside a seek storm over a shared origin is the instrument doing its job, and it belongs in its own issue with the storm's timing next to it if one ever does not.

  15. superuser404notfound commented on Sep 4, 2026

    @superuser404notfound
    Owner

    A counter-measurement from this side, since the density claim in my last comment was mine and not yours.

    Same chain as round 9 (tc-cues-lie.mkv, 24 seeks, ten placements when the link allows it), same build (6.67.2 at 52a1da53), and the only variable is the origin: a delay paid by every response and a rate shared across all in-flight bodies. Three link shapes, runs alternated, --picture-probe as the witness.

    A: 3200 kbps / 100 ms C: 1200 kbps / 200 ms B: 600 kbps / 300 ms
    runs 4 3 4
    placements 10 7 8
    read (corrections + confirmations) 10 7 8
    superseded / holds those bytes 0 / 0 0 / 0 0 / 0
    read off a rebuilt timeline 0 1 1
    compositions carrying a one-frame residual 2 4 2
    composed axis at the end -34.376 -9.043 -14.793
    mean |capErr|, last 10 ticks 0.0162 0.0316 to 0.0411 0.0230 to 0.0278

    With the link held fixed, the session repeats to the millisecond. Every run inside a condition produced the same placement census, the same composed axis and the same residual sequence. So this harness contributes no scatter of its own, and what moves between conditions is the condition.

    Changing only the link changes what the session IS. Same seek pattern, same build, ten placements against seven, and final axes 25 s apart. None of those axes is wrong: they are honest axes for three sessions that were handed different bytes at different times.

    And the census is not a function of "slower". C is twice B's rate and makes FEWER placements than B. So a sitting cannot be characterised by how it felt, only by what it counted, which is the argument for putting the per-arm census next to any terminal number rather than treating two sittings of the same arms as two samples of one quantity.

    The third case is produced by the link as well. It appears on both slow conditions, 1 placement in each, in every run, and never on the fast one:

    #418 seg12 placed on base 0.000s, not -9.000s (... residual +9.000s): axis -14.000s -> -5.000s; taught nothing, read off a rebuilt timeline; the distance stays 0.000s
    

    The picture says what it is worth. For the two ticks before that reading lands, axisErr reads -0.000 while the session is still publishing -9.000, so a host placing a cue there is 9 s out, and the reading is what ends it. Your 0 of 36 is therefore a statement about conditions that never arose on that asset, not about the clause.

    The cost of an unread composition is not a per-placement constant. In every run of every condition, a deviation arrived as a PAIR, one composition a frame low and the next a frame high (-0.042 then +0.042), while every other composition was under a millisecond: two such compositions in A and B, four in C. What a session keeps depends on WHICH compositions went unread, not on how many placements it made, so I would not convert your 5 against 10 into a predicted 0.016 s, and a per-arm count is worth more than a per-session one for exactly that reason.

    The limit, which is the honest half. I could not manufacture your regime here at all: across 14 runs, superseded and holds those bytes never occurred once and every placement was read, while your arms leave 20 of 33 and 22 of 36 unread. So this measures that the link sets the census, and it cannot measure the accumulation that follows from an unread composition. That half stays on your side, and this instrument would not resolve it anyway, since the picture probe quantises at one frame and the difference at issue is smaller.

    Closing the issue here. Rounds 1 through 9 are released and confirmed at the picture on both sides, the remaining questions are about how to measure the residue rather than about the axis, and none of them needs an open tracker. Anything that turns up on a later build, or a FreezeDiag stall that does not come back on its own, is worth its own thread, and this one can be reopened if the axis itself moves again.

    Thanks for ten rounds of this. Half the rules in the file came out of your measurements refuting mine, which is the only reason the model is checkable line by line now.

  16. rrgomes commented on Sep 4, 2026

    @rrgomes
    ContributorAuthor

    You asked for the per-arm census and whether the 6.62.3 arms were a separate sitting. Both answers are below, and the first thing they turn up is that my terminal numbers were not a measurement. Retracting them — rounds 9 and 10 both. Nothing here needs the issue reopened; it removes a claim rather than adding a defect.

    The metric was bimodal and I sampled it once per arm

    |producerShift - (t - avpClock)| is not stable within an arm. Across all nine arms, in the undisturbed settle, it takes two values 0.050s apart — the same gap every time — and I reported whichever tick happened to be last:

    build arm held axis frameAhead low mode high mode I reported
    6.62.3 1 -18.120 0.000 0.031 0.081 0.081
    6.62.3 2 -55.599 0.000 0.044 0.094 0.044
    6.62.3 3 -50.009 0.000 0.021 0.071 0.071
    6.67.0 1 -26.843 0.000 0.023 0.073 0.023
    6.67.0 2 -35.611 0.000 0.030 0.080 0.030
    6.67.0 3 -34.292 0.000 0.018 0.068 0.018
    6.67.2 1 -45.218 0.000 0.038 0.088 0.038
    6.67.2 2 -31.163 0.000 0.043 0.093 0.043
    6.67.2 3 -44.135 0.000 0.040 0.090 0.040

    Two of the three 6.62.3 arms came from the high mode and all six later arms from the low one. That is the whole of "0.065 to 0.024". The low modes are 0.031/0.044/0.021 against 0.023/0.030/0.018 and 0.038/0.043/0.040 — fully overlapping, with 6.67.2 the highest of the three if anything.

    A 0.050s gap identical on nine arms is an instrument constant, not content. t and avpClock are sampled at different points in the line and quantise differently, so differencing them returns the skew.

    The engine had already said so and I read past it. On every settled tick of every arm frameAhead is exactly 0.000, and the held axis is a single value across 43 to 79 ticks. That is one measurement rather than a difference of two clocks, and by it there is no residual on any of these arms to compare between builds.

    So: no measured accuracy change between 6.62.3, 6.67.0 and 6.67.2 on this asset, in either direction. Your original prediction — a wash — is what these arms actually show, and the sentence of mine you adopted, that your fixture's chain was too short, was explaining an artifact.

    The 6.62.3 arms were a separate sitting

    You asked to be told. They ran 2026-09-02, a different day from rounds 9 and 10, which were both 2026-09-03. So the anchor does not survive for the reason you gave — it was not measured alongside — and given the above it does not need to.

    The census, which is solid

    Log-line counts, so unaffected by any of the above:

    build arm placements read holds those bytes never reached superseded read %
    6.62.3 1 13 3 1 2 7 23%
    6.62.3 2 13 2 5 1 5 15%
    6.62.3 3 13 1 2 2 8 8%
    6.67.0 1 10 3 1 3 3 30%
    6.67.0 2 11 3 2 2 4 27%
    6.67.0 3 12 2 2 2 6 17%
    6.67.2 1 13 2 4 3 4 15%
    6.67.2 2 11 2 3 2 4 18%
    6.67.2 3 12 2 3 3 4 17%

    Read fraction by sitting: 15%, 25%, 17%. Your density reading would have wanted the middle sitting to read most and end tightest, and it does read most — but with the terminal numbers gone there is nothing left for it to explain. The census is worth having anyway, since it is the part that says these three sittings were not the same experiment, which was your point and stands.

    Everything else from rounds 9 and 10 is log lines and stands: the rollbacks including the 6.970s one, the verdict accounting, the five readings of -0.041 ± 0.002, and the third case at 0 of 36 — which your last comment explains better than I did, as a statement about conditions that never arose rather than about the clause.

    Sorry for the detour. Ten rounds of this and the one number I derived rather than read off a line is the one that was wrong.

  17. superuser404notfound commented on Sep 4, 2026

    @superuser404notfound
    Owner

    Taking the retraction, and then applying the same audit to my own table, which fails it in the same shape one frame wide.

    The retraction is right, and it is the stronger result

    A 0.050s gap identical on nine arms is an instrument constant, and frameAhead reading exactly 0.000 on every settled tick of every arm is a single-source measurement that was already in the line. So the honest reading of those arms is no measured accuracy change between 6.62.3, 6.67.0 and 6.67.2, in either direction, and the band goes out of my notes with the mean it replaced. Nothing about that needs an apology: a number that is withdrawn with the arms that produced it is worth more than one that stands because nobody checked it.

    My capErr row is the same mistake

    I re-read all 11 arms of my counter-measurement, and the tail of capErr is bimodal in every single one, at exactly one frame:

    condition the two values the settled tail takes gap pair centre mean |capErr|, last 10
    A: 3200 kbps / 100 ms +0.009 / -0.033 0.042 -0.012 0.0162 (4 of 4 runs)
    B: 600 kbps / 300 ms +0.026 / -0.016 0.042 +0.005 0.0230, 0.0230, 0.0230, 0.0278
    C: 1200 kbps / 200 ms -0.024 / -0.066 0.042 -0.045 0.0316, 0.0337, 0.0411

    0.042s is one frame at the fixture's 24 fps. So the per-condition mean is two things and neither is accuracy: which lattice pair the session's sub-frame phase landed on, and how many of ten ticks fell on each side of it. The pair centres are 0.033s apart at the widest, still inside one frame, so that row cannot separate the conditions even in principle. I wrote in the same comment that the probe quantises at one frame, and then put sub-frame means in the table anyway.

    What that row was doing in the table was supporting the census, and the census does not need it. The rest holds because it is measured above the quantum or not measured in seconds at all: the placement counts are log lines, the composed axes are 25s apart, and the residual pairs come off the engine's own placement lines at exactly -0.042 / +0.042, read as a pairing rather than as a magnitude.

    The instrument now says which of its two errors is a reading

    The two error columns in that line never had the same resolution, and only one of them said so:

    • axisErr differences two frame-grid values read out of one copyPixelBuffer call, so it is a whole number of frames and every digit of it is a reading.
    • capErr differences that same grid value against the engine's continuous clock. Below one frame it is the phase of the sampling instant.

    Both printed to three decimals, which is what invites the reading I gave them. 88a76d46 prints capFr, the same error in frames, next to capErr: capFr=+0.40 is visibly the same frame, capFr=+1.80 is visibly not. Verified on a fresh arm against the delayed origin.

    The 6.62.3 sitting

    Noted, and it drops out on its own terms then. It was the one comparison I claimed was safe because it was measured alongside, and it was not. With the terminal numbers gone there is nothing left that needed an anchor, and the census is what carries the point it was there for: three sittings, read fractions of 15%, 25% and 17%, not one experiment.

    What this thread ends up having established about measuring

    Both halves of round 11 are the same rule from two directions. A quantity assembled out of two sources is only as good as the instant they share, and when a single-source reading of the same thing exists it wins by default: frameAhead on your side, axisErr on mine, both sitting in the line while the derived number got quoted. The version worth keeping is that a metric has to state its own resolution where it is read, because "I know it quantises at a frame" demonstrably does not survive the trip into a summary table.

    Eleven rounds, and the last one is the two of us catching the same class of error in each other's numbers within a day. Thanks for going back to the logs rather than letting a retracted claim stand as a build difference.

  18. superuser404notfound commented on Sep 4, 2026

    @superuser404notfound
    Owner

    One more thing the same audit turned up on this side: docs/cli.md was giving the advice that produced it. It told a reader to "read the verdict as the MEAN of capErr over the run", which averages the sampling phase rather than buying resolution below the quantum, and the AE#481 paragraph read a move from 0.0230 and 0.0411 to 0.0162 on two arms as an improvement. Both corrected in ab94a810, with the actual AE#481 number left standing where it belongs (+9.037 to +0.037, 216 frames).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions