Darkice needs a configuration file to be able to stream to an Icecast server. Example configuration files can be found in /usr/share/doc/darkice/examples
but the configuration needs to be adapted to our settings.
A possible configuration can be as follows:
[general]
duration = 0 # duration in s, 0 forever
bufferSecs = 1 # buffer, in seconds
reconnect = yes # reconnect if disconnected
[input]
device = default # `pulse' for Pulseaudio
sampleRate = 44100 # sample rate 11025, 22050 or 44100
bitsPerSample = 16 # bits
channel = 2 # 2 = stereo
[icecast2-0]
bitrateMode = vbr # variable bit rate (`cbr' constant, `abr' average)
quality = 1.0 # 1.0 is best quality
format = mp3 # format. Choose `vorbis' for OGG Vorbis
bitrate = 256 # bitrate
server = localhost # or IP
port = 8000 # port for IceCast2 access
password = hackme # source password to the IceCast2 server
mountPoint = mystream.mp3 # mount point on the IceCast2 server .mp3 or .ogg
name = mystream
Save this file to any location (per default Darkice looks for /etc/darkice.cfg
) and then start Darkice with
darkice -c /path/to/darkice.cfg