flathub / io.mpv.Mpv

Home Page:https://flathub.org/apps/details/io.mpv.Mpv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No sound with pipewire, but sound is present with pulseaudio

Sunspark-007 opened this issue · comments

Audio used to be present with the flatpak of 0.36, with 0.37 there is no audio.

--ao=pipewire is silent, but --ao=pulse outputs sound.

mpv-player/mpv#13312

flatpak mpv has updated the runtime to freedesktop 23.08 which has newer pipewire.

I've had that the whole time.. This installed version is the one pre-selected by Valve. I also have 22.08.20 installed as well.

The possibility exists that while it could be a freedesktop bug, why does the system and all other apps work EXCEPT for mpv and libmpv?

image

mpv uses only one freedesktop version (currently 23.08.x) at time regardless of how many you have installed. Does other apps use also 23.08.x?

BTW: this tooltip on screenshot is completely bogus

Yes, I have 6 flatpaks using freedesktop 23.08 (including mpv). One of them is Zoom. I fired it up and went into settings and tested audio.. it plays fine on all audio outputs. The flatpaks that use freedesktop 22.08 also work.

Some other flatpaks use a different variant, org.kde.Platform/x86_64/5.15-23.08. One of those is Haruna which uses libmpv. No audio from that one, but vlc also uses the same runtime and does have audio.

PS. I agree the tooltip is not a good message to say that the latest version is outdated.. I have the same message on Mangohud 0.7.0 from 2023.. the stable version it wants people to use (and doesn't work properly) is from 2022.

Can you provide an mpv log with --msg-level=ao/pipewire=trace?

Is this the latest steamOS? The pipewire daemon on the host is quite a bit older than the one in the flatpak.

Can you provide an mpv log with --msg-level=ao/pipewire=trace?

Sure thing!
output pipewire trace.txt

Is this the latest steamOS? The pipewire daemon on the host is quite a bit older than the one in the flatpak.

Sort of. It's the last previous version before current, 3.4.11. I have 3.5.5 in the other partition, I haven't been using that one because it has been buggy for many.

`pactl info | grep "Server Name"

Server Name: PulseAudio (on PipeWire 0.3.59)
`

According to the logs mpv properly forwards the samples to the pipewire daemon when pipewire asks for them.
So I'm not sure what mpv could do differently.

Could you try it with the newer SteamOS version?

Edit: for me sound works correctly from flatpak mpv.

Could you try it with the newer SteamOS version?

I did, sound works. :(

I also observed the other 2 issues involving seeking freezing and switching to hardware decoding using the keyboard were also not present.

I ran the command to see what version of pipewire it is using. It is using 0.3.62 so only a very small incremental change from 0.3.59.

Something in userspace has been broken between the two versions, but I don't have an understanding of what exactly. I'm thinking that because the KDE desktop remains the same perhaps there are configuration files that have been changed that are now conflicting in terms of settings.

I also ran the pipewire trace command again in 3.5.5 to compare.
355_pipewire_trace.txt

To be honest if it works with the new version, finding out what is broken on the old one is a very academic exercise.
Nobody will fix this old version and in the end it will be a known issue, as it is already fixed.

Maybe newer versions of 3.5.x are more stable?

As you say, it won't be fixed, but it's just so strange in the specificity of the issue.. why only mpv and libmpv and nothing else?

I just feel that it should affect everything, not merely a single app. I did try clean-uninstalling mpv including the user data and re-installing it, but it did not change anything.

I'd like to test using an older mpv version to see if it is different since it used to be fine. Would you know offhand what command to use to grab the 0.36 version?

Are you sure that the other applications

  • are actually using the native Pipewire protocol (and not pulse/alsa)
  • are using the same version of libpipewire
    ?

Please note that these are all pre 1.0 versions of pipewire, so while the version numbers may be close the actual differences can be fairly large.

I have no real clue on how to use flatpak, sorry.

Well, well, well..

sudo flatpak update --commit=ab5661d5510eea41ba27bf1211d3407009628211547efaa1e64f10fc57780657 io.mpv.Mpv

The above command will downgrade to the very last version of 0.36 right before 0.37 was released.

Guess what?

SOUND WORKS!! Switching to hardware decoding using the keyboard works without freezing. Clicking on seek bar positions works without freezing.

I observed that 0.36 uses the freedesktop 22.08 runtime.

0.37 is buggy in some manner.

it's not buggy, the freedesktop verison 23.08 has new version of pipewire than what older version of distros have.

you could also try 0.37 with 22.08 without the freedesktop 23.08 from 333a91d

sudo flatpak update --commit=5b9dfcbbf3cadf320ea4baf4440f4e40803d290eaa6d6e2ff6d0039a5e5ea315 io.mpv.Mpv

to get that commit from io.mpv.Mpv flathub git

flatpak --system remote-info --log flathub io.mpv.Mpv|grep -A3 -B3 "0\.37"
flatpak --system remote-info --log flathub io.mpv.Mpv|grep -A3 -B3 "333a91d"

it's not buggy, the freedesktop verison 23.08 has new version of pipewire than what older version of distros have.

you could also try 0.37 with 22.08 without the freedesktop 23.08 from 333a91d

sudo flatpak update --commit=5b9dfcbbf3cadf320ea4baf4440f4e40803d290eaa6d6e2ff6d0039a5e5ea315 io.mpv.Mpv

I confirm that this works as well, sound, etc. is present. Thank you.

This situation is interesting to me, packaging is complicated, even in an environment that is advertised as coming with everything that is needed.

Update: I decided to see which commit was the last version of 0.37 still using 22-08 was. It is this one (803e946) on 2023-12-31: sudo flatpak update --commit=3af7e682f5138b8466aae9b51e094264383fdd3fa51bbaeda3a2c1fa340af42a io.mpv.Mpv

After that commit date, it is on 23-08.