mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
96 lines
5.4 KiB
HTML
96 lines
5.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Icecast Docs Docs — Relaying</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="assets/css/style.css" media="screen, print" />
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="header">
|
|
<h1><a href="#" title="Home page">Icecast</a> <span>documentation</span></h1>
|
|
</div>
|
|
|
|
<div class="section">
|
|
|
|
<h2>Icecast 2.4.99.1 Docs — Relaying</h2>
|
|
|
|
<div class="article">
|
|
<h3 id="overview">Overview</h3>
|
|
<p>Relaying is the process by which one server mirrors one or more streams from a remote server. The servers
|
|
need not be of the same type (i.e. Icecast can relay from Shoutcast). Relaying is used primarily for large
|
|
broadcasts that need to distribute listening clients across multiple physical machines.</p>
|
|
|
|
</div>
|
|
|
|
<div class="article">
|
|
<h3 id="type-of-relays">Type of Relays</h3>
|
|
<p>There are two types of relays that icecast supports.<br />
|
|
The first type is when both master and slave servers are Icecast 2 servers. In this case, a “master-slave” relay
|
|
can be setup such that all that needs to be done is configure the slave server with the connection information
|
|
(server IP and port) of the master server and the slave will mirror all mountpoints on the master server. The slave
|
|
will also periodically check the master server to see if any new mountpoints have attached and if so will relay those
|
|
as well. </p>
|
|
|
|
<p>The second type of relay is a “single-broadcast” relay. In this case, the slave server is configured with a
|
|
server IP, port and mount and only the mountpoint specified is relayed. In order to relay a broadcast stream on
|
|
a Shoutcast server, you must use the “single-broadcast” relay and specify a mountpoint of <code>/</code>.</p>
|
|
|
|
</div>
|
|
|
|
<div class="article">
|
|
<h3 id="setting-up-a-master-slave-relay">Setting Up a Master-Slave Relay</h3>
|
|
<p>In order to setup a relay of this type both servers (the one you wish to relay and the one doing the relaying)
|
|
need to be Icecast 2 servers. The following configuration snippet is used as an example:</p>
|
|
|
|
<div class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="nt"><master-server></span>192.168.1.11<span class="nt"></master-server></span>
|
|
<span class="nt"><master-server-port></span>8001<span class="nt"></master-server-port></span>
|
|
<span class="nt"><master-update-interval></span>120<span class="nt"></master-update-interval></span>
|
|
<span class="nt"><master-password></span>hackme<span class="nt"></master-password></span></code></pre></div>
|
|
|
|
<p>In this example, this configuration is setup in the server which will be doing the relaying (slave server).
|
|
The master server in this case need not be configured (and actually is unaware of the relaying being performed)
|
|
as a relay. When the slave server is started, it will connect to the master server located at 192.168.1.11:8001
|
|
and will begin to relay all mountpoints connected to the master server. Additionally, every master-update-interval
|
|
(120 seconds in this case) the slave server will poll the master server to see if any new mountpoints have connected,
|
|
and if so, the slave server will relay those as well. Note that the names of the mountpoints on the slave server will
|
|
be identical to those on the master server. </p>
|
|
|
|
</div>
|
|
|
|
<div class="article">
|
|
<h3 id="setting-up-a-single-broadcast-relay">Setting Up a Single-Broadcast Relay</h3>
|
|
<p>In this case, the master server need not be an Icecast 2 server. Supported master servers for a single-broadcast
|
|
relay are Shoutcast, Icecast 1.x, and of course Icecast 2. The following configuration snippet is used as an example:</p>
|
|
|
|
<div class="highlight"><pre><code class="language-xml" data-lang="xml"><span class="nt"><relay></span>
|
|
<span class="nt"><server></span>192.168.1.11<span class="nt"></server></span>
|
|
<span class="nt"><port></span>8001<span class="nt"></port></span>
|
|
<span class="nt"><mount></span>/example.ogg<span class="nt"></mount></span>
|
|
<span class="nt"><local-mount></span>/different.ogg<span class="nt"></local-mount></span>
|
|
<span class="nt"><relay-shoutcast-metadata></span>0<span class="nt"></relay-shoutcast-metadata></span>
|
|
<span class="nt"></relay></span></code></pre></div>
|
|
|
|
<p>In this example, this configuration is also setup in the server which will be doing the relaying (slave server).
|
|
The master server in this case need not be configured (and actually is unaware of the relaying being performed) as a
|
|
relay. When the slave server is started, it will connect to the master server located at 192.168.1.11:8001 and will
|
|
begin to relay only the mountpoint specified (<code>/example.ogg</code> in this case). Using this type of relay, the user can
|
|
override the local mountpoint name and make it something entirely different than the one on the master server.
|
|
Additionally, if the server is a Shoutcast server, then the <code><mount></code> must be specified as <code>/</code>.<br />
|
|
And if you want the Shoutcast relay stream to have metadata contained within it (Shoutcast metadata is embedded
|
|
in the stream itself) then the <code><relay-shoutcast-metadata></code> needs to be set to <code>1</code>.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Support icecast development at <a href="http://icecast.org">icecast.org</a></p>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|