[Tutorial] Setting Up a Basic Online Radio - GNU/Linux

Users browsing this thread: 1 Guest(s)
Joomla12
This is rather simple and can be done on a local network or via an HTTP accessible server. Now, I know that there are way more efficient ways of doing this (there are addons and whatnot floating around for individual media players) but for now, darkice will suffice. You'll also need Pulse since it seems OSS is no longer a standard. You can try drudging through the ALSA or Jack configuration if you'd like.

Code:
wget http://darkice.googlecode.com/files/darkice-1.1.tar.gz
tar xvfz darkice-1.1.tar.gz && cd darkice-1.1
./configure && make && sudo make install

Now you'll need to install Icecast2 on either the local machine or remote server you wish to stream to. Make sure to edit "/etc/icecast2/icecast.xml" and change the passwords. You may also want to reconfigure other stuff here. Once it's setup and you can confirm that it runs properly, you'll need to configure darkice.

Note: You can check if Icecast2 is running by going to localhost:8000 or domain/IP:8000 if you didn't change the default port.

Code:
sudo <editor> /etc/darkice.cfg

Here's a sample configuration file that you are free to use. You may want to edit it just a bit.

Code:
[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

[input]
device          = pulse            # OSS DSP soundcard device for the audio input
sampleRate      = 22050            # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16               # bits per sample. try 16
channel         = 1                # channels. 1 = mono, 2 = stereo

[icecast2-0]
bitrateMode     = cbr              # constant bit rate
format          = mp3
bitrate         = 128              # bitrate of the mp3 stream sent to the server
quality         = 0.8              # encoding quality
server          =                  # host name of the server
                            
port            = 8000             # port of the IceCast server, usually 8000
password        =                  # source password to the IceCast server
mountPoint      = s.mp3            # mount point of this stream on the IceCast server
name            =                  # name of the stream
                            
description     =                  # stream description

genre           =                  # genre of the stream
public          = no               # advertise this stream?

Install pavucontrol, run it, and switch to the "Recording" tab. If darkice is running, you'll be able to set what gets streamed here. If you want to stream what comes off of your sound card, change it to the monitor of your default card. Same goes for any other interface you wish to stream.


Messages In This Thread
[Tutorial] Setting Up a Basic Online Radio - by Joomla12 - 21-08-2012, 02:37 AM