Menu ▾ ▴

Configure_stations

ZXED

Configure Stations

You must create a single INI file for each station that you are going to run. In order for the station to be loaded at the server startup, you'll have to write the path to station's INI file in the main configuration file in the [stations] section (see above).

MesonCast installers create one INI file in APP_DIR/stations/station.ini for Windows or /Library/Application Support/mesoncast/stations/station.ini automatically. You may use this file as a template. If this file doesn't exist, then you must either create station INI files by yourself or by renaming APP_DIR/stations/station.ini.template (from sources archive).

There are some possible caveats regarding INI files used by MesonCast. Read more in "Configure the app" article.

Sections

Below is how the whole process of transmission goes. All operations are performed on fly.

  1. The source files are decoded into a RAW PCM data using settings in [sound] section.
  2. This RAW PCM data is resampled (if needed) using settings in [mixer] section.
  3. Resampled PCM data is encoded to an actual radio stream (e. g. MP3) using settings in [encoder] section.
  4. Encoded radio stream is transmitted to all connected clients using settings in [transmitter] section.

Below is a list of sections in station INI file and their respective parameters. Note, that almost all parameters in this configuration file are optional. If you're running only one station, then the only required section is [files]. If you're running more than one station, then you must also specify TRANSMITTER.port at least. Bold values in "Valid values" column are default.

If you don't understand what does any particular option mean, then leave it untouched! There is no foolproof protection here!

[files]

Here you must specify files and/or directories to be loaded, one per line in the following format:

<file_ID>=<path to file or directory>

File ID doesn't really matter for now, though. If a relative path is specified, then it will be relative to this INI file.

The path can contain any of the following:

  • Any supported music file: *.MO3, *.IT, *.XM, *.S3M, *.MTM, *.MOD, *.UMX, *.MP3, *.MP2, *.MP1, *.OGG, *.WAV, *.AIFF
  • Any other music format, which is supported by loaded plugins
  • Playlist in any of these supported formats: ASX, M3U, XSPF, PLS or WPL. Note, that playlist can contain directories and remote streams URLs as well. In case SOUND.playlistsAutoload=true, then playlists can also contain other playlists' filenames. All playlists must be in UTF-8 format.
  • Any remote stream or Internet radio channel, that uses ShoutCast protocol. Internet radio playlist is fine too.
  • Any directory path. In that case MesonCast will load all supported files from that directory recursively. If SOUND.playlistsAutoload=true, then playlists in that directory will also be loaded.

Examples:

singleFile=/media/Teleidofusion/07. Fat Cat Wants Tasty Fish.mp3
playlist=C:/media/playlists/good_stuff.m3u
dir={APP_DIR}/../media/Press Play On Tape/
internet_radio_stream=http://live.nsbradio.co.uk:8904/
internet_radio_playlist=http://s1.voscast.com:7492/listen.pls
cue_sheet=../../Rise of a Digital Nation.cue

[sound]

Param Valid values Description
randomOrder false, true Play tracks in random order.
sampleInterpolation sinc, none, linear Set sample interpolation mode. Only applies to tracker music. Valid values:
sinc - Use sinc interpolated sample mixing. This increases the sound quality, but also requires more processing;
none - Use non-interpolated sample mixing. This generally reduces the sound quality, but can be good for chip-tunes;
linear - linear interpolation
sampleRamping sensitive, normal, none Set sample ramping mode. Only applies to tracker music. Valid values:
normal - smoothen volume/pan changes to avoid "clicks";
sensitive - Same as normal, but will only ramp the start of a sample if it thinks that it would "click" otherwise. This keeps percussive sounds sharp, whereas normal ramping can slightly deaden their impact;none - no ramping is applied.
sampleType normal, 8bits, float32 Set the type of samples. Note: if you set ENGINE.use8bits=true, then you must set sampleType=8bits. Valid values:
float32 - Use 32-bit floating-point sample data;
8bits - Use 8-bit resolution (default, when ENGINE.use8bits=true);
normal - Use 16-bit resolution.
sincPoints 8, 4, 16, 32, 64, 128, 256 When a channel has a different sample rate to what the MIXER is using, the channel's sample data will need to be converted to match the MIXER.outputFrequency. The sinc interpolation is used in that case. This parameter allows you to set the number of points used for sinc interpolation. Resampling quality and CPU usage are increasing with the number of points.
surroundMode none, mode1, mode2 Set surround mode. Only applies to tracker music. Discarded if SOUND.useMono or ENGINE.useMono are set to true. Valid values:
none - do not apply surround effects;
mode1 - apply XMPlay's surround sound to the music;
mode2 - same as mode1, but ignores panning, which is useful if the music's channels are all centered.
trackerEmulation none, fastTracker2, proTracker1 Set tracker emulation mode. Only applies to tracker music. Valid values:
none - play .MOD file as usual;
fastTracker2 - play .MOD file as FastTracker 2 would;
proTracker1 - play .MOD file as ProTracker 1 would.
useMono false, true Use mono output. When ENGINE.useMono=true this option is set to true regardless.
useSoftware false, true Use software for sound processing, else use hardware. Not used in Windows.

[mixer]

Param Valid values Description
outputFrequency 44100, 192000, 96000, 48000, 22050, 16000, 11025, 8000 Output frequency in Hz.
useSoftware false, true Use software for resampling, else use hardware. Not used in Windows.

[encoder]

Param Valid values Description
type lame Encoder type. Currently, only LAME is supported.
chunkDuration any positive integer (default: 5) Number of seconds for encoder to process at a time.
outputBitrate 192, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 Output bitrate in kbps. It is not recommended to use bitrates lower that 128. Also, when using low bitrate, you'll may have to decrease TRANSMITTER.dataBlockLength.
outputQuality any integer in range [0..100] (default: 80) Encoder processing quality. Varies in range 0..100. 100 means maximum quality, but slower encoding.
processPriority normal, lowest, lower, higher, highest Encoder's process priority. Higher priorities can slightly speed up the encoding, but will probably slow down all other apps running, especially on single-processor machines.

[transmitter]

Param Valid values Description
aim anything AIM contact number. This will appear in icy-aim header.
bufferLength any positive integer (default: 15) Internal output buffer in seconds.
controlPassword anything If set, then you can control the station via HTTP requests. See more info at "Control and use stations" article.
dataBlockLength any positive integer Number of bytes in each ShoutCast data block (icy-metaint). Default value:16384
genre anything (default: Unknown) Station music genre. This will appear in icy-genre header.
icq anything ICQ contact number. This will appear in icy-icq header.
irc anything IRC contact number. This will appear in icy-irc header.
isPublic true, false This will appear in icy-pub response. In the current server implementation, this param doesn't mean anything.
maxListeners any positive integer or 0 Maximum number of simultaneously connected clients allowed. Set to zero for no limit.
name any non-empty string (default: Unnamed) Station name. This will appear in icy-name header.
notice1 anything This will appear in icy-notice1 header.
notice2 anything This will appear in icy-notice2 header.
pollInterval any positive integer Polling interval in seconds after which the encoder will process each new chunk. Discarded when useAccurateSendIntervals=true. Default value is calculated as ENCODER.chunkDuration minus 1.
port any valid port number in range of 1..65535 (default: 8000) Station port. You must specify different ports for a different stations.
titleFormat anything (default: %full_title%) Title format for a current track.
%artist% will be replaced with an artist's name;
%title% will be replaced with a track title;
%full_title% will be replaced with "%artist% - %title%" if artist's title is present, otherwise it will be replaced with %title%.
If a title cannot be determined then it will be the current filename without an extension.
url anything Station's URL. This will appear in icy-url header.
useAccurateSendIntervals true, false By default, MesonCast sends data to clients using approximate intervals of time based on bitrate and other parameters. In other words, the tranmission speed from server not exactly equals to a playback speed on client side. Such behavior can lead to buffer underflow/overflow on client side and, as a result, playback corruption. When enableAccurateSendIntervals=true, then MesonCast will use upload speed that exactly matches the playback speed of the audio stream, minimizing chances of above mentioned client-side problems. To use this option, you must set ENGINE.enableAccurateSendIntervals to true.
Default value is what ENGINE.enableAccurateSendIntervals is set to.

When all parameters in station INI file is set, then you can run the application finally.

Also, if you've specified TRANSMITTER.controlPassword, then you're able to control the station using HTTP request. Read more info at "Control and use stations" article.


Related

Wiki: Configure_the_app
Wiki: Control_and_use_stations
Wiki: Home
Wiki: Run_the_app