strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.53k stars 164 forks source link

pipewire backend fails to play mp3 files #1453

Closed AllKind closed 3 weeks ago

AllKind commented 3 weeks ago

Describe the bug When the backend is set to pipewire, strawberry cannot play mp3 files (sending to Pulseaudio plays them just fine). It may start to play, but soon fails by itself, or it seemed to me, when just moving up/down the playlist. The error displayed is the shown in the picture I attach below in the Screenshot section.

If I start strawberry with gstreamer debug, it just crashes with below message. I also attach the debug log.

10:39:28.262 DEBUG MainWindow:1393                  Song changed to "Santana" "Abraxas" "Se a cabó (live, 1970‐04‐18: Royal Albert Hall)"
10:39:28.263 DEBUG Player:739                       Playing song "Se a cabó (live, 1970‐04‐18: Royal Albert Hall)" QUrl("file:///storage/pub/music/by-genre/Rock/Santana/Abraxas/10-Santana-Se_a_cabo_(live,_1970-04-18__Royal_Albert_Hall).mp3") position 0
10:39:28.274 DEBUG GstEnginePipeline:522            "pipewiresink" does not have volume, using own volume.
10:39:28.275 DEBUG GstEnginePipeline:664            Setting buffer duration: 4000000000 low watermark: 0.33 high watermark: 0.99
10:39:28.283 DEBUG GstEnginePipeline:1564           Setting pipeline state to "Playing"
10:39:28.284 DEBUG GstEnginePipeline:1456           Pipeline state changed from "Null" to "Ready"
10:39:28.307 WARN  IconLoader:87                    Couldn't load icon "media-playback-pause" from system theme icons.
10:39:28.312 WARN  IconLoader:87                    Couldn't load icon "media-playback-pause" from system theme icons.
10:39:28.320 DEBUG GstEnginePipeline:1456           Pipeline state changed from "Null" to "Ready"
10:39:28.506 DEBUG GstEnginePipeline:1456           Pipeline state changed from "Ready" to "Paused"
10:39:28.506 DEBUG GstEnginePipeline:1459           Pipeline is active
10:39:28.514 DEBUG GstEnginePipeline:817            1 event latency
10:39:28.531 DEBUG GstEnginePipeline:1456           Pipeline state changed from "Paused" to "Playing"
10:39:28.581 DEBUG GstEngine:965                    Got stream info for "file:///storage/pub/music/by-genre/Rock/Santana/Abraxas/10-Santana-Se_a_cabo_(live,_1970-04-18__Royal_Albert_Hall).mp3:" "MPEG"

(strawberry:3210552): GStreamer-CRITICAL **: 10:39:28.617: gst_buffer_map_range: assertion 'GST_IS_BUFFER (buffer)' failed

(strawberry:3210552): GStreamer-CRITICAL **: 10:39:28.617: gst_buffer_extract: assertion 'dest != NULL' failed

(strawberry:3210552): GStreamer-CRITICAL **: 10:39:28.617: gst_buffer_unmap: assertion 'GST_IS_BUFFER (buffer)' failed

(strawberry:3210552): GStreamer-CRITICAL **: 10:39:28.617: gst_buffer_resize_range: assertion 'gst_buffer_is_writable (buffer)' failed

(strawberry:3210552): GStreamer-CRITICAL **: 10:39:28.617: gst_buffer_copy_into: assertion 'gst_buffer_is_writable (dest)' failed
/home/ellen/bin/strawberry: line 3: 3210552 Segmentation fault      (core dumped) QT_FONT_DPI="" /usr/bin/strawberry

strawberry-gst-debug.log.gz

To Reproduce Set backend to pipewire and play mp3 files.

Expected behavior Not to fail playing mp3 files of course.

Screenshots: strawberry_pipewire_mp3_error

System Information:

apt show gstreamer1.0-pipewire Package: gstreamer1.0-pipewire Version: 1.0.7-3~ubuntu22.04 Priority: optional Section: libs Source: pipewire Maintainer: Sourav Das souravdas142@gmail.com

apt show pipewire Package: pipewire Version: 1.0.7-3~ubuntu22.04

I use the pipewire-debian PPA deb [signed-by=/etc/apt/keyrings/pipewire-debian-pipewire-upstream-jammy.gpg] https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu jammy main

Additional context Any more information required I'm happy to provide.

jonaski commented 3 weeks ago

This seem to be a similar issue to https://github.com/strawberrymusicplayer/strawberry/issues/1435#issuecomment-2138481681, and I'm guessing the issue is related to the same pipewire bug: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2240 Since the gstreamer pipewire plugin isn't mature yet and there are several known issues, you should be using alsa or pulseaudio: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2240#note_1314702