flathub / com.spotify.Client

https://flathub.org/apps/details/com.spotify.Client
68 stars 34 forks source link

Playback of local .mp3's is failing #243

Closed TibiIius closed 5 months ago

TibiIius commented 1 year ago

I have no idea whether this is a "me problem", but I found it present on 2 different systems now. The Flatpak sandbox uses ffmpeg in version 5.x instead of the specified ffmpeg 4.4, resulting in local files not being playable anymore. I've observed this running on Fedora Silverblue 38 on 2 different systems. I have not set any override rules for Spotify specifically. My global overrides are as follows:

[Context]
filesystems=~/.themes;xdg-data/themes;xdg-run/app/com.discordapp.Discord:create;xdg-data/icons;~/.icons

Entering Spotify's sandbox environment via flatpak run --command=sh com.spotify.Client and running ffmpeg results in the following output (note that there's more output, which was cut out, indicated by "[...]" to not clutter this too much):

[📦 com.spotify.Client ~]$ ffmpeg
ffmpeg version 5.0.3 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
[...]

which ffmpeg reveals /usr/bin/ffmpeg as its location, if this is relevant information. If there's any important information I forgot to add, let me know.

Erick555 commented 1 year ago

spotify is supposed to use uses ffmpeg libraries that are in /app/lib/libav* and are from ffmpeg 4.4.2 release. The soversion is .so.58 - the same version is shipped in official snap so if snap isn't broken then flatpak shouldn't be.

How did you get impression spotify flatpak uses ffmpeg 5? What kind of local files doesn't play?

TibiIius commented 1 year ago

spotify is supposed to use uses ffmpeg libraries that are in /app/lib/libav* and are from ffmpeg 4.4.2 release. The soversion is .so.58 - the same version is shipped in official snap so if snap isn't broken then flatpak shouldn't be.

How did you get impression spotify flatpak uses ffmpeg 5? What kind of local files doesn't play?

I got the impression that Spotify uses ffmpeg 5.x by just running ffmpeg from within a shell session inside Spotify's Flatpak sandbox, I started that like so: flatpak run --command=sh com.spotify.Client. In the output, ffmpeg reported version 5.0.3. I do however see the correct .so library files within /app/lib/. But I guess the binary doesn't have anything to do with the shipped libs? Especially since the binary resides in /usr/bin/ffmpeg instead of something like /app/bin/ffmpeg.

As for the second part of your question: I currently can't play any of my local .mp3 files. I used to play them using Spotify in the past, so I know that they're not the issue. They also still run on my phone using Spotify, so I doubt that there's something wrong with those.

Erick555 commented 1 year ago

Apps like spotify usually consume ffmpeg through libraries, the binary is standalone tool.

ghost commented 1 year ago

Same issue here. Local files wouldn't play anymore. I have made an issue previously and the fix was to include ffmpeg4.4. Why did it stop working?

SuperNinja-4965 commented 1 year ago

Apps like spotify usually consume ffmpeg through libraries, the binary is standalone tool.

This is correct. The reason the ffmpeg command returned version 5 is because we dont actually ship the ffmpeg 4.4 binary only the libraries that spotify should need to be able to use ffmpeg. Just to check spotify hadn't changed anything their end i did run a local build with the binary available and nothing changed. I'm thinking spotify might have changed something their end?

~Maybe they updated their build to use a newer version of ffmpeg??~ Edit: they still use 4.4

Erick555 commented 1 year ago

This seems to be known upstream regression. No fix for that unfortunately.

dacanizares commented 1 year ago

While it's fixed I'm using and older version. If it helps someone, here's the command:

flatpak update --commit=44e179795004a87090214404d13e672b1873b523f1b6e4863f32390bf34de7c8 com.spotify.Client

You may need to delete local-files.bnk under a folder inside ~/.var/app/com.spotify.Client/config/spotify/Users/

dacanizares commented 5 months ago

I've upgraded to latest version and it seems to be working fine. Can someone else confirm? BTW, I'm using Fedora 39.

L1Z3 commented 5 months ago

Can confirm, latest version (1.2.26.1187.g36b715a1) works fine for me too. (Fedora 39 as well.)

Zlopez commented 5 months ago

Can confirm as well (Fedora 39 Silverblue).

TibiIius commented 5 months ago

+1 here, works for me with an up-to-date Spotify Flatpak installation (running Fedora Silverblue 39, but distro shouldn't matter for Flatpaks)