Skip to content
Lieven Hollevoet edited this page Sep 22, 2014 · 1 revision

Table of Contents

Xmms multimedia install on fc6

(fc7 is current as of this document, I usually am on the previous stable release with updates) This should be similar for other distributions using their tools apt-get emerge ....

Many distributions have dropped xmms from the main distribution, you may need to seek out alternative repositories, or if your brave/foolish/smart enough, compile it from the sources from http://www.xmms.org/

getting the core pieces

packages needed (through yum install) code yum install xmms xmms-devel xmms-mp3 code

and the perl module (through cpan install) code

  1. cpan
>install Xmms code

Depreciated: Opton 1 for icecast serving - xmms-liveice

NOTE: liveice xmms component may need to be built for other distributions, the current homepage is at http://web.arm.ac.uk/%7Espm/software/liveice.html This will work with icecast1X versions, 2x (current) versions will require patches to either icecast or xmms-liveice

Your mileage will vary depending on many factors, distribution, versions ..... This is valid for Fedora Core 6 (as of 2/2008) code wget http://dl.lcg.ufrj.br/RPMS/myrpms-fc6/lcgrpms/xmms-liveice-1.0.0-4.fc6.lcg.i386.rpm rpm -ivh xmms-liveice-1.0.0-4.fc6.lcg.i386.rpm

yum install icecast

code

Preferred : Option 2 for serving to Icecast1/2 Shoutcast - Darkice

Rather than using the xmms plugin. the best way I find on modern distros is to use Darkice as a connector from your audio output (soundcard output) to Icecast/Shoutcast. The advantage (or disadvantage) is that all the system sounds will be broadcast. On the plus side, you can mix how the sounds go out. For example if you're playing music, you could drop that volume down, and announce over .... As a bounus you can stream from any soundcard in your system, and you can set it up to stream to multiple servers/mountpoints etc in mp3, ogg, or other supported formats

Darkice can be obtained from http://darkice.tyrell.hu/

FC tip when defining the souce device in the config file, remember FC Alsa uses hw:0,0 (default card) Here is a Sample of my darkice configuration file ( change values as necessary) code

 more /etc/darkice.cfg
  1. sample DarkIce configuration file, edit for your needs before using
  2. see the darkice.cfg man page for details
  3. this section describes general aspects of the live streaming session
[general] duration = 0 # duration of encoding, in seconds. 0 means forever bufferSecs = 5 # size of internal slip buffer, in seconds reconnect = yes # reconnect to the server(s) if disconnected
  1. this section describes the audio input that will be streamed
[input]
  1. device = /dev/dsp # OSS DSP soundcard device for the audio input
device = hw:0,0
                                         # OSS DSP soundcard device for the audio input

sampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100 bitsPerSample = 16 # bits per sample. try 16 channel = 2 # channels. 1 = mono, 2 = stereo

  1. this section describes a streaming connection to an IceCast2 server
  2. there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]
  3. these can be mixed with [icecast-x] and [shoutcast-x] sections
[icecast2-0] bitrateMode = abr # average bit rate format = mp3 # format of the stream: ogg vorbis bitrate = 96 # bitrate of the stream sent to the server server = 192.168.0.199
                                        # host name of the server

port = 8010 # port of the IceCast2 server, usually 8000 password = misterhouse # source password to the IceCast2 server mountPoint = stream # mount point of this stream on the IceCast2 server name = Mr Music Man

                                        # name of the stream

description = Misterhouse Jukebox

                                        # description of the stream

url = http://192.168.0.199

                                        # URL related to the stream

genre = my own # genre of the stream public = yes # advertise this stream?

code

Make Life Easier FC style init

Here is an /etc/init.d file I cobbled together from the original icecast init (includes darkice startup too) code

  1. !/bin/sh
  2. icecast This shell script takes care of starting and stopping
  3. the icecast multimedia streaming systen.
  4. chkconfig: - 85 15
  5. description: icecast is a multimedia streaming daemon. It is used to \
  6. relay and offer multimedia streaming content.
  7. processname: icecast
  8. pidfile: /var/run/icecast/icecast.pid
  9. config: /etc/icecast.xml
  10. Source function library.
. /etc/rc.d/init.d/functions

[-x] || exit 0

  1. See how we were called.
case "$1" in
  start)
        # Start daemon.
        echo -n $"Starting icecast streaming daemon: "
        daemon "/usr/bin/icecast -b -c /etc/icecast.xml > /dev/null"
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/icecast
        echo -n $"Starting darkice streaming source daemon: "
        daemon "/usr/bin/darkice&"
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/darkice
        ;;
  stop)
        # Stop daemon.
        echo -n $"Shutting down darkice streaming source daemon: "
        killproc darkice
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/darkice
        echo -n $"Shutting down icecast streaming daemon: "
        killproc icecast
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/icecast
        ;;
  status)
        status icecast
        RETVAL=$?
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  reload)
        echo -n $"Reloading icecast: "
        killproc icecast -HUP
        RETVAL=$?
        echo
        ;;
  condrestart)
        [ -f /var/lock/subsys/icecast ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload}"
        RETVAL=1
        ;;

esac

exit $RETVAL

code and of course you'll need to add it to your rc list chkconfig -add icecast

MisterHouse ini file settings

Adjust according to your setup code mp3_stream_server_port=http://yourServerIPorName:8010/ mp3_playlist_dir=/home/MP3 mp3_playlist_ext=m3u mp3_file_dir=/home/MP3/Music mp3_extension=mp3 mp3_dir=/home/MP3 mp3_program=/usr/bin/xmms

code

-Pete Flaherty

Clone this wiki locally