View previous topic :: View next topic |
Author |
Message |
etnoy Apprentice
Joined: 29 Aug 2003 Posts: 255 Location: Västerås, Sweden
|
Posted: Tue Apr 26, 2005 10:03 am Post subject: Simple guide to Icecast2 music broadcasting with MPD |
|
|
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 _________________ The md5sum of the above post is 06280ccd85ef9deb49c336e7945f4b5c
God is dead! - Nietzsche
Nietzsche is dead! -God |
|
Back to top |
|
|
etnoy Apprentice
Joined: 29 Aug 2003 Posts: 255 Location: Västerås, Sweden
|
Posted: Thu Apr 28, 2005 10:10 am Post subject: |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Apr 28, 2005 3:14 pm Post subject: |
|
|
Maybe nobody in the two days since you've posted it is looking for icecast2/MPD info. |
|
Back to top |
|
|
ahlen n00b
Joined: 12 May 2004 Posts: 17 Location: Linköping, Sweden
|
Posted: Sat May 28, 2005 11:26 am Post subject: |
|
|
Very nice guide, exactly what I was looking for. Thank you! |
|
Back to top |
|
|
le_franck Tux's lil' helper
Joined: 04 Nov 2004 Posts: 107 Location: Tübingen (Germany)
|
Posted: Mon Jul 18, 2005 2:33 pm Post subject: |
|
|
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 |
|
|
Sade Guru
Joined: 22 Mar 2005 Posts: 406 Location: Netherlands - Eindhoven
|
Posted: Mon Feb 20, 2006 11:54 am Post subject: |
|
|
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 |
|
|
|