Skip to content

fix(software-live): play audio far from its video on the video's axis - #9

Merged
jpsts merged 1 commit into
spectrumfrom
fix/live-audio-axis
Nov 3, 2026
Merged

jpsts merged 1 commit into
spectrumfrom
fix/live-audio-axis

Conversation

@jpsts

@jpsts jpsts commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

A live MPEG-TS source whose audio runs more than a minute from its video could not play on the software path with a rewind buffer: FFmpeg's 33-bit wrap correction puts the audio about 26.5 h ahead, the audio sets the live edge, and the rewind buffer discards every video keyframe as older than its window.

What changed

  • LiveAudioAxis: audio more than 30 s from the video moves onto the video's axis, aligned on arrival, in both live loops (rewind and no rewind).
  • Audio that disagrees for a moment (a seam one stream crosses first) is held back only while video is moving; a sparse picture over continuous sound is left alone.

Test plan

  • LiveAudioAxisTests.
  • aetherctl play --live --sw --dvr-window 600 on a local real-time stream with audio 274 s behind video, a Mac, macOS 27: stock 7.56.0 logs 15 eviction recoveries and 15 underruns in 30 s with the clock stopped; with this change none, 50 fps, clock running.
  • Full suite on a Mac: one failure, LAN peers cannot take the slots kept for loopback, which times out the same way on stock 7.56.0.
  • Not measured: A/V sync on a real source. Aligning on arrival is only as exact as the source's interleave.

@jpsts
jpsts merged commit ac6d17a into spectrum Nov 3, 2026
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