Repository navigation
Conversation
… live join A lite-06 join replays 2.13 s of retained audio, which at the 20 ms join took 106 one-frame groups: a stream each at every hop, over the 100 a peer grants by default, so the live edge queued for credit behind history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe encoder groups retained audio according to the broadcast join interval and continues to group live audio according to the encoder join. Replay history is recorded before retained frames are submitted. A regression test checks replay and live grouping. Documentation describes the behavior and reports an interop failure and a proposed Rust counterpart. Severity of issue fixed: Medium Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Scheduled Interop run 45253796046 (Chromium x64) failed
live incumbent fallback playsonmoq-lite-06. The player's audio never started within the 1039 ms bound (audioStalled,audioTimestamp: 0), and the incumbent loggedreset a lower stream to make room. Per the 2026-11-23 decision (moq-dev/moq#9511), a lite-06 join correctly replays 2.13 s of retained audio. At the 20 ms audio join that replay is 106 one-frame groups, so 106 streams at every hop. That's more than the 100 a peer grants by default, so the live edge queued for stream credit behind history that the player then skipped as stale.Approach
@moq/publishgroups replayed history as coarsely as the catalog'ssync.intervalpromises (Broadcast.join, the longest group of any rendition, so the HLS/DASH grid holds). Live audio keeps its join. The fixture's 500 ms GOP turns the 2.13 s replay into 5 streams instead of 106. An audio-only broadcast declares its own join as the interval, so nothing changes there. The replay mark (#history) is now set before each submit, so a codec that emits withinencode()still sees its frame as history.This stays within the recorded decision: the join still gets all 2.13 s, live audio is not encoded first, and the bound is unchanged.
Impact
Validation
Focused case:
just test media --media-engines chromium --media-cases replacement, pinned withtaskset. Logged timestamps (removed before commit) on the incumbent's encoder and the viewer's groups, ring, and stall state.lite-07 and moq-transport stay at about 210 to 330 ms in both. Where the time went before (4 cores, from withdraw): routing 50 to 75 ms, then the incumbent's 105 history outputs over ~90 ms. A standalone
AudioEncoderdoes 106 Opus frames in ~8 ms, so that cost is page contention, not the codec. The live edge then reached the viewer ~60 to 110 ms later behind the history streams, with holes the viewer skipped. Under the 40-stream relay, live groups arrived in bursts at 471 ms and 629 ms. With the fix, the viewer un-stalls ~30 ms after the live frame is encoded. Some pinned runs failedaudio toneorlifecycle player returnson other versions, before and after the change alike: CPU starvation from the pinning.Unit:
replayed audio groups at the declared interval and live audio at its joinfails without the fix (one frame per group) and passes with it.just cipasses.Caused by
Alternatives
sync.intervalpromise that HLS/DASH export cuts segments on.Decisions
sync.interval(rejected: one group for the whole replay, which breaks the interval HLS/DASH export cuts on).quest/m3/audio-replay-groups.mdas its own m3 quest (rejected: fold into this PR, drop).Follow-ups
moq-audio's Rust replay groups at the join too.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code