来自 IceCast 的远程流服务器

Remote Stream Server from IceCast

我试图在 IceCast 服务器中重现视频流,所以我想在 icecast.xml 服务器中配置它。我有以下问题:

  1. 在安装部分如何配置视频流以读取 input.I 想读取以下类型的流:

rtsp://*******************/Streaming/Channels/101?transportmode=unicast

事实上,我刚刚配置了以下 iceCast.xml 文件:

<icecast>
    <limits>
        <clients>1000</clients>
        <sources>42</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</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>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>hackme</admin-password>
    </authentication>
    <hostname>localhost</hostname>
    <listen-socket>
        <port>8000</port>
    </listen-socket>
    <relay>
        <server>rtsp://172.31.8.44/Streaming/Channels/101?transportmode=unicast</server>
        <port>8000</port>
        <mount>/test.ogg</mount>
        <on-demand>0</on-demand>
        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
    </relay>
    <mount type="normal">
        <mount-name>/test.ogg</mount-name>
        <username>othersource</username>
        <password>hackmemore</password>
        <max-listeners>1</max-listeners>
        <dump-file>/test.mp4</dump-file>
        <burst-size>65536</burst-size>
        <fallback-mount>/etc/icecast2/test.mp4</fallback-mount>
        <fallback-override>1</fallback-override>
        <fallback-when-full>1</fallback-when-full>
        <intro>/etc/icecast2/videoDAT.mp4</intro>
        <hidden>1</hidden>
        <no-yp>1</no-yp>
        <stream-url>rtsp://172.31.8.44/Streaming/Channels/101?transportmode=unicast</stream-url>
        <on-connect>sh /home/stream-start.sh</on-connect>
    </mount>
    <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/share/icecast2</basedir>
        <logdir>/var/log/icecast2</logdir>
        <webroot>/usr/share/icecast2/web</webroot>
        <adminroot>/usr/share/icecast2/admin</adminroot>
        <alias source="/" dest="/status.xsl"/>
    </paths>

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

    <security>
        <chroot>0</chroot>
    </security>
</icecast>
  1. 我如何配置它来读取 mp4 文件?

Icecast 无法中继 RTSP 流。您只能中继兼容的 HTTP Progressive 流(这是像 Icecast 和 SHOUTcast 服务的流服务器。)

Icecast 也不会解码您的 MP4。

您需要使用像 FFmpeg 这样的工具来中继到 Icecast。像...

ffmpeg -i <your RTSP URL> icecast://example.com/stream