Mopidy Discourse

Mopidy YouTube or Local track - restarts after 4 Seconds

Installed Mopidy on RasPi 3 and tried to play track on the webclient. No audio and the track plays for 4 seconds and restarts. Same experience with YouTube.

Which web client?

Iris WebClient is where I am trying.

Here’re errors from GST Debug

    0:00:03.188969343 27086 0x6f405c80 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error
0:00:03.189350013 27086 0x6f405c80 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error
ERROR    2020-09-15 18:16:53,393 [27086:Audio-2] mopidy.audio.actor
  Failed to create audio output "output = lamemp3enc ! shout2send async=false mount=mopidy ip=192.168.68.120 port=8000 password=asdf1234": gst_parse_error: syntax error (0)
ERROR    2020-09-15 18:16:53,394 [27086:Audio-2] pykka
  Unhandled exception in Audio (urn:uuid:81fd62cd-1326-4213-95e8-d008b32a3bc0):
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mopidy/audio/actor.py", line 125, in add_output
    description, ghost_unlinked_pads=True
gi.repository.GLib.GError: gst_parse_error: syntax error (0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 186, in _actor_loop
    self.on_start()
  File "/usr/lib/python3/dist-packages/mopidy/audio/actor.py", line 458, in on_start
    self._setup_outputs()
  File "/usr/lib/python3/dist-packages/mopidy/audio/actor.py", line 507, in _setup_outputs
    self._outputs.add_output(self._config["audio"]["output"])
  File "/usr/lib/python3/dist-packages/mopidy/audio/actor.py", line 131, in add_output
    raise exceptions.AudioException(bytes(ex))
TypeError: cannot convert 'Error' object to bytes
INFO     2020-09-15 18:16:54,026 [27086:YouTubeBackend-3] mopidy_youtube
  YouTube API key verified
INFO     2020-09-15 18:16:54,029 [27086:MainThread] mopidy.commands
  Starting Mopidy core
INFO     2020-09-15 18:16:54,058 [27086:MainThread] mopidy.commands
  Starting Mopidy frontends: YouTubeAutoplayer, IrisFrontend, HttpFrontend, MpdFrontend
INFO     2020-09-15 18:16:54,062 [27086:IrisFrontend-9] mopidy_iris.core
  Starting Iris 3.52.4
DEBUG    2020-09-15 18:16:54,063 [27086:MainThread] mopidy.http.actor
  Starting HTTP server
ERROR    2020-09-15 18:16:54,068 [27086:MainThread] mopidy.commands
  Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
ERROR    2020-09-15 18:16:54,070 [27086:MainThread] mopidy.commands
  Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
INFO     2020-09-15 18:16:54,071 [27086:MainThread] mopidy.commands
  Starting GLib mainloop

Here’s my Mopidy Audio Config

[audio]
mixer = software
mixer_volume =
output = tee name=t ! queue ! audioresample ! autoaudiosink t. ! queue ! lamemp3enc ! shout2send async=false mount=mopidy ip=192.168.68.120 port=8000 password=asdf1234
buffer_time = 50

Is there anything I am doing wrong here?

A full regular log would be more helpful. As well as the full output of sudo mopidyctl deps and sudo mopidyctl config. And confirmation you are running Mopidy as a service.

@kingosticks I am having the exact same issue. Super Linux noob here so please excuse any dumb questions from me as I go figure it out.

Also noticing this message in the log:

Sep 26 20:55:05 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)

Dependencies:

Executable: /usr/bin/mopidy
Platform: Linux-4.19.118-v7l±armv7l-with-debian-10.4
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
mopidy-raspberry-gpio: 1.0.2 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.2 from /usr/lib/python3/dist-packages
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-YouTube: 3.1 from /usr/local/lib/python3.7/dist-packages
requests: 2.21.0 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
youtube-dl: 2020.9.20 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.2 from /usr/lib/python3/dist-packages
cachetools: 4.1.1 from /usr/local/lib/python3.7/dist-packages
beautifulsoup4: 4.7.1 from /usr/lib/python3/dist-packages
Mopidy-Iris: 3.52.4 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.2 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
Mopidy-MPD: 3.0.0 from /usr/local/lib/python3.7/dist-packages
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
Pykka: 2.0.2 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-Spotify: 4.0.1 from /usr/lib/python3/dist-packages
mopidy-pidi: 1.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
netifaces: 0.10.9 from /usr/local/lib/python3.7/dist-packages
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
Pykka: 2.0.2 from /usr/lib/python3/dist-packages
musicbrainzngs: 0.7.1 from /usr/local/lib/python3.7/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.30.4
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec
mad

Config:

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false
[logging]
verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =
[audio]
mixer = software
mixer_volume = 40
output = alsasink device=hw:sndrpihifiberry
buffer_time =
[proxy]
scheme =
hostname =
port =
username =
password =
[youtube]
enabled = true
youtube_api_key =
threads_max = 16
search_results = 15
playlist_max_videos = 20
api_enabled = false
autoplay_enabled = false
strict_autoplay = false
max_autoplay_length = 600
max_degrees_of_separation = 3
[raspberry-gpio]
enabled = true
bcm0 =
bcm1 =
bcm2 =
bcm3 =
bcm4 =
bcm5 = play_pause,active_low,250,
bcm6 = volume_down,active_low,250,
bcm7 =
bcm8 =
bcm9 =
bcm10 =
bcm11 =
bcm12 =
bcm13 =
bcm14 =
bcm15 =
bcm16 = next,active_low,250,
bcm17 =
bcm18 =
bcm19 =
bcm20 = volume_up,active_low,250,
bcm21 =
bcm22 =
bcm23 =
bcm24 = volume_up,active_low,250,
bcm25 =
bcm26 =
bcm27 =
[pidi]
enabled = true
display = st7789
rotation = 90
[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u
[iris]
enabled = true
country = NZ
locale = en_NZ
spotify_authorization_url = hxxps://jamesbarnsley.co.nz/iris/auth_spotify.php
lastfm_authorization_url = hxxps://jamesbarnsley.co.nz/iris/auth_lastfm.php
genius_authorization_url = hxxps://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris
[file]
enabled = true
media_dirs =
/home/pi/Music
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 = 0.0.0.0
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
[spotify]
enabled = false ; Extension disabled by user config.

Log:

– Logs begin at Sat 2020-09-26 20:51:53 CDT, end at Sat 2020-09-26 21:27:59 CDT. –
Sep 26 20:51:57 raspberrypi systemd[1]: Starting Mopidy music server…
Sep 26 20:51:57 raspberrypi systemd[1]: Started Mopidy music server.
Sep 26 20:52:06 raspberrypi mopidy[515]: INFO [MainThread] mopidy. main Starting Mopidy 3.0.2
Sep 26 20:52:06 raspberrypi mopidy[515]: INFO [MainThread] mopidy.config Loading config from builtin defaults
Sep 26 20:52:06 raspberrypi mopidy[515]: INFO [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Sep 26 20:52:06 raspberrypi mopidy[515]: INFO [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Sep 26 20:52:06 raspberrypi mopidy[515]: INFO [MainThread] mopidy.config Loading config from command line options
Sep 26 20:52:09 raspberrypi mopidy[515]: INFO [MainThread] mopidy. main Enabled extensions: raspberry-gpio, mpd, file, iris, youtube, http, softwaremixer, stream, pidi, m3u
Sep 26 20:52:09 raspberrypi mopidy[515]: INFO [MainThread] mopidy. main Disabled extensions: spotify
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Mixer volume set to 40
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Starting Mopidy audio
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Starting Mopidy backends: YouTubeBackend, FileBackend, M3UBackend, StreamBackend
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [YouTubeBackend-3] mopidy_youtube using bs4API
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Starting Mopidy core
Sep 26 20:52:15 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Starting Mopidy frontends: YouTubeAutoplayer, RaspberryGPIOFrontend, PiDiFrontend, MpdFrontend, IrisFrontend, HttpFrontend
Sep 26 20:52:16 raspberrypi mopidy[515]: INFO [MainThread] mopidy_mpd.actor MPD server running at [::ffff:0.0.0.0]:6600
Sep 26 20:52:16 raspberrypi mopidy[515]: INFO [Audio-2] mopidy.audio.actor Audio output set to “alsasink device=hw:sndrpihifiberry”
Sep 26 20:52:16 raspberrypi mopidy[515]: INFO [IrisFrontend-12] mopidy_iris.core Starting Iris 3.52.4
Sep 26 20:52:16 raspberrypi mopidy[515]: INFO [HttpFrontend-14] mopidy.http.actor HTTP server running at [::ffff:0.0.0.0]:6680
Sep 26 20:52:16 raspberrypi mopidy[515]: INFO [MainThread] mopidy.commands Starting GLib mainloop
Sep 26 20:55:05 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)
Sep 26 21:01:58 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)
Sep 26 21:07:55 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)
Sep 26 21:08:27 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)
Sep 26 21:08:49 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)
Sep 26 21:12:57 raspberrypi mopidy[515]: WARNING [FileBackend-4] mopidy.file.library Failed looking up file:///home/pi/Music: gst-resource-error-quark: “/home/pi/Music” is a directory. (5)