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

GStreamer fails to connect #383

Open
alazyworkaholic opened this issue Mar 23, 2024 · 1 comment
Open

GStreamer fails to connect #383

alazyworkaholic opened this issue Mar 23, 2024 · 1 comment

Comments

@alazyworkaholic
Copy link

I just installed mopidy-spotify. ncmpcpp connects to mopidy-mpd and displays a list of tracks from my spotify playlists but it won't play any tracks. Raspbery Pi OS (Debian Bookworm) on R Pi 3B+ arm64 with wayland. Mopidy 3.4.2
Logs show lots of mopidy[75215]: ERROR [MainThread] mopidy.audio.gst GStreamer error: Failed to connect:

I also seem to have mpris problems.

Please let me know what other information would help fix this.

#Installation & Confguration
sudo mkdir -p /etc/apt/keyrings
sudo wget -q -O /etc/apt/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/bookworm.list
sudo apt update
sudo apt install mopidy mopidy-mpd mopidy-mpris

#Install gst-plugins-spotify
wget https://github.com/kingosticks/gst-plugins-rs-build/releases/download/gst-plugin-spotify_0.12.2-1/gst-plugin-spotify_0.12.2-1_arm64.deb
sudo dpkg -i gst-plugin-spotify_0.12.2-1_arm64.deb

#Install mopidy-spotify (brand new alpha, check upon next install)
sudo python3 -m pip install --break-system-packages Mopidy-Spotify==5.0.0a1

#Allow mopidy to send audio to pulseaudio
#Add the following under the ### Network access section of /etc/pulse/default.pa
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

#Add to mopidy.conf under [audio]: output = pulsesink server=127.0.0.1

#Run as a service
#mopidy service runs under mopidy user, which is created upon pgk install
#Note that mopidy user must have access to any local music mopidy should play
#mopidy also needs access to your mopidy.conf, unless you want to copy everything into the system-wide default.
#A better idea is to grant mopidy access to the file and hardlink to it from a place it's looking for configs anyway.
#Note this won't work if /home is on a separate filesystem.
setfacl -m u:mopidy:x /home/alan/.config/mopidy/mopidy.conf
sudo ln /home/alan/.config/mopidy/mopidy.conf /usr/share/mopidy/conf.d/alazy_mopidy.conf
sudo systemctl enable mopidy
sudo systemctl start mopidy
alan@rpi3bplus:~ $ sudo mopidyctl config
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = true

[logging]
verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

[audio]
mixer = software
mixer_volume =
output = pulsesink server=127.0.0.1
buffer_time =

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

[spotify]
enabled = true
username = ********
password = ********
client_id = 32f2ca86-4e6c-4369-a022-b764a50c1bf6
client_secret = ********
bitrate = 320
volume_normalization = true
timeout = 10
allow_cache = true
cache_size = 8192
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50

[file]
enabled = true
media_dirs =
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions =
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

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

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

[mpris]
enabled = true
bus_type = session
alan@rpi3bplus:~ $ sudo journalctl -u mopidy
Mar 22 21:02:55 rpi3bplus systemd[1]: Starting mopidy.service - Mopidy music server...
Mar 22 21:02:55 rpi3bplus systemd[1]: Started mopidy.service - Mopidy music server.
Mar 22 21:02:59 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.4.2
Mar 22 21:02:59 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.config Loading config from builtin defaults
Mar 22 21:02:59 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Mar 22 21:02:59 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/alazy_mopidy.conf
Mar 22 21:02:59 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Mar 22 21:02:59 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.config Loading config from command line options
Mar 22 21:03:00 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.__main__ Enabled extensions: m3u, softwaremixer, stream, spotify, mpris, mpd, file, >
Mar 22 21:03:00 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.__main__ Disabled extensions: none
Mar 22 21:03:01 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Mar 22 21:03:01 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.commands Starting Mopidy audio
Mar 22 21:03:01 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.commands Starting Mopidy backends: SpotifyBackend, FileBackend, M3UBackend, StreamBa>
Mar 22 21:03:01 rpi3bplus mopidy[75215]: INFO     [Audio-2 (_actor_loop)] mopidy.audio.actor Audio output set to "pulsesink server=127.0.0.1"
Mar 22 21:03:02 rpi3bplus mopidy[75215]: INFO     [SpotifyBackend-3 (_actor_loop)] mopidy_spotify.web Logged into Spotify Web API as lh0f9zcdm88tescxpyddw>
Mar 22 21:03:02 rpi3bplus mopidy[75215]: INFO     [SpotifyBackend-3 (_actor_loop)] mopidy_spotify.playlists Refreshing Spotify playlists
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [SpotifyBackend-3 (_actor_loop)] mopidy_spotify.playlists Refreshed 12 Spotify playlists
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [Core-7 (_actor_loop)] mopidy.core.actor Loading state from /var/lib/mopidy/core/state.json.gz
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MpdFrontend, MprisFrontend
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [HttpFrontend-9 (_actor_loop)] mopidy.http.actor HTTP server running at [::ffff:127.0.0.1]:6680
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy_mpd.actor MPD server running at [::ffff:127.0.0.1]:6600
Mar 22 21:03:09 rpi3bplus mopidy[75215]: INFO     [MainThread] mopidy.commands Starting GLib mainloop
Mar 22 21:03:09 rpi3bplus mopidy[75215]: WARNING  [MprisFrontend-11 (_actor_loop)] mopidy_mpris.frontend MPRIS frontend setup failed (g-io-error-quark: Ca>
Mar 22 21:17:57 rpi3bplus mopidy[75215]: INFO     [MpdSession-12 (_actor_loop)] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:50102
Mar 22 21:18:32 rpi3bplus mopidy[75215]: INFO     [MpdSession-13 (_actor_loop)] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:47158
Mar 22 21:18:34 rpi3bplus mopidy[75215]: ERROR    [SpotifyBackend-3 (_actor_loop)] mopidy_spotify.web Retrying https://api.spotify.com/v1/users/lh0f9zcdm8>
Mar 22 21:18:44 rpi3bplus mopidy[75215]: INFO     [MpdSession-14 (_actor_loop)] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:33694
Mar 22 21:18:49 rpi3bplus mopidy[75215]: ERROR    [MainThread] mopidy.audio.gst GStreamer error: Failed to connect: Connection refused
Mar 22 21:18:49 rpi3bplus mopidy[75215]: WARNING  [Audio-2 (_actor_loop)] mopidy.audio.actor Setting GStreamer state to GST_STATE_PLAYING failed
Mar 22 21:18:49 rpi3bplus mopidy[75215]: WARNING  [Core-7 (_actor_loop)] mopidy.core.tracklist Track is not playable: spotify:track:4hvCxgioUiT85MCgfIhDP3
Mar 22 21:18:49 rpi3bplus mopidy[75215]: ERROR    [MainThread] mopidy.audio.gst GStreamer error: Failed to connect: Connection refused
Mar 22 21:18:49 rpi3bplus mopidy[75215]: WARNING  [Audio-2 (_actor_loop)] mopidy.audio.actor Setting GStreamer state to GST_STATE_PLAYING failed
Mar 22 21:18:49 rpi3bplus mopidy[75215]: WARNING  [Core-7 (_actor_loop)] mopidy.core.tracklist Track is not playable: spotify:track:5tzQBDvosYbVemX5GLFkmB
@kingosticks
Copy link
Member

Did you ever resolve this? The config looks good, I am not sure what's going on. It's a general Mopidy issue rather than anything specific to this extension. You might get better help at https://discourse.mopidy.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants