Forum

Full Version: Mopidy / Spotify package?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey,

firstly I posted this in the Additional Packages folder (http://forum.xbian.org/thread-1526.html) but as I think it was a mistake and this is a sightly different approach, I first apologise and then ask any mods to mix both topics if they think its appropriate.

I tried to install Mopidy in more than one occasion without look. As I guess there's some steps needed to accomplish that, should there be a package within Xbian to get it installed? Installation details are bellow, but if I remember well the installation fails as it needs gstreamer plugins, then some tag libraries that break XBMC. Feel free to ask for more info if needed, and I'll try to post a SSH log.

http://docs.mopidy.com/en/latest/installation/raspberrypi/#raspberrypi-installation

sudo modprobe ipv6
echo ipv6 | sudo tee -a /etc/modules
wget -q -O - http://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list http://apt.mopidy.com/mopidy.list
sudo apt-get update
sudo apt-get install mopidy
I recently did what you are trying now.
In order to install gstreamer you need to have the correct libtag version, I found out that another person had the same problem and it got solved in https://github.com/xbianonpi/xbian/issues/378 by installing another libtag version.
This bit is the one that did it for me, but read all the other information first!

Once done, you will be able to install gstreamer and then mopidy without problems.
(22nd Oct, 2013 09:13 PM)Trinket Wrote: [ -> ]I recently did what you are trying now.
In order to install gstreamer you need to have the correct libtag version, I found out that another person had the same problem and it got solved in https://github.com/xbianonpi/xbian/issues/378 by installing another libtag version.
This bit is the one that did it for me, but read all the other information first!

Once done, you will be able to install gstreamer and then mopidy without problems.

Perfect mate, I just installed it! Going to try it
(26th Oct, 2013 07:14 AM)rndl Wrote: [ -> ]
(22nd Oct, 2013 09:13 PM)Trinket Wrote: [ -> ]I recently did what you are trying now.
In order to install gstreamer you need to have the correct libtag version, I found out that another person had the same problem and it got solved in https://github.com/xbianonpi/xbian/issues/378 by installing another libtag version.
This bit is the one that did it for me, but read all the other information first!

Once done, you will be able to install gstreamer and then mopidy without problems.

Perfect mate, I just installed it! Going to try it

After I managed to get time and some hours testing, I finally got the system up and ready. I needed to complete some extra steps, though, as the extras for Mopidy were missing. I think I can manage to write a short tutorial if somebody wants, so feel free to post here.
(4th Nov, 2013 07:06 PM)rndl Wrote: [ -> ]
(26th Oct, 2013 07:14 AM)rndl Wrote: [ -> ]
(22nd Oct, 2013 09:13 PM)Trinket Wrote: [ -> ]I recently did what you are trying now.
In order to install gstreamer you need to have the correct libtag version, I found out that another person had the same problem and it got solved in https://github.com/xbianonpi/xbian/issues/378 by installing another libtag version.
This bit is the one that did it for me, but read all the other information first!

Once done, you will be able to install gstreamer and then mopidy without problems.

Perfect mate, I just installed it! Going to try it

After I managed to get time and some hours testing, I finally got the system up and ready. I needed to complete some extra steps, though, as the extras for Mopidy were missing. I think I can manage to write a short tutorial if somebody wants, so feel free to post here.

I would really like to know what you did to get spotify working. I have installed Mopidy but the spotify extension is missing.
(5th Nov, 2013 10:16 AM)Blonic Wrote: [ -> ]
(4th Nov, 2013 07:06 PM)rndl Wrote: [ -> ]
(26th Oct, 2013 07:14 AM)rndl Wrote: [ -> ]
(22nd Oct, 2013 09:13 PM)Trinket Wrote: [ -> ]I recently did what you are trying now.
In order to install gstreamer you need to have the correct libtag version, I found out that another person had the same problem and it got solved in https://github.com/xbianonpi/xbian/issues/378 by installing another libtag version.
This bit is the one that did it for me, but read all the other information first!

Once done, you will be able to install gstreamer and then mopidy without problems.

Perfect mate, I just installed it! Going to try it

After I managed to get time and some hours testing, I finally got the system up and ready. I needed to complete some extra steps, though, as the extras for Mopidy were missing. I think I can manage to write a short tutorial if somebody wants, so feel free to post here.

I would really like to know what you did to get spotify working. I have installed Mopidy but the spotify extension is missing.

I think you must install GStreamer:

Terminal
sudo yum install -y python-gst0.10 gstreamer0.10-plugins-good \
gstreamer0.10-plugins-ugly gstreamer0.10-tools

Mopidy:

Terminal
wget -q -O - http://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list http://apt.mopidy.com/mopidy.list
sudo apt-get update
sudo apt-get install mopidy

Edit ~/.config/mopidy/mopidy.conf

Terminal
sudo pico ~/.config/mopidy/mopidy.conf

with these values:

Quote:[mpd]
hostname = ::
[spotify]
username = your spotify user
password = your spotify password

Alsa Mixer:

Terminal
sudo apt-get install alsa

Update ~/.asoundrc

Terminal
sudo pico ~/.asoundrc

Incluse these values:

Quote:pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}

If everything is correct, launch mopidy simply typing MOPIDY. Check what the log says.

I think something is missing, but I can't recall what, and I wont be able to confirm all the steps until at least the next weekend (maybe even next week's weekend), so if you have the time to try, follow the steps and post any errors your get.

PS, also, I've seen there's a new version of Mopidy, I guess the installation process may change a bit.
@rndl

can you anytime check if the new mopidy version changed dependency to libtag in any way ?

the last wheezy 7.2 updates didn't change libtag1c2a package itself if I remember right so at least this one should not cause new trouble. but still if you find something let me know to recheck xbian's libtag packages.

Matus
I'm trying to achieve this, and I fear I'm lost. My aim is to install Mopidy on an XBian 1.0Beta2 system (ideally in such a way that Mopidy would send audio via the 3.5mm jack, and xbmc would send audio via the HDMI connection).

I'm not completely new to Linux, but I've mostly been a user, not an administrator. So while I'd be happy to figure things out for myself, I don't really know where to start. I think my basic question is: How do I install the correct libtag version, so that the other steps can go through unhindered? The link provided above doesn't work anymore, but I assume that the correct libtag version can be found somewhere else. How do I go about finding that version? @mk01, in another thread you mention:
Quote:There is one requirement currently and that is that lib tag lilibtag1c2a needs to be installed from XBian repo, not Debian (it is just dummy package).
Could you explain to me what this entails? How do I "install libtag from the xbian repo"?

Also, purely so that I can understand it better: In their detailed how-to posting, the user @rndl suggests to install the needed gstreamer packages via yum, and the mopidy packages via apt-get. Why make that difference? Is it important?

In case it helps to understand my situation, here is what I tried:
Terminal

root@xbian:~# wget -q -O - http://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
OK
root@xbian:~# sudo wget -q -O /etc/apt/sources.list.d/mopidy.list http://apt.mopidy.com/mopidy.list
root@xbian:~# apt-get clean
root@xbian:~# apt-get update
...
Reading package lists... Done
root@xbian:~# apt-get install mopidy
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mopidy : Depends: gstreamer0.10-plugins-good but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@xbian:~# apt-get install gstreamer0.10-plugins-good
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
gstreamer0.10-plugins-good : Depends: libtag1c2a (>= 1.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Thanks in advance for your help!
(8th Dec, 2013 10:58 PM)Thorsten Frank Wrote: [ -> ]The following packages have unmet dependencies:
gstreamer0.10-plugins-good : Depends: libtag1c2a (>= 1.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
[/term]

Thanks in advance for your help!

The libtag package was available here: http://ivka57.dyndns-ip.com/others/ but there's nothing to find there now. Does anyone has got a backup, I'm not able to find it!
(10th Dec, 2013 04:40 AM)kikkeraap Wrote: [ -> ]
(8th Dec, 2013 10:58 PM)Thorsten Frank Wrote: [ -> ]The following packages have unmet dependencies:
gstreamer0.10-plugins-good : Depends: libtag1c2a (>= 1.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
[/term]

Thanks in advance for your help!

The libtag package was available here: http://ivka57.dyndns-ip.com/others/ but there's nothing to find there now. Does anyone has got a backup, I'm not able to find it!

I don't have access to my Xbian installation right now, but I remember there exists a package libtag1c2a that's available via apt-get. To verify, do an "apt-cache search libtag". However, trying to install this fails with unresolved dependencies, and I didn't want to blindly meddle any further at this point, because I don't understand the connections between the various involved packages, metapackages, and the interactions between debian and xbian / xbmc repos.
For those who cannot figure it out and are to lazy to look themselves. Here is the procedures:
First look at the date I posted this, then if it's not long ago, go ahead.

Keep in mind; stay in /tmp for dpkg to work.

Now we need to hold the package for the time being (until they have a more stable solutions.) or else xbian updates may funky out your system once updated. (i.e.: break your xbian setup?

Terminal
apt-mark hold libtag1c2a

I recommend you guys who do this to continue to monitor the situation, so to avoid missing out on important information. Troubleshooting is so much easier when you know where you should look.

Now follow what trinket wrote further up, I'd use apt-get where he wrote yum. But that's me Smile

Enjoy!
I've been trying to set this up, so far a couple of points to add:

Make sure to do
Terminal
apt-get install mopidy-spotify

I found that asound is made in /etc/asound.conf

Despite this I have no audio, with the following error:
Terminal
ERROR Failed to create audio output "alsasink": no element "alsasink"
INFO Interrupted. Exiting...
INFO Stopping Mopidy frontends
INFO Stopping Mopidy core
WARNING Failed to create audio mixer "alsamixer": no element "alsamixer"
INFO Stopping Mopidy backends
I've installed Mopidy with it's Spotify extension but if I want to start playback, Mopidy crashes with following error:

Terminal
FATAL: cannot locate cpu MHz in /proc/cpuinfo

Seems to be a problem with jackd2. Any ideas how to fix it?


// edit:
It's a confirmed bug on launchpad: https://bugs.launchpad.net/ubuntu/+source/jackd2/+bug/1353832

// edit 2:
I've compiled jackd2 by hand but the problem is still there. Sad
Here's what I've did:
Terminal
sudo apt-get install libsamplerate0-dev libasound2-dev libsndfile1-dev
wget https://github.com/jackaudio/jack2/archive/master.zip -O "jack2.master.github.2014-08-20.zip"
unzip ./jack2.master.github.2014-08-20.zip && cd jack2-master
./waf configure --alsa
./waf build
sudo ./waf install

// edit 3:
I tried to bypass jack and use ALSA directly. For this I've installed gstreamer0.10-alsa and set output = alsasink in mopidy.conf.
Mopidy still starts fine but when I want to start the playback it throws:
Code:
ERROR    GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. Debug message: gstplaysink.c(1899): gen_audio_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0
Any help?

// edit 4: SOLUTION
Terminal
sudo modprobe snd_bcm2835

Wink


Conclusion:
Mopidy is running well on Xbian and even plays directly from Spotify. Cool

If someone does still have problems, just call...
(20th Aug, 2014 03:29 AM)josch Wrote: [ -> ]If someone does still have problems, just call...

Care to share a guide on installing from the beggining? I've been trying to install Mopidy with the Spotify extension without success Sad Thanks in advance!
Pages: 1 2
Reference URL's