Subscribe to this blog


I like to listen my music everywhere where I want:wq , not only at the computer . My smart phone has not enough space for all my music and anyway, I don't like to keep the music on my notebooks and my smart phone synchronized. Therefore a own streaming server is the easiest solution. I'll describe here a quick setup which assumes Debian GNU/Linux (or Ubuntu), but can be done on other *nixes as well.

  1. The first step is the installation of Icecast, on Debian or Ubuntu:

    # apt-get install icecast2
    
  2. Then the admin, source and relay-password need to be changed (in the file /etc/icecast2/icecast.xml. On Debian/Ubuntu, you will be automatically prompted for those during the installation.

  3. Verify that the service is up and running by visiting http://localhost:8000.

Icecast is only the service which handles the incoming client connections. The real noise comes from a source which is provided by other programs. One of those is Icegenerator, which will stream mp3 or ogg audio files.

  1. Download the source from http://www.becrux.com/index.php?page=projects&name=icegenerator (where you also find basic instructions on how to set up the program).
  2. Now some dependencies must be installed, on Debian/Ubuntu:

    # apt-get install libshout3-dev libid3-dev
    

    (I hope I haven't forgot one)

  3. In the unpacked source the typical ritual: ./configure; make; make install.

  4. Afterwards, the program is located in /usr/local/etc/icegenerator.conf. There various things can be set like the server where Icecast runs (here 127.0.0.1) or the port. More interesting is to set the mount point, which is the location where your stream becomes available, I chose /listen:

    MOUNT=/listen
    
  5. Then the user name and password to login into the Icecast service need to be set. The password is the one you chose during the Icecast installation.

  6. The format is automatically set to mp3, which you can leave untouched, if you don't want to stream ogg vorbis files.
  7. Now set the path to the audio files and activate recursive search:

    MP3PATH=/path/to/mp3s
    RECURSIVE=1
    
  8. The logging output can be set to a different file path which makes it possible to start Icegenerator as user.

  9. Finally, you can start Icegenerator by invoking /usr/local/bin/icegenerator and enter in your player http://localhost:8000/listen (or the URL which was configured).

I was not able to add path's (MP3PATH) containing spaces. It's simpler to create a separate directory with lots of symlinks to the desired music.



Comments