michaelherger / Spotty-Plugin

A Spotify plugin for the Lyrion Music Server (fka. Logitech Media Server) and Squeezebox compatible players
104 stars 20 forks source link

Spotty playback constantly interrupted for every 5-30 sec. #127

Closed qztseng closed 2 weeks ago

qztseng commented 2 weeks ago

I have been using Logitech Media Server with the Spotty plugin for a while, thanks for this great project. However, the spotify music playback through spotty became intermittent since this morning. It played a title for around 5 sec (sometimes up to 30sec) and then stopped for another 10-30sec, resumed again, stopped again.... On the player GUI, it showed the playback is normal without any stop. The playback cursor just kept moving while the music was actually stopped.

I tried to re-install everything from LMS, squeezelite and the spotty plugin, but nothing helped. The server.log showed a lot entries of something like this: "Plugins::Spotty::ProtocolHandler::getMetadataFor (190) Returning metadata cached in song object for spotify://track:6NDaYWg85ZnJ3Ae0WkILWh" over a short period of time (like 50+ such message within 1 min).

Attached is my server.log file. server.log

michaelherger commented 2 weeks ago

As first measure please try disabling Spotty -> Ogg streaming in Settings/Advanced/File Types.

The messages are normal, eg. when you have a web UI open which does poll for player status every second.

qztseng commented 2 weeks ago

By changing the Spotty ogg vorbis option from "spotty-x86_64" to "disable" , the playback seemed to persist for a longer time ( sometimes up to 1 full track. ) but it still stopped and resumed at random interval..... While watching the server.log file, I have noticed that each time the music resume coincided with messages like this:

[24-06-18 22:30:46.1493] Plugins::Spotty::Plugin::updateTranscodingTable (274) TMPDIR=/var/lib/squeezeboxserver/cache/spotty [spotty-x86_64] -n Squeezebox -c "/var/lib/squeezeboxserver/cache/spotty/a9dfb4d7" --single-track $URL$ --bitrate 320 --disable-discovery --disable-audio-cache $START$ | [lame] -r --silent -q $QUALITY$ $BITRATE$ - - [24-06-18 22:30:46.1498] Plugins::Spotty::Plugin::updateTranscodingTable (274) TMPDIR=/var/lib/squeezeboxserver/cache/spotty [spotty-x86_64] -n Squeezebox -c "/var/lib/squeezeboxserver/cache/spotty/a9dfb4d7" --single-track $URL$ --bitrate 320 --disable-discovery --disable-audio-cache --pass-through $START$ [24-06-18 22:30:46.1502] Plugins::Spotty::Plugin::updateTranscodingTable (274) TMPDIR=/var/lib/squeezeboxserver/cache/spotty [spotty-x86_64] -n Squeezebox -c "/var/lib/squeezeboxserver/cache/spotty/a9dfb4d7" --single-track $URL$ --bitrate 320 --disable-discovery --disable-audio-cache $START$ | [flac] -cs --channels=2 --sample-rate=44100 --bps=16 --endian=little --sign=signed --fast --totally-silent --ignore-chunk-sizes - [24-06-18 22:30:46.1506] Plugins::Spotty::Plugin::updateTranscodingTable (274) TMPDIR=/var/lib/squeezeboxserver/cache/spotty [spotty-x86_64] -n Squeezebox -c "/var/lib/squeezeboxserver/cache/spotty/a9dfb4d7" --single-track $URL$ --bitrate 320 --disable-discovery --disable-audio-cache $START$ [24-06-18 22:30:46.1513] Plugins::Spotty::AccountHelper::purgeAudioCacheAfterXTracks (219) Played 7 song(s) since last audio cache purge. [24-06-18 22:30:46.1696] Plugins::Spotty::ProtocolHandler::getMetadataFor (190) Returning metadata cached in song object for spotify://track:4HjD6g47A4WL1Q4qKOTMEg [24-06-18 22:30:46.1700] Plugins::Spotty::ProtocolHandler::getMetadataFor (191) { album => "Fiddler On The Roof", artist => "Cannonball Adderley", bitrate => "1411kbps CBR", cover => "https://i.scdn.co/image/ab67616d0000b273b3d2c599de825d3298ce7e9d", duration => "250.4", icon => "/html/images/cover.png", originalType => "Ogg Vorbis (Spotify)", originaltype => "Ogg Vorbis (Spotify)", title => "Now I Have Everything", type => "Ogg Vorbis (Spotify) (Converted to PCM)", url => "spotify://track:4HjD6g47A4WL1Q4qKOTMEg", }

I am also wondering why it worked before and stopped working now ? (I've never changed any options under the file type tab.) What does the "disable" and "spotty-x86_64" options actually do ?

qztseng commented 2 weeks ago

After fiddling with this file type setting, and probably rebooting and restarting. The problem seems to disappear. Although I still wonder how this file type setting might affect the random playback stop behavior (transcoding memory or cache?), I think this issue can be closed. Anyway, thanks for the help and contribution of this great software!