Spotify Plugin - GAPLESS playback not working

Hi,

I’m using the spotify plugin which, although is 320Kbps limited (not hires), it’s enough for me as I use this for playlists, get to know new music, and so on.

My issue is that I cannot get the GAPLESS playback to work. There’s always a brief pause between tracks, specially noticed and annoying in conceptual albuns or live ones.

Any ideas to solve this?
Spotify in PC and mobile phone works like a charm on this matter.

BR,
Paulo Nunes

Try the Spotify connect plugin, it has gapless. The other spotify plugin (based on spop/libspotify) doesn’t support gapless unfortunately.

I have two plugins installed, both ones come in volumio: Spotify and Spotify connect.

Altthough I Check thé gapless option it still doesn’t work.

Could you share some logs?

Either from the /dev page using the livelog feature or via ssh.

# Volumio logs
journalctl -f -o cat
# vollibrespot logs
journalctl -f -o cat -u volspotconnect2.service

Note you might need sudo before these commands depending on the version of Volumio your running

1 Like

Thanks in advance for your answer,

I’m using volumio Primo with last software version.

I’ll send the info later today.

BR

Hi,

Is this info:
volumio@volumiosala:/run/systemd/journal$ sudo journalctl -f -o cat
pam_unix(sudo:session): session closed for user root
info: Log sent successfully, reply: {“status”:“OK”,“link”:“http://logs.volumio.org/volumio/AkFf15I.html”}
volumio : TTY=pts/0 ; PWD=/dev ; USER=root ; COMMAND=/usr/local/bin/volumio log
pam_unix(sudo:session): session opened for user root by volumio(uid=0)
pam_unix(sudo:session): session closed for user root
volumio : TTY=pts/0 ; PWD=/dev ; USER=root ; COMMAND=/usr/local/bin/volumio logs journalctl -f -o cat
pam_unix(sudo:session): session opened for user root by volumio(uid=0)
pam_unix(sudo:session): session closed for user root
volumio : TTY=pts/0 ; PWD=/run/systemd/journal ; USER=root ; COMMAND=/bin/journalctl -f -o cat
pam_unix(sudo:session): session opened for user root by volumio(uid=0)

volumio@volumiosala:/run/systemd/journal$ sudo journalctl -f -o cat -u volspotconnect2.service
Starting Volspotconnect2 Daemon…
Started Volspotconnect2 Daemon.
vollibrespot v0.2.2 cd96399 2020-10-07 (librespot 08d8bcc 2020-10-07) – Built On 2020-10-07
Reading Config from “volspotify.toml”
[Vollibrespot] : Using Alsa backend with device: plughw:1,1
[Vollibrespot] : Failed to register IPv6 receiver: Os { code: 19, kind: Other, message: “No such device” }

That’s great, but please play something so that we can see what it does when the track changes and the gapless doesn’t work :wink:

You should also enable the debug toggle in the Spotify Connect plugin settings page…

PS: You can wrap the output in your post by clicking </> code icon to make it more readable…

1 Like

Thanks, I’m going to do that now.

Sorry for the bad text presentation :grin: :slight_smile:

volumio@volumiosala:/$ sudo journalctl -f -o cat
info: AFTER: SPOP HAS 0 PROMISE IN STACK
volumio : TTY=pts/0 ; PWD=/run/systemd/journal ; USER=root ; COMMAND=/bin/journalctl -f -o cat -u volspotconnect2.service
pam_unix(sudo:session): session opened for user root by volumio(uid=0)
2020-11-12 18:58:44 [SPTF] 18:58:44.797 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
2020-11-12 18:58:57 [SPTF] 18:58:57.398 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
pam_unix(sudo:session): session closed for user root
2020-11-12 18:59:09 [SPTF] 18:59:09.997 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
2020-11-12 18:59:22 [SPTF] 18:59:22.201 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
volumio : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/journalctl -f -o cat
pam_unix(sudo:session): session opened for user root by volumio(uid=0)
2020-11-12 18:59:34 [SPTF] 18:59:34.597 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
2020-11-12 18:59:46 [SPTF] 18:59:46.772 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
2020-11-12 18:59:58 [SPTF] 18:59:58.809 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
info: CoreCommandRouter::volumioSeek
info: CoreStateMachine::seek
info: CorePlayQueue::getTrack 2
info: TRACKBLOCK {"uri":"spotify:track:5ZRnBEsfv1l5dnnzANNowF","service":"spop","name":"Metropolis - Live In England 1981","artist":"Motörhead","album":"No Sleep 'Til Hammersmith (Live) [Live; Deluxe Edition]","type":"song","duration":211,"tracknumber":3,"albumart":"https://i.scdn.co/image/ab67616d0000b27311608760260da490db21375b","samplerate":"320Kbps","bitdepth":"16 bit","trackType":"spotify"}
info: CoreStateMachine::startPlaybackTimer
info: CorePlayQueue::getTrack 2
info: [1605207598912] ControllerSpop::seek to 192000
info: [1605207598913] ControllerSpop::sendSpopCommand
info: ADDING DEFER FOR COMMAND seek 192000
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info:
[1605207598928] ---------------------------- Spop announces state update
info: [1605207598929] ControllerSpop::parseState
info: [1605207598929] ControllerSpop::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 2
verbose: STATE SERVICE {"status":"play","position":0,"seek":192000,"duration":211,"samplerate":"320Kbps","bitdepth":null,"channels":null,"artist":"Motörhead","title":"Metropolis - Live In England 1981","album":"No Sleep 'Til Hammersmith (Live) [Live; Deluxe Edition]"}
verbose: CURRENT POSITION 2
info: CoreStateMachine::syncState   stateService play
info: CoreStateMachine::syncState   currentStatus play
info: Received an update from plugin. extracting info from payload
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: [1605207598948] ------------------------------ 20ms
info: FIRST BRANCH
info: BEFORE: SPOP HAS 1 PROMISE IN STACK
info: AFTER: SPOP HAS 0 PROMISE IN STACK
2020-11-12 18:59:59 [SPTF] 18:59:59.434 I [file_streamer_simple.cpp:769] Request for file e183f683f81bc59fac501fa82608312491aba270 complete (code: 0)
info: CorePlayQueue::getTrack 2
info: CorePlayQueue::getTrack 3
info: Prefetching next song
2020-11-12 19:00:18 [SPTF] 19:00:18.255 I [social_presence.cpp:135] Presence: A track was played
info:
[1605207618255] ---------------------------- Spop announces state update
info: [1605207618256] ControllerSpop::parseState
info: [1605207618256] ControllerSpop::pushState
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 2
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CorePlayQueue::getTrack 2
verbose: STATE SERVICE {"status":"stop","position":null,"seek":null,"duration":null,"samplerate":"320Kbps","bitdepth":null,"channels":null}
verbose: CURRENT POSITION 2
info: CoreStateMachine::syncState   stateService stop
info: CoreStateMachine::syncState   currentStatus play
info: CoreStateMachine::play index undefined
info: CoreStateMachine::setConsumeUpdateService undefined
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 3
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CorePlayQueue::getTrack 3
info: CoreStateMachine::startPlaybackTimer
info: CorePlayQueue::getTrack 3
info: [1605207618265] ControllerSpop::clearAddPlayTrack
info: {"uri":"spotify:track:3YUQ2RcUv3XkECsjICj0UM","service":"spop","name":"The Hammer - Live In England 1981","artist":"Motörhead","album":"No Sleep 'Til Hammersmith (Live) [Live; Deluxe Edition]","type":"song","duration":185,"tracknumber":4,"albumart":"https://i.scdn.co/image/ab67616d0000b27311608760260da490db21375b","samplerate":"320Kbps","bitdepth":"16 bit","trackType":"spotify"}
info: [1605207618265] ControllerSpop::sendSpopCommand
info: ADDING DEFER FOR COMMAND uplay
info: [1605207618266] ------------------------------ 11ms
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 3
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info:
[1605207618369] ---------------------------- Spop announces state update
info: [1605207618370] ControllerSpop::parseState
info: [1605207618370] ControllerSpop::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 3
verbose: STATE SERVICE {"status":"play","position":0,"seek":0,"duration":185,"samplerate":"320Kbps","bitdepth":null,"channels":null,"artist":"Motörhead","title":"The Hammer - Live In England 1981","album":"No Sleep 'Til Hammersmith (Live) [Live; Deluxe Edition]"}
verbose: CURRENT POSITION 3
info: CoreStateMachine::syncState   stateService play
info: CoreStateMachine::syncState   currentStatus stop
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 3
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: [1605207618375] ------------------------------ 6ms
info: FIRST BRANCH
info: BEFORE: SPOP HAS 1 PROMISE IN STACK
info: AFTER: SPOP HAS 0 PROMISE IN STACK
2020-11-12 19:00:18 [SPTF] 19:00:18.823 I [file_streamer_simple.cpp:769] Request for file 77d11ee5e14d21f5bc9bf63f9d08f2e0f7509cc9 complete (code: 0)
2020-11-12 19:00:19 [SPTF] 19:00:19.020 I [file_streamer_simple.cpp:769] Request for file 77d11ee5e14d21f5bc9bf63f9d08f2e0f7509cc9 complete (code: 0)
info: CoreCommandRouter::volumioPause
info: CoreStateMachine::pause
info: CoreStateMachine::stPlaybackTimer
info: CoreStateMachine::servicePause
info: CorePlayQueue::getTrack 3
info: CoreCommandRouter::servicePause
info: [1605207624748] ControllerSpop::pause
info: [1605207624748] ControllerSpop::sendSpopCommand
info: ADDING DEFER FOR COMMAND toggle
info:
[1605207625175] ---------------------------- Spop announces state update
info: [1605207625176] ControllerSpop::parseState
info: [1605207625176] ControllerSpop::pushState
info: CoreCommandRouter::servicePushState
info: CorePlayQueue::getTrack 3
verbose: STATE SERVICE {"status":"pause","position":0,"seek":6733,"duration":185,"samplerate":"320Kbps","bitdepth":null,"channels":null,"artist":"Motörhead","title":"The Hammer - Live In England 1981","album":"No Sleep 'Til Hammersmith (Live) [Live; Deluxe Edition]"}
verbose: CURRENT POSITION 3
info: CoreStateMachine::syncState   stateService pause
info: CoreStateMachine::syncState   currentStatus pause
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 3
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreStateMachine::stPlaybackTimer
info: [1605207625181] ------------------------------ 6ms
info: FIRST BRANCH
info: BEFORE: SPOP HAS 1 PROMISE IN STACK
info: AFTER: SPOP HAS 0 PROMISE IN STACK
2020-11-12 19:00:48 [SPTF] 19:00:48.349 I [offline-mgr:2056] 0 files unlocked. 0 images unlocked

The transition is at the end.

Is prior information enough?

Thanks that is better, but this is the inbuilt Spotify plugin, that for sure doesn’t have gapless :slight_smile:
Try using the Spotify Connect plugin?

If I get my spotify APP in PC playing to the device VOLUMIO it is then gapless…

If I disable the Volumio Spotify I cannot get the volumio to play spotify…

I believe I’m doing something completely wrong…

Yes!

Step 1: On the Volumio webUI
So, once you have enabled the Spotify Connect plugin, go to the settings page, and enable the gapless toggle. Also disable multi-user and enter your credentials.

Step 2: Open your Spotify App on your PC.
Click the little speaker icon where it says “Connect to a device” or similar and then pick the Volumio device. Start playing some track - enjoy gapless! :slight_smile:

EDIT:

Yes, that is what I was trying to initially say in the first comment
The Spotify plugin from Volumio (i.e the one where you can browse and select music from the WebUI, will not be able to support Gapless, because the internal library is no longer maintained, and doesn’t support gapless playback.

The Spotify Connect plugin however uses a different library (librespot) and supports it :slight_smile:

Hope that makes sense?

1 Like

It was the damn multi user option by default… it didn´t allowed to put credentials!
LOOOL

So one looses the Spotify source and search spotify via volumio browser or app, right?

Many, Many thanks!

Hmm, even without the credentials, it should work - the Volumio device should automagically show up in the list on the Spotify app (as long as you are on the same network/WiFi)

Yes, unfortunately with Spotify Connect, you need to do all the browsing and searching from the official Spotify app.

1 Like

You are absolutely right. Even without the credentials IT worked. O just thought that with them I would be able to use the volumio App :slight_smile:

Many thanks for your assistance.

1 Like