Gorka Sanz Monllor
Gorka Sanz Monllor

Reputation: 73

Remote Stream Server from IceCast

I an trying to reproduce a video streaming in an IceCast server so I would like to configure it in icecast.xml server. I have the following questions:

  1. In the mount section how can I configure the video stream for reading the input.I would like to read a stream of the following type:

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

In fact, I have just configured the following iceCast.xml file:

<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. How could I configure it for reading a mp4 file ?

Upvotes: 0

Views: 1698

Answers (1)

Brad
Brad

Reputation: 163234

Icecast can't relay RTSP streams. You can only relay compatible HTTP Progressive streams (which are the streams servers like Icecast and SHOUTcast serve.)

Icecast also will not decode your MP4.

You need to use a tool like FFmpeg to relay to Icecast. Something like...

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

Upvotes: 2

Related Questions