Skip to content

fix: eliminate overlay lag in vision mixer multiview#499

Merged
srperens merged 1 commit intomainfrom
fix/overlay-timestamp-lag
Apr 14, 2026
Merged

fix: eliminate overlay lag in vision mixer multiview#499
srperens merged 1 commit intomainfrom
fix/overlay-timestamp-lag

Conversation

@srperens
Copy link
Copy Markdown
Collaborator

Summary

  • The overlay appsrc used do_timestamp(true), stamping buffers with the current pipeline running time
  • The multiview compositor syncs all pads, so it held the overlay buffer until video caught up — delaying it by the full pipeline latency (~1s)
  • PGM/PVW switches appeared instant in video but the border/label overlay lagged behind
  • Fix: disable auto-timestamping and set PTS=0 on every overlay buffer so the compositor renders it immediately

Test plan

  • Start a vision mixer flow with latency > 0
  • Switch PGM/PVW and verify overlay borders update instantly (no ~1s lag)
  • Verify overlay clock still ticks correctly
  • Verify overlay alpha toggle still works

🤖 Generated with Claude Code

With do_timestamp(true), the overlay appsrc stamped buffers with the
current pipeline running time. The multiview compositor then held the
buffer until all other pads caught up, delaying it by the full pipeline
latency (~1s). PGM/PVW switches appeared instant in video but the
border/label overlay lagged behind.

Fix: disable auto-timestamping and set PTS=0 on every overlay buffer.
PTS=0 is always in the past so the compositor renders it immediately.
max-last-buffer-repeat (default infinite) keeps the frame visible until
the next push replaces it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@srperens srperens merged commit 401e1ba into main Apr 14, 2026
7 checks passed
@srperens srperens deleted the fix/overlay-timestamp-lag branch April 14, 2026 13:30
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