Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Simple guide to Icecast2 music broadcasting with MPD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
etnoy
Apprentice
Apprentice


Joined: 29 Aug 2003
Posts: 255
Location: Västerås, Sweden

PostPosted: Tue Apr 26, 2005 10:03 am    Post subject: Simple guide to Icecast2 music broadcasting with MPD Reply with quote

Okay, so you've got MPD up and running for weeks, endlessy serving you with musik 24/7, but want to be able to listen to it just anywhere? Then you've come to the right place.

This guide is about configuring you mpd server to broadcast your music like a shoutcast server. The result is an ogg stream that you will be able to listen to from almost any normal music client.

There are some troubles, though. First, all the music will be re-encoded to ogg in MPD before it is sent to Icecast. This means that you will have a lossy compression of your lossy .oggs and .mp3s. If you don't want this, don't read on, but don't be disappointed by the fact that I don't think that there's a better way of doing it for the time being.

Software
You'll need the svn version of mpd provided by the mpd-svn ebuild. Of course, you'll also need Icecast2.
This guide assumes familiarity with mpd, as I won't go into configuring it.

Now, do the following steps.

1. Unmask mpd-svn

2. emerge -C mpd (if you have mpd installed)
3. emerge mpd-svn icecast

Initial configuration
Assuming your box is on example.com, your music will be reached on http://example.com:8000/mpd.ogg.m3u
First, configure mpd.

Add the following lines to /etc/mpd.conf:
Code:

audio_output {
        type            "shout"
        name           "mpdstream"
        host             "localhost"
        port             "8000"
        mount          "/mpd.ogg"
        password     "$password"
        quality         "5.0"

        format          "44100:16:1"

       # Optional Paramters
        user            "source"
        description     "MPD Stream"
        genre            "jazz"
} # end of audio_output

Of course, choose a password, description and genre, but keep the mount name and user as it is.

Now, configure icecast: /etc/icecast2/icecast.xml

Set source-password to the same value as you did in mpd
Code:

 <source-password>$password</source-password>


That's about it. Now start icecast and mpd

/etc/init.d/icecast start
/etc/init.d/mpd start

Open the following URL in your favourite music app (not mpd, of course!) : http://localhost:8000/mpd.ogg.m3u

Listen and enjoy 8)
_________________
The md5sum of the above post is 06280ccd85ef9deb49c336e7945f4b5c

God is dead! - Nietzsche
Nietzsche is dead! -God
Back to top
View user's profile Send private message
etnoy
Apprentice
Apprentice


Joined: 29 Aug 2003
Posts: 255
Location: Västerås, Sweden

PostPosted: Thu Apr 28, 2005 10:10 am    Post subject: Reply with quote

Sure this guide is a bit rough in the current state, but is that a reason for not getting any feedback at all?
_________________
The md5sum of the above post is 06280ccd85ef9deb49c336e7945f4b5c

God is dead! - Nietzsche
Nietzsche is dead! -God
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17813

PostPosted: Thu Apr 28, 2005 3:14 pm    Post subject: Reply with quote

Maybe nobody in the two days since you've posted it is looking for icecast2/MPD info.
Back to top
View user's profile Send private message
ahlen
n00b
n00b


Joined: 12 May 2004
Posts: 17
Location: Linköping, Sweden

PostPosted: Sat May 28, 2005 11:26 am    Post subject: Reply with quote

Very nice guide, exactly what I was looking for. Thank you!
Back to top
View user's profile Send private message
le_franck
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2004
Posts: 107
Location: Tübingen (Germany)

PostPosted: Mon Jul 18, 2005 2:33 pm    Post subject: Reply with quote

I did all that, but when I click the link I get a "connection refused" message in firefox and a "could not connect to localhost" message if I try to open it with xmms. I checked both mpd.conf and icecast.xml but I can't find anything wrong. Any idea what that can be ?
Back to top
View user's profile Send private message
Sade
Guru
Guru


Joined: 22 Mar 2005
Posts: 406
Location: Netherlands - Eindhoven

PostPosted: Mon Feb 20, 2006 11:54 am    Post subject: Reply with quote

sorry to be opening this old post, but i'm getting this error, and ive been searchin to resolve it for a long time and now i'm grasping at strohalms.

Code:
problem opening connection to shout server localhost:8000 (attempt 1): Socket error

_________________
| 1.6Ghz atom N270 | adopt an unanswerd post | a nice way to post a config file |
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum