If you ever wanted to broadcast your own voice or a mp3 playlist, here’s the solution for that. When I was exploring about online broadcasting, I found two popular audio broadcasting applications those are Shoutcast (Windows) and Icecast (Linux). In this guide I’ll setup an Icecast server in Ubuntu. The reason why I choose to Linux based setup is because I don’t want to touch any GUI to setup the whole thing. Before you start prepare the basic requirements.
A decent internet connection
First install the required applications.
sudo apt-get update && sudo apt-get install icecast2 darkice ezstream
sudo apt-get install openssh-server screen (If you want to manage the server remotely)
When installing icecast2 package you’ll be asked to change the password. Don’t leave the default password. Change it to something else.
How Streaming Works
There are two type of streaming.
1. Live voice streaming (using Darkice).
2. Streaming a premade mp3 playlist (using ezstream).
- Icecast is the broadcaster which needs to be feeded by another application.
- Darkice will get the line-in and feed into icecast2 in mp3 format.
- ezstream will feed the mp3 playlist into icecast.
Setting up Live Streaming
Create a directory called ‘livestream’ in your home directory
Create config file and paste following code
duration = 0 # duration of encoding, in seconds. 0 means forever
bufferSecs = 1 # size of internal slip buffer, in seconds
reconnect = yes # reconnect to the server(s) if disconnected
device = pulse
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
bitrateMode = vbr # variable bit rate (cbr for constant)
quality = 1.0 # 1.0 is best quality
format = mp3 bitrate = 64 # bitrate
server = localhost # or IP
port = 8000 # port for IceCast2 access
password = PASSWORD # source password to the IceCast2 server
mountPoint = live.mp3 # mount point on the IceCast2 server
Change <PASSWORD> to Icecast server password which we setup while installing icecast.
Save the config file and run the following command.
sudo darkice -c /home/irfad/livestream/
Now open up your web browser and go to
Streaming a Playlist
Create directories in your home directory called ‘mp3streaming’ and ‘mp3store’
mkdir /home/irfad/mp3streaming /home/irfad/mp3store
Now copy all the mp3 files which you want to broadcast into tha mp3store directory.
Create playlist file in mp3stream directory and enter the paths of mp3 files line by line.
Save the playlist and create the config file and paste the codes.
<svrinfodescription>Geek Radio Station</svrinfodescription>
<!-- No advertising on a public YP directory -->
Change the <PASSWORD> to access Icecast server.
Start streaming by typing
ezstream -c /home/irfad/mp3streaming/
Now go to http://localhost:8000/myradio.
To access the live radio from another machine simply change ‘localhost‘ to machines ip address.
I’ve done this already. See it in action www.serendibfm.org
I’ll explain on how to embed the stream in to the websites on next post.4629 Views