Accessing Airtime's output without any delay for feeding into phone system.
  • Hello

    Firstly, thanks for all the great work that has gone into Airtime so far!

    Sorry if the title isn't that clear - but I didn't know how to phrase it.

    My intended situation is as follows:

    I will have an airtime server broadcasting a scheduled playlist of audio files to an icecast server.

    I will also have a FreeSwitch VOIP telephone system that can be used to broadcast live call-in shows to icecast.

    Icecast will be set up with fallback mountpoints, so if there is no live show, airtime will play.

    Now, I would also like to feed in airtime's output into the freeswitch system so hosts can hear the current output of the radio and basically get ready for there show. It could possibly be used to go into breaks too.

    Obviously i'm not expecting assistance on the freeswitch side of things, but I wondered what the options are for accessing the airtime output without delay.

    I believe Freeswitch can support incoming audio from icecast or from the soundcard - so am i better off setting up a secondary icecast server with no delay, or setting up a virtual soundcard that airtime can play out on and freeswitch can pickup.

    (This will be on a server without a hardware soundcard.)

    If anyone has any thoughts about the options available that would be really appreciated.

    Thanks

    Ben
  • 8 Comments sorted by
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    I would definitely go with the virtual sound card if possible. And if you
    get it working, please tell us how you did it. :)



    On Fri, Mar 4, 2011 at 8:23 AM, Radiant Flow <
    airtime-support@lists.sourcefabric.org> wrote:

    > Hello
    >
    > Firstly, thanks for all the great work that has gone into Airtime so far!
    >
    > Sorry if the title isn't that clear - but I didn't know how to phrase it.
    >
    > My intended situation is as follows:
    >
    > I will have an airtime server broadcasting a scheduled playlist of audio
    > files to an icecast server.
    >
    > I will also have a FreeSwitch VOIP telephone system that can be used to
    > broadcast live call-in shows to icecast.
    >
    > Icecast will be set up with fallback mountpoints, so if there is no live
    > show, airtime will play.
    >
    > Now, I would also like to feed in airtime's output into the freeswitch
    > system so hosts can hear the current output of the radio and basically get
    > ready for there show. It could possibly be used to go into breaks too.
    >
    > Obviously i'm not expecting assistance on the freeswitch side of things,
    > but I wondered what the options are for accessing the airtime output without
    > delay.
    >
    > I believe Freeswitch can support incoming audio from icecast or from the
    > soundcard - so am i better off setting up a secondary icecast server with no
    > delay, or setting up a virtual soundcard that airtime can play out on and
    > freeswitch can pickup.
    >
    > (This will be on a server without a hardware soundcard.)
    >
    > If anyone has any thoughts about the options available that would be really
    > appreciated.
    >
    > Thanks
    >
    > Ben
    >

  • Paul Baranowski wrote on Fri, 04 March 2011 16:58
    I would definitely go with the virtual sound card if possible. And if you
    get it working, please tell us how you did it. Smile



    Thanks for the response. Smile

    I guess my next questions would be which one & how to install a virtual soundcard on a xen based ubuntu/debian vps....

    I'm sure i've seen some howtos about this recently but cant find them now!

    When i do get this working, i will of course do a full write up!

  • Hi Radiant,

    We do not have enough resources right now to figure out how this would work, as we are still improving the core aspects of Airtime. If you do get this working, we would be more than happy to hear how you did it.
    Airtime Pro Hosting: http://airtime.pro
  • I understand - thanks for the work you are doing.

    Just to clarify though, I was only looking for a few hints or pointers from those that may have more knowledge in this area than myself, not any in-depth assistance.


    Martin Konecny wrote on Sat, 05 March 2011 22:23

    We do not have enough resources right now to figure out how this would work, as we are still improving the core aspects of Airtime. If you do get this working, we would be more than happy to hear how you did it.

  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Ben,

    > I will have an airtime server broadcasting a scheduled playlist of audio
    > files to an icecast server.

    For the time being, Airtime defaults to the expectation that it will be
    installed on the same machine as Icecast. If you want to run Airtime
    locally and Icecast remotely, you'll need to do some tweaking. It may be
    simpler to run one Icecast server locally, and relay to a remote Icecast
    server at your ISP for the listeners:

    http://www.icecast.org/docs/icecast-2.3.1/icecast2_relay.htm l

    > I will also have a FreeSwitch VOIP telephone system that can be used to
    > broadcast live call-in shows to icecast.
    >
    > Icecast will be set up with fallback mountpoints, so if there is no live
    > show, airtime will play.

    The simplest solution I can think of is to use IDJC on a local machine
    for your phone-in show, streaming to your 'live' mountpoint on the
    Icecast server from a local machine:

    http://idjc.sourceforge.net/

    This may be in combination with FreeSwitch, or instead of it.

    > Now, I would also like to feed in airtime's output into the freeswitch
    > system so hosts can hear the current output of the radio and basically
    > get ready for there show. It could possibly be used to go into breaks too.

    The limitation of doing this with a remote Airtime/Icecast server is
    that the size of the stream buffer on the return (the stream monitor)
    will cause latency, which could mean that your phone-in guests miss
    their cue at the start of the show by up to a couple of seconds.

    You could monitor directly from the Airtime machine's ALSA output,
    instead of via Icecast. This might involve setting up an ALSA plugin on
    the Airtime server which sent its output back to IDJC as an auxillary
    input, via JACK, assuming that VoIP connections can hear the aux input.
    If the Airtime machine was remote from the IDJC machine, you would need
    to use netjack with the CELT codec to do this.

    However if you intend to use fallbacks to switch from Airtime to live
    phone-in and back, you should make sure that Airtime is actually
    dropping the stream when it has nothing to play, instead of streaming
    silence. I believe that feature is currently being worked on. Otherwise
    there will no fallback, because Airtime will still be connected to Icecast.

    I would suggest using Airtime on your local machine with just an ALSA
    plugin to connect to JACK, on to IDJC's aux input for mixing, and from
    there to your Icecast server. This will give you full control over the
    switch from Airtime to live phone-in shows, with minimal monitoring
    latency. The limitation of this method is that colleagues will not be
    able to access Airtime from outside your LAN unless you open a port on
    your firewall, set up DNS etc. Also, it does increase complexity and the
    number of points of failure, compared to using Airtime and Icecast
    independently of your live show system.

    > (This will be on a server without a hardware soundcard.)

    That's not a problem, this is the default setting with Airtime 1.6.1
    onwards. You would need at least one microphone input on your local
    machine to make the most of IDJC. It would make for a very one-sided
    phone-in show otherwise :-)

    Cheers!

    Daniel
  • Hi Daniel,

    Thanks for the detailed response to this question, there is plenty of food for thought there.

    It looks like i need to experiment with ALSA virtual devices, JACK and possibly IDJC to see if they can help with the solution.

    I am intending to keep both airtime & Freeswitch on the same machine to keep latency to a minimum. The reason for picking Freeswitch so far is that it is a headless solution, so it all runs on a server and I don't actually have to use my local machine.


    Thanks again

    Ben


  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    Could Darkice also be used to send the stream to the remote icecast? This could stream from a Jack server with airtime connected using alsa to jack and whatever else as Jack plugs as well. A local sound card connected to Alsa could still be used for the foldback to the caller/guest.

    Jeremy
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Jeremy,

    > Could Darkice also be used to send the stream to the remote icecast?

    Yes, that's an option, but you still have the problem of latency caused
    by relatively large buffers. Icecast is not a real-time server, it's
    designed to compensate for network problems. Netjack with CELT may be a
    better option for near-real-time streaming to/from remote machines.

    There is also the EBU N/ACIP reference implementation (for Windows),
    based on pjsip. That's more like doing a VoIP call, but in high quality
    stereo.

    > This could stream from a Jack server with airtime connected using alsa
    > to jack and whatever else as Jack plugs as well. A local sound card
    > connected to Alsa could still be used for the foldback to the caller/guest.

    That would work, but for an entirely remote system you would need to
    send the Airtime monitor output to the VoIP caller and still have the
    caller able to hear the show presenter, who is also calling in by VoIP.
    Hopefully the VoIP connection has lower latency than the Icecast stream.

    That would imply some kind of adjustable mixer or ducking, unless you
    just want to drop the Airtime output and the presenter mic (from the
    presenters VoIP client) by a fixed amount, to avoid clipping.

    I expect the toughest part of this is to get your guests to use the
    right tool for the job when phoning in. Skype is widely used and
    understood, but it may be too prone to drop-outs if your guests have
    poor Internet connectivity.

    I guess it might be useful to have an analogue TBU (telephone balancing
    unit) plugged directly into the ALSA input of your server. You would
    then have to mix this input with your VoIP client and Airtime output to
    create your live show.

    Cheers!

    Daniel