Skip to content

Fix video freeze on late-stream joins, real A/V sync - #2

Merged
Ghosts6 merged 2 commits into
mainfrom
fix/video-playback-issues
Sep 17, 2026
Merged

Ghosts6 merged 2 commits into
mainfrom
fix/video-playback-issues

Conversation

@Ghosts6

@Ghosts6 Ghosts6 commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fix video render freeze on mid-stream/late joins: tighten the broken-reference-chain gap check from 1s (vs. last keyframe) to 100ms (vs. last decoded frame) the old threshold let discontinuous frames through, which most likely crashed the render loop silently
  • Pace audio decode/schedule off the video render clock instead of firing on arrival, fixing real A/V sync
  • Engine: cache the last keyframe for late joiners (not just SPS/PPS) and shorten GOP to ~2s, bounding worst-case join wait
  • Engine: force CFR (-r <fps>) in the ffmpeg transcode — source was silently 25fps while pacing assumed 30fps, playing back ~20% too fast
  • Add dashboard test infra (Vitest) and wire lint/test into CI

video render freeze still open; debug logging kept in on purpose
- Tighten the decode gap check from 1s (measured against the last
  keyframe) to 100ms (measured against the last decoded frame) - the
  old threshold let discontinuous frames reach the renderer, which is
  the likely cause of the canvas silently freezing after a mid-stream
  join
- Pace audio decode/schedule off the video render clock instead of
  firing on arrival, so audio and video actually reflect the same
  position instead of audio racing ahead
- Shorten engine GOP to ~2s (-g/-keyint_min) to bound late-joiner
  wait further, on top of the existing keyframe cache
- Add dashboard test infra (vitest + testing-library), wire lint/test
  into CI
- Strip debug instrumentation, remove leftover FPS overlay from
  ParticleBackground
@Ghosts6
Ghosts6 merged commit 0c9af9f into main Sep 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant