mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
ef7242ca02
svn path=/icecast/trunk/icecast/; revision=7900
459 lines
21 KiB
HTML
459 lines
21 KiB
HTML
<?xml version="1.0"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<title>Icecast v2.0 Documentation</title>
|
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
</head>
|
|
<body>
|
|
<div class="boxtest">
|
|
<h1>Icecast 2 Config File</h1>
|
|
<hr id='titlebar' />
|
|
<h3>Overview</h3>
|
|
<p>
|
|
This section will describe each section of the config file and is grouped into the following sections:
|
|
</p>
|
|
<ul>
|
|
<li><a href="#limits">Limits</a></li>
|
|
<li><a href="#authentication">Authentication</a></li>
|
|
<li><a href="#yp">YP Directory Settings</a></li>
|
|
<li><a href="#misc">Misc Server settings</a></li>
|
|
<li><a href="#relay">Relay settings</a></li>
|
|
<li><a href="#mount">Mount Specific settings</a></li>
|
|
<li><a href="#path">File path settings</a></li>
|
|
<li><a href="#log">Logging</a></li>
|
|
<li><a href="#security">Security</a></li>
|
|
</ul>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="limits"></a>
|
|
<h2>Limits</h2>
|
|
<pre>
|
|
<limits>
|
|
<clients>100</clients>
|
|
<sources>2</sources>
|
|
<threadpool>5</threadpool>
|
|
<queue-size>102400</queue-size>
|
|
<client-timeout>30</client-timeout>
|
|
<header-timeout>15</header-timeout>
|
|
<source-timeout>10</source-timeout>
|
|
<burst-on-connect>1</burst-on-connect>
|
|
<burst-size>65536</burst-size>
|
|
</limits>
|
|
</pre>
|
|
<p>This section contains server level settings that, in general, do not need to be changed. Only modify this section if you are know what you are doing.
|
|
</p>
|
|
<h4>clients</h4>
|
|
<div class="indentedbox">
|
|
Total number of concurrent clients supported by the server. Listeners are considered clients, but so is accesses to any static content (i.e. fileserved content) and also any requests to gather stats. These are max *concurrent* connections for the entire server (not per mountpoint).
|
|
</div>
|
|
<h4>sources</h4>
|
|
<div class="indentedbox">
|
|
Maximum number of connected sources supported by the server.
|
|
</div>
|
|
<h4>threadpool</h4>
|
|
<div class="indentedbox">
|
|
This is the number of threads that are started to handle client connections. You may need to increase this value if you are running a high traffic stream. This recommended value is for a small to medium traffic server.
|
|
</div>
|
|
<h4>queue-size</h4>
|
|
<div class="indentedbox">
|
|
This is the maximum size (in bytes) of a client (listener) queue. A listener may temporarily lag behind due to network congestion and in this case an internal queue is maintained for each listener. If the queue grows larger than this config value, then the listener will be removed from the stream.
|
|
</div>
|
|
<h4>client-timeout</h4>
|
|
<div class="indentedbox">
|
|
This does not seem to be used.
|
|
</div>
|
|
<h4>header-timeout</h4>
|
|
<div class="indentedbox">
|
|
The maximum time (in seconds) to wait for a request to come in once the client has made a connection to the server. In general this value should not need to be tweaked.
|
|
</div>
|
|
<h4>source-timeout</h4>
|
|
<div class="indentedbox">
|
|
If a connected source does not send any data within this timeout period (in seconds), then the source connection will be removed from the server.
|
|
</div>
|
|
<h4>burst-on-connect</h4>
|
|
<div class="indentedbox">
|
|
With this enabled, a connecting client will be sent a burst of audio data from the stream. This will have the effect of reducing the startup time for the stream from the perspective of the listener. This is due to the fact that most media players have local buffers that must be filled before the stream begins to play. This may introduce a small latency in the stream (difference in time between when the source plays a clip and the listener hears a clip). If this latency is important to you, then you can disable this feature. The latency is bitrate-dependent, but as an example, for a 128kbps stream, the latency between the source and the player is ~ 1.5 secs WITHOUT burst on connect, and WITH burst on connect the latency is 3 secs.
|
|
</div>
|
|
<h4>burst-size</h4>
|
|
<div class="indentedbox">
|
|
The burst size is the amount of data (in bytes) to burst to a client at connection time. Like
|
|
burst-on-connect, this is to quickly fill the pre-buffer used by media players. The default
|
|
is 64kbytes which is a typical size used by most clients so changing it is not usually required.
|
|
This setting applies to all mountpoints.
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="authentication"></a>
|
|
<h2>Authentication</h2>
|
|
<pre>
|
|
<authentication>
|
|
<source-password>hackme</source-password>
|
|
<relay-password>hackme</relay-password>
|
|
<admin-user>admin</admin-user>
|
|
<admin-password>hackme</admin-password>
|
|
</authentication>
|
|
</pre>
|
|
<p>This section contains all the users and passwords used for administration purposes or to connect sources and relays.
|
|
</p>
|
|
<h4>source-password</h4>
|
|
<div class="indentedbox">
|
|
The unencrypted password used by sources to connect to icecast2. Currently, the username for all source connections must be 'source'. This is likely to change in the future.
|
|
</div>
|
|
<h4>relay-password</h4>
|
|
<div class="indentedbox">
|
|
Currently not used.
|
|
</div>
|
|
<h4>admin-user</h4>
|
|
<h4>admin-password</h4>
|
|
<div class="indentedbox">
|
|
The username/password used for all administration functions. This includes retrieving statistics, accessing the web-based administration screens, etc. A list of these functions can be found in the "Administration" section of the manual.
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="yp"></a>
|
|
<h2>YP Directory Settings</h2>
|
|
<pre>
|
|
<directory>
|
|
<yp-url-timeout>15</yp-url-timeout>
|
|
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
|
|
</directory>
|
|
</pre>
|
|
<p>This section contains all the settings for listing a stream on any of the Icecast2 YP Directory servers. Multiple occurances of this section can be specified in order to be listed on multiple directory servers.
|
|
</p>
|
|
<h4>yp-url-timeout</h4>
|
|
<div class="indentedbox">
|
|
This value is the maximum time icecast2 will wait for a response from a particular directory server. The recommended value should be sufficient for most directory servers.
|
|
</div>
|
|
<h4>yp-url</h4>
|
|
<div class="indentedbox">
|
|
The URL which icecast2 uses to communicate with the Directory server. The value for this setting is provided by the owner of the Directory server.
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="misc"></a>
|
|
<h2>Misc Server Settings</h2>
|
|
<pre>
|
|
<hostname>localhost<hostname>
|
|
|
|
<-- You can use these two if you only want a single listener -->
|
|
<-- <port>8000</port> -->
|
|
<-- <bind-address>127.0.0.1</bind-address> -->
|
|
|
|
<-- You may have multiple <listen-socket> elements -->
|
|
<listen-socket>
|
|
<port>8000</port>
|
|
<bind-address>127.0.0.1</bind-address>
|
|
</listen-socket>
|
|
|
|
<fileserve>1</fileserve>
|
|
</pre>
|
|
<p>This section contains miscellaneous server settings. Note that multiple listen-socket sections may be configured in order to have icecast2 listen on multiple network interfaces. If a bind-address is not specified for a particular listen-socket, then the hostname parameter will be used to specify the address that will be bound.
|
|
</p>
|
|
<h4>port</h4>
|
|
<div class="indentedbox">
|
|
The TCP port that will be used to accept client connections.
|
|
</div>
|
|
<h4>bind-address</h4>
|
|
<div class="indentedbox">
|
|
And option IP address that can be used to bind to a specific network card. If not supplied, then <hostname> will be used.
|
|
</div>
|
|
<h4>fileserve</h4>
|
|
<div class="indentedbox">
|
|
This flag turns on the icecast2 fileserver from which static files can be served. All files are served relative to the path specified in the <paths><webroot> configuration setting.
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="relay"></a>
|
|
<h2>Relay Settings</h2>
|
|
<pre>
|
|
<master-server>127.0.0.1</master-server>
|
|
<master-server-port>8001</master-server-port>
|
|
<master-update-interval>120</master-update-interval>
|
|
<master-password>hackme</master-password>
|
|
|
|
<relay>
|
|
<server>127.0.0.1</server>
|
|
<port>8001</port>
|
|
<mount>/example.ogg</mount>
|
|
<local-mount>/different.ogg</local-mount>
|
|
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
|
|
</relay>
|
|
</pre>
|
|
<p>This section contains the server's relay settings. There are two types of relays: a "Master server relay" or a "Specific Mountpoint relay." A Master server relay is only supported between icecast2 servers and is used to relays all mountpoints on a remote icecast2 server.
|
|
</p>
|
|
<h3>Master Relay</h3>
|
|
<p>
|
|
The following diagram shows the basics of doing a Master relay. Note that Server 1 is configured with the <master-server>, <master-server-port>, etc settings and Server 2 is the server from which Server 1 will pull all attached mountpoints and relay them. Using a Master Server relay, ALL mountpoints on Server 2 will be relayed. If only specific mountpoints need to be relayed, then you must configure Server 1 as a "Specific Mountpoint Relay". Both Master server relays and Specific Mountpoint relays begin their "relaying" when the Server is started.
|
|
</p>
|
|
<pre>
|
|
|-----| |-----|
|
|
| | all mountpoints | | /mount1
|
|
| | <------------------- | | /mount2.ogg
|
|
|-----| |-----| /mount3
|
|
Icecast 2 Icecast 2
|
|
Server 1 Server 2
|
|
(RELAY SERVER) (MASTER SERVER)
|
|
|
|
configured with
|
|
<master-server>
|
|
settings
|
|
|
|
</pre>
|
|
<p>
|
|
A server is configured as a Master Server relay by specifying the <master-server>, <master-server-port>,<master-update-interval>,<master-password> values in the config file. The server that is being relayed does not need any special configuration.
|
|
</p>
|
|
|
|
<h4>master-server</h4>
|
|
<div class="indentedbox">
|
|
This is the IP for the server which contains the mountpoints to be relayed (Master Server).
|
|
</div>
|
|
<h4>master-server-port</h4>
|
|
<div class="indentedbox">
|
|
This is the TCP Port for the server which contains the mountpoints to be relayed (Master Server).
|
|
</div>
|
|
<h4>master-update-interval</h4>
|
|
<div class="indentedbox">
|
|
The interval (in seconds) that the Relay Server will poll the Master Server for any new mountpoints to relay.
|
|
</div>
|
|
<h4>master-password</h4>
|
|
<div class="indentedbox">
|
|
This is the admin password on the Master server. It is used to query the server for a list of mountpoints to relay.
|
|
</div>
|
|
<br />
|
|
<h3>Specific Mountpoint Relay</h3>
|
|
The following diagram shows the basics of doing a Specific Mountpoint relay. Note that Server 1 is configured with the <relay> settings and Server 2 is the server from which Server 1 will pull the specified mountpoint(s) and relay them. Using a Specific Mountpoint Relay, only those mountpoints specified on Server 1 will be relayed from Server 2.
|
|
|
|
<pre>
|
|
|-----| |-----|
|
|
| | /mount3 | | /mount1
|
|
| | <------------------- | | /mount2.ogg
|
|
|-----| |-----| /mount3
|
|
Icecast 2 Icecast 2/Shoutcast/Icecast
|
|
Server 1 Server 2
|
|
(RELAY SERVER) (REMOTE SERVER)
|
|
|
|
configured with
|
|
<relay>
|
|
settings
|
|
|
|
</pre>
|
|
|
|
Specific Mountpoint Relays can be configured to relay from an Icecast 2 server, as well as Icecast 1.x and Shoutcast.
|
|
A server is configured as a Specific Mountpoint Server relay by specifying a <relay> XML chunk in the config file for each mountpoint to be relayed. The server that is being relayed does not need any special configuration.
|
|
|
|
<pre>
|
|
<relay>
|
|
<server>127.0.0.1</server>
|
|
<port>8001</port>
|
|
<mount>/example.ogg</mount>
|
|
<local-mount>/different.ogg</local-mount>
|
|
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
|
|
</relay>
|
|
</pre>
|
|
|
|
|
|
<h4>server</h4>
|
|
<div class="indentedbox">
|
|
This is the IP for the server which contains the mountpoint to be relayed.
|
|
</div>
|
|
<h4>port</h4>
|
|
<div class="indentedbox">
|
|
This is the TCP Port for the server which contains the mountpoint to be relayed.
|
|
</div>
|
|
<h4>mount</h4>
|
|
<div class="indentedbox">
|
|
The mountpoint located on the remote server. If you are relaying a shoutcast stream, this must be '/'.
|
|
</div>
|
|
<h4>local-mount</h4>
|
|
<div class="indentedbox">
|
|
The name to use for the local mountpoint. This is what the mount will be named on the RELAY SERVER.
|
|
</div>
|
|
<h4>relay-shoutcast-metadata</h4>
|
|
<div class="indentedbox">
|
|
If you are relaying a Shoutcast stream, you need to specify this indicator to also relay the metadata (song titles) that is part of the Shoutcast stream (1=enabled, 0=disabled).
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="mount"></a>
|
|
<h2>Mount Specific Settings</h2>
|
|
<pre>
|
|
<mount>
|
|
<mount-name>/example-complex.ogg</mount-name>
|
|
<username>othersource</username>
|
|
<password>hackmemore</password>
|
|
<max-listeners>1</max-listeners>
|
|
<dump-file>/tmp/dump-example1.ogg</dump-file>
|
|
<fallback-mount>/example2.ogg</fallback-mount>
|
|
<fallback-override>1</fallback-override>
|
|
<burst-size>65536</burst-size>
|
|
<authentication type="htpasswd">
|
|
<option name="filename" value="myauth"/>
|
|
<option name="allow_duplicate_users" value="0"/>
|
|
</authentication>
|
|
|
|
</mount>
|
|
</pre>
|
|
<p>This section contains settings which apply only to a specific mountpoint. Within this section you can reserve a specific mountpoint and set a source username/password for that mountpoint (not yet implemented) as well as specify individual settings which will apply only to the supplied mountpoint.
|
|
</p>
|
|
<h4>mount-name</h4>
|
|
<div class="indentedbox">
|
|
The name of the mount point for which these settings apply.
|
|
</div>
|
|
<h4>username</h4>
|
|
<div class="indentedbox">
|
|
An optional value which will set the username that a source must use to connect using this mountpoint.
|
|
</div>
|
|
<h4>password</h4>
|
|
<div class="indentedbox">
|
|
An optional value which will set the password that a source must use to connect using this mountpoint.
|
|
</div>
|
|
<h4>max-listeners</h4>
|
|
<div class="indentedbox">
|
|
An optional value which will set the maximum number of listeners that can be attached to this mountpoint.
|
|
</div>
|
|
<h4>dump-file</h4>
|
|
<div class="indentedbox">
|
|
An optional value which will set the filename which will be a dump of the stream coming through on this mountpoint.
|
|
</div>
|
|
<h4>fallback-mount</h4>
|
|
<div class="indentedbox">
|
|
This specifies a mountpoint that is used in the case of a source disconnect. If listeners are connected to the mount specified by the <mount-name> config value, then if the source is disconnected; all currently connected clients will be moved to the fallback-mount.
|
|
</div>
|
|
<h4>fallback-override</h4>
|
|
<div class="indentedbox">
|
|
When enabled, this allows a connecting source client or relay on this mountpoint to move
|
|
listening clients back from the fallback mount.
|
|
</div>
|
|
<h4>burst-size</h4>
|
|
<div class="indentedbox">
|
|
This optional setting allows for providing a burst size which overrides the default burst size
|
|
as defined in limits. The value is in bytes.
|
|
</div>
|
|
<h4>authentication</h4>
|
|
<div class="indentedbox">
|
|
This specifies that the named mount point will require listener authentication. Currently, we only support a file-based authentication scheme (type=htpasswd). Users and encrypted password are placed in this file (separated by a :) and all requests for this mountpoint will require that a user and password be supplied for authentication purposes. These values are passed in via normal HTTP Basic Authentication means (i.e. http://user:password@stream:port/mountpoint.ogg). Users and Passwords are maintained via the web admin interface. A mountpoint configured with an authenticator will display a red key next to the mount point name on the admin screens. You can read more about listener authentication <a href="icecast2_listenerauth.html">here</a>.
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="path"></a>
|
|
<h2>Path Settings</h2>
|
|
<pre>
|
|
<paths>
|
|
<basedir>./</basedir>
|
|
<logdir>./logs</logdir>
|
|
<pidfile>./icecast.pid</pidfile>
|
|
<webroot>./web</webroot>
|
|
<adminroot>./admin</adminroot>
|
|
<alias source="/foo" dest="/bar"/>
|
|
</paths>
|
|
</pre>
|
|
<p>This section contains paths which are used for various things within icecast. All paths should not end in a '/'.
|
|
</p>
|
|
<h4>basedir</h4>
|
|
<div class="indentedbox">
|
|
This path is used in conjunction with the chroot settings, and specified the base directory that is chrooted to when the server is started. This feature is not supported on win32.
|
|
</div>
|
|
<h4>logdir</h4>
|
|
<div class="indentedbox">
|
|
This path specifies the base directory used for logging. Both the error.log and access.log will be created relative to this directory.
|
|
</div>
|
|
<h4>pidfile</h4>
|
|
<div class="indentedbox">
|
|
This pathname specifies the file to write at startup and to remove at normal shutdown. The file contains the process id of the icecast process. This could be read and used for sending signals icecast.
|
|
</div>
|
|
<h4>webroot</h4>
|
|
<div class="indentedbox">
|
|
This path specifies the base directory used for all static file requests. This directory can contain all standard file types (including mp3s and ogg vorbis files). For example, if webroot is set to /var/share/icecast2, and a request for http://server:port/mp3/stuff.mp3 comes in, then the file /var/share/icecast2/mp3/stuff.mp3 will be served.
|
|
</div>
|
|
<h4>adminroot</h4>
|
|
<div class="indentedbox">
|
|
This path specifies the base directory used for all admin requests. More specifically, this is used to hold the XSLT scripts used for the web-based admin interface. The admin directory contained within the icecast distribution contains these files.
|
|
</div>
|
|
<h4>alias source="/foo" dest="/bar"</h4>
|
|
<div class="indentedbox">
|
|
Aliases are used to provide a way to create multiple mountpoints that refer to the same mountpoint.
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<a name="log"></a>
|
|
<h2>Logging Settings</h2>
|
|
<pre>
|
|
<logging>
|
|
<accesslog>access.log</accesslog>
|
|
<errorlog>error.log</errorlog>
|
|
<loglevel>4</loglevel> <-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
|
|
</logging>
|
|
</pre>
|
|
<p>This section contains information relating to logging within icecast. There are two logfiles currently generated by icecast, an error.log (where all log messages are placed) and an access.log (where all stream/admin/http requests are logged).
|
|
</p>
|
|
<p>Note that on non-win32 platforms, a HUP signal can be sent to icecast in which the log files are re-opened for appending giving the ability move/remove the log files.
|
|
</p>
|
|
<h4>accesslog</h4>
|
|
<div class="indentedbox">
|
|
Into this file, all requests made to the icecast2 will be logged. This file is relative to the path specified by the <logdir> config value.
|
|
</div>
|
|
<h4>errorlog</h4>
|
|
<div class="indentedbox">
|
|
All icecast generated log messages will be written to this file. If the loglevel is set too high (Debug for instance) then this file can grow fairly large over time. Currently, there is no log-rotation implemented.
|
|
</div>
|
|
<h4>loglevel</h4>
|
|
<div class="indentedbox">
|
|
Indicates what messages are logged by icecast. Log messages are categorized into one of 4 types, Debug, Info, Warn, and Error.<br /><br />The following mapping can be used to set the appropraite value :
|
|
<ul>
|
|
<li>loglevel = 4 - Debug, Info, Warn, Error messages are printed</li>
|
|
<li>loglevel = 3 - Info, Warn, Error messages are printed</li>
|
|
<li>loglevel = 2 - Warn, Error messages are printed</li>
|
|
<li>loglevel = 1 - Error messages only are printed</li>
|
|
</ul>
|
|
</div>
|
|
<br />
|
|
<a name="security"></a>
|
|
<h2>Security Settings</h2>
|
|
<pre>
|
|
<security>
|
|
<chroot>0</chroot>
|
|
<changeowner>
|
|
<user>nobody</user>
|
|
<group>nogroup</group>
|
|
</changeowner>
|
|
</security>
|
|
</pre>
|
|
<p>This section contains configuration settings that can be used to secure the icecast server by performing a chroot to a secured location. This is currently not supported on win32.
|
|
</p>
|
|
<h4>chroot</h4>
|
|
<div class="indentedbox">
|
|
An indicator which specifies whether a chroot() will be done when the server is started. The chrooted path is specified by the <basedir> configuration value.
|
|
</div>
|
|
<h4>changeowner</h4>
|
|
<div class="indentedbox">
|
|
This section indicates the user and group that will own the icecast process when it is started. These need to be valid users on the system.
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|