1

I was trying to follow the instructions here to set up a local audio stream, but when I tried to start Darkice, it gave the error DarkIce: DarkIceConfig.cpp:137: no current section [0] and quit. What does that mean?

Update: ...I didn't copy the config file right. I fixed it, and now it works.

  • I didn't copy the contents of the config file that the tutorial listed correctly. I fixed it and it works now. – Zelda64fan Apr 24 '13 at 19:27
  • Glad you got it working. I wrote an answer anyway to have your question "answered", and to hopefully help other people with this issue. – Takkat Apr 24 '13 at 20:13

1 Answers1

1

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
Takkat
  • 142,284