You are not logged in.

#1 2009-11-07 03:46:39

f3ar007
Member
Registered: 2009-08-18
Posts: 44

[Solved] MPD on the network

Hi.
A few questions first:
I have a sheeva plug which I would like to use as an MPD server.  The sheeva plug does not have an audio device, is it required?  What would be the easiest way to stream from the sheeva plug to, say, my laptop?

Information:
I have MPD 0.15.4 on the debian sheeva plug.  I tried following the guides in the wiki, however, it's not functioning correctly.
When I use a client, ncmpc, on my laptop I can add songs to the playlist but I can not set the volume or play a song -- as it remains paused and crashes MPD when I press 'enter' to play.

Other questions:
will I have to use another app such as icecast to stream this?  is there a preferred way of accomplishing this task?

Thanks for the info!

Last edited by f3ar007 (2009-11-09 12:44:02)

Offline

#2 2009-11-07 03:54:25

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [Solved] MPD on the network

IIRC, you need to use Icecast or similar to stream it. You need to configure your audio output device to use the Icecast server instead of an audio card etc -- there's example config in /etc/mpd.conf

Offline

#3 2009-11-07 03:56:41

f3ar007
Member
Registered: 2009-08-18
Posts: 44

Re: [Solved] MPD on the network

fukawi2 wrote:

IIRC, you need to use Icecast or similar to stream it. You need to configure your audio output device to use the Icecast server instead of an audio card etc -- there's example config in /etc/mpd.conf

Okay, with the icecast server there is a mount point -- and the default is /live.nsv
Should this be the same in /etc/mpd.conf?

**the default mount in /etc/mpd.conf is /mpd.ogg

Last edited by f3ar007 (2009-11-07 03:57:25)

Offline

#4 2009-11-07 04:55:09

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [Solved] MPD on the network

Now streaming music with mpd is simple and you can use the http option in the mpd.conf file. see mpd wiki for more details.

Offline

#5 2009-11-07 05:06:00

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [Solved] MPD on the network

kgas wrote:

Now streaming music with mpd is simple and you can use the http option in the mpd.conf file. see mpd wiki for more details.

i literally just found and set this up, motivated by the OP.  it's working really well, and that's one less service to have running.

Offline

#6 2009-11-07 13:12:05

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] MPD on the network

It needs CPU tho, because every file is reencoded. A workaround is to mount your music folder with cifs/nfs and use a local mpd+client to play.
Or use pulseaudio to stream the sound to your network.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#7 2009-11-07 15:38:40

f3ar007
Member
Registered: 2009-08-18
Posts: 44

Re: [Solved] MPD on the network

Questions:
Does the server need an audio device (the sheevaplug does not have one)?
I can connect to the server (sheevaplug) from the client (lapotp) but everything remains paused.  If I press enter in ncmpc to 'play' the file mpd daemon process crashes on the server.  Is this related to the first question?

Offline

#8 2009-11-07 16:24:33

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] MPD on the network

you dont need sound on the server.
The setup looks like this:

Server:
---------
mpd with configured music path and defined httpd output. Also make sure mpd will listen to the external IP, visible by the client.


Client:
--------
you will need 2 clients to be precise... One to connect to the mpd on your server - this one will start the actual playback of music OR a working ssh session to the server with something like ncmpc)

And a 2nd one (any music player will do - either a complete mpd+client or something small like audacious): with this one you connect to the stream: http://YOUR_SERVER_IP:PORT (8080 is the default i think)
Keep in mind that if you want to use mpd to listen to your stream, you need to set up a 2nd mpd on your client. It does not need a path to your music, since you only use it to playback the stream from the server.


Hope this clears things up.

Last edited by Rasi (2009-11-07 16:25:34)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#9 2009-11-07 20:18:40

f3ar007
Member
Registered: 2009-08-18
Posts: 44

Re: [Solved] MPD on the network

Okay, even with a client such as ncmpc on the server...It will not play volume reads n/a and when I press enter to play the selected song it remains [Paused] Song Title.

Offline

#10 2009-11-08 09:17:25

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] MPD on the network

f3ar007 wrote:

Okay, even with a client such as ncmpc on the server...It will not play volume reads n/a and when I press enter to play the selected song it remains [Paused] Song Title.

In that case try to enable the null ouput device in mpd.conf


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#11 2009-11-08 10:37:48

mvdvarrier
Member
Registered: 2008-10-04
Posts: 47

Re: [Solved] MPD on the network

The embedded  streaming method needs lot of system resources. I have a 40GB music collection. When I tried  mpd streaming in an athlon X2 5200+ with 2GB of RAM it is observed that about 80% of the CPU has been consumed by mpd. (using top). The streaming with VLC also consumes lot of system resources. (I am using only one client, my laptop). With a limited number of clients I think that sharing through samba is the most suitable option. Any one can point out a alternative for this? Thanks in advance.
mvdvarrier


mvdvarrier is a Warrior; Born to Expedite!!!

Offline

#12 2009-11-08 11:00:38

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] MPD on the network

Rasi wrote:

It needs CPU tho, because every file is reencoded. A workaround is to mount your music folder with cifs/nfs and use a local mpd+client to play.
Or use pulseaudio to stream the sound to your network.

big_smile


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#13 2009-11-08 12:34:41

ak-89
Member
From: Finland
Registered: 2008-08-26
Posts: 86
Website

Re: [Solved] MPD on the network

mvdvarrier wrote:

The embedded  streaming method needs lot of system resources. I have a 40GB music collection. When I tried  mpd streaming in an athlon X2 5200+ with 2GB of RAM it is observed that about 80% of the CPU has been consumed by mpd. (using top). The streaming with VLC also consumes lot of system resources. (I am using only one client, my laptop). With a limited number of clients I think that sharing through samba is the most suitable option. Any one can point out a alternative for this? Thanks in advance.
mvdvarrier

I have Athlon XP 3000+ and that embedded http streaming uses only 9-12% of CPU with mp3 stream.

Sshfs is good alternative to samba and nfs, if you have ssh server running on that computer. I use sshfs to share files between my netbook and desktop.

If you use ssh with pubkey auth with no passphrase, you can use pipe output of mpd to stream audio over ssh. Or you can stream audio to fifo-file and from there stream it to other computer with netcat, ssh etc. Default compile time configuration option for pipe output seems to be disabled, it may be unstable and buggy and you have to recompile mpd from ABS to enable it.

//edit: I just noticed there is fifo output too in mpd. I used pipe output to stream to fifo.

Last edited by ak-89 (2009-11-08 16:11:28)

Offline

#14 2009-11-08 15:59:33

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [Solved] MPD on the network

As per this mpd configuration the author confirms the usage of less cpu.

Offline

#15 2009-11-09 12:28:38

f3ar007
Member
Registered: 2009-08-18
Posts: 44

Re: [Solved] MPD on the network

I sucessfully built 0.16~ from the git repo ( on debian squeeze, which is on the sheeva right now ) and this solved the problem.  I was getting a segmentation fault everytime I played a track in 0.15.5. 

However, when I stream via httpd output I get jittery output and I notice cpu usage is ~100% on the sheevaplug.  Though, that only happens when I connect and play hmm

Would a usb audio dongle take stress from the cpu?

Offline

#16 2009-11-09 12:30:41

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] MPD on the network

f3ar007 wrote:

I sucessfully built 0.16~ from the git repo ( on debian squeeze, which is on the sheeva right now ) and this solved the problem.  I was getting a segmentation fault everytime I played a track in 0.15.5. 

However, when I stream via httpd output I get jittery output and I notice cpu usage is ~100% on the sheevaplug.  Though, that only happens when I connect and play hmm

Would a usb audio dongle take stress from the cpu?

A strace output would fit perfectly on mpds bugtracker in such cases smile


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#17 2009-11-09 12:43:34

f3ar007
Member
Registered: 2009-08-18
Posts: 44

Re: [Solved] MPD on the network

@Rasi thanks for the input!

this can be marked as solved

Offline

Board footer

Powered by FluxBB