top | item 38401452

(no title)

chenxiaolong | 2 years ago

Yup, Bluetooth devices can report the latency via AVDTP 1.3 Delay Reporting. If I remember correctly from the last time I looked at this, the media framework in OS's tend to expose this to applications by reporting the timestamp that a submitted audio buffer is actually played back. The video player can use these timestamps to adjust the video delay accordingly. And since it's per buffer, it can handle the latency changing (eg. by switching from Bluetooth to a wired connection).

I know at least Android and Linux + Pipewire support this. I haven't encountered a single application on desktop Linux that doesn't support this properly. All the standard video players and browsers work. It works for HDMI too, when the TV/AV receiver is well designed and communicates the latency in the EDID.

discuss

order

AnssiH|2 years ago

Indeed, there is some (usually much smaller, but depending on buffer sizes) audio delay even in regular desktop systems so video players and audio APIs mostly already had proper handling for it.