strawberrymusicplayer / strawberry

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

OGG file playing skips continuously after several seconds #1435

Closed Saboe closed 3 months ago

Saboe commented 4 months ago

Describe the bug When playing an OGG file, the playback begins to skip after several seconds and then it skips continuously.

To Reproduce

Expected behavior playback should never skip

Screenshots: ./.

System Information:

Additional context Probably this issue is more or less the same issue #1422

jonaski commented 4 months ago

Does it skip if you play the file with this command?

gst-play-1.0 --use-playbin3 --audiosink="alsasink" file:///path/filename

Replace alsasink with pulsesink if you are using pulseaudio.

Saboe commented 4 months ago

No skips, neither with with --audiosink="alsasink" nor with --audiosink="pulsesink". The same file added to the playlist lets strawberry "gets confused" while playing which means, it skips endless.

jonaski commented 4 months ago

I can't reproduce this. Is this one specific file, or all Ogg Vorbis files? What's the buffer settings under backend settings set to? Are any features such as audio normalization, equalizer or bs2b enabled?

Saboe commented 4 months ago

As far as I know this issue I have with all OGG's. How can I find out what the buffer settings are? And the rest of your question regarding audio normalization, bs2b (what's it?)?

jonaski commented 4 months ago

On the file menu: Tools / Settings / Backend.

Saboe commented 4 months ago

Tools / Settings / Backend

Audio Output Engine: GStreamer Output: Send audio/video to pipewire Output: Automatically select

Options Enable volume control: enabled Upmix / downmix to ...: disabled Improve headphone listening ....: disabled Enable HTTP/s for strewaming: disabled Use strict SSL mode: disabled

Buffer Buffer duration: 4000 ms Low watermark: 0,33 High watermark: 1,00

Audio normalization No audio normalization: disabled

Replay Gain Use Replay Gain metadata if it is available: enabled Replay Gain mode: Radio (equal loudness for all tracks) Pre-amp -0,9 dB Fallback-gain +0,0 dB Apply compression to prevent clipping: enabled

EBU R 128 Loudness Normalization Perform track loudness normalization: disabled

Fading Fade out when stopping a track: enabled Cross-fade ....: both disabled Fading duration: 2000 ms Fade out ...: disabled

As far as I know are these the defaults except the fade out when stopping. I've changed this month's ago.

jonaski commented 4 months ago

High watermark set to 1,0 is not the default, it's 0,99.

Please try these buffer settings:

Buffer duration: 8000 ms Low watermark: 0,10 High watermark: 0,99

Saboe commented 4 months ago

High watermark set to 1,0 is not the default, it's 0,99.

Yes, after I pressed "default" it changed to 0,99. I also changed the buffer duration to 8000 ms. Now I can play an OGG file but may not jump when it's playing. When I jump forward by 10 seconds with the right cursor key, the skipping begins immediately. When I jump back by 10 seconds (cursor left) then it gets much more ugly and during the first try Strawberry crashed few seconds later. During a second try I got the following pop-up error message:

Strawberry error - The stream is in the wrong format. ../gstreamer/subprojects/gst-plugins-base/gst/audioconvert/gstaudioconvert.c(910): gst_audio_convert_transform (): /GstPlayBin3:pipeline-1-pipeline/GstPlaySink:playsink/GstBin:abin/GstBin:audiobin/GstAudioConvert:pipeline-1-audioqueueconverter: failed to map output buffer

I don't believe that (stream format wrong) because when I listening to that file with mplayer mp3/mymusic.ogg, I don't experience any issues. The same with gst-play-1.0 --use-playbin3 --audiosink="pulsesink" mp3/mymusic.ogg.

Ok, I've started Strawberry from the command line with strawberry --verbose. After the OGG plays I hitted enter in the terminal window to get an empty line and then inside strawberry I jumped few seconds forward, skipping begins and then I jumped somewhere else and then strawberry crashed after few seconds. In the terminal windows I got this:

02:49:06.551 ERROR logging:84(GStreamer) gst_buffer_resize_range: assertion 'gst_buffer_is_writable (buffer)' failed 02:49:06.551 ERROR logging:84(GStreamer-Audio) gst_audio_buffer_map: assertion 'GST_IS_BUFFER (gstbuffer)' failed 02:49:06.551 ERROR GstEnginePipeline:1348 ErrorMessageReceived ID: 1 Domain: 3279 Code: 11 Error: "The stream is in the wrong format." 02:49:06.551 ERROR GstEnginePipeline:1349 ErrorMessageReceived ID: 1 Domain: 3279 Code: 11 Debug: "../gstreamer/subprojects/gst-plugins-base/gst/audioconvert/gstaudioconvert.c(910): gst_audio_convert_transform (): /GstPlayBin3:pipeline-1-pipeline/GstPlaySink:playsink/GstBin:abin/GstBin:audiobin/GstAudioConvert:pipeline-1-audioqueueconverter:\nfailed to map output buffer" 02:49:06.552 ERROR logging:84(GStreamer) gst_mini_object_unref: assertion 'GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) > 0' failed 02:49:06.552 ERROR GstEngine:560 GStreamer error: 3279 11 "The stream is in the wrong format." Segmentation fault (core dumped)

Perhaps it hepls.

jonaski commented 4 months ago

I'm not sure what's causing this, since no-one else seem to experience these errors. Could you share one of the ogg files with me, if you don't want to share it publicly you can share the file from dropbox or similar and send a link to my e-mail, my e-mail is listed on my profile.

jonaski commented 4 months ago

Please make sure you set Output to PulseAudio, not Pipewire in the backend settings. Currently there are issues with Pipewire and GStreamer that are not solved, specifically this issue: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2240

jonaski commented 3 months ago

Is this still an issue with PulseAudio output?