Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some recent "ends of songs" are played randomly #1582

Closed
3 tasks done
jirislaby opened this issue Oct 25, 2024 · 15 comments
Closed
3 tasks done

Some recent "ends of songs" are played randomly #1582

jirislaby opened this issue Oct 25, 2024 · 15 comments
Assignees

Comments

@jirislaby
Copy link

jirislaby commented Oct 25, 2024

  • I have checked the FAQ for answers.
  • I have checked the Changelog that the issue is not already fixed.
  • I believe this issue is a bug, and not a general technical issue, question or feature requests that can be discussed on the forum.

Describe the bug
Running strawberry for a couple of days. Sometimes, it plays the last ~ 10 seconds of some past song incl. fade-out. Strawberry needs not be playing currently. It just starts playing randomly. This is somewhat new bug, I updated like:

2024-07-17 07:05:45|install|strawberry|1.1.0-1.1|x86_64
2024-07-26 07:09:05|install|strawberry|1.1.1-1.1|x86_64
2024-08-15 14:28:49|install|strawberry|1.1.1-1.2|x86_64
2024-09-23 07:44:17|install|strawberry|1.1.2-1.1|x86_64
2024-10-07 06:28:22|install|strawberry|1.1.3-1.1|x86_64

To Reproduce
Just use strawberry for some time. Likely fade-out needs to be enabled? And using pipewire?

Expected behavior
To not play the ends randomly.

Screenshots:
Note these pipewire streams:
straw

Usually only one playing a song is present. All the other are to play these ends of songs.

System Information:
Operating System: openSUSE Tumbleweed 20241018
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-rc1-1.g8c2e67f-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
Memory: 58.4 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: LENOVO
Product Name: 21K6S0A006
System Version: ThinkPad P14s Gen 4

  • pipewire: 1.2.5
  • Strawberry Version: 1.1.3
@jonaski
Copy link
Member

jonaski commented Nov 2, 2024

I suspect this is the same bug as.:
#1535
https://forum.strawberrymusicplayer.org/topic/3379/music-fragments-play-over-other-music-randomly
https://forum.strawberrymusicplayer.org/topic/3212/randomly-playing-end-of-previously-played-track

I can't reproduce this.
What audio format does it happen with, and is cross fading enabled?

@jirislaby
Copy link
Author

I suspect this is the same bug as.: #1535

Not sure about #1535.

https://forum.strawberrymusicplayer.org/topic/3379/music-fragments-play-over-other-music-randomly https://forum.strawberrymusicplayer.org/topic/3212/randomly-playing-end-of-previously-played-track

But +1 likely for those two.

I can't reproduce this. What audio format does it happen with

I cannot say which ones exactly. I have mp3s, oggs, flacs, and even some m4as.

and is cross fading enabled?

Yes:
fade

Just a hint, maybe not relevant. But sometimes I rename folders or remove songs, so I (properly) get:

ERROR CollectionPlaylistItem:46 Could not reload file QUrl("file://.../Track03.mp3") "File does not exist"

Cannot this make the previous song streams alive, while jumping to another (existing) song?

@jirislaby
Copy link
Author

jirislaby commented Nov 5, 2024

Just a hint, maybe not relevant.

It is relevant. I played:

  • Queen: Don't Stop Me Now -- fine
  • Fleret: Na Kralovej Holi -- error: "No data in file"
  • Iron Maiden: Still Life -- fine

Now pipewire has two sinks:

  • media.name = "„Still Life“ od „Iron Maiden“" (currently playing)
  • media.name = "„Don't Stop Me Now“ od „Queen“"

So I enqueued Na Kralovej Holi once again (by Ctrl+D). After finishing the current song, I have now three sinks:

  • media.name = "„Don't Stop Me Now“ od „Queen“" (played before the first fail above)
  • media.name = "„Já su od Lidečka“ od „Fleret“" (played before the second fail)
  • media.name = "„Chord Sounds“ od „Moby“" (currently playing)

@jonaski
Copy link
Member

jonaski commented Nov 9, 2024

I've set up pipewire and set output to PulseAudio, tested playing for many hours a playlist on repeat containing MP3 and MP4 files, I still can't reproduce this, I've checked that no more than 1 file is open at a time.

lsof -p $(pidof strawberry) shows only 1 file open, and pactl list sinks shows only 1 sink.

If cross fading is disabled, it's hard to understand why several files are kept open at the same time.

But surely there must be a case where there is an error leading to the previous pipeline is stuck, I still don't understand why it's fading if automatic cross-fading is disabled, unless the issue occurs only when manually switching track.

@guprobr
Copy link

guprobr commented Nov 9, 2024

I confirm this behaviour happening here too, but I could not reproduce.
After disabling EBUR normalization it seems to stop, but I'm not sure about this.

@jonaski
Copy link
Member

jonaski commented Nov 9, 2024

@jirislaby Do you have any of the features replay gain, ebur128 or bs2b enabled in the backend settings?

@jirislaby
Copy link
Author

@jirislaby Do you have any of the features replay gain, ebur128 or bs2b enabled in the backend settings?

I have "No Audio Normalization" set.

for many hours a playlist on repeat containing MP3 and MP4 files

Have you enqueued a bad file as I wrote above? Like the attached file.zip (sorry, I had to pack the file due to github restrictions)?

@jonaski
Copy link
Member

jonaski commented Nov 9, 2024

Can reproduce with that file

@jonaski
Copy link
Member

jonaski commented Nov 9, 2024

The playbin pipeline is unrefed and the engine pipeline is deleted, but the file is still open, so unless I'm missing something basic here this seems like a GStreamer bug.

@jonaski
Copy link
Member

jonaski commented Nov 9, 2024

I see the issue now, the problem is that the pipeline isn't set to NULL correctly before unrefing because state() returns GST_STATE_NULL when it's getting GST_STATE_CHANGE_FAILURE...

@jonaski jonaski self-assigned this Nov 9, 2024
jonaski added a commit that referenced this issue Nov 9, 2024
@jonaski
Copy link
Member

jonaski commented Nov 10, 2024

Could you please test the latest master branch and check if the issue is gone?
For Tumbleweed you can either build from source or use my repository here:
https://build.opensuse.org/projects/home:jonaski:audio/packages/strawberry/repositories/openSUSE_Tumbleweed/binaries

@jirislaby jirislaby changed the title Some recent "fading ends of songs" are played randomly Some recent "ends of songs" are played randomly Nov 11, 2024
@jirislaby
Copy link
Author

Yes, seems to be fixed. Thanks!

@jonaski
Copy link
Member

jonaski commented Nov 16, 2024

@jirislaby I'm aware of it, but haven't studied it enough yet.

@jonaski
Copy link
Member

jonaski commented Nov 16, 2024

Will make a release candidate this weekend, and hopefully a stable release next week.

@jonaski jonaski closed this as completed Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants