darkice.cfg(5)
π darkice.cfg β the config file for darkice π
okay so this is the darkice.cfg(5) page, like the manpage for the config file that runs DarkIce, the live audio streamer. bestie, this is the whole vibe guide to making darkice do what you want, so buckle up π
πΈ NAME πΈ
darkice.cfg β the configuration file for darkice β¨
π¦ DESCRIPTION π¦
okay so the config file is literally just sections, and inside every section you've got key = value pairs, separated by spaces and/or tabs. that's the whole thing, no cap π
[section1]
# this is a whole line comment
key = value
an ugly key name = long value # this end is a comment too
[section2]
# this is a whole line comment in section 2
key = value
an ugly key name = long value # this end is a comment too
so a proper DarkIce config file has these sections, periodt:
[general][input][icecast-0]β¦[icecast-7][icecast2-0]β¦[icecast2-7][shoutcast-0]β¦[shoutcast-7][file-0]β¦[file-7]
the order of the sections? doesn't matter even a little bit, slay π« but [general] and [input] are required (like, mandatory mandatory), and you need at least one of [icecast-x], [icecast2-x], [shoutcast-x] or [file-x] or else what are you even doing here π
specifically, these are the sections and values that get recognized:
β¨ [general] β¨
this section is the general operational parameters, and yes it's required π
required values:
durationβ how long DarkIce runs, in seconds. if it's0, it runs forever and ever and ever π«ΆbufferSecsβ data read from the sound card gets buffered before it's sent to the encoder. each buffer holds this many seconds of samples.
optional values:
reconnectβ try to reconnect to the server(s) if the connection breaks mid-stream."yes"or"no". (optional, defaults to"yes") πrealtimeβ use POSIX realtime scheduling,"yes"or"no". (optional, defaults to"yes") β±οΈrtprioβ the scheduling priority for the realtime threads. (optional, defaults to4)
π [input] π
this section describes the input, and it's required too β no input, no stream, iykyk πΈ
required values:
deviceβ specifies the device to record from, which can be an OSS DSP device, an ALSA source, a PulseAudio source, or you can use Jack audio:- an OSS DSP audio device to record from (e.g.
/dev/dsp) - an ALSA DSP device name (e.g.
hwplug:0,0) - for PulseAudio, use
"pulseaudio" - the string
'jack', to have an unconnected Jack port, or'jack_auto'to automatically make Jack connect to the first source.
- an OSS DSP audio device to record from (e.g.
sampleRateβ the sample rate to record with, samples per second (e.g.44100for 44.1kHz CD-quality audio,22050for 22kHz or11025for 11kHz) π΅bitsPerSampleβ number of bits to use for each sample (e.g. 8 bits or 16 bits)channelβ number of channels to record (e.g.1for mono,2for stereo)jackClientNameβ the name of the jack input channel created by darkice ifdevice=jackis specified.paSourceNameβ the name of the PulseAudio source to use. it can be"default", an index, or a device string you get from running"pactl list"
π [icecast-x] π
this section is an output to an IceCast 1.3.x server or a Darwin Streaming Server, while encoding with a lame encoder. you can have at most 8 outputs, numbered 0 β¦ 7. the number lives in the section name (e.g. [icecast-0] β¦ [icecast-7]). your stream will be reachable at http://<server>:<port>/<mountPoint> π₯
required values:
bitrateModeβ the bit rate mode of the encoding, either"cbr","abr"or"vbr"β standing for constant bit rate, average bit rate and variable bit (rate, respectively). use thebitrateand/orqualityvalues to specify the details of the appropriate bit rate mode.bitrateβ bit rate to encode to in kBits / sec (e.g.96). only used whencbrorabrbit rate modes are specified.qualityβ the quality of encoding, a value between0.0..1.0(e.g.0.8), with1.0being the highest quality. use a value greater than0.0. only used whencbrorvbrbit rate modes are specified.serverβ the IceCast server's name (e.g.yp.yourserver.com)portβ the port to connect to the IceCast server (e.g.8000)passwordβ the password to use to connect to the IceCast servermountPointβ mount point for the stream on the server
optional values:
sampleRateβ the sample rate of the encoded mp3 output. if not specified, defaults to the value of the input sample rate.channelβ number of channels for the mp3 output (e.g.1for mono,2for stereo). if not specified, defaults to the value of the input sample rate. (yes bestie, the page literally says "sample rate" there, we're just reporting the news π)nameβ name of the streamdescriptionβ description of the streamurlβ url related to the streamgenreβ genre of the streampublicβ"yes"or"no", whether the stream is publicremoteDumpFileβ the file the IceCast server should dump the contents of this stream to on its side.localDumpFileβ dump the same mp3 data sent to the IceCast server to this local file.fileAddDateβ"yes"or"no"if you want to automatically insert a date string in thelocalDumpFilename before its extension, or at the end of the file name if there's no extension presentfileDateFormatβ the date format to use for appending the date to the dump file name. defaults to"[%m-%d-%Y-%H-%M-%S]". all format strings acceptable bystrftime()can be used, see thestrftimeman page for details. only applicable iffileAddDateis"true". ποΈlowpassβ lowpass filter setting for the lame encoder, in Hz. frequencies above the specified value will be cut. if not set or set to0, the encoder's default behaviour is used. if set to-1, the filter is disabled.highpassβ highpass filter setting for the lame encoder, in Hz. frequencies below the specified value will be cut. if not set or set to0, the encoder's default behaviour is used. if set to-1, the filter is disabled.compressionβ compression level of the FLAC encoder. an integer value between0(fast, least compression) and8(slow, most compression). if not set, the encoder's default value (5) is used.
π [icecast2-x] π
this section is an output to an IceCast2 server, while encoding with the ogg vobis encoder. at most 8 outputs, numbered 0 β¦ 7, with the number in the section name (e.g. [icecast2-0] β¦ [icecast2-7]). the stream will be reachable at http://<server>:<port>/<mountPoint> β
DarkIce supports both fixed bitrate and variable bitrate vorbis streams. when you're using fixed bitrate, specify the bitrate with the bitrate field. when you're using variable bitrate, specify the quality of the stream with the quality field, which is a value between 0.0 and 1.0 π«
required values:
formatβ format of the stream sent to the IceCast2 server. supported formats are'vorbis','opus','flac','mp3','mp2','aac'and'aacp'.bitrateModeβ the bit rate mode of the encoding, either"cbr","abr"or"vbr", standing for constant bit rate, average bit rate and variable bit (rate) respectively. use thebitrateand/orqualityvalues to specify the details of the appropriate bit rate mode. Ogg Opus only supports'cbr'and'abr'.bitrateβ bit rate to encode to in kBits / sec (e.g.96). only used whencbrorabrbit rate modes are specified.qualityβ the quality of encoding, a value between0.0..1.0(e.g.0.8), with1.0being the highest quality. use a value greater than0.0. only used whenvbrbit rate mode is specified for Ogg Vorbis format, or invbrandabrmodes for mp3 and mp2 format.serverβ the IceCast2 server's name (e.g.yp.yourserver.com)portβ the port to connect to the IceCast server (e.g.8000)passwordβ the password to use to connect to the IceCast2 servermountPointβ mount point for the stream on the server
optional values:
sampleRateβ the sample rate of the encoded output. if not specified, defaults to the value of the input sample rate. π please note that Ogg Opus only supports 48kHz sample rate, and will resample to this rate.channelβ number of channels for the output (e.g.1for mono,2for stereo). if not specified, defaults to the value of the input sample rate. (again, that's the page's own words, we don't make the rules π) different channels for input and output are only supported for mp3, but not for Ogg Vorbis.maxBitrateβ the maximum bitrate of the stream. only used when incbrmode and in Ogg Vorbis format.nameβ name of the streamdescriptionβ description of the streamurlβ url related to the streamgenreβ genre of the streampublicβ"yes"or"no", whether the stream is publiclocalDumpFileβ dump the same Ogg Vorbis data sent to the IceCast2 server to this local file.fileAddDateβ"yes"or"no"if you want to automatically insert a date string in thelocalDumpFilename before its extension, or at the end of the file name if there's no extension presentfileDateFormatβ the date format to use for appending the date to the dump file name. defaults to"[%m-%d-%Y-%H-%M-%S]". all format strings acceptable bystrftime()can be used, see thestrftimeman page for details. only applicable iffileAddDateis"true".lowpassβ lowpass filter setting for the lame encoder, in Hz. frequencies above the specified value will be cut. if not set or set to0, the encoder's default behaviour is used. if set to-1, the filter is disabled. only has effect if themp3ormp2format is used.highpassβ highpass filter setting for the lame encoder, in Hz. frequencies below the specified value will be cut. if not set or set to0, the encoder's default behaviour is used. if set to-1, the filter is disabled. only has effect if themp3ormp2format is used.
π [shoutcast-x] π
this section is an output to a ShoutCast server, while encoding with a lame encoder. at most 8 outputs, numbered 0 β¦ 7, with the number in the section name (e.g. [shoutcast-0] β¦ [shoutcast-7]). the stream will be reachable at http://<server>:<port-1>/ π§
required values:
bitrateModeβ the bit rate mode of the encoding, either"cbr","abr"or"vbr", standing for constant bit rate, average bit rate and variable bit (rate) respectively. use thebitrateand/orqualityvalues to specify the details of the appropriate bit rate mode.bitrateβ bit rate to encode to in kBits / sec (e.g.96). only used whencbrorabrbit rate modes are specified.
(bestie this is only part 1, there's more coming β don't go anywhere π )
Okay so, still rolling through the server-output values β here's the rest of the lineup, bestie:
qualityβ the quality of encoding, a value between0.0 .. 1.0(e.g.0.8), with1.0being the highest quality. Use a value greater than0.0. Only used whencbrorvbrbit rate modes are specified. β¨serverβ the ShoutCast server's name (e.g.yp.yourserver.com).portβ the source port to connect to the ShoutCast server (e.g.8001).passwordβ the password to use to connect to the ShoutCast server. π
πΈ Optional values πΈ
mountPointβ mount point for the stream on the server. Only works on Darwin Streaming Server; the original Shoutcast server does not support mount points. π«ΆsampleRateβ the sample rate of the encoded mp3 output. If not specified, defaults to the value of the input sample rate.channelβ number of channels for the mp3 output (e.g.1for mono,2for stereo). If not specified, defaults to the value of the input sample rate. (yes, sample rate β that's what it says π )nameβ name of the stream.urlβ url related to the stream.genreβ genre of the stream.publicβ"yes"or"no", whether the stream is public.ircβ IRC information related to the stream.aimβ AIM information related to the stream.icqβ ICQ information related to the stream.lowpassβ lowpass filter setting for the lame encoder, in Hz. Frequencies above the specified value will be cut. If not set or set to0, the encoder's default behaviour is used. If set to-1, the filter is disabled.highpassβ highpass filter setting for the lame encoder, in Hz. Frequencies below the specified value will be cut. If not set or set to0, the encoder's default behaviour is used. If set to-1, the filter is disabled.localDumpFileβ dump the same mp3 data sent to the ShoutCast server to this local file. π§fileAddDateβ"yes"or"no"if you want to automatically insert a date string in thelocalDumpFilename before its extension or at the end of file name if no extension present.fileDateFormatβ the date format to use for appending the date to the dump file name. Defaults to"[%m-%d-%Y-%H-%M-%S]". All format strings acceptable bystrftime()can be used, see thestrftimeman page for details. Only applicable isfileAddDateis"true".
π [file-x] π
This section describes an output to a local file in either Ogg Vorbis or mp3 format. There may be at most 8 outputs, numbered from 0 ... 7. The number is included in the section name (e.g. [file-0] ... [file-7]). π
β¨ Required values β¨
formatβ format to encode in. Must be either'mp3','mp2','vorbis','opus','aac'or'aacp'.bitrateModeβ the bit rate mode of the encoding, either"cbr","abr"or"vbr", standing for constant bit rate, average bit rate and variable bit respectively. Use thebitrateand/orqualityvalues to specify details of the appropriate bit rate mode.bitrateβ bit rate to encode to in kBits / sec (e.g.96). Only used whencbrorabrbit rate modes are specified.qualityβ the quality of encoding, a value between0.0 .. 1.0(e.g.0.8), with1.0being the highest quality. Use a value greater than0.0. Only used whencbrorvbrbit rate modes are specified.fileNameβ the name of the local file to save the encoded data into.
π¦ Optional values π¦
sampleRateβ the sample rate of the encoded mp3 output. If not specified, defaults to the value of the input sample rate. Only used if the output format is mp3.lowpassβ lowpass filter setting for the lame encoder, in Hz. Frequencies above the specified value will be cut. If not set or set to0, the encoder's default behaviour is used. If set to-1, the filter is disabled. Only used if the output format is mp3.highpassβ highpass filter setting for the lame encoder, in Hz. Frequencies below the specified value will be cut. If not set or set to0, the encoder's default behaviour is used. If set to-1, the filter is disabled. Only used if the output format is mp3.
A sample configuration file follows. This file makes DarkIce stream for 1 minute (60 seconds) from the audio device /dev/dsp at 22.05kHz, 16 bit stereo. It will build up a connection to the IceCast server yp.yourserver.com on port 8000 with the password "hackme". The stream will be encoded to 96 kb/s mp3 with quality 0.8, and will be reachable at http://yp.yourserver.com:8000/live96 to mp3 players. The encoding session will be stored by IceCast in the file /tmp/server-dump.mp3 on the server side, and also by DarkIce in the file /tmp/encoder-dump.mp3 on the encoder side. π₯
[general]
duration = 60
bufferSecs = 5
[input]
device = /dev/dsp
sampleRate = 22050
bitsPerSample = 16
channel = 2
[icecast-0]
bitrateMode = cbr
bitrate = 96
quality = 0.8
server = yp.yourserver.com
port = 8000
password = hackme
mountPoint = live96
name = DarkIce trial
description = This is only a trial
url = http://www.yourserver.com
genre = live
public = no
remoteDumpFile = /tmp/server-dump.mp3
localDumpFile = /tmp/encoder-dump.mp3
fileAddDate = no
The following sample configuration file simply encodes the 16 bit stereo 44.1 kHz sound card input into Ogg Vorbis at average bit rate 96 kb/s for 60 seconds, and saves it in the local file at /tmp/save.ogg. πΈ
[general]
duration = 60
bufferSecs = 5
[input]
device = /dev/dsp
sampleRate = 44100
bitsPerSample = 16
channel = 2
[file-0]
format = vorbis
bitrateMode = abr
bitrate = 96
fileName = /tmp/save.ogg
A bit more complicated sample follows. This one makes DarkIce stream for 1 hour (3600 seconds) from the audio device /dev/dsp at 44.1kHz, 16 bit stereo. π
It will build up a connection to an IceCast server yp.your-ice-server.com on port 8000 with the password "ice-hackme". The sound for this stream will be cut at 10500 Hz from above. The stream will be encoded to average bit rate 96 kb/s mp3 and resampled to 22.05kHz and 1 channel (mono). The stream will be reachable at http://yp.your-ice-server.com:8000/live96 to mp3 players. The encoding session will be stored by IceCast in the file /tmp/live96.mp3 on the server side. π¦
It will also connect to a ShoutCast server at yp.your-shout-server.com on port 8001 with the password "shout-hackme" This stream will be encoded to constant bit rate 128 kb/s mp3 with quality 0.8, and will be reachable at http://yp.your-shout-server.com:8000 to mp3 players. π
[general]
duration = 3600
bufferSecs = 5
[input]
device = /dev/dsp
sampleRate = 22050
bitsPerSample = 16
channel = 2
[icecast-0]
sampleRate = 22050
channel = 1
bitrateMode = abr
bitrate = 96
lowpass = 10500
server = yp.your-ice-server.com
port = 8000
password = ice-hackme
mountPoint = live96
name = DarkIce trial
description = This is only a trial
url = http://www.yourserver.com
genre = live
public = yes
remoteDumpFile = /tmp/live96.mp3
[shoutcast-0]
bitrateMode = cbr
bitrate = 128
quality = 0.8
server = yp.your-shout-server.com
port = 8001
password = shout-hackme
name = DarkIce trial
url = http://www.yourserver.com
genre = live
public = yes
irc = irc.yourserver.com
aim = aim here
icq = I see you too
π BUGS π
Lots of bugs. That's it. That's the section. π
π SEE ALSO π
π AUTHOR π
Akos Maroy <darkeye@tyrell.hu>
π LINKS π
- Project homepage:
http://darkice.org/ - IceCast homepage:
http://www.icecast.org/ - ShoutCast homepage:
http://www.shoutcast.com/ - Lame homepage:
http://www.mp3dev.org/mp3/ - Ogg Vorbis homepage:
http://www.xiph.org/ogg/vorbis/ - Ogg Opus homepage:
http://www.opus-codec.org/
π And that's the whole darkice.cfg(5) from DarkIce, dated April 3, 2024 β slay, bye bestie! π
π¦ where this page comes from
- alpine 3.24: darkice-doc 1.6-r0 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms