A mount (or mountpoint) is what we call a URL on the server that a broadcaster or listener can connect to. If a broadcaster connects, they're able to send streaming audio from their encoder. If a listener connects, they'll receive that streaming audio as an HTTP stream. HTTP streams (progressive download) can be played by most web browsers, media players, and mobile devices, and generally has universal compatibility.
If a listener connects to a mount when no broadcaster is connected,
they will receive an HTTP 404 Not Found
error, unless the mount is
configured with a fallback or as a relay.
The following short example configuration declares two mounts, /hifi
and /lofi
,
with limit of 100 listeners on each:
<icecast>
<listen-socket>
<port>8000</port>
<bind-address>0.0.0.0</bind-address> <!-- Listen on all interfaces -->
</listen-socket>
<mount>
<mount-name>/hifi</mount-name>
<username>source</username>
<password>hackme</password> <!-- Change this password -->
<max-listeners>100</max-listeners>
</mount>
<mount>
<mount-name>/lofi</mount-name>
<username>source</username>
<password>hackme</password> <!-- Change this password -->
<max-listeners>100</max-listeners>
</mount>
</icecast>
Mount names must begin with a /
, and cannot contain spaces or punctuation.
Dashes and underscores are allowed.
To remove the listener limit from a mount, omit the <max-listeners>
tag
or set the value to 0
.
A mount can be configured to "relay" or mirror an existing stream. This is explained in detail in the Relaying section.
A mount can also be configured to "fallback" to another source, if a broadcaster disconnects. Listeners will be moved to the fallback mount and hear different audio. Full details of how fallbacks work and how to configure them are explained in the Fallbacks section.
A wildcard mount (or "default mount") allows broadcasters to connect to a mountpoint of any name. It can be used to share a common set of credentials across all mounts, or in situations where mountpoints need to change frequently.
The simplest wildcard mount configuration looks like:
<mount>
<mount-name>/*</mount-name> <!-- Indicates it is a wildcard mount -->
<username>source</username>
<password>hackme</password> <!-- Change this password -->
</mount>
Wildcard mounts can use "webhook source authentication" to
require a different set of credentials for each mount. Webhook
authentication lets you specify a URL to which an HTTP POST request is
made when a broadcaster connects. If the response includes the
header specified in the auth_header
option, then the broadcaster is
allowed to connect. If the HTTP request fails, times out, or doesn't include
that header, the broadcaster's connection is rejected.
<!-- Wildcard mount with webhook authentication (HTTPS too!) -->
<mount>
<mount-name>/*</mount-name>
<authentication type="url">
<option name="auth_header" value="icecast-auth-user: 1"/>
<option name="stream_auth" value="https://mywebservice.com/icecast-source-auth"/>
</authentication>
</mount>
For more information on source authentication, including all the POST parameters
passed to the stream_auth
URL, please see Authentication.
Icecast and Icecast-KH use different terminology and syntax to describe wildcard mounts.
In the original Icecast, they're called "default mounts" and marked with the type="default"
mount attribute. In Icecast-KH, they're called "wildcard mounts" and follow the syntax that we
recommend for RSAS.
However, RSAS is compatible with both the original type="default"
syntax from Icecast
and the /*
mount syntax from Icecast-KH. When writing new configurations, we recommend you follow
our documentation above on Wildcard Mounts.
You can impose a limit on the max duration of a listener session by adding the <max-listener-duration>
setting
to your <mount>
section:
<max-listener-duration>3600</max-listener-duration>
The duration specified is in seconds. After that duration, the listener will be kicked. However, the listener is not prevented from reconnecting. Listener Authentication can be used to implement a permanent time limit.