Вы находитесь на странице: 1из 3

Configuring icecast audio(mp3) streaming server in linux(Ubuntu)

1. Search about following Topics in google .


a. Icecast server
b. Ogg/vorbis
c. Ices2, ezstream,ices, DarkIce

I. Install dependency packages

a. # sudo apt-get update


b. # sudo apt-get install make zip build-essential screen pkg-config libxml2-dev ezstream

II. Step I-install icecast server

a. # sudo apt-get install icecast2


III. Step II-View icecast2 server configuration file

Now configure icecast by editing the icecast.xml file. First move the original sample file
to an alternate place:

a. # sudo nano /etc/icecast2/icecast.xml


you can set admin password,source password,relay password and icecast server
hostname here (use default values).

b. # sudo nano /etc/default/icecast2


Change ENABLE to true

IV. Step III- start icecast server

a. # sudo /etc/init.d/icecast2 start


Also the icecast server should be reachable via webgui under your given hostname and port,
ex:- http://localhost:8000/

V. Setting up the OGG/Vorbis streaming client: EZSTREAM


Before you can compile ezstream you need the libogg,libvorbis, and libshout library. First
download it:

a. To Install ogg libraries run following commands

# cd /home/bcs3
# wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
# tar -xvzf libogg-1.3.2.tar.gz
# cd libogg-1.3.2
# ./configure
# make
#sudo make install
b. To Install vorbis libraries run following commands

# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz
# tar -xvzf libvorbis-1.3.5.tar.gz
# cd libvorbis-1.3.5
# ./configure
# make
#sudo make install
c. To Install shout libraries run following commands

# wget http://downloads.xiph.org/releases/libshout/libshout-2.4.1.tar.gz
# tar -xvzf libshout-2.4.1.tar.gz
# cd libshout-2.4.1
# ./configure
# make
#sudo make install
d. To stream MP3 files you need a streaming client like ezstraem. To Install ezstream
command line source client run following commands

# wget http://downloads.xiph.org/releases/ezstream/ezstream-0.6.0.tar.gz
# tar -xvzf ezstream-0.6.0.tar.gz
# cd ezstream-0.6.0
# ./configure
# make
#sudo make install
VI. Create a directory for mp3 Files

# cd /home/bcs3
# mkdir mp3
Download sample mp3 files and copy to mp3 folder

VII. Create a mp3 playlist

The playlist is a plain text file and contains all your songs you want to play. Every mp3 file inside this file
must have the full path. Files should be listed like /home/bcs3/mp3/track1.mp3.
# nano /home/bcs3/mp3/playlist.txt

/home/bcs3/mp3/track1.mp3

/home/bcs3/mp3/track2.mp3

VIII. Create ezstraem configuration file

Copy the template confg file for ezstream into the working directory to edit it.
# cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml /home/bcs3/mp3/ezstream_mp3.xml
e. Open ezstream_mp3.xml file and change it as follows.

# nano /home/bcs3/mp3/ezstream_mp3.xml

a.
<url>http://localhost:8000/stream</url>
b.
<filename> /home/bcs3/mp3/playlist.txt </filename>
c.
<stream_ones>0</stream_ones> (for looping playlist)
d.
<svrinfoname>BCS3 Stream</svrinfoname>
e.
<svrinfodescription> BCS3 Stream –Department of Computer
Science</svrinfodescription>
f. Set permission for ezstream

# sudo chmod 0644 /home/bcs3/mp3/ezstream_mp3.xml

IX. Staring the ezstream

Start stream in the background with screen

# sudo screen –S “stream”

# ezstream -c /home/bcs3/mp3/ezstream_mp3.xml

the radio station is ready and available under http://localhost:8000/ Now try to connect to your streaming
server with an audio client and enjoy listening to your radio.

Вам также может понравиться