Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help Needed with relaying a video stream

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Video Streaming
View previous topic :: View next topic  
Author Message
DemolitionloverD
Guest





PostPosted: Tue Jan 31, 2006 2:32 am    Post subject: Help Needed with relaying a video stream Reply with quote

ok to start i am a compleate noob with icecast. i have never used it at all. what i am trying to do is relay a ess.tv video stream so i can watch it at work while my family can still watch it at home. it is a pay service that can only be used on one IP address at a time. i have read the TOS at ess.tv and as long as i dont make the relay public i can do this without violating. on this little project i only need to stream to 1 user at a time. here is what i have so far. its probably compleatly wrong. I have been reading the tutorials and the help file but i still am missing something. any help getting it running would be greatly appriciated. the information on the stream i am tryign to relay is as follows. http://maggie.ess.tv:13631;stream.nsv someone online set me this script to automate the process but i cant understand it. here is the message.

"I have a few different files for this. I could do it slightly differently, but I didn't want to parse the xml file for the right tags to strip out. Basically, I parse the ess.pls file from the server I also keep the parsed list in a file, you could make it a file you delete at the end, but that is simple enough.

So, you'll need your initial configuration for the icecast server, and then just pull out the last </icecast> line and rename it to something else. The script just adds the streams to the end of that."

Well, anyway, here's the script:

Code:

#!/bin/bash

PLAYLIST="http://ess.tv/ess.pls"
CONFIG_TEMPLATE=/etc/icecast2/def-icecast.xml
CONFIG_DEST=/etc/icecast2/icecast.xml
LIST=/etc/icecast2/ess.list
SED_FILE=/etc/icecast2/ess.sed
ICECAST=/etc/init.d/icecast2


echo -e Getting the most recent playlist and parsing it...

wget -q -O - "${PLAYLIST}" | egrep '(Title|File)'  | sed -f /etc/icecast2/ess.sed > $LIST


echo Completed successfully.
echo -e Compiling new icecast2.xml...

cat $CONFIG_TEMPLATE $LIST > $CONFIG_DEST
echo "</icecast>" >> $CONFIG_DEST

echo Completed!
echo Restarting Icecast2 Servers.

$ICECAST reload


ess.sed (note that this is 3 lines, the <-- \5 should connect to --> e.g. "<-- \5 -->"):

Code:

N
s@File[0-9]*=http://\([^:]*\):\([^;]*\);\([^\n]*\)\nTitle\([0-9]*\)=\([^\n]*\)@<!-- \5 -->\n
<relay>\n
\t<server>\1</server>\n
\t<port>\2</port>\n
\t<mount>/;\3</mount>\n
\t<local-mount>/;ess\4.nsv</local-mount>\n
</relay>\n\n<mount>\n
\t<mount-name>/;ess\4.nsv</mount-name>\n
\t<stream-description>\5</stream-description>\n
</mount>\n
@s@ess\([0-9]\)\.nsv@ess0\1.nsv@g



here is my file so far.
Code:

<icecast>
    <limits>
        <clients>1</clients>
        <sources>1</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <!-- If enabled, this will provide a burst of data when a client
             first connects, thereby significantly reducing the startup
             time for listeners that do substantial buffering. However,
             it also significantly increases latency between the source
             client and listening client.  For low-latency setups, you
             might want to disable this. -->
        <burst-on-connect>1</burst-on-connect>
        <!-- same as burst-on-connect, but this allows for being more
             specific on how much to burst. Most people won't need to
             change from the default 64k. Applies to all mountpoints  -->
        <burst-size>65535</burst-size>
    </limits>

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

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

    <!-- Uncomment this if you want directory listings -->
    <!--
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
    </directory>
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://www.oddsock.org/cgi-bin/yp-cgi</yp-url>
    </directory>
     -->

    <!-- This is the hostname other people will use to connect to your server.
    It affects mainly the urls generated by Icecast for playlists and yp
    listings. -->
    <hostname>localhost</hostname>

    <!-- You can use these two if you only want a single listener -->
    <!--<port>8000</port> -->
    <!--<bind-address>127.0.0.1</bind-address>-->

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <!-- <bind-address>127.0.0.1</bind-address> -->
    </listen-socket>
    <!--
    <listen-socket>
        <port>8001</port>
    </listen-socket>
    -->

    <!--<master-server>127.0.0.1</master-server>-->
    <!--<master-server-port>8001</master-server-port>-->
    <!--<master-update-interval>120</master-update-interval>-->
    <!--<master-password>hackme</master-password>-->

    <!-- setting this makes all relays on-demand unless overridden, this is
         useful for master relays which do not have <relay> definitions here.
         The default is 0 -->
    <!--<relays-on-demand>1</relays-on-demand>-->

    <!--
    <relay>
        <server>http://bart.ess.tv</server>
        <port>11411</port>
        <mount>/stream.nsv</mount>
        <local-mount>/stream.nsv</local-mount>
        <on-demand>1</on-demand>

        <relay-shoutcast-metadata>1</relay-shoutcast-metadata>
    </relay>
    -->


    <fileserve>1</fileserve>

    <!-- set the mountpoint for a shoutcast source to use, the default if not
         specified is /stream but you can change it here if an alternative is
         wanted or an extension is required
    <shoutcast-mount>/live.nsv</shoutcast-mount>
    -->

    <paths>
      <!-- basedir is only used if chroot is enabled -->
        <basedir>./</basedir>

        <!-- Note that if <chroot> is turned on below, these paths must both
             be relative to the new root, not the original root -->
        <logdir>./logs</logdir>
        <webroot>./web</webroot>
        <adminroot>./admin</adminroot>
        <!-- <pidfile>./icecast.pid</pidfile> -->

        <!-- Aliases: treat requests for 'source' path as being for 'dest' path
             May be made specific to a port or bound address using the "port"
             and "bind-address" attributes.
          -->
        <!--
        <alias source="/foo" dest="/bar"/>
          -->
        <!-- Aliases: can also be used for simple redirections as well,
             this example will redirect all requests for http://server:port/ to
             the status page
          -->
        <alias source="/" dest="/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 -->
        <!-- If logarchive is enabled (1), then when logsize is reached
             the logfile will be moved to [error|access|playlist].log.DATESTAMP,
             otherwise it will be moved to [error|access|playlist].log.old.
             Default is non-archive mode (i.e. overwrite)
        -->
        <!-- <logarchive>1</logarchive> -->
    </logging>

    <security>
        <chroot>0</chroot>
        <!--
        <changeowner>
            <user>nobody</user>
            <group>nogroup</group>
        </changeowner>
        -->
    </security>
</icecast>
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jan 31, 2006 3:11 am    Post subject: Reply with quote

From an initial look over the xml, there are a few things that stand out

1. the <relay> section is commented out <!-- -->, so icecast doesn't know about the relay at all.

2. clients is set to 1, so that will just be the relay, no listeners or browsers will be allowed to connect, set it higher eg 10.

3. <hostname> is still set to localhost, set it to something useful like an IP address or DNS name.

4. in your commented out relay group you have set <mount> to be /stream.nsv whereas your commentary states it should be /;stream.nsv

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DemoilitionloverD
Guest





PostPosted: Tue Jan 31, 2006 6:43 am    Post subject: Reply with quote

ok i have chaned it to this now but all winamp does when i try to connect to it is switch between connection and buffer 0% really fast.

<icecast>
<limits>
<clients>10</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>

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

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

<!-- Uncomment this if you want directory listings -->
<!--
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://www.oddsock.org/cgi-bin/yp-cgi</yp-url>
</directory>
-->

<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>69.137.95.185</hostname>

<!-- You can use these two if you only want a single listener -->
<!--<port>8000</port> -->
<!--<bind-address>127.0.0.1</bind-address>-->

<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
</listen-socket>
<!--
<listen-socket>
<port>8001</port>
</listen-socket>
-->

<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->
<!--<master-password>hackme</master-password>-->

<!-- setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 -->
<!--<relays-on-demand>1</relays-on-demand>-->


<relay>
<server>http://bart.ess.tv</server>
<port>:11411</port>
<mount>/;stream.nsv</mount>
<local-mount>/stream.nsv</local-mount>
<on-demand>0</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>


<!-- Only define a <mount> section if you want to use advanced options,
like alternative usernames or passwords
<mount>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>

<mount>
<mount-name>/auth_example.ogg</mount-name>
<authentication type="url">
<option name="mount_add" value="http://myauthserver.net/notify_mount.php"/>
<option name="mount_remove" value="http://myauthserver.net/notify_mount.php"/>
<option name="listener_add" value="http://myauthserver.net/notify_listener.php"/>
<option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
</authentication>
</mount>

-->

<fileserve>1</fileserve>

<!-- set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
-->

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>./</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<!-- <pidfile>./icecast.pid</pidfile> -->

<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"
and "bind-address" attributes.
-->
<!--
<alias source="/foo" dest="/bar"/>
-->
<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" dest="/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 -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>

<security>
<chroot>0</chroot>
<!--
<changeowner>
<user>nobody</user>
<group>nogroup</group>
</changeowner>
-->
</security>
</icecast>
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jan 31, 2006 2:14 pm    Post subject: Reply with quote

you still need to read what you are specifying, you see quite clearly from the log file that the relay isn not starting

<server>http://bart.ess.tv</server>

a server is a DNS name or IP address, http is used for urls so the above is wrong.

<port>:11411</port>

a port number is just that, a number, there is no non-numeric characters in a port number

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Guest






PostPosted: Tue Jan 31, 2006 5:22 pm    Post subject: Reply with quote

ok well thankyou again i did not know i needed to pull the http:// part out of there. i corrected that and pulled the : out of the port number. i dont know how i managed that it must have been a copy/paste mistake. so now that those are correct i still do not get a connection. i am going to post the error report to see if it helps. i really dont understand it.
Code:

[2006-01-31  11:17:38] INFO main/main.c Icecast 2.3.1 server started
[2006-01-31  11:17:38] DBUG yp/yp.c Updating YP configuration
[2006-01-31  11:17:38] INFO stats/stats.c stats thread started
[2006-01-31  11:17:38] INFO fserve/fserve.c file serving thread started
[2006-01-31  11:17:38] INFO yp/yp.c YP update thread started
[2006-01-31  11:17:38] INFO auth/auth.c Authentication thread started
[2006-01-31  11:17:39] DBUG slave/slave.c checking master stream list
[2006-01-31  11:17:39] DBUG slave/slave.c Adding relay source at mountpoint "/stream.nsv"
[2006-01-31  11:17:39] DBUG source/source.c Applying mount information for "/stream.nsv"
[2006-01-31  11:17:39] DBUG source/source.c public set to 0
[2006-01-31  11:17:39] DBUG source/source.c max listeners to -1
[2006-01-31  11:17:39] DBUG source/source.c queue size to 524288
[2006-01-31  11:17:39] DBUG source/source.c burst size to 65535
[2006-01-31  11:17:39] DBUG source/source.c source timeout to 10
[2006-01-31  11:17:39] DBUG source/source.c fallback_when_full to 0
[2006-01-31  11:17:39] DBUG stats/stats.c new source stat /stream.nsv
[2006-01-31  11:17:39] DBUG stats/stats.c new node public (0)
[2006-01-31  11:17:39] DBUG stats/stats.c new node server_name (Unspecified name)
[2006-01-31  11:17:39] DBUG stats/stats.c new node server_description (Unspecified description)
[2006-01-31  11:17:39] DBUG stats/stats.c new node genre (various)
[2006-01-31  11:17:39] DBUG stats/stats.c new node max_listeners (unlimited)
[2006-01-31  11:17:39] DBUG stats/stats.c new node listeners (0)
[2006-01-31  11:18:09] DBUG stats/stats.c update node clients (1)
[2006-01-31  11:18:09] DBUG stats/stats.c update node connections (1)
[2006-01-31  11:18:10] DBUG connection/connection.c alias has made / into /status.xsl
[2006-01-31  11:18:10] DBUG connection/connection.c Stats request, sending XSL transformed stats
[2006-01-31  11:18:10] DBUG fserve/fserve.c Adding client to file serving engine
[2006-01-31  11:18:10] DBUG connection/connection.c alias has made / into /status.xsl
[2006-01-31  11:18:10] DBUG connection/connection.c Stats request, sending XSL transformed stats
[2006-01-31  11:18:10] DBUG xslt/xslt.c Using cached sheet 2
[2006-01-31  11:18:10] DBUG fserve/fserve.c Adding client to file serving engine
[2006-01-31  11:18:10] DBUG stats/stats.c update node client_connections (1)
[2006-01-31  11:18:10] DBUG stats/stats.c update node clients (0)
[2006-01-31  11:18:10] DBUG stats/stats.c update node clients (1)
[2006-01-31  11:18:10] DBUG stats/stats.c update node connections (2)
[2006-01-31  11:18:10] DBUG stats/stats.c update node client_connections (2)
[2006-01-31  11:18:10] DBUG connection/connection.c alias has made / into /status.xsl
[2006-01-31  11:18:10] DBUG connection/connection.c Stats request, sending XSL transformed stats
[2006-01-31  11:18:10] DBUG xslt/xslt.c Using cached sheet 2
[2006-01-31  11:18:10] DBUG fserve/fserve.c Adding client to file serving engine
[2006-01-31  11:18:10] DBUG stats/stats.c update node clients (0)
[2006-01-31  11:18:10] DBUG stats/stats.c update node clients (1)
[2006-01-31  11:18:10] DBUG stats/stats.c update node connections (3)
[2006-01-31  11:18:10] DBUG stats/stats.c update node client_connections (3)
[2006-01-31  11:18:10] DBUG stats/stats.c update node clients (0)
[2006-01-31  11:18:10] DBUG stats/stats.c update node clients (1)
[2006-01-31  11:18:10] DBUG stats/stats.c update node connections (4)
[2006-01-31  11:18:10] DBUG connection/connection.c alias has made / into /status.xsl
[2006-01-31  11:18:10] DBUG connection/connection.c Stats request, sending XSL transformed stats
[2006-01-31  11:18:10] DBUG xslt/xslt.c Using cached sheet 2
[2006-01-31  11:18:10] DBUG fserve/fserve.c Adding client to file serving engine
[2006-01-31  11:18:10] DBUG stats/stats.c update node client_connections (4)
[2006-01-31  11:18:11] DBUG connection/connection.c alias has made / into /status.xsl
[/code]
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jan 31, 2006 7:45 pm    Post subject: Reply with quote

I've just tried the xml you last posted with the fixed relay settings I previously mentioned and the relay starts up (although the master server is reporting itself as full currently).

The error log would tend to indicate that the relay is set as on-demand which your last xml does not. Also note that the last part of the log indicates that the status.xsl page was given and not the stream, if you request /stream.nsv then the relay should startup if it really is set as on-demand.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
demolitionlover
Guest





PostPosted: Wed Feb 01, 2006 4:45 am    Post subject: Reply with quote

sigh....still not working, any more ideas?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Feb 01, 2006 12:13 pm    Post subject: Reply with quote

ideas yes, but I need the facts to see where to go from here. Is the relay on-demand?, does your error log show what mine does when the relay starts?, is the relay failing because the other server is rejecting the connection ?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
OrionShock
Guest





PostPosted: Thu Mar 09, 2006 3:23 am    Post subject: Reply with quote

knowing how nsv streaming works ... sort of.. and how shoutcast servers work...sort of--- wouldn't it be reasonable to say that the iceCast server is formating the URL wrong?
according to my experiance shoutcast servers format the url with only the ';' ie "http://bart.ess.tv:####;stream.nsv"

so shouldn't the mount options for the relay reflect that idea?
Back to top
Guest






PostPosted: Sun Mar 12, 2006 8:15 pm    Post subject: Reply with quote

OrionShock wrote:
knowing how nsv streaming works ... sort of.. and how shoutcast servers work...sort of--- wouldn't it be reasonable to say that the iceCast server is formating the URL wrong?
according to my experiance shoutcast servers format the url with only the ';' ie "http://bart.ess.tv:####;stream.nsv"

so shouldn't the mount options for the relay reflect that idea?


i purchased a link to and i want to stream it i am haveing same problem like it is not working any way the link i purchased is this help me plz
http://conflict:780hsbsr6@84.19.178.57:8020/streamtv09.nsv
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Video Streaming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber