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 

Multiple streams

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



Joined: 29 Jun 2008
Posts: 16

PostPosted: Sun Jun 29, 2008 12:14 pm    Post subject: Multiple streams Reply with quote

Hi all,

I have succesfully setup a stream. Which I can connect to, so everything is fine. The Icecast server and the source are located on the same server. But I want to be able to stream live music from my own PC on the stream. So when stream B (my live stream) comes online, stream A stops and fallsover to stream B without the listener notice it. And when stream B stops, it falls over to stream A again. But how would I accomplish this?

INFORMATION:

OS: Windows Server 2003
Icecast version: Latest
Streams: /stream (main stream) /stream1 (LIVE stream)

Thanks!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jun 29, 2008 1:25 pm    Post subject: Reply with quote

The fallback/override will be the basis of what you want. If you actually want control the fallback stream as well then you will need to use the triggers of on-[dis]connect or I suspect more effective is the auth url mount add/remove triggers.

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



Joined: 29 Jun 2008
Posts: 16

PostPosted: Sun Jun 29, 2008 1:35 pm    Post subject: Reply with quote

Can you explain me how to setup fallback/override? Thanks!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jun 29, 2008 2:13 pm    Post subject: Reply with quote

When a stream stops then the stream listeners are moved to the fallback mount if active. When a stream starts then any listeners that are on an active fallback mount are moved to it.

karl.


Last edited by karlH on Sun Jun 29, 2008 2:27 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MHz



Joined: 29 Jun 2008
Posts: 16

PostPosted: Sun Jun 29, 2008 2:23 pm    Post subject: Reply with quote

How to configure the fallback? I cant find any usefull information in the docs.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jun 29, 2008 2:36 pm    Post subject: Reply with quote

the options are <fallback-mount> and <fallback-override>

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



Joined: 29 Jun 2008
Posts: 16

PostPosted: Sun Jun 29, 2008 3:30 pm    Post subject: Reply with quote

So this is the part I need to modify:

Code:
    <mount>
        <mount-name>/example-complex.ogg</mount-name>

        <username>USER</username>
        <password>PASS</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>


Could you help me doing this?

/stream is the main stream and /stream1 is the live stream

What do I need to use as the user and the password?

Thanks in advance!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jun 29, 2008 5:49 pm    Post subject: Reply with quote

just add/remove the parts you actually need. The only required part of <mount> is <mount-name> and as you have already mentioned, one will be /stream and the other will be /stream1. Whether you want an intro or dump file or burst etc is up to you. Start simple have only what you want then add things as see fit. The docs describe each of those settings, we just shipped samples with that lot uncommented to give people an idea.

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



Joined: 29 Jun 2008
Posts: 16

PostPosted: Mon Jun 30, 2008 10:28 am    Post subject: Reply with quote

I tried the following but it doesnt work.

Code:

   <mount>
        <mount-name>/stream</mount-name>
        <fallback-mount>/stream1</fallback-mount>
    </mount>

    <mount>
        <mount-name>/stream1</mount-name>
        <fallback-mount>/stream</fallback-mount>
    </mount>


the first one is for /stream so it will fallover to /stream1 and the second one is for /stream1 so it will fallover to /stream. Any ideas why this doesnt work?

Oh, and by the way,when I listen to my station, press the stop button on winamp and then press play again, i'm listening to an old buffer or something, because I dont hear the song currently playing. Why does this happen, on shoutcast I dont have this problem. Thanks
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 Jun 30, 2008 12:20 pm    Post subject: Reply with quote

That snippet will work provided 2 things are true. 1. The xml snippet is not commented out (loading the xml into a browser should show that). 2. The fallback is active at the time the current stream is shutting down.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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