mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
272 lines
12 KiB
HTML
272 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<link rel="shortcut icon" href="../img/favicon.ico">
|
|
<title>Relaying - Icecast Docs</title>
|
|
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
|
|
|
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
|
|
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
|
|
<link rel="stylesheet" href="../css/highlight.css">
|
|
|
|
<script>
|
|
// Current page data
|
|
var mkdocs_page_name = "Relaying";
|
|
var mkdocs_page_input_path = "relaying.md";
|
|
var mkdocs_page_url = "/relaying/";
|
|
</script>
|
|
|
|
<script src="../js/jquery-2.1.1.min.js"></script>
|
|
<script src="../js/modernizr-2.8.3.min.js"></script>
|
|
<script type="text/javascript" src="../js/highlight.pack.js"></script>
|
|
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
|
<div class="wy-side-nav-search">
|
|
<a href=".." class="icon icon-home"> Icecast Docs</a>
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
<ul class="current">
|
|
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="..">Introduction</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../basic_setup/">Basic Setup</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../config_file/">Configuration File</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../server_stats/">Server Statistics</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../auth/">Authentication</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1 current">
|
|
|
|
<a class="current" href="./">Relaying</a>
|
|
<ul class="subnav">
|
|
|
|
<li class="toctree-l2"><a href="#type-of-relays">Type of Relays</a></li>
|
|
|
|
|
|
<li class="toctree-l2"><a href="#setting-up-a-master-slave-relay">Setting Up a Master-Slave Relay</a></li>
|
|
|
|
|
|
<li class="toctree-l2"><a href="#specific-mountpoint-relay">Specific Mountpoint Relay</a></li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../yp/">Listing in a YellowPage Directory</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../admin_interface/">Admin Interface</a>
|
|
</li>
|
|
|
|
<li class="toctree-l1">
|
|
|
|
<a class="" href="../win32/">Windows Specific</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="..">Icecast Docs</a>
|
|
</nav>
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content">
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href="..">Docs</a> »</li>
|
|
|
|
|
|
|
|
<li>Relaying</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main">
|
|
<div class="section">
|
|
|
|
<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>
|
|
<h1 id="type-of-relays">Type of Relays</h1>
|
|
<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 specific mountpoint relay. In this case, the slave server is configured with a
|
|
server IP, port and mountpoint and only the mountpoint specified is relayed.</p>
|
|
<h1 id="setting-up-a-master-slave-relay">Setting Up a Master-Slave Relay</h1>
|
|
<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.<br />
|
|
The following configuration snippet is used as an example:</p>
|
|
<pre><code class="xml"><master-server>192.168.1.11</master-server>
|
|
<master-server-port>8001</master-server-port>
|
|
<master-update-interval>120</master-update-interval>
|
|
<master-username>relay</master-username>
|
|
<master-password>hackme</master-password>
|
|
<relays-on-demand>0</relays-on-demand>
|
|
</code></pre>
|
|
|
|
<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).
|
|
When the slave server is started, it will connect to the master server, 192.168.1.11:8001 in this example. The slave server will begin to relay all non-hidden 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.<br />
|
|
Note that the names of the mountpoints on the slave server will be identical to those on the master server.</p>
|
|
<p>Configuration options:</p>
|
|
<dl>
|
|
<dt>master-server</dt>
|
|
<dd>This is the hostname (or IP) for the server which contains the mountpoints to be relayed (Master Server).</dd>
|
|
<dt>master-server-port</dt>
|
|
<dd>This is the TCP port for the server which contains the mountpoints to be relayed (Master Server).</dd>
|
|
<dt>master-update-interval</dt>
|
|
<dd>The interval in seconds that the relay server will poll the master server for any new mountpoints to relay.</dd>
|
|
<dt>master-username</dt>
|
|
<dd>This is the relay username for the master server, used to query the server for a list of mountpoints to relay.<br />
|
|
(Defaults to <code>relay</code>)</dd>
|
|
<dt>master-password</dt>
|
|
<dd>This is the relay password for the master server, used to query the server for a list of mounpoints to relay.</dd>
|
|
<dt>relays-on-demand</dt>
|
|
<dd>Global on-demand setting for relays. Because you do not have individual relay options when using a master server relay, you still may want those relays to only pull the stream when there is at least one listener on the slave. The typical case here is to avoid bandwidth costs when no one is listening.</dd>
|
|
</dl>
|
|
<h1 id="specific-mountpoint-relay">Specific Mountpoint Relay</h1>
|
|
<p>If only specific mountpoints need to be relayed, or the master server is not a Icecast 2 server, you can use the specific
|
|
mountpoint relay. Supported master servers for this type of relay are Shoutcast, Icecast 1.x, and of course Icecast 2.<br />
|
|
The following configuration snippet is used as an example:</p>
|
|
<pre><code class="xml"><relay>
|
|
<server>192.168.1.11</server>
|
|
<port>8001</port>
|
|
<mount>/example.ogg</mount>
|
|
<local-mount>/different.ogg</local-mount>
|
|
<username>Jekyll</username>
|
|
<password>Hyde</password>
|
|
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
|
|
<on-demand>1</on-demand>
|
|
</relay>
|
|
</code></pre>
|
|
|
|
<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, in this example located at 192.168.1.11:8001
|
|
and will begin to relay only the mountpoint specified (/example.ogg in this case).<br />
|
|
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>,
|
|
and if you want the Shoutcast relay stream to have metadata contained within it (Shoutcast metadata is embedded
|
|
in the stream itself), the <code><relay-shoutcast-metadata></code> needs to be set to <code>1</code>.</p>
|
|
<p>Configuration options:</p>
|
|
<dl>
|
|
<dt>server</dt>
|
|
<dd>This is the hostname (or IP) for the server which contains the mountpoint to be relayed.</dd>
|
|
<dt>port</dt>
|
|
<dd>This is the TCP port for the server which contains the mountpoint to be relayed.</dd>
|
|
<dt>mount</dt>
|
|
<dd>The mountpoint located on the remote server. (If you are relaying a Shoutcast stream, this should be <code>/</code>)</dd>
|
|
<dt>local-mount</dt>
|
|
<dd>The name to use for the local mountpoint. This is what the mountpoint will be called on the relaying server. (Defaults to the remote mountpoint)</dd>
|
|
<dt>username</dt>
|
|
<dd>The username, if required, for the remote mountpoint.</dd>
|
|
<dt>password</dt>
|
|
<dd>The password, if required, for the remote mountpoint.</dd>
|
|
<dt>relay-shoutcast-metadata</dt>
|
|
<dd>If relaying a Shoutcast stream, set this to <code>1</code> to relay the metadata (song titles), which are part of the Shoutcast data stream. (Defaults to enabled, but it's up to the remote server if metadata is sent)<br />
|
|
Possible values: <code>1</code>: enabled, <code>0</code>: disabled</dd>
|
|
<dt>on-demand</dt>
|
|
<dd>An on-demand relay will only retrieve the stream if there are listeners requesting the stream. (Defaults to the value of <code><relays-on-demand></code>)<br />
|
|
Possible values: <code>1</code>: enabled, <code>0</code>: disabled</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="../yp/" class="btn btn-neutral float-right" title="Listing in a YellowPage Directory">Next <span class="icon icon-circle-arrow-right"></span></a>
|
|
|
|
|
|
<a href="../auth/" class="btn btn-neutral" title="Authentication"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<!-- Copyright etc -->
|
|
|
|
</div>
|
|
|
|
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="rst-versions" role="note" style="cursor: pointer">
|
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
|
|
|
|
<span><a href="../auth/" style="color: #fcfcfc;">« Previous</a></span>
|
|
|
|
|
|
<span style="margin-left: 15px"><a href="../yp/" style="color: #fcfcfc">Next »</a></span>
|
|
|
|
</span>
|
|
</div>
|
|
<script>var base_url = '..';</script>
|
|
<script src="../js/theme.js"></script>
|
|
|
|
</body>
|
|
</html>
|