# Mopidy YouTube or Local track - restarts after 4 Seconds

**URL:** https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316
**Category:** Misc
**Created:** [September 15, 2020, 5:25pm UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316 "2020-09-15T17:25:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![youneverknow1](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/youneverknow1/32/1714_2.png) [@youneverknow1](https://discourse.mopidy.com/u/youneverknow1)
#### Post date: [September 15, 2020, 5:25pm UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316/1 "2020-09-15T17:25:56Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [September 15, 2020, 7:25pm UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316/2 "2020-09-15T19:25:38Z")

</div>

Which web client?

> **[Troubleshooting — Mopidy 3.0.2-4-g41d170a5 documentation](https://docs.mopidy.com/en/latest/troubleshooting/)**

---

<div class="post-metadata">

### Author: ![youneverknow1](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/youneverknow1/32/1714_2.png) [@youneverknow1](https://discourse.mopidy.com/u/youneverknow1)
#### Post date: [September 15, 2020, 9:00pm UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316/3 "2020-09-15T21:00:31Z")

</div>

Iris WebClient is where I am trying.

---

<div class="post-metadata">

### Author: ![youneverknow1](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/youneverknow1/32/1714_2.png) [@youneverknow1](https://discourse.mopidy.com/u/youneverknow1)
#### Post date: [September 15, 2020, 10:22pm UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316/4 "2020-09-15T22:22:19Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [September 15, 2020, 10:47pm UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316/5 "2020-09-15T22:47:45Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![AshMan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/ashman/32/1729_2.png) [@AshMan](https://discourse.mopidy.com/u/AshMan)
#### Post date: [September 27, 2020, 3:00am UTC](https://discourse.mopidy.com/t/mopidy-youtube-or-local-track-restarts-after-4-seconds/4316/6 "2020-09-27T03:00:49Z")

</div>

@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)
