You are not logged in.

#1 2025-05-22 18:47:10

SneakySnake
Member
Registered: 2012-03-30
Posts: 25

[SOLVED] pipewire 1:1.4.3-1 audio underrun in mpv --ao=pipewire

EDIT: Fixed by pipewire 1.4.4

-----------
Workaround: Someone on the mpv GitHub pointed out that there is an option for controlling the buffer size.
I added this to my ~/.config/mpv/mpv.conf

# (maybe temporary) Increase pipewire buffer size (milliseconds) to counter underruns
pipewire-buffer=50

After upgrading to testing/pipewire, if I try to play a music file or video with a sample rate of 48000 hz, I get a weird stutter/slowdown effect.
It only happens with the pipewire audio output driver of mpv.

Seems to only happen on my system if the audio has a sample rate of 48000 hz.
It doesn't happen with 44100 hz.

Example command:

mpv --ao=pipewire --no-config music.ogg

Reverting to pipewire 1:1.4.2-1 fixes the problem.

EDIT: Another important detail is if I open pavucontrol, the stutter disappears and the audio appears to play normally.
But as soon as I close it, the stuttering starts again.

EDIT: I bisected, and it seems that the offending commit is https://gitlab.freedesktop.org/pipewire … 8dc4615b34
EDIT: Upstream issue: https://gitlab.freedesktop.org/pipewire … ssues/4713

Last edited by SneakySnake (2025-05-30 11:24:26)

Offline

#2 2025-05-23 16:44:28

SneakySnake
Member
Registered: 2012-03-30
Posts: 25

Re: [SOLVED] pipewire 1:1.4.3-1 audio underrun in mpv --ao=pipewire

A weird thing that works for me to counter the effects of this regression is to keep `pavucontrol` open in the background.
As long as `pavucontrol` is open, the buffer underruns don't occur.
I have no idea why this works though.

EDIT: Also, you can tell mpv to use a larger buffer size. See the EDIT at the top of the first message.

Last edited by SneakySnake (2025-05-23 17:21:28)

Offline

Board footer

Powered by FluxBB