You are not logged in.

#1 2022-11-21 16:20:52

tofiffe
Member
Registered: 2016-02-14
Posts: 31

[Solved] MPV has no sound

As of recently I started having issues with MPV (and only mpv), where it doesn't output any sound.
I've tried using both 0.35.0 and mpv-git (0.35.0-18-ga62f71bfbe) versions, with both performing the same.

Other applications (such as VLC) play the same files fine, and MPV no longer outputs any sound for files that used to work either. I have tried checking with Pavucontrol, however MPV is not on the list, while everything else is. Reinstall does not fix it. How do I resolve this?

Last edited by tofiffe (2022-11-23 15:27:21)

Offline

#2 2022-11-21 21:08:33

Alopex
Member
From: Chilliwack, British Columbia
Registered: 2021-01-26
Posts: 10

Re: [Solved] MPV has no sound

The recent update of MPV has A LOT of problems. Most videos I play have a LOT of lag, interesting it's only the ones with proprietary codecs.... The open ones work fine. Anyways I just downgraded the version of mpv :0.34.1-5-x86_64 and it works fine! I suggest you do the same. And wait for a fix. It's easier that trying to debug something that will probably be fixed in the coming week (maybe).

Last edited by Alopex (2022-11-21 21:09:20)


arch + dwm

Offline

#3 2022-11-21 21:18:11

xerxes_
Member
Registered: 2018-04-29
Posts: 505

Re: [Solved] MPV has no sound

You can display a list and choose to test audio output and device by commands:

mpv --ao=help
mpv --audio-device=help

Offline

#4 2022-11-22 07:35:36

tofiffe
Member
Registered: 2016-02-14
Posts: 31

Re: [Solved] MPV has no sound

I have tried setting audio devices through the config file before posting here, I've gone through pretty much the whole list, but nothing helped. Will try downgrading and see if that helps.

Offline

#5 2022-11-23 14:11:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 17,745

Re: [Solved] MPV has no sound

Works fine here, terminal output while running mpv in an affected way as well as

sudo fuser -v /dev/snd/*

Offline

#6 2022-11-23 14:17:42

tofiffe
Member
Registered: 2016-02-14
Posts: 31

Re: [Solved] MPV has no sound

MPV terminal output while playing a file:

 (+) Video --vid=1 (*) (hevc 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (eac3 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (subrip)
AO: [alsa] 48000Hz stereo 2ch float
VO: [gpu] 1920x1080 yuv420p10
AV: 00:00:20 / 00:43:23 (1%) A-V: -0.000

output of sudo fuser -v /dev/snd/*:

Cannot stat file /proc/1794/fd/4: Permission denied
Cannot stat file /proc/1794/fd/5: Permission denied
Cannot stat file /proc/1794/fd/6: Permission denied
Cannot stat file /proc/1794/fd/7: Permission denied
Cannot stat file /proc/1794/fd/8: Permission denied
Cannot stat file /proc/1794/fd/9: Permission denied
Cannot stat file /proc/1794/fd/10: Permission denied
Cannot stat file /proc/1794/fd/11: Permission denied
Cannot stat file /proc/1794/fd/12: Permission denied
Cannot stat file /proc/1794/fd/13: Permission denied
Cannot stat file /proc/1794/fd/14: Permission denied
Cannot stat file /proc/1794/fd/15: Permission denied
Cannot stat file /proc/1794/fd/16: Permission denied
Cannot stat file /proc/1794/fd/17: Permission denied
Cannot stat file /proc/1794/fd/18: Permission denied
Cannot stat file /proc/1794/fd/19: Permission denied
Cannot stat file /proc/1794/fd/20: Permission denied
Cannot stat file /proc/1794/fd/21: Permission denied
Cannot stat file /proc/1794/fd/22: Permission denied
Cannot stat file /proc/1794/fd/23: Permission denied
Cannot stat file /proc/1794/fd/24: Permission denied
Cannot stat file /proc/1794/fd/25: Permission denied
Cannot stat file /proc/1794/fd/26: Permission denied
Cannot stat file /proc/1794/fd/27: Permission denied
Cannot stat file /proc/1794/fd/28: Permission denied
Cannot stat file /proc/1794/fd/29: Permission denied
Cannot stat file /proc/1794/fd/30: Permission denied
Cannot stat file /proc/1794/fd/31: Permission denied
Cannot stat file /proc/1794/fd/32: Permission denied
Cannot stat file /proc/1794/fd/33: Permission denied
Cannot stat file /proc/1794/fd/34: Permission denied
Cannot stat file /proc/1794/fd/35: Permission denied
Cannot stat file /proc/1794/fd/36: Permission denied
Cannot stat file /proc/1794/fd/37: Permission denied
Cannot stat file /proc/1794/fd/38: Permission denied
Cannot stat file /proc/1794/fd/39: Permission denied
Cannot stat file /proc/1794/fd/40: Permission denied
Cannot stat file /proc/1794/fd/41: Permission denied
Cannot stat file /proc/1794/fd/42: Permission denied
Cannot stat file /proc/1794/fd/43: Permission denied
Cannot stat file /proc/1794/fd/44: Permission denied
Cannot stat file /proc/1794/fd/69: Permission denied
Cannot stat file /proc/1794/fd/1023: Permission denied
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  gdm        1199 F.... pulseaudio
                     user        1638 F.... pulseaudio
                     user       71241 F.... pipewire
                     user       71243 F.... wireplumber
/dev/snd/controlC1:  gdm        1199 F.... pulseaudio
                     user        1638 F.... pulseaudio
/dev/snd/controlC2:  gdm        1199 F.... pulseaudio
                     user        1638 F.... pulseaudio
                     user       71243 F.... wireplumber
/dev/snd/pcmC0D8p:   user       71241 F...m pipewire
/dev/snd/pcmC1D0p:   user        1638 F...m pulseaudio
/dev/snd/seq:        user       71241 F.... pipewire

Last edited by tofiffe (2022-11-23 14:18:52)

Offline

#7 2022-11-23 14:54:27

seth
Member
Registered: 2012-09-03
Posts: 33,685

Re: [Solved] MPV has no sound

Do you run vlc on alsa as well?

mpv -ao=pulse someporn.mp4

Offline

#8 2022-11-23 15:03:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 17,745

Re: [Solved] MPV has no sound

This is in general a quite broken constellation, you should not use wireplumber while using pulseaudio (or explicitly disable it's ALSA/audio nodes) and instead opt for pipewire-media-session (and switch from what I'm assuming to have pipewire-alsa installed to pulseaudio-alsa) OR you should remove pulseaudio and switch to the entire pipewire stack with wireplumber pipewire-alsa and pipewire-pulse

Offline

#9 2022-11-23 15:11:28

tofiffe
Member
Registered: 2016-02-14
Posts: 31

Re: [Solved] MPV has no sound

hm, -ao=pulse seems to make mpv work again.

@V1del: I do not remember installing any of these manually, must have been "update and replace" process. I have installed pipewire-media-session and it prompted to remove wireplumber, and it does look like I have pipewire-alsa installed, I've replaced that as well.
I did not follow the pipewire closely, but is it not supposed to replace pulseaudio at some point?

Offline

#10 2022-11-23 15:19:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 17,745

Re: [Solved] MPV has no sound

There was a short while where wireplumber unconditionally replaced pipewire-media-session but it was reinstated after it was clear that wireplumber was too aggressive in wanting to acquire audio devices even if you didn't want the audio features of pipewire.

As for pipewire replacing pulse, it already does that assuming you want it to, but in that case you'd install pipewire-pulse (replacing pulseaudio) and wireplumber and pipewire-alsa. There are still some cases where one might prefer pulse (and the increased speed of development on pipewire being both a blessing and a curse since you'd get newer features faster but also often quite a few regressions)

You did run a frankenstein setup that lead to mpv with the alsa output getting redirected to pipewire, which picked a random audio device (likely some HDMI) but would not show up in pavucontrol since the pulse side was still provided by pulseaudio itself.

Offline

#11 2022-11-23 15:27:03

tofiffe
Member
Registered: 2016-02-14
Posts: 31

Re: [Solved] MPV has no sound

I see, thanks for the explanation!

Offline

Board footer

Powered by FluxBB