Jump to content
knex666

[Support] knex666 - Mopidy

26 posts in this topic Last Reply

Recommended Posts

Posted (edited)

Application Name: Mopidy

Overview: Support for Docker image of Mopidy

Application: Mopidy - https://www.mopidy.com/

Docker Hub: https://hub.docker.com/r/knex666/mopidy

GitHub: https://github.com/maschhoff/docker/tree/master/mopidy

 

Please read all information in the Overview Box

Is a good compination with Icecast or Snapcast

For any question - dont mind to ask!

Edited by knex666

Share this post


Link to post
Posted (edited)
/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/mnt/user/appdata/mopidy/mopidy.conf\" to rootfs \"/var/lib/docker/btrfs/subvolumes/768b540054ed7ac679f30d5ed714735ab0a9f23222149868913b6132c8a833b5\" at \"/var/lib/docker/btrfs/subvolumes/768b540054ed7ac679f30d5ed714735ab0a9f23222149868913b6132c8a833b5/etc/mopidy.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

The command failed.

can't install docker, fails everytime with this message

Edited by ffhelllskjdje

Share this post


Link to post

I'm having trouble getting sound output and being able to see local files. Spotify loads up, but the server keeps connecting and disconnecting. This is my conf file. I'm guessing the [audio] portion is wrong. I've tried some other variations like:

mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

But to no avail.

[core]
data_dir = /var/lib/mopidy

[local]
media_dir = /media

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[mpd]
hostname = 192.168.1.3
port = 6600

[http]
hostname = 192.168.1.3
port = 6680

[audio]
output = lamemp3enc ! shout2send async=false mount=mopidy ip=192.168.1.43 port=8000 password=hackme

[spotify]
username
password=
client_id = 
client_secret = 

[spotify_web]
client_id = 
client_secret = 

[iris]
snapcast_enabled = true
snapcast_port = 6680

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

Any ideas on what parts of the config I need to change? Docker is mapping /media to my NAS folder with music files. The IP set for the container is 192.168.1.3, ports at default.

Share this post


Link to post

Hey, audio is not working because you are using the configuration to use icecast for audio streaming output, which is for me the best way.

Snapcast is more better but I have chromecast devices. Since pulseaudio is not working on unraid you will not be able to have a direct output.

 

Your local media has to be scanned first. You have to run #mopidy local scan inside the container. therefor exec -it into it or use the console from docker.

after scan is completed restart the container and you´ll have it.

 

Share this post


Link to post

Right. I changed out [audio] portion to

 

[audio] output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioconvert ! wavenc ! filesink location=/tmp/snapfifo

 

Still no sound. Also, tried running the local scan through the console and got the following output:

 

/usr/local/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  extension_class = entry_point.load(require=False)
INFO     Starting Mopidy 2.2.2
INFO     Loading config from builtin defaults
INFO     Loading config from /root/.config/mopidy/mopidy.conf
INFO     Loading config from command line options
INFO     Enabled extensions: mopify, iris, mpd, http, stream, spotify_tunigo, m3u, youtube, simple-webclient, tunein, local-images, softwaremixer, file, musicbox_webclient, party, api_explorer, local-sqlite
INFO     Disabled extensions: spotify, local, scrobbler, soundcloud
WARNING  Found local configuration errors, the extension has been automatically disabled:
WARNING    local/media_dir must be set.
WARNING  Found scrobbler configuration errors, the extension has been automatically disabled:
WARNING    scrobbler/username must be set.
WARNING    scrobbler/password must be set.
WARNING  Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING    soundcloud/auth_token must be set.
WARNING  Found spotify configuration errors, the extension has been automatically disabled:
WARNING    spotify/username must be set.
WARNING    spotify/client_secret must be set.
WARNING    spotify/password must be set.
WARNING    spotify/client_id must be set.
WARNING  Please fix the extension configuration errors or disable the extensions to silence these messages.
ERROR    Unable to run command provided by disabled extension local

Configurations for most of the warning messages are set. I'm browsing Spotify and playing files OK, but with no sound,.

Share this post


Link to post

Are you running the Snapcast Container from my repo? And the Snapcast client on you PC? It should be working out of the box.

For your local files check the config for [local] if it exists

if you start your container does it say INFO Loading config from /etc/mopidy.conf? because thats the place where the config is mapped to.

Because this line is wrong INFO Loading config from /root/.config/mopidy/mopidy.conf

than try #service mopidy run local scan but local scan should work as well.

 

Cheers

 

 

Share this post


Link to post
Posted (edited)

Cant seem to install it. I made sure all paths were correct and picked an ip address but its always telling me its failed.

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='Mopidy' --net='br0' --ip='192.168.0.5' -e TZ="America/New_York" -e HOST_OS="Unraid" -v '/mnt/user/appdata/mopidy/mopidy.conf':'/etc/mopidy.conf':'rw' -v '/mnt/user/appdata/mopidy/tmp/':'/tmp/':'rw' -v '/mnt/user/media/Music/':'/media':'rw' 'knex666/mopidy' 
061521d60da08664c0bd6ff1937ad685bf238f92ee2efc3de398bd875550d334
/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused "rootfs_linux.go:58: mounting \"/mnt/user/appdata/mopidy/mopidy.conf\" to rootfs \"/var/lib/docker/btrfs/subvolumes/404d13417f8511c1a7192a4b26a0311fed3bfec5bb534e5dfa92611bc5c1eb46\" at \"/var/lib/docker/btrfs/subvolumes/404d13417f8511c1a7192a4b26a0311fed3bfec5bb534e5dfa92611bc5c1eb46/etc/mopidy.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

Is the mopidy .conf suppose to be a folder or file? Because it does create a folder in appdata but nothing inside. Guessing because it cant start?

Edited by mkono87

Share this post


Link to post
21 minutes ago, mkono87 said:

'/mnt/user/appdata/mopidy/mopidy.conf':'/etc/mopidy.conf'

That looks to me like you're trying to to mount a file which you can't.  only folders allowed

Share this post


Link to post
Posted (edited)
4 minutes ago, Squid said:

That looks to me like you're trying to to mount a file which you can't.  only folders allowed

Ah see thats what the template does by default so I was a little confused if it was intended to be a folder name too.

 

I still get the same error though.

Edited by mkono87

Share this post


Link to post

No it is right it is a file and as explayned above you have to create that file put it to the specific path and mounting works 

 

41 minutes ago, Squid said:

That looks to me like you're trying to to mount a file which you can't.  only folders allowed

Thats not true ;) but the file has to exists which is not does by default 

Share this post


Link to post

Thanks @knex666 for the development of this docker.

 

I have some rather basic questions. I checked out mopidy web-site, your git and read through various forums. It seems to me that my questions may be too basic to be discussed anywhere ;-)

 

1) What is mopidy actually good for and how is this different from a DLNA server?

 

2) I am a very active user of DLNA, but Unraid lacks a good dlna server docker. Can I use mopidy instead of a dlna server? I.e., can my dlna clients access my local music files available on mopidy?

 

3) What additional features do icecast and snapcast provide? Are both supported with Unraid? What's the pulseaudio issue?

 

4) In what way is multi-room audio supported? You mention that you have chromecast devices? How do they interact with mopidy?

Share this post


Link to post
Posted (edited)

Hey @steve1977,

 

thats true but no worries I´ll try my best. 

 

1) mopidy has nothing like a dlna server. I am using https://github.com/binhex/arch-minidlna. But I switched using Plex now.

mopidy is only for music. I am using it like a radio station for multiroom audio controller.

You can build chromecast audio groups or if you are not able to do this you can use mopidy and snapcast for synchonus audio streaming.

with mopidy you can access spotify, youtube, soundcloud and local media at once, you can search over all this services and play media over all connected divices.

 

2) dlna lacks if you use transcoding. switch that of use mini dlna. mayme there is an extension of mopidy to support dlna. but easyer is to use the stream.

 

3)on chromecast you can stream http stream to the audio group and youll have synced audio. If you dont you can use snapcast and snapcast devices.

Cheers

 

Edited by knex666

Share this post


Link to post

Hi!

 

I am unable to scan local files inside of Mopidy. I get this error:

INFO Running system action: local_scan
ERROR global name 'path' is not defined

How can I fix this? Thank you in advance! Here is the config I use;

[core]
data_dir = /var/lib/mopidy

[local]
media_dir = /media

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[mpd]
hostname = ::
port = 6600

[http]
hostname = ::
port = 6680

[audio]
output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioconvert ! wavenc ! filesink location=/tmp/snapfifo

[spotify]
username=
password=
client_id = 
client_secret = 

[spotify_web]
client_id = 
client_secret = 

[iris]
snapcast_enabled = true
snapcast_port = 6680

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

 

Share this post


Link to post
On 4/23/2019 at 7:02 PM, knex666 said:

1) mopidy has nothing like a dlna server. I am using https://github.com/binhex/arch-minidlna. But I switched using Plex now.

mopidy is only for music. I am using it like a radio station for multiroom audio controller.

You can build chromecast audio groups or if you are not able to do this you can use mopidy and snapcast for synchonus audio streaming.

with mopidy you can access spotify, youtube, soundcloud and local media at once, you can search over all this services and play media over all connected divices.

Thanks. I am still not clear what Mopidy actually is. Is it a music server or a a music client? Can my DLNA client access the mopidy music server?

Share this post


Link to post
53 minutes ago, steve1977 said:

Thanks. I am still not clear what Mopidy actually is. Is it a music server or a a music client? Can my DLNA client access the mopidy music server?

Hey, Its a Music Server and as you can read here it is able to steam to dlna/upnp https://docs.mopidy.com/en/latest/clients/upnp/

Share this post


Link to post
14 hours ago, wmaarten said:

Hi!

 

I am unable to scan local files inside of Mopidy. I get this error:


INFO Running system action: local_scan
ERROR global name 'path' is not defined

How can I fix this? Thank you in advance! Here is the config I use;


[core]
data_dir = /var/lib/mopidy

[local]
media_dir = /media

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[mpd]
hostname = ::
port = 6600

[http]
hostname = ::
port = 6680

[audio]
output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioconvert ! wavenc ! filesink location=/tmp/snapfifo

[spotify]
username=
password=
client_id = 
client_secret = 

[spotify_web]
client_id = 
client_secret = 

[iris]
snapcast_enabled = true
snapcast_port = 6680

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

 

Hey,

 

oh ok. You have mounted your media to /media?
have you startet the process manually inside the container with #mopidy local scan? after scan is completed restart the container.

 

Cheers

Share this post


Link to post
20 hours ago, knex666 said:

Hey, Its a Music Server and as you can read here it is able to steam to dlna/upnp https://docs.mopidy.com/en/latest/clients/upnp/

I followed the link, which elaborates how it can be a "digital media renderer" (DMR), which basically is a client. It also mentions the word digital media server (DMS), but it says that it does not support it. There was some development in 2013, which seems didn't go anywhere?

 

My take-away is that this project is largely about being a client (for UPNP, spotify, radio, etc.). Through additional add-ons, this client can also stream content to other devices. It does not have a server feature though. Is this a correct conclusion?

Share this post


Link to post

Hi,

I was also after some help. My config looks exactly like wmaarten's and is placed in my /mnt/user/appdata/mopidy folder. Under container variables i have my music directory mapped to /media but when i run mopidy localscan from the console (right click, menu option) i get "WARNING    local/media_dir must be set." 

 

If i cd around i can see that my music has successfully mounted. So i wondered if the container was reading some other config

 

I've had a go at install mopidy for myself on a spare raspberry pi before with no luck. But I notice in the container that mopidy.conf also exists in the root directory which i think is for initial setup using a user but the container points to etc/mopidy which is the case for a system service. But  mopidyctl local scan doesn't seem to work either. \

 

Any ideas?

Share this post


Link to post

hi I installed and uninstalled this program and tried to reinstall

but its not working

when I click Start to start the application  I get a execution error and a null error

 

what I gotta do to get this puppy up and running.. as I wanna try to stream internet radio

Share this post


Link to post
14 hours ago, comet424 said:

hi I installed and uninstalled this program and tried to reinstall

but its not working

when I click Start to start the application  I get a execution error and a null error

 

what I gotta do to get this puppy up and running.. as I wanna try to stream internet radio

Can you post the error message for me to debug?

Share this post


Link to post
Posted (edited)

@knex666 this is what happens when i try to start it.. i left them as the defaults as i just only wanna stream internet radio  through the unraid motherboards sound card  not like my desktop  so cant even test your program...

as i want to have my unraid hooked up to my stereo and just stream radio  and not need the app open.. and i never edited the conf file maybe thats why i having issues i just left it as default.. like any app set it up then just run webgui.. so many my fault

 

mopidy.JPG

mopidy2.JPG

Edited by comet424

Share this post


Link to post

I'm having a really hard time getting this working.

 

When I open mopidy through a webbrowser @ 192.168.1.2:6800/iris I get a page loading for an extended period of time before I get a 404.

Something worth noting is all my other dockers run off my server's local IP 192.168.1.100

 

Here is a screenshot of my config

image.thumb.png.dd76fa40471b4c64637309062ee6d702.png

 

Here's the contents of my config file located at /mnt/user/appdata/mopidy/mopidy.conf;

[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =
[mpd]
hostname = ::
port = 6600

[spotify]
client_id = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
username = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
password = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[spotify_web]
client_id = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

[iris]
snapcast_enabled = true
snapcast_port = 6680

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

[scrobbler]
enabled = false

[soundcloud]
enabled = false

[local]
enabled = false

 

Share this post


Link to post
On 4/29/2019 at 4:03 PM, wmaarten said:

Hi!

 

I am unable to scan local files inside of Mopidy. I get this error:


INFO Running system action: local_scan
ERROR global name 'path' is not defined

How can I fix this? Thank you in advance! Here is the config I use;

 

 

On 4/30/2019 at 6:25 AM, knex666 said:

Hey,

 

oh ok. You have mounted your media to /media?
have you startet the process manually inside the container with #mopidy local scan? after scan is completed restart the container.

 

Cheers

 

 

@knex666 The problem is that iris expects sudo to exist, but sudo is missing from the docker (understandable, user in the docker is root):

 

INFO SELF.PATH: /usr/local/lib/python2.7/dist-packages/mopidy_iris
INFO Running system action: local_scan file: /usr/local/lib/python2.7/dist-packages/mopidy_iris/system.py
INFO SELFPATH: /usr/local/lib/python2.7/dist-packages/mopidy_iris
ERROR global name 'path' is not defined

/bin/sh: 1: sudo: not found <--------------------
                                                  
Exception in thread Thread-14:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/mopidy_iris/system.py", line 40, in run
output = subprocess.check_output(["sudo " + filepath + "/system.sh " + self.action], shell=True)
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '[u'sudo /usr/local/lib/python2.7/dist-packages/mopidy_iris/system.sh local_scan']' returned non-zero exit status 127

The 'ERROR global name 'path' is not defined' log is coming out of '/usr/local/lib/python2.7/dist-packages/mopidy_iris/system.py' but it's not fatal.

 

The command does launch after I manually remove 'sudo' from the command in '/usr/local/lib/python2.7/dist-packages/mopidy_iris/system.py':

# diff system.py.ORIG system.py
36c36
<         output = subprocess.check_output(["sudo "+self.path+"/system.sh "+self.action], shell=True)
---
>         output = subprocess.check_output([self.path+"/system.sh "+self.action], shell=True)

However when it does launch the wrong mopidy.conf it being read (note that my library *is* populated, configured via /etc/mopidy.conf):

INFO Running system action: local_scan
ERROR global name 'path' is not defined

Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf local scan" as user mopidy
/usr/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.

extension_class = entry_point.load(require=False)
INFO Starting Mopidy 2.2.1
INFO Loading config from builtin defaults
INFO Loading config from /etc/mopidy/mopidy.conf
INFO Loading config from command line options
ERROR Loading logging config '/etc/mopidy/logging.conf' failed. [Errno 13] Permission denied: '/var/log/mopidy/mopidy.log'
INFO Enabled extensions: mopify, local-sqlite, mpd, http, stream, spotify_tunigo, m3u, youtube, simple-webclient, local-images, softwaremixer, file, musicbox_webclient, party, api_explorer, iris, local, tunein
INFO Disabled extensions: spotify, scrobbler, soundcloud
WARNING Found scrobbler configuration errors, the extension has been automatically disabled:
WARNING scrobbler/username must be set.
WARNING scrobbler/password must be set.
WARNING Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING soundcloud/auth_token must be set.
WARNING Found spotify configuration errors, the extension has been automatically disabled:
WARNING spotify/username must be set.
WARNING spotify/client_secret must be set.
WARNING spotify/password must be set.
WARNING spotify/client_id must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.

INFO Found 0 files in media_dir. <--------------------

INFO Checking 0 tracks from library.
INFO Removing 0 missing tracks.
INFO Found 0 tracks which need to be updated.
INFO Scanning...
INFO Scanned 0 of 0 files in 0s.
INFO Done scanning.

iris is using 'mopidyctl' to launch the commands, and from the logs mopidyctl is using '/etc/mopidy/mopidy.conf'.  This also happens to be the config file recommended when running mpd as a service (https://docs.mopidy.com/en/latest/service/).

 

I also hit a similar 'wrong config' issue running 'mopidy local scan' in the docker, which is most likely what  @Lammy hit:

root@d46c51e4da38:/# mopidy local scan
/usr/local/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  extension_class = entry_point.load(require=False)
INFO     Starting Mopidy 2.2.2
INFO     Loading config from builtin defaults

INFO     Loading config from /root/.config/mopidy/mopidy.conf <--------------------

INFO     Loading config from command line options
INFO     Enabled extensions: mopify, iris, mpd, http, stream, spotify_tunigo, m3u, youtube, simple-webclient, tunein, local-images, softwaremixer, file, musicbox_webclient, party, api_explorer, local-sqlite
INFO     Disabled extensions: spotify, local, scrobbler, soundcloud
WARNING  Found local configuration errors, the extension has been automatically disabled:
WARNING    local/media_dir must be set.
WARNING  Found scrobbler configuration errors, the extension has been automatically disabled:
WARNING    scrobbler/username must be set.
WARNING    scrobbler/password must be set.
WARNING  Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING    soundcloud/auth_token must be set.
WARNING  Found spotify configuration errors, the extension has been automatically disabled:
WARNING    spotify/username must be set.
WARNING    spotify/client_secret must be set.
WARNING    spotify/password must be set.
WARNING    spotify/client_id must be set.
WARNING  Please fix the extension configuration errors or disable the extensions to silence these messages.
ERROR    Unable to run command provided by disabled extension local

To successfully launch a scan I had to specific the --config option:

root@d46c51e4da38:/# mopidy --config /etc/mopidy.conf local scan
/usr/local/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  extension_class = entry_point.load(require=False)
INFO     Starting Mopidy 2.2.2
INFO     Loading config from builtin defaults
INFO     Loading config from /etc/mopidy.conf
INFO     Loading config from command line options
INFO     Enabled extensions: mopify, iris, mpd, http, stream, m3u, simple-webclient, tunein, local-images, softwaremixer, file, musicbox_webclient, party, api_explorer, local, local-sqlite
INFO     Disabled extensions: spotify, youtube, scrobbler, soundcloud, spotify_tunigo
<Successful scan>

So the root cause of all this is that mopidy.conf is mapped to /etc/mopidy.conf, which is (no longer?) the expected location when mopidy is running as a user process or as a daemon.

 

I had the following questions:

 

- Would it be possible to include the 'sudo' command in the docker, even though the user inside the docker is root?

 

- Was there a specific need to map the config to '/etc/mopidy.conf'?  Could the docker be reworked to map it to a different location?  If you map to '/etc/mopidy/mopidy.conf', you could explain in the readme that mopidyctl must be used to scan the library.

 

 

Thanks for all the work on this.

 

 

 

 

Edited by ambidex2

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.