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 

[Solved] Noob Wanting To Setup A Simple Relay

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



Joined: 17 Aug 2009
Posts: 4

PostPosted: Mon Aug 17, 2009 1:39 am    Post subject: [Solved] Noob Wanting To Setup A Simple Relay Reply with quote

TL;DR I want to setup a relay for a french radio station to go through my US dedicated server so I can listen to the stream on my phone. More info below.

Okay first, let me say that I've tried reading the docs and following several guides, but I'm completely lost now as how to set this up.

Now, what I want to do is setup a radio station relay on my VPS for my favorite trance radio station. I want to relay the station because the stream comes from France (french radio station) and my mobile operator doesn't have a good enough speed to keep up with the stream at 192kbit/s, so the result is the stream playing for ~10 seconds and then a 4 second pause for buffering, and then rinse and repeat.

I've setup a stream on my server and have done several speed tests, and I am able to keep up a 192 bitrate stream if it comes from my VPS (located in the US).

With all that said, I've successfully installed Icecast on my server, and I am able to connect to it just fine. The stream that I want to connect to is located here:
Code:

http://stream.pulsradio.com:5000


Now the relay section in my config looks like this:

Code:
<relay>
        <server>stream.pulsradio.com</server>
        <port>5000</port>
        <mount>/</mount>
        <local-mount>/music</local-mount>
        <on-demand>0</on-demand>

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


I go to my IP:port I get a xml file that says
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
I gather this is because my status.xsl file has no style in it, but I'm not sure if I needed one to make basic stream relaying work. Also, my admin section works just fine, but the point is that instead of receiving a stream, I get an XML. Whenever I try to connect to my server I get a "Error Syncing To Stream" error, but when I try to connect to the source stream from my server (via VNC; The music plays but I can't hear it due to no audio drivers Smile) it works just fine.
Now my questions are:

1. What exactly am I doing wrong?
2. Does the source stream and my relay have to be on the same port?
3. What changes if any should I make to the config file?

Thanks in advance to whoever can give some help, any is appreciated.


Last edited by myusernameis on Mon Aug 17, 2009 7:01 am; edited 1 time in total
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Aug 17, 2009 2:07 am    Post subject: Reply with quote

do you still have the alias that maps / to /status.xsl, if so then that will explain why you cannot connect to the relay as a listener. Eiterh remove the alias or choose a different local-mount for the relay

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



Joined: 17 Aug 2009
Posts: 4

PostPosted: Mon Aug 17, 2009 3:41 am    Post subject: Reply with quote

Thanks for the quick help. I've removed the alias bit, and now I receive a 404 error now.

When going to IP:port I get an error of
Code:
"The file you requested could not be found"


Edit: What is my local mount supposed to be set to? I have it set to /music (I saw that in a guide somewhere) but am I supposed to create a folder on my server somewhere named music? Sorry for being so dense, I just don't completely understand this whole mount thing, even after reading the doc a few times.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Aug 17, 2009 3:52 am    Post subject: Reply with quote

do you want to alias / to /music or do you want to change the local-mount to / ? either way should work

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



Joined: 17 Aug 2009
Posts: 4

PostPosted: Mon Aug 17, 2009 4:00 am    Post subject: Reply with quote

Honestly I have no idea, I just want it to stream from the server. I've left the local mount at /music, but I've tried making it just / but I still get the 404 not found. Are there additional files that I need to place on the server for the stream?

Again, sorry if I'm not getting this that quickly. The way I understood it is since I am not streaming any files directly from my server I don't need a mount of any sort.
Back to top
View user's profile Send private message
myusernameis



Joined: 17 Aug 2009
Posts: 4

PostPosted: Mon Aug 17, 2009 6:25 am    Post subject: Reply with quote

I got it, it's working now. Apparently the master server bit in the config file was causing it to try to relay from a master server even though I had no intention of using it. Just for other users having this issue, I will post the relay part of my config file so that others may see:

Code:

<relay>
<server>stream.pulsradio.com</server>
<port>5000</port>
<mount>/</mount>
<local-mount>/music</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>


Let me explain. The stream I want to relay is http://stream.pulsradio.com:5000 . The mount on their server is / , meaning that http://stream.pulsradio.com:5000/ <--(notice the forward slash) will play their broadcast in your media player. The local mount means what the extension will be on YOUR website/server. In my example, the IP was my.ip.is.cool:8000/music. I specified my IP and port earlier in the config, so that is where my.ip.is.cool and 8000 has come from, but the important part is the /music bit. Below is my full config file so that you can see what I have omitted from the original:

Code:
<icecast>

<limits>
<clients>100</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>heyhackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>heyhackme</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>omghackme</admin-password>
</authentication>

<!--
 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>mywebsite.com</hostname>
<!-- You may have multiple <listener> elements -->

<listen-socket>
<port>8000</port>
<!-- <bind-address>my.ip.is.cool</bind-address> -->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
</listen-socket>

<!--

    <listen-socket>
        <port>8001</port>
    </listen-socket>
   
-->

<relay>
<server>stream.pulsradio.com</server>
<port>5000</port>
<mount>/</mount>
<local-mount>/music</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

    -->

   

<!--
 Only define a <mount> section if you want to use advanced options,
         like alternative usernames or passwords
    <mount>
        <mount-name>/music</mount-name>
        <max-listeners>10</max-listeners>
        <dump-file>/home/userhere1/icecast/tmp/dump-example1.mp3</dump-file>
        <burst-size>65536</burst-size>
   </mount>

     
-->
<fileserve>1</fileserve>

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

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

<!--
 <pidfile>/home/userhere1/icecast/icecast.pid</pidfile>
-->
</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>


I removed my IP, hostname, and changed my username for privacy reasons, but basically you can edit those in with your own information. Also I changed all of the paths because you should never run icecast as root, and most of the default directories were only accessible by root. The stream runs perfectly fine with the removed stuff from the original, and it makes the config file smaller and easier to read IMO. Thanks for all the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server 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