Pi Musicbox choppy spotify playback

I’m experiencing choppy playback when I try to play anything from Spotify.
It sounds like Spotify isn’t buffering properly. Music will play fine for awhile then stop briefly and start back up again. I have experienced the same problem with Pi MusicBox 0.5.2 and 0.5.3.
Playback of local files and internet radio stations works perfectly.
I have tried to modify the gstreamer buffer in the Pi MusicBox settings.ini file, but that doesn’t fix the problem.

system:
Raspberry Pi A+ using 3.5mm analog jack
Wi-Pi USB wifi adapter
Pi MusicBox 0.5.3
Mopidy 0.19.5

Mopidy config

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = mopidy.log
config_file =

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
visualizer =

[proxy]
scheme =
hostname =
port =
username =
password =

[musicbox_webclient]
enabled = true

[spotify_tunigo]
enabled = true
region = all
cache_time = 3600

[scrobbler]
enabled = false ; Extension disabled due to config errors.
username = ; Must be set.
password = ; Must be set.

[local-whoosh]
enabled = true

[audioaddict]
enabled = true
username =
password =
quality = 320k
difm = true
radiotunes = true
rockradio = true
jazzradio = true
frescaradio = true

[podcast]
enabled = true
browse_limit = 100
search_limit = 20
search_details = false
update_interval = 86400
feeds =
feeds_root_name = Subscribed Feeds
feeds_cache_size = 32
feeds_cache_ttl = 3600
feeds_timeout = 10

[tunein]
enabled = true
timeout = 5000

[gmusic]
enabled = false ; Extension disabled due to config errors.
username = ; Must be set.
password = ; Must be set.
deviceid =
all_access = false
refresh_library = 1440
refresh_playlists = 60
show_radio_stations_browse = true
show_radio_stations_playlist = false
max_radio_stations = 0
max_radio_tracks = 25

[subsonic]
enabled = false ; Extension disabled due to config errors.
hostname = ; Must be set.
port = ; Must be set.
username = ; Must be set.
password = ; Must be set.
ssl = false ; Must be set.

[local]
enabled = false ; Extension disabled due to config errors.
library = json
media_dir = ; Must be set.
data_dir = $XDG_DATA_DIR/mopidy/local
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
scan_timeout = 1000
scan_flush_threshold = 1000
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname

[softwaremixer]
enabled = true

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
file
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[websettings]
enabled = true
musicbox = false
config_file = /etc/mopidy/mopidy.conf

[moped]
enabled = true

[internetarchive]
enabled = true
username =
collections =
audio
audio_bookspoetry
opensource_audio
audio_tech
GratefulDead
etree
audio_music
netlabels
audio_news
audio_foreign
audio_podcast
radioprograms
audio_religion
audio_formats =
VBR MP3
64Kbps MP3
image_formats =
JPEG
JPEG Thumb
browse_limit = 100
browse_order = downloads desc
search_limit = 20
search_order =
exclude_collections =
exclude_mediatypes =
cache_size = 128
cache_ttl = 86400
retries = 3
timeout = 10

[mopify]
enabled = true

[podcast-itunes]
enabled = true
root_name = iTunes Store
genre_format = {name}
charts_format = All {name}
podcast_format = {collectionName}
episode_format = {trackName} [{collectionName}]
charts = AudioPodcasts
country = US
explicit =
timeout = 10

[soundcloud]
enabled = false ; Extension disabled due to config errors.
explore_songs = 25
auth_token = ; Must be set.

[alsamixer]
enabled = true
card = 0
control = Master

[local-sqlite]
enabled = true
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Folders local:directory:
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
extract_images = false
image_dir =
image_base_uri = /sqlite/images/
album_art_files =
*.jpg
*.jpeg
*.png

[somafm]
enabled = true
encoding = mp3
quality = fast

[podcast-gpodder]
enabled = true
root_name = gpodder.net
tag_format = {tag}
podcast_format = {title}
count = 20
timeout = 10

[youtube]
enabled = true

[spotify]
enabled = false ; Extension disabled due to config errors.
username = ; Must be set.
password = ; Must be set.
bitrate = 160
timeout = 10
cache_dir = $XDG_CACHE_DIR/mopidy/spotify
settings_dir = $XDG_CONFIG_DIR/mopidy/spotify
toplist_countries =
AD
AR
AU
AT
BE
CO
CY
DK
EE
FI
FR
DE
GR
HK
IS
IE
IT
LV
LI
LT
LU
MY
MX
MC
NL
NZ
NO
PT
ES
SG
SE
CH
TW
TR
GB
US

[http-kuechenradio]
enabled = true
title = Mopidy Küchenradio
default_locale = en

[dirble]
enabled = false ; Extension disabled due to config errors.
api_key = ; Must be set.
countries =
timeout = 5000

[simple-webclient]
enabled = true

Any help would be greatly appreciated,

Matt

In Musicbox, by default the Spotify cache_dir setting is set to “” (i.e. nothing) to disable the cache as this has been found to “fix” stuttering audio. But that’s not the case in the config you’ve posted, where did you get it from? It looks suspiciously like the config you’d get by logging in and running mopidy config. If so, then you’ll need to instead run service mopidy run config to get the actual config being used as Musicbox runs Mopidy as a service.
https://docs.mopidy.com/en/latest/debian/#differences-when-running-as-a-system-service

ok thank you. Yes I did run mopidy config I didn’t realize MusicBox was running mopidy as a service. I will post the active mopidy config when I get home. However I know I am using the default cache_dir = “” in the MusicBox settings.ini

active mopidy config

[logging] color = true console_format = %(levelname)-8s %(message)s debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s debug_file = /var/log/mopidy/mopidy-debug.log config_file = /etc/mopidy/logging.conf

[audio]
mixer = software
mixer_volume = 85
output = alsasink buffer-time=200000 latency-time=10000
visualizer =

[proxy]
scheme =
hostname =
port =
username =
password =

[musicbox_webclient]
enabled = true

[spotify_tunigo]
enabled = true
region = all
cache_time = 3600

[scrobbler]
enabled = false ; Extension disabled by user config.

[local-whoosh]
enabled = true

[audioaddict]
enabled = false ; Extension disabled by user config.

[podcast]
enabled = true
browse_limit = 100
search_limit = 20
search_details = false
update_interval = 86400
feeds =
feeds_root_name = Subscribed Feeds
feeds_cache_size = 32
feeds_cache_ttl = 3600
feeds_timeout = 10

[tunein]
enabled = true
timeout = 5000

[gmusic]
enabled = false ; Extension disabled by user config.

[subsonic]
enabled = false ; Extension disabled by user config.

[local]
enabled = true
library = sqlite
media_dir = /music
data_dir = /var/lib/mopidy/localdata
playlists_dir = /var/lib/mopidy/playlists
scan_timeout = 1000
scan_flush_threshold = 1000
excluded_file_extensions =
.html
.jpeg
.jpg
.log
.nfo
.png
.txt
.mkv
.avi
.divx
.qt
.wmv
.htm
.zip
.rar
.gz
.pdf
.exe
.ini
.mid
.db
.m3u
.sfv
.midi

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname

[softwaremixer]
enabled = true

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir = /opt/webclient
zeroconf =

[stream]
enabled = true
protocols =
http
https
mms
file
rtmp
rtmps
rtsp
udp
mmsh
metadata_blacklist =
timeout = 5000

[websettings]
enabled = true
musicbox = true
config_file = /boot/config/settings.ini

[moped]
enabled = true

[internetarchive]
enabled = false ; Extension disabled by user config.

[mopify]
enabled = true

[podcast-itunes]
enabled = true
base_url = http://itunes.apple.com/
root_name = iTunes Store
genre_format = {name}
charts_format = All {name}
podcast_format = {collectionName}
episode_format = {trackName} [{collectionName}]
charts = AudioPodcasts
country = US
explicit =
timeout = 10

[soundcloud]
enabled = false ; Extension disabled by user config.

[alsamixer]
enabled = false ; Extension disabled due to config errors.
card = ; Must be set.
control = ; Must be set.

[local-sqlite]
enabled = true
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Folders local:directory:
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
extract_images = false
image_dir =
image_base_uri = /sqlite/images/
album_art_files =
*.jpg
*.jpeg
*.png

[somafm]
enabled = false ; Extension disabled by user config.

[podcast-gpodder]
enabled = true
base_url = http://gpodder.net/
root_name = gpodder.net
tag_format = {tag}
podcast_format = {title}
count = 20
timeout = 10

[youtube]
enabled = true

[spotify]
enabled = true
username = 1296976030
password = ********
bitrate = 320
timeout = 10
cache_dir =
settings_dir = /var/lib/mopidy/spotify
toplist_countries =
AD
AR
AU
AT
BE
CO
CY
DK
EE
FI
FR
DE
GR
HK
IS
IE
IT
LV
LI
LT
LU
MY
MX
MC
NL
NZ
NO
PT
ES
SG
SE
CH
TW
TR
GB
US

[http-kuechenradio]
enabled = true
title = Mopidy Küchenradio
default_locale = en

[dirble]
enabled = true
api_key = 473279e3fa0e7010cbbbb40ecc31890d46e57a2e
countries =
US
NL
DE
NO
SE
timeout = 5000

[simple-webclient]
enabled = true

hmm it looks like I have a wireless internet problem. My Pi is only getting 3Mb/s on wifi and my laptop is only getting 5Mb/s on wi-fi. My wired connection is 30Mb/s.