The ices 2 configuration file is in XML format, which is described in detail below. There are some sample XML files provided in the distribution under the conf directory which show the main way ices is used.
live audio streaming, takes audio from the soundcard which can be captured from say the Mic, line-In, CD or a combination of these.
Playlist audio streaming, takes pre-encoded Ogg Vorbis files and either sends them as-is or re-encodes them to different settings
<?xml version="1.0"?>
<ices>
general settings
stream section
</ices>
These apply to IceS as a whole. The example below gives a useful example to work to
<background>0</background>
<logpath>/var/log/ices</logpath>
<logfile>ices.log</logfile>
<logsize>2048</logsize>
<loglevel>3</loglevel>
<consolelog>0</consolelog>
<pidfile>/var/log/ices/ices.pid</pidfile>
This describes how the input and outgoing streams are configured.
<stream>
Metadata
Input
Instance
</stream>
<metadata>
<name>My Stream</name>
<genre>Rock</genre>
<description>A short description of your stream</description>
<url>http://mysite.org</url>
</metadata>
This section describes what metadata information is passed in the headers at connection time to icecast. This applies to each instance defined within the stream section but maybe overridden by a per-instance <metadata> section.
This section deals with getting the audio data into IceS. There are a few ways that can happen. Typically it's either from a playlist or via a soundcard.
The layout is consistent between the different input modules. Within the input section a module tag is needed to identify the module in question. The rest are made up of param tags specific to the module. There can be several param tags supplied to a module. Details of the module parameters are shown later.
Multiple instances can be defined to allow for multiple encodings, this is useful for encoding the same input to multiple bitrates. Each instance defines a particular set actions that occur on the passed in audio. Any modifications to the input data is isolated to the instance.
<instance>
hostname
port
password
mount
yp
resample
downmix
savefile
encode
</instance>
<resample>
<in-rate>44100</in-rate>
<out-rate>22050</out-rate>
</resample>
When encoding or re-encoding, there is a point where you take PCM audio and encode to Ogg Vorbis. In some situations a particular encoded stream may require a lower samplerate to achieve a lower bitrate. The resample will modifiy the audio data before it enters the encoder, but does not affect other instances.
The most common values used are 48000, 44100, 22050 and 11025, and is really only used to resample to a lower samplerate, going to a higher rate serves no purpose within IceS.
<downmix>1</downmix>
<savefile>/home/ices/dump/stream1.ogg</savefile>
<encode>
<quality>0</quality>
<nominal-bitrate>65536</nominal-bitrate>
<maximum-bitrate>131072</maximum-bitrate>
<minimum-bitrate>-1</minimum-bitrate>
<managed>0</managed>
<samplerate>22050</samplerate>
<channels>1</channels>
<flush-samples>11000</flush-samples>
</encode>
quality
nominal-bitrate
managed
maximum-bitrate
minimum-bitrate
samplerate
channels
flush-samples
Setting this to the same value as the encode samplerate will mean that a page per second is sent, if a value that is half of the encoded samplerate is specified then 2 ogg pages per second are sent.