You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On live MPEG-TS streams (H.264 1080p50, AAC), playback through AetherEngine freezes briefly every so often; the host OSD pops up because the player drops out of the playing state for a moment. The same stream plays without any issue in KSPlayer (a 34 min session in the same log: 0 dropped frames at 49.99 fps) and in QuickTime. VLC on Mac shows similar freezes.
In the log, the live HLS producer cuts segments against a 0.5 s cut target, but the actual segments come out at 1.0 to 2.4 s (GOP-bound). TARGETDURATION is then sealed at 1 to 3 s. AVPlayer repeatedly reports CoreMediaErrorDomain -12888 ("Playlist File unchanged for longer than 1.5 * target duration") on the local media.m3u8, and #524 fires 287 times with only about 1.5 to 2 s of fetched runway. At the same moments AVSampleBufferVideoRenderer toggles readyForDisplay NO → YES, which matches the visible freezes.
Steps to reproduce
Play a live H.264 1080p50 MPEG-TS stream (sample capture available, see below) through AetherEngine on tvOS.
Watch for a few minutes.
The picture freezes briefly at irregular intervals; -12888 and #524 show up in the log at the same moments.
AetherEngine version or commit SHA
7.17.1
Host app
Custom / my own integration
Platform
tvOS
OS version
27
Device / chip
Apple Tv
Playback path
Native AVPlayer
Source media (for playback bugs)
Live MPEG-TS over HTTP, H.264 [email protected] 1920x1080, 50 fps, SDR, fieldOrder=1, AAC ADTS (stream-copied). A 53 MB TS capture of the stream is available on request.
Error codes / log lines
[HLSSegmentProducer] init OK (baseIndex=0, segments=0, targetDur=0.500s, srcVideoTb=1/90000) audio=stream-copy inTb=1/90000
[HLSVideoEngine] live TARGETDURATION sealed at 1s (holdback 3.000s): max EXTINF 1.000s, 1.5 x cut target 0.750s, no measured floor (segments are cut here, not ingested)
[HLSSegmentProducer] live seg-67 finalized: start=68.040s dur=1.120s
[NativeAVPlayerHost] #9 errorLog code=-12888 domain=CoreMediaErrorDomain uri=http://127.0.0.1:52900/.../media.m3u8 'Playlist File unchanged for longer than 1.5 * target duration'
[AetherEngine] #524 the client is running thin: it holds 1.48s of fetched runway, playhead 5421.82s against a seekable edge of 5436.58s (which already carries the holdback)
-12888 appeared 188 times over three sessions; #524 appeared 287 times.
Anything else
The TARGETDURATION sealed at 1 s is exceeded by later segments (for example 1.120 s), and with a 0.75 s staleness basis the playlist can easily look "unchanged" to AVPlayer whenever a GOP runs long.
Thanks for the detailed log, the seal line pointed straight at it. Reproduced on the Mac against current main (7.23.0), and the fix is up as #676.
What happens. Under .fastZap the engine cuts at every keyframe past 0.5 s, so each segment is one whole source GOP. TARGETDURATION is sealed from the first window and has to stay fixed for the session. On your stream that window held three 1.000 s GOPs, so it sealed at 1 s with a 3 s holdback and no headroom at all. Your GOPs are not regular (1.0 to 2.4 s in the log), and every longer one then:
exceeds the sealed value (EXTINF 2.4 rounds to 2, above TARGETDURATION 1),
leaves the playlist unchanged for longer than AVPlayer's 1.5 x TARGETDURATION patience while the cutter waits for the next keyframe (your -12888),
.standard never ran into this because its 4 s cut target already carries 50% headroom. Under fastZap that headroom collapsed to nothing.
The fix. When the engine cuts the segments itself under fastZap, the seal now takes ceil(1.5 x the longest GOP seen). A 1 s GOP stream serves TARGETDURATION 2 with a 6 s holdback, the same values you saw on your origins back in #195. Ingested HLS segments and .standard are unchanged. The seal line now names the new term, so the log shows 1.5 x max EXTINF 1.500s (each segment is one whole GOP).
Measured with a synthetic 50 fps TS using the same GOP pattern (1.0 / 1.12 / 2.4 s), two runs each. Before: sealed at 1 s, a stall on every run, and macOS AVPlayer rejected the playlist outright. After: sealed at 2 s, no stalls, no rejections. The join moves by about 0.2 s. The one real cost is that fastZap now plays about 6 s behind the live edge instead of 3 s.
One request: could you share the 53 MB capture you mentioned? I'd like to run the fix against your real GOP distribution before releasing it, since a stream that opens with 1 s GOPs and later runs GOPs longer than 3 s would still outgrow a seal of 2. Any file host works, or a private link by email if you prefer.
Thanks for the detailed log, the seal line pointed straight at it. Reproduced on the Mac against current main (7.23.0), and the fix is up as #676.
What happens. Under .fastZap the engine cuts at every keyframe past 0.5 s, so each segment is one whole source GOP. TARGETDURATION is sealed from the first window and has to stay fixed for the session. On your stream that window held three 1.000 s GOPs, so it sealed at 1 s with a 3 s holdback and no headroom at all. Your GOPs are not regular (1.0 to 2.4 s in the log), and every longer one then:
exceeds the sealed value (EXTINF 2.4 rounds to 2, above TARGETDURATION 1),
leaves the playlist unchanged for longer than AVPlayer's 1.5 x TARGETDURATION patience while the cutter waits for the next keyframe (your -12888),
.standard never ran into this because its 4 s cut target already carries 50% headroom. Under fastZap that headroom collapsed to nothing.
The fix. When the engine cuts the segments itself under fastZap, the seal now takes ceil(1.5 x the longest GOP seen). A 1 s GOP stream serves TARGETDURATION 2 with a 6 s holdback, the same values you saw on your origins back in #195. Ingested HLS segments and .standard are unchanged. The seal line now names the new term, so the log shows 1.5 x max EXTINF 1.500s (each segment is one whole GOP).
Measured with a synthetic 50 fps TS using the same GOP pattern (1.0 / 1.12 / 2.4 s), two runs each. Before: sealed at 1 s, a stall on every run, and macOS AVPlayer rejected the playlist outright. After: sealed at 2 s, no stalls, no rejections. The join moves by about 0.2 s. The one real cost is that fastZap now plays about 6 s behind the live edge instead of 3 s.
One request: could you share the 53 MB capture you mentioned? I'd like to run the fix against your real GOP distribution before releasing it, since a stream that opens with 1 s GOPs and later runs GOPs longer than 3 s would still outgrow a seal of 2. Any file host works, or a private link by email if you prefer.
Released in 7.23.1 (0d3dc68). A retest on your stream would be great; the TARGETDURATION seal line should now read sealed at 2s with the 1.5 x max EXTINF term, and -12888 / #524 should be gone or rare. The capture is still welcome if you can share it.
Thanks for the capture, and sorry: the link was in the quote reply and I missed it when I posted the release note above.
I ran it through aetherctl live --fast-zap --realtime --preroll 0 on 7.24.0 (the capture looped as a 1x origin, 150 s, two runs):
GOPs in the capture: 103 keyframes, the longest GOP is exactly 1.000 s, and the scene cuts in between go as short as 0.04 s. Under fastZap that gives segments of 0.54 to 1.48 s.
Seal:sealed at 2s (holdback 6.000s) on both runs, with the new 1.5 x max EXTINF term in the line. The later candidate was 3 s, but no segment ever came close to breaking TARGETDURATION 2 (max 1.44 s).
One thing the capture does not contain: the 2.4 s EXTINF from your original log. Its first three segments are 1.12 / 0.64 / 1.0 s, so even 7.23.0 would have sealed this window at 2 s, and no GOP in it is longer than 1 s. So the long segments in your session came from a stretch of the stream this capture does not cover. My guess is a keyframe lost in transport (a damaged IDR merges two GOPs into one segment, and 1.0 + 1.44 is exactly the shape of a 2.4), but that is a guess from the numbers, not something I can see here.
What would settle it is a retest on 7.23.1 or later: the seal line should read sealed at 2s with the 1.5 x max EXTINF term, and -12888 / #524 should be gone or rare. If a later candidate line then shows a value above 3, or a segment's EXTINF goes past 3 s, please post the log from that stretch, because that is the case a seal of 2 cannot cover.
A field data point for the GOP term, from a 59.94 fps source, at 7.24.0 (9bd00968).
Setup. Apple TV 4K (3rd generation, AppleTV14,1, tvOS 26.6), Debug builds of our app, 2026-10-01. A live 1080p59.94 H.264 channel as raw MPEG-TS through a custom IOReader, .fastZap, the engine cutting at its 0.5 s cut target. The channel is re-encoded upstream of us with h264_nvenc -g 60, so its key frames are 60 frames (1.001 s) apart, with occasional extra key frames at scene cuts.
The arithmetic at 59.94 fps (VideoSegmentProvider.swift:349-359, :371-374, :292-306 at 7.24.0):
longest segment
duration
× 1.5, served
TD
holdback
79 frames
1.317983 s
1.977
2
6 s
80 frames
1.334667 s
2.002
3
9 s
One 80-frame segment moves the seal from 2 to 3 by 1.0 ms of segment duration. At a true 60.000 fps the same 80 frames are 1.3333 s and seal 2.
Where 80-frame segments come from here. A key-frame probe of the source (10 minutes) shows runs of exactly 60-frame intervals and bursts of extra key frames 6 to 58 frames after a regular one. Applying the cut target to those key frames gives segments of 30 to 89 frames, the same range as in our engine logs: an extra key frame 20 to 29 frames after a regular one is under the cut target and merges into an 80 to 89-frame segment. (The merge is our inference from the probe and the bounds; the engine does not log the key frame it passed.)
How often. Our logs of this channel from 2026-09-23 to 2026-10-01, about 6,800 segments over three test rounds and every engine version we ran: 1.4 to 1.8 % of segments are 80 frames or longer, all are between 30 and 89 frames (longest 1.485 s), and they come in bursts.
What it cost in one session. A rebuild of ours that hands the engine a 6 s backlog (our "Go to Live" after a pause), one hold, both versions, one run per leg:
rebuild
seal
press to first manifest
second plain request held
press to #361 startup 8/8 presenting
settled behind live
7.17.1, three runs
TD 2
0.51 to 0.54 s
3 to 4 ms
0.534 to 0.566 s
6.5 to 7.7 s
7.24.0, TD 2
TD 2
0.54 s
4 ms
0.574 s
6.8 s
7.24.0, TD 3 (max EXTINF 1.335 s)
TD 3
1.66 s
1.348 s
3.060 s
9.0 s
With TD 3 the 6.573 s cushion is under the 9 s holdback, so the first manifest is a bounded start and the second request waits a second grace. (A third 7.24.0 rebuild, also TD 2, presented at 0.620 s; its upstream feed restarted during the leg, so it is left out of the table.)
The other side of it. Three sessions in these logs sealed TD 2 and later met 80 to 89-frame segments (two at 7.24.0, one at 7.17.1, one run each): each ended dropped 0 stalls 0 with no -12888.
We are not asking for a particular change: you know what the reporter's 1.0 to 2.4 s GOPs need. The data point is that on a 59.94 fps source with a 1 s GOP, a single merged 80 to 89-frame segment buys a whole extra second of TARGETDURATION and 3 s of holdback. On our side we have found the encoder setting behind the extra key frames (NVENC's scene-cut insertion) and asked for it to be turned off, which removes the trigger for this channel.
Thanks, this was a clean report: the frame arithmetic and the rebuild table pointed straight at the cliff. The fix is up as #691.
Cause. The headroom term rounded 1.5 x max EXTINF up, so it asked more of a hypothetical longer GOP than HLS asks of any real segment. RFC 8216 compares EXTINF with TARGETDURATION rounded to the nearest integer. That made 2.002 cost a whole second, which is the 79/80-frame step in your table.
Fix. The term now asks what it is for. It takes the smallest TARGETDURATION under which a GOP 1.5 x the longest seen would still list legally (nearest-integer rounding) and finish inside AVPlayer's 1.5 x TD patience with 0.5 s to spare. That 0.5 s is the margin round 1 already accepted for the 2.4 s GOP this issue was opened for. In practice:
segments up to 1.666 s seal 2, which covers your 80 to 89-frame segments (max 1.485 s, 2.228 x 1.5);
1 s GOPs keep TD 2, so the original report is unaffected;
the new value is never above the old one.
The seal line now states the result, e.g. 1.5 x max EXTINF 2.002s needs 2s. Your three TD 2 sessions that later met 80 to 89-frame segments with dropped 0 stalls 0 were the field evidence that this margin is enough.
Measured with a 59.94 fps seed shaped like your probe: keyframes every 60 frames plus one extra at frame 100, so the third segment is exactly 80 frames. Run with aetherctl live --fast-zap --realtime --preroll 6, as a stand-in for your 6 s rebuild backlog, two runs per arm:
Neither arm showed a -12888 or a stall. Turning off NVENC's scene-cut insertion is still worth doing on your side. With it off, the channel's segments are all 60 frames, which is the steadiest shape for fastZap anyway. A release note will follow here.
Released in 7.26.2 (f660fc1). On your channel, a window whose longest segment is 80 to 89 frames should now read sealed at 2s with 1.5 x max EXTINF ... needs 2s in the seal line, and the Go to Live rebuild should no longer start bounded. If a TD 3 seal shows up on a channel whose segments stay under 1.667 s, please post the seal line.
Activity
superuser404notfound commentedon Sep 30, 2026
Thanks for the detailed log, the seal line pointed straight at it. Reproduced on the Mac against current main (7.23.0), and the fix is up as #676.
What happens. Under
.fastZapthe engine cuts at every keyframe past 0.5 s, so each segment is one whole source GOP. TARGETDURATION is sealed from the first window and has to stay fixed for the session. On your stream that window held three 1.000 s GOPs, so it sealed at 1 s with a 3 s holdback and no headroom at all. Your GOPs are not regular (1.0 to 2.4 s in the log), and every longer one then:EXTINF 2.4rounds to 2, aboveTARGETDURATION 1),1.5 x TARGETDURATIONpatience while the cutter waits for the next keyframe (your -12888),.standardnever ran into this because its 4 s cut target already carries 50% headroom. Under fastZap that headroom collapsed to nothing.The fix. When the engine cuts the segments itself under fastZap, the seal now takes
ceil(1.5 x the longest GOP seen). A 1 s GOP stream serves TARGETDURATION 2 with a 6 s holdback, the same values you saw on your origins back in #195. Ingested HLS segments and.standardare unchanged. The seal line now names the new term, so the log shows1.5 x max EXTINF 1.500s (each segment is one whole GOP).Measured with a synthetic 50 fps TS using the same GOP pattern (1.0 / 1.12 / 2.4 s), two runs each. Before: sealed at 1 s, a stall on every run, and macOS AVPlayer rejected the playlist outright. After: sealed at 2 s, no stalls, no rejections. The join moves by about 0.2 s. The one real cost is that fastZap now plays about 6 s behind the live edge instead of 3 s.
One request: could you share the 53 MB capture you mentioned? I'd like to run the fix against your real GOP distribution before releasing it, since a stream that opens with 1 s GOPs and later runs GOPs longer than 3 s would still outgrow a seal of 2. Any file host works, or a private link by email if you prefer.
Simpendaal commentedon Sep 30, 2026
https://wormhole.app/LKmREK#yHrQ6nuXzM1PlzDG4fgNTw
superuser404notfound commentedon Sep 30, 2026
Released in 7.23.1 (0d3dc68). A retest on your stream would be great; the TARGETDURATION seal line should now read
sealed at 2swith the1.5 x max EXTINFterm, and -12888 / #524 should be gone or rare. The capture is still welcome if you can share it.superuser404notfound commentedon Sep 30, 2026
Thanks for the capture, and sorry: the link was in the quote reply and I missed it when I posted the release note above.
I ran it through
aetherctl live --fast-zap --realtime --preroll 0on 7.24.0 (the capture looped as a 1x origin, 150 s, two runs):sealed at 2s (holdback 6.000s)on both runs, with the new1.5 x max EXTINFterm in the line. The later candidate was 3 s, but no segment ever came close to breaking TARGETDURATION 2 (max 1.44 s).VERDICT: live playingon both runs, including across the loop point. The only wait was one of 0.1 to 0.2 s about 5 s after the join, which is the shallow bounded start that fastZap trades for the quick join, not this defect.One thing the capture does not contain: the 2.4 s EXTINF from your original log. Its first three segments are 1.12 / 0.64 / 1.0 s, so even 7.23.0 would have sealed this window at 2 s, and no GOP in it is longer than 1 s. So the long segments in your session came from a stretch of the stream this capture does not cover. My guess is a keyframe lost in transport (a damaged IDR merges two GOPs into one segment, and 1.0 + 1.44 is exactly the shape of a 2.4), but that is a guess from the numbers, not something I can see here.
What would settle it is a retest on 7.23.1 or later: the seal line should read
sealed at 2swith the1.5 x max EXTINFterm, and -12888 / #524 should be gone or rare. If alater candidateline then shows a value above 3, or a segment's EXTINF goes past 3 s, please post the log from that stretch, because that is the case a seal of 2 cannot cover.cmcpherson274 commentedon Oct 2, 2026
A field data point for the GOP term, from a 59.94 fps source, at 7.24.0 (
9bd00968).Setup. Apple TV 4K (3rd generation,
AppleTV14,1, tvOS 26.6), Debug builds of our app, 2026-10-01. A live 1080p59.94 H.264 channel as raw MPEG-TS through a customIOReader,.fastZap, the engine cutting at its 0.5 s cut target. The channel is re-encoded upstream of us withh264_nvenc -g 60, so its key frames are 60 frames (1.001 s) apart, with occasional extra key frames at scene cuts.The arithmetic at 59.94 fps (
VideoSegmentProvider.swift:349-359,:371-374,:292-306at 7.24.0):One 80-frame segment moves the seal from 2 to 3 by 1.0 ms of segment duration. At a true 60.000 fps the same 80 frames are 1.3333 s and seal 2.
Where 80-frame segments come from here. A key-frame probe of the source (10 minutes) shows runs of exactly 60-frame intervals and bursts of extra key frames 6 to 58 frames after a regular one. Applying the cut target to those key frames gives segments of 30 to 89 frames, the same range as in our engine logs: an extra key frame 20 to 29 frames after a regular one is under the cut target and merges into an 80 to 89-frame segment. (The merge is our inference from the probe and the bounds; the engine does not log the key frame it passed.)
How often. Our logs of this channel from 2026-09-23 to 2026-10-01, about 6,800 segments over three test rounds and every engine version we ran: 1.4 to 1.8 % of segments are 80 frames or longer, all are between 30 and 89 frames (longest 1.485 s), and they come in bursts.
What it cost in one session. A rebuild of ours that hands the engine a 6 s backlog (our "Go to Live" after a pause), one hold, both versions, one run per leg:
#361 startup 8/8 presentingWith TD 3 the 6.573 s cushion is under the 9 s holdback, so the first manifest is a bounded start and the second request waits a second grace. (A third 7.24.0 rebuild, also TD 2, presented at 0.620 s; its upstream feed restarted during the leg, so it is left out of the table.)
The other side of it. Three sessions in these logs sealed TD 2 and later met 80 to 89-frame segments (two at 7.24.0, one at 7.17.1, one run each): each ended
dropped 0 stalls 0with no-12888.We are not asking for a particular change: you know what the reporter's 1.0 to 2.4 s GOPs need. The data point is that on a 59.94 fps source with a 1 s GOP, a single merged 80 to 89-frame segment buys a whole extra second of TARGETDURATION and 3 s of holdback. On our side we have found the encoder setting behind the extra key frames (NVENC's scene-cut insertion) and asked for it to be turned off, which removes the trigger for this channel.
superuser404notfound commentedon Oct 3, 2026
Thanks, this was a clean report: the frame arithmetic and the rebuild table pointed straight at the cliff. The fix is up as #691.
Cause. The headroom term rounded
1.5 x max EXTINFup, so it asked more of a hypothetical longer GOP than HLS asks of any real segment. RFC 8216 compares EXTINF with TARGETDURATION rounded to the nearest integer. That made 2.002 cost a whole second, which is the 79/80-frame step in your table.Fix. The term now asks what it is for. It takes the smallest TARGETDURATION under which a GOP 1.5 x the longest seen would still list legally (nearest-integer rounding) and finish inside AVPlayer's
1.5 x TDpatience with 0.5 s to spare. That 0.5 s is the margin round 1 already accepted for the 2.4 s GOP this issue was opened for. In practice:The seal line now states the result, e.g.
1.5 x max EXTINF 2.002s needs 2s. Your three TD 2 sessions that later met 80 to 89-frame segments withdropped 0 stalls 0were the field evidence that this margin is enough.Measured with a 59.94 fps seed shaped like your probe: keyframes every 60 frames plus one extra at frame 100, so the third segment is exactly 80 frames. Run with
aetherctl live --fast-zap --realtime --preroll 6, as a stand-in for your 6 s rebuild backlog, two runs per arm:#361 startup 8/8 presentingNeither arm showed a -12888 or a stall. Turning off NVENC's scene-cut insertion is still worth doing on your side. With it off, the channel's segments are all 60 frames, which is the steadiest shape for fastZap anyway. A release note will follow here.
Merge pull request #691 from superuser404notfound/fix/670-gop-headroo…
superuser404notfound commentedon Oct 3, 2026
Released in 7.26.2 (f660fc1). On your channel, a window whose longest segment is 80 to 89 frames should now read
sealed at 2swith1.5 x max EXTINF ... needs 2sin the seal line, and the Go to Live rebuild should no longer start bounded. If a TD 3 seal shows up on a channel whose segments stay under 1.667 s, please post the seal line.fix(live): one frame more no longer buys a whole second of fastZap TA…