gpt4 book ai didi

linux - 来自源的 Icecast 音频通过所有安装点

转载 作者:太空宇宙 更新时间:2023-11-04 10:16:35 25 4
gpt4 key购买 nike

我有一个 Icecast2 服务器,有 6 个安装点,由 Ices2 提供间歇性的 .ogg 音频流。当流没有被 Ices2 发送时,它有一个回退挂载到 silence.ogg 以保持流继续,直到 Ices2 再次连接到挂载。

问题是无论我连接到哪个挂载点,我都会收到来自所有其他 Ices2 提要的流。

这是我的 icecast.xml:

<icecast>
<location>Toronto</location>
<admin>webmaster@example.com</admin>

<limits>
<clients>100</clients>
<sources>10</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>100</source-timeout>
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>hackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>hackme</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>changeMe</admin-password>
</authentication>

<hostname>sound.example.com</hostname>

<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<ssl>1</ssl>
</listen-socket>
<listen-socket>
<port>8001</port>
</listen-socket>

<relays-on-demand>0</relays-on-demand>

<mount>
<mount-name>/mount1.ogg</mount-name>
<max-listeners>5</max-listeners>
<max-listener-duration>36000</max-listener-duration>
<burst-size>65536</burst-size>
<fallback-mount>/silent.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<public>0</public>
</mount>
<mount>
<mount-name>/mount2.ogg</mount-name>
<max-listeners>5</max-listeners>
<max-listener-duration>36000</max-listener-duration>
<burst-size>65536</burst-size>
<fallback-mount>/silent.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<public>0</public>
</mount>
<mount>
<mount-name>/mount3.ogg</mount-name>
<max-listeners>5</max-listeners>
<max-listener-duration>36000</max-listener-duration>
<burst-size>65536</burst-size>
<fallback-mount>/silent.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<public>0</public>
</mount>
<mount>
<mount-name>/mount4.ogg</mount-name>
<max-listeners>5</max-listeners>
<max-listener-duration>36000</max-listener-duration>
<burst-size>65536</burst-size>
<fallback-mount>/silent.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<public>0</public>
</mount>
<mount>
<mount-name>/mount5.ogg</mount-name>
<max-listeners>5</max-listeners>
<max-listener-duration>36000</max-listener-duration>
<burst-size>65536</burst-size>
<fallback-mount>/silent.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<public>0</public>
</mount>

<fileserve>1</fileserve>

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/share/icecast2</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/var/log/icecast2</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
<ssl-certificate>/etc/icecast2/fullchain.pem</ssl-certificate>

<alias source="/" destination="/status.xsl"/>
</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
</logging>

<security>
<chroot>0</chroot>

</security>

最佳答案

所有挂载回落到同一个流(或者那是一个文件?):/silent.ogg

由于所有挂载点也都启用了覆盖,因此产生的行为可能不是预期的。

在 Icecast 中,所有客户端在挂载点的上下文中都是无状态的。这意味着一旦监听器从 /mountX.ogg 转移到 /silent.ogg ,就没有任何关于会影响后续行为的原始挂载点的概念。这意味着,如果现在 /mountY.ogg 上线,由于覆盖,它会获取 所有 /silent.ogg 的当前客户端。

消除这种设置的一种方法是使用不相交的回退链。例如/mountX.ogg/silentX.ogg

旁注:仅在非常很短的时间并且文件必须具有高比特率时才建议回退到文件。否则你最终会得到监听器客户端很多的沉默,因为没有真正的速率限制。这可能会导致播放器缓冲数分钟或数小时的静音。

关于linux - 来自源的 Icecast 音频通过所有安装点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45888833/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com