mopidy / mopidy-spotify

Mopidy extension for playing music from Spotify
https://mopidy.com/ext/spotify/
Apache License 2.0
936 stars 109 forks source link

Playback randomly stops until I skip to the next track #271

Closed blacklight closed 1 month ago

blacklight commented 4 years ago

This is an issue I've been experiencing for about 2 weeks on my RPi4 with Raspbian.

mopidy-spotify version: 4.0.1-0mopidy1 mopidy version: 3.0.2-1 Both installed through apt.

Relevant configuration:

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
connection_timeout = 60

[audio]
mixer = software
mixer_volume = 10

[spotify]
enabled = true
username = ******
password = ******
bitrate = 320
client_id = *******
client_secret = ******
allow_cache = true
timeout = 20

Playback stops quite randomly in the middle of a track, I haven't identified any precise pattern when it occurs, sometimes it does after 7-8 songs, sometimes it does nearly on every song.

Skipping forward/backwards doesn't help the audio to get back. The only thing that works is skipping to the next track.

Logs are here. I have trimmed the parts in between where playback went on as expected, the issue in this session happened towards the end - the track got stuck in the middle of the playback and the playback eventually resumed on mpc next.

This is quite annoying because I can't get a playlist to run without having to manually skip to the next track every few minutes, and I can't recall it happening before 2 weeks ago - could it be a regression introduced in one of the latest versions either mopidy or mopidy-spotify? Also, I haven't experienced the issue with other backends (e.g. TuneIn, local or Soundcloud).

MrLemur commented 4 years ago

I've had this happening for the past 6-7 months. What I did was to make a bash script to compare the run times after 10 seconds, and issue mpc next if it notices it has got stuck.

adamcik commented 4 years ago

My hunch is that this is the same issue that #269 fixes, but not 100% sure.

blacklight commented 4 years ago

If that's the case however I'd expect the issue to occur only when gapless playback is configured (that's not my case) and only when transitioning between songs (while in my case it also occurs in the middle of a song).

If however both these issues are due to libspotify pushing audio packets to gstreamer when it's not supposed to (can't really say if that's the case because the logs don't give many clues when the issue occurs) then the changes should hopefully fix this case as well.

I'll keep an eye on this pull request 👀

kingosticks commented 1 month ago

We've moved to a new way of streaming so closing this.