strawberrymusicplayer / strawberry

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

Regularly stuck on "Buffering..." when playing Opus files #1530

Open bsduck opened 2 months ago

bsduck commented 2 months ago

Describe the bug When playing a playlist consisting of .opus files, Strawberry is regularly stuck buffering forever between tracks. I need to manually start the next track in order to resume playback. The problem seems to occur rather randomly, not always between the same tracks, but is frequent. It doesn't occur when playing other audio formats.

To Reproduce Play any album encoded in Opus format.

System Information:

Additional context Another user mentioned the same problem earlier this year in a comment to the closed bug report #1020:

I'm having the same issue where Strawberry 1.0.23 gets stuck on Buffering - 0%. It only happens on Opus files. It's been happening to me for a long time, even back before I started using Pipewire, so please don't blame Pipewire. I've tried running Strawberry from the terminal in verbose mode, but I didn't see any useful error messages. It just outputs messages on the previous track and it doesn't look like it's trying to advance to the next track.

For context, I don't use PipeWire, nor PulseAudio (Strawberry outputs directly to FreeBSD's native OSS). I've also had this problem for years (it was about time to finally report it!), actually since I began using Strawberry instead of Clementine (which didn't have this bug).

dtl131 commented 2 months ago

I was the "other user" having that issue. I can't remember when/how, but it went away. What version of gstreamer are you using?

bsduck commented 2 months ago

Interesting, thanks for the feedback.

I'm using gstreamer 1.22.10.

jonaski commented 2 months ago

The bug is most likely in GStreamer even if you can't reproduce it with Clementine, Strawberry uses GStreamer differently than Clementine so it's hard to compare a problem like this. It would be good idea to try the latest GStreamer version first and see if the issue still can be reproduced. If it can then run strawberry from a terminal with GST_DEBUG and attach the debug log here. Command: GST_DEBUG=5 GST_DEBUG_FILE=/tmp/gst-debug.log strawberry

scottfurry commented 6 days ago

Had a similar issue but not with OPUS files. My issue was definitely was definitely gstreamer related. An update and rebuild of gstreamer resolved the problem. IIRC, v1.23 fixes the buffering problem.

Until then, the workaround is to kill the strawberry instance, restart strawberry, and you may need to reload the playlist. If the problem persists a couple of tracks later, repeat. It's annoying behavior but it does go away eventually with the update.