Pulse server, A2DP: pop/clicks when seeking with MPV
edit: The current behavior with an updated git build:
- It's no longer clicks/pops, it sounds like fast, low-amplitude, wing-flapping sound.
- It a generic Pulse server issue. It happens with both Bluetooth and non-Bluetooth devices but is a bit more frequent with the former, though maybe starting to look more consistent in the frequency of occurrence compared to the latter.
- The A2DP codec choice doesn't seem to make any difference.
- It's specific for PipeWire's Pulse server. It never happened to me with PulseAudio.
- It can be avoided by using PipeWire's ALSA or JACK backends.
- The duration of the noise will be at worst a second or two, no matter the duration of the seeking action.
- Specifically to mpv, the issue can be avoided by using mpv's
--audio-stream-silence=yes
option. Thanks for @yourealwaysbe for pointing this out.
original post
Recent build 908dc6b1 on Arch Linux, bluez 5.55, Intel Wireless-AC 9260, testing A2DP Bluetooth output sink with MPV 0.32.0.
Before the changes that were introduced between 935851a6 and 908dc6b1 every seek operation in MPV ended with overrun or underun audio and video playback hiccups up until the audio caught up with the image.
Now, after 908dc6b1, there are no video playback hiccups, the image will be played smoothly but instead, the audio is introducing pops/clicks. In other words, the audio is no longer blocking the video playback but instead it introducing pops/clicks until it finally catching up with the image.
This is noticeable on a continuous seeking operation where the time that will take the audio to catch up with the image and clicks/pops will disappear is longer.
Pops/clicks are also introduced on pause/un-pause and when closing the player.
In comparison, when playing a video in Chrome and seeking or pause/un-pause there's maybe a single, not very noticeable pop.
In a similar fashion, when playing a video in MPV with analog headphones and seeking, there's a momentary period of not very noticeable pops/clicks, and it doesn't add up after a continuous seeking operation.