Swap to live stream, then swap back to Airtime
  • Hi all,

    I have a stream running at http://stream.popbackintime.com/1980s which is running from Airtime as follows:

    External Relay -> Internal Icecast Server <- Airtime (mountpoint /1980s)

    Next Monday, I want to do a live show - I have a mini studio ready, and with MuSE - a streaming server that will connect to the internal icecast server.

    If I'm right in saying so, you can't have two sources connecting to the same mountpoint, so how do I 'hand over' the listening clients to the live show, and then back to Airtime when the live show is over?  The clients will generally listen from the website (www.popbackintime.com) which has a flash player, so I don't want to have to reconfigure the flash player to connect to a different mountpoint.

    Any suggestions how I do this?

    Thanks :)
  • 3 Comments sorted by
  • There are two ways, that I'm aware of:

    First, try the beta version. I've recently installed 2.1.0 beta 6 and it works smoothly. In stream settings there are new options, including adding the live stream from studio. You have to define mountpoints and password, but that's easy to figure out. In Airtime 2.1.0 you can just click which source goes ON AIR, whether it's live or scheduled play.

    Second is modifying liquidsoap script in /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq by adding line

    default = fallback( track_sensitive=false, [input.http("http://{your_ip}:8000/live"), default])

    When you connect to Icecast with another program, this switches stream from scheduled play to live stream, without listeners even noticing, that they're listening to other mountpoint. That's just a simple example, read more in other examples, which you can find on Liquidsoap website or on this forum. Of course, test it before you run a live show.

    Hope it helps,
    Krzysiek

  • +1 to Krzysztof's post. I'd prefer the beta 6 way since you can also help us test this new functionality. 
    Airtime Pro Hosting: http://airtime.pro
  • Hi all.

    Thanks for the posts.  What I did was this:

    In icecast.xml on the source server, I added the following mountpoints:

    <mount>
            <mount-name>/1980s</mount-name>
            <fallback-mount>/studio</fallback-mount>
            <fallback-override>1</fallback-override>
            <hidden>0</hidden>
    </mount>

    <mount>
            <mount-name>/studio</mount-name>
            <fallback-mount>/airtime-1980s</fallback-mount>
            <fallback-override>1</fallback-override>
            <hidden>0</hidden>
    </mount>

    <mount>
            <mount-name>/airtime-1980s</mount-name>
            <hidden>0</hidden>
    </mount>

    So, clients or relays connect to server:8000/1980s, which relays /airtime-1980s if nothing is connected to /studio (the live stream).  If something connects to /studio, then the clients are automatically transferred to the new source, and if /studio disconnects, they are transferred back to /airtime-1980s.

    But, all my clients connect to the relay, so the relay is simply set to relay /1980s - not the other streams - which means they don't get transferred around :)

    So all I had to do was to make sure I had the same song playing through my mixing desk that Airtime was already playing, then connect to the /studio stream just before I started my live broadcast.  Similarly, when "handing back" to airtime, I made sure I was playing the same track that was due to be played by Airtime before disconnecting /studio to keep the transitions as smooth as possible.

    If I was able to use the audio output of my airtime server, I could have put that through my mixing desk and then just faded up the airtime server before "handing back", but this wasn't possible as my server is a VM and VMWare ESXi doesn't allow me to use the audio device :(