Skip to content
Snippets Groups Projects

clock: fix audio/video synchronisation issues

Merged Thomas Guillem requested to merge tguillem/vlc:timeget2 into master

This MR aim to fix #27023 (closed)

I decided to report more precise timing points from all audio outputs instead of trying to use a different mathematical function to "smooth" the clock average. This solution might be possible, but will always be less precise.

This MR is divided in two parts:

  • The core part
  • PulseAudio changes

I also tested it with all main aout modules (apple, android AAudio, Wasapi). If accepted, I will implement aout_TimingReport for all these modules.

The result ! Clock offset measurement in most common situation with this MR:

A/V sync is perfect and quick to stabilize, even with BT devices, no video drops reported in logs.

Compare with #27023 (closed)

PulseAudio with a BT device, playing a 25fps video (23ms audio sample)

fixed-25fps-bt

PulseAudio with a BT device, playing a 60fps video (10ms audio sample)

fixed-60fps-bt

PulseAudio with a speaker, playing a 25fps video (23ms audio sample)

fixed-25fps-speaker

PulseAudio with a speaker, playing a 60fps video (10ms audio sample)

fixed-60fps-speaker

Merge request reports

Merge request pipeline #236266 passed

Merge request pipeline passed for 9eabb282

Approval is optional

Merged by Steve LhommeSteve Lhomme 2 years ago (Jun 29, 2022 8:58am UTC)

Merge details

Pipeline #236270 passed

Pipeline passed for 9eabb282 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Denis Charmet
  • Denis Charmet
  • Denis Charmet
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Rémi Denis-Courmont
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading