Repository navigation
fix(ts): hold audio behind a stale start group's next keyframe - #5810
Conversation
A joiner's video start group older than the delay goes stale at acquisition, leaving the video queue empty until its next keyframe. leads_video fell back to the dropped keyframe's timestamp, so audio and data went out ahead of the first video frame. Drop them as trimmed until a video frame is queued. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Outcome: the quest is implemented, and its regression fails without the fix and passes with it on repeated runs. One open decision is listed in the body: should audio be released once every video track ends before going out? I recommend no. One follow-up: the acquisition depends on (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Merging. Summary:
(Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Found reading #5713 (quest
quest/m1/ts-reliability/audio-lead.md). When a joiner's video start group is older than the delay, the jitter buffer's acquisition marks its keyframe stale and drops the group whole, so the video queue stays empty until the next keyframe lands.Export::leads_videothen fell back tovideo_start, the dropped keyframe's timestamp, and released audio and data ahead of the first video frame, by up to the rest of the GOP less the delay.Approach
leads_video: until video goes out, a non-video frame is dropped (counted as trimmed) unless a video frame is queued and the frame presents at or after it. With no video queued, nothing goes out ahead of the keyframe that has yet to arrive. This is the fix settled in fix(ts): start an export on a whole group and count every drop #5713.a_stale_start_group_holds_the_audio_behind_the_next_keyframe: the exporter joins 160 ms into a GOP with a 100 ms delay, and the audio is one frame per group so its live edge is fresher than the video's start group. It fails without the fix (audio at 192, 256, 320 ms leads the 600 ms keyframe) and passes with it, across repeated runs.tune_in_does_not_wait_on_dropped_audionow writes less than a delay of the group, which keeps its original intent (tune-in does not wait on the dropped lead audio).publisher_preserves_scte35_cuesjoins the clip's 2 s last group all at once. Its egress now uses a 3 s latency so that group's keyframe is not stale.Impact
Alternatives
video_startonce every video track has finished, so a program whose video ends before its first frame still carries its audio. Not done: no test needs it, and the program's PMT still declares the video.Decisions
Follow-ups
HashMapiteration order inExport::fill. It can end partway through one fill pass, before reading another track's frames that are already available, so the same input anchors differently from run to run. While building the fixture, the same broadcast started on either the 0 ms or the 600 ms keyframe depending on which track was filled first. Recommend a quest to make acquisition see every track's available frames before it decides.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)