Install Icecast Server AutoDJ and Live Streaming

Tutorial Install Icecast Server AutoDJ and Live Streaming in Ubuntu 64 Bit

Install Icecast Server With Auto DJ on Ubuntu (Tested)

OS tested using VPS KVM:

1. Install your OS needed

2. If you've finished installing the OS, login to your server via putty dan run this command,

Note : Do not forget toset IP, gateway and DNS your server to be connected to the Internet

3. You need to update and upgrade your OS,

root@radio:~# apt-get update

root@radio:~# apt-get upgrade

4. Install the package that will be needed

root@server:~# apt-get install nano gcc make zip openvpn build-essential pkg-config libxml2-dev icecast2 ezstream
5. After installations finished, we have to configure the icecast2 server, open and edit file /etc/icecast2/icecast.xml
root@radio:~# nano /etc/icecast2/icecast.xml
edit and adjust with the real condition 6. And then restart service the icecast2
root@radio:~# /etc/init.d/icecast2 restart

7. Icecast will run at port 8000, so try to visit http://Server-IP:8000 (E,g http://192.168.2.111:8000 or http://myradiodomain.com:8000)

And you'll get a page like this, that icecast is running on your vps:

8. Install ezstream and there packages needed :

8.a. Need to install libogg :

root@radio:~# wget http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
root@radio:~# tar xf libogg-1.3.1.tar.gz
root@radio:~# cd libogg*
root@radio:~# ./configure
root@radio:~# make && make install

8.b. Need to install libvorbis :

root@radio:~# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
root@radio:~# tar xf libvorbis-1.3.3.tar.gz
root@radio:~# cd libvorbis-1.3.3
root@radio:~# ./configure
root@radio:~# make && make install
8.c. Need to install libshout :
root@radio:~# wget http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz
root@radio:~# tar xf libshout-2.3.1.tar.gz
root@radio:~# cd libshout-2.3.1
root@radio:~# ./configure
root@radio:~# make && make install
8.d. And then install ezstream :
root@radio:~# wget http://downloads.xiph.org/releases/ezstream/ezstream-0.5.6.tar.gz
root@radio:~# tar xf ezstream-0.5.6.tar.gz
root@radio:~# cd ezstream*
root@radio:~# ./configure
root@radio:~# make && make install

9. Make a directory to save playlist :
E.g /home/mp3
root@radio:~# mkdir /home/mp3
10. And then need to create txt file
root@radio:~# nano /home/mp3/playlist.txt
And fill in the name of the song that is
/home/mp3/namefile1.mp3
/home/mp3/namefile.mp3
/home/mp3/namefile.mp3
/home/mp3/namefile.mp3
etc,
Then upload your MP3 files into /home/mp3
11. Configuring ezstream
Copy file ezstream_mp3.xml to /root/
root@radio:~# cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml /root/ezstream_mp3.xml
And edit file /root/ezstream_mp3.xml
root@radio:~# nano /root/ezstream_mp3.xml
And please change as you want/real condition
Then change permision
root@radio:~# chmod 0755 /root/ezstream_mp3.xml
Now run the ezstream by using screen
root@radio:~# screen -S "stream"
root@radio:~# ezstream -c /root/ezstream_mp3.xml
12. To make a autoDJ on fallback mount and live on mount We make 2 mount points. Open and edit file /etc/icecast2/icecast.xml
root@radio:~# nano /etc/icecast2/icecast.xml
Add this code after :
<relay>

---
</relay>
< mount>
< mount-name>/autodj< /mount-name>
< password>my-password< /password>
< max-listeners>500< / max-listeners>
< max-listener-duration>3600< / max-listener-duration>
< dump-file>/tmp/dump-live.mp3< / dump-file>
< intro>< / intro>
< charset>ISO8859-1< / charset>
< public>1< / public>
< stream-name>Radio< / stream-name>
< stream-description> Radio< / stream-description>
< stream-url>http://192.168.2.111:8000/autodj.mp3.m3u< / stream-url>
< genre>Top40< / genre>
< bitrate>64< / bitrate>
< type>application/mp3< / type>
< subtype>mp3< / subtype>
< burst-size>65536< / burst-size>
< mp3-metadata-interval>4096< / mp3-metadata-interval>
< /mount>
< mount>
< mount-name>/live< / mount-name>
< password>my-password< / password>
< max-listeners>500< / max-listeners>
< max-listener-duration>3600< / max-listener-duration>
< dump-file>/tmp/dump-live.mp3< / dump-file>
< intro>< / intro>
< fallback-mount>/autodj< / fallback-mount>
< fallback-override>1< / fallback-override>
< fallback-when-full>1< / fallback-when-full>
< charset>ISO8859-1< / charset>
< public>1< / public>
< stream-name>My Radio Server< / stream-name>
< stream-description>Radio< / stream-description>
< stream-url>http://192.168.2.111:8000/live.mp3.m3u< / stream-url>
< genre>Top40< / genre>
< bitrate>64< / bitrate>
< type>application/mp3< / type>
< subtype>mp3< / subtype>
< burst-size>65536< / burst-size>
< mp3-metadata-interval>4096< / mp3-metadata-interval>
< / mount>
And then save
13. Done (Configure server)
1. Assumptions already have winamp, if not please download and install (http://www.winamp.com/)
2. Install the Edcast DSP Plugin and lame_enc.dll
http://djlab.com/stuff/dj/edcast_winamp_3.1.21.exe
http://djlab.com/stuff/dj/lame_enc.dll (file lame_enc.dll copy to C:\ Program Files(x86)\Winamp)
3. Start Winamp and the Edcast DSP Plugin

In the ‘Basic Settings’ section, set up the encoder.


You should see information about the encoder status in the ‘Transfer Rate’ column.  If it’s working properly, a numeric value will appear indicating the transmission speed.

Notes

You’re now streaming live on the Internet!