Streaming & ao output
  • First time running Airtime.

    I discovered my original problem of missing svstat and FAILED AUDIO was missing install packages liquidsoap and daemon-tools.
    Those problems corrected, I would appreciate some help with the areas below:

    where <------------ exists I would appreciate an explanation of what it is, why, and if a problem or error what to do to correct it please.

    It appears to me that the ao failure is due to jackd and/or liquidsoap not configured to be aware of each other's existence
    and instead is just trying to use alsa alone which won't work with jack running. A few shortcuts or tips would be appreciated here...

    When I access the Icecast2 server using the WUI, it is running and I am able to login, and although liquidsoap and icecast2
    processes are running in a ps-A, when I use a command line to play a playlist as you see below I do not see an active mountpoint in Icecast2
    admin WUI.

    I also noticed there is a lot of references in liquidsoap docs to icecast which is a different package from icecast2. the 2 version I believe allows for option format playouts, whereas the icecast was restricted to only ogg I believe; please correct me if I am wrong here. Would that
    possibly be an explanation why the mount points aren't showing?

    It appears to me from below that the stream output is supposedly working, just the ao to the sound card is shut down due to jack problem.

    I have tried both types of playlist generation methods, the #EXTINFO type and the find piped to an m3u file and both give the same result as below.



    Ubuntu 11.04 Airtime 1.8.2

    Thanks in advance.
    Andy



    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    airhost1@studio-ws:~$ liquidsoap 'out(normalize(playlist("/home/airhost1/Oldies-103.m3u")))'
    2011/06/16 08:25:53 >>> LOG START

    2011/06/16 08:25:53 [protocols.external:3] Didn't find "ufetch" <-------------------- what is this? why? (not in apt-get or synaptic package list repos)

    2011/06/16 08:25:53 [protocols.external:3] Found "/usr/bin/wget" <-------------------- what is this? why?


    2011/06/16 08:25:53 [main:3] Liquidsoap 0.9.2
    2011/06/16 08:25:53 [threads:3] Created thread "generic queue #1".
    2011/06/16 08:25:53 [threads:3] Created thread "root" (1 total).
    2011/06/16 08:25:53 [root:3] Waking up active nodes...
    2011/06/16 08:25:53 [Oldies-103(dot)m3u:3] Loading playlist...
    2011/06/16 08:25:53 [Oldies-103(dot)m3u:3] No mime type specified, trying autodetection.
    2011/06/16 08:25:53 [Oldies-103(dot)m3u:3] Playlist treated as format audio/x-mpegurl
    2011/06/16 08:25:53 [Oldies-103(dot)m3u:3] Successfully loaded a playlist of 1125 tracks.
    2011/06/16 08:25:53 [threads:3] Created thread "ao" (2 total).
    2011/06/16 08:25:53 [root:3] Broadcast starts up!


    2011/06/16 08:25:53 [mksafe:3] Switch to safe_blank. <-------------------------- What and why??


    2011/06/16 08:25:53 [decoder:3] Decoder MP3 chosen for "/home/airhost1/Music/Joan Baez - We Shall Overcome - Flower Power- Time Of The Season-oldies.mp3".


    2011/06/16 08:25:54 [threads:1] Thread "ao" failed: Failed to open device! <------------ JACK Audio config needed ?????? to autostart??
    Thread 4 killed on uncaught exception Failure("Failed to open device") <------------ " " " "


    2011/06/16 08:25:54 [main:3] Shutdown started!
    2011/06/16 08:25:54 [main:3] Waiting for threads to terminate...
    2011/06/16 08:25:54 [Oldies-103(dot)m3u:3] Prepared "/home/airhost1/Music/Joan Baez - We Shall Overcome - Flower Power- Time Of The Season-oldies.mp3" (RID 1).


    2011/06/16 08:25:54 [mksafe:3] Switch to src_10939 with transition. <-------------------- What is this and why????



    ^Z
    [2]+ Stopped liquidsoap 'out(normalize(playlist("/home/airhost1/Oldies-103.m3u")))'
    airhost1@studio-ws:~$
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • 8 Comments sorted by
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    On Thu, Jun 16, 2011 at 5:09 AM, VE4PER / Andy <
    airtime-support@lists.sourcefabric.org> wrote:

    > **
    >
    >
    > It appears to me that the ao failure is due to jackd and/or liquidsoap not
    > configured to be aware of each other's existence
    > and instead is just trying to use alsa alone which won't work with jack
    > running. A few shortcuts or tips would be appreciated here...
    >

    Hi Andy -
    Currently we support audio out to ALSA and streaming OGG or MP3. At the
    moment you might be the first person to try to hook it up to JACK.

    Most of the warnings you saw in the liquidsoap log file you can ignore,
    except for the ao ones. For more in depth understand of liquidsoap, check
    out their web page (it is a separate project).

    The documentation for recompiling liquidsoap is here:
    http://wiki.sourcefabric.org/x/ZIBr



    >
    > I also noticed there is a lot of references in liquidsoap docs to icecast
    > which is a different package from icecast2. the 2 version I believe allows
    > for option format playouts, whereas the icecast was restricted to only ogg I
    > believe; please correct me if I am wrong here. Would that
    > possibly be an explanation why the mount points aren't showing?
    >

    Airtime works with icecast2, thats what we are using by default.



    > I have tried both types of playlist generation methods, the #EXTINFO type
    > and the find piped to an m3u file and both give the same result as below.
    >

    Not sure what you are referring to here?

    - Paul

  • OK thanks for the comments and efforts.

    I have since confirmed the problem is related to liquidsoap and
    jack/alsa interplay.
    If jack/alsa is running and although levels are lower than I would like,
    there is sound
    and config possible using the connections and patchbay in jack.

    However, starting airtime streaming will generate the errors since the
    ao device is grabbed by alsa/jack
    automatically. Rebooting the box and airtime autostarts and grabs the ao
    device rendering it
    busy to jack/alsa and the jackd won't start due to device busy.

    The only way I could get jack server up was to 'sysv-rc-conf' liquidsoap
    so that it did not autostart.

    I tried to find a config file for liquid soap somewhere that was telling
    it to launch/grab the ao device
    automatically and disable it yet allow streaming so that sound card was
    available to jack but couldn't locate
    such a file.

    The airtime WUI shows show playing and selections count down and
    change as scheduled, however there is no
    ON AIR light... When I access the icecast2 WUI and click the m3u
    stream, it launches the player app, and the player's
    visual effects would appear that there is audio playing, but because the
    ao problems are grabbing the snd card, the player,
    which is jack-aware, can't be monitored from off the stream either.

    I thought if I could turn off the direct monitoring using the soundcard
    directly from airtime/liquidsoap, and instead
    monitor by using a browser plugin connection to the actual icecast2
    stream output, I might be bale to work around
    the no sound.

    The only references in docs I could find so far was the CLI switch
    options/configs for testing icecast2/liquidsoap
    operation by directly playing a playlist without airtime.

    The reason why I have no ON Air Light, I cannot explain.


    Paul Baranowski wrote:
    > On Thu, Jun 16, 2011 at 5:09 AM, VE4PER / Andy <
    > airtime-support@lists.sourcefabric.org
    > <mailto:airtime-support@lists.sourcefabric.org>> wrote:
    >
    > > **
    > >
    > >
    > > It appears to me that the ao failure is due to jackd and/or
    > liquidsoap not
    > > configured to be aware of each other's existence
    > > and instead is just trying to use alsa alone which won't work with jack
    > > running. A few shortcuts or tips would be appreciated here...
    > >
    >
    > Hi Andy -
    > Currently we support audio out to ALSA and streaming OGG or MP3. At the
    > moment you might be the first person to try to hook it up to JACK.
    >
    > Most of the warnings you saw in the liquidsoap log file you can ignore,
    > except for the ao ones. For more in depth understand of liquidsoap, check
    > out their web page (it is a separate project).
    >
    > The documentation for recompiling liquidsoap is here:
    > http://wiki.sourcefabric.org/x/ZIBr
    >
    >
    >
    > >
    > > I also noticed there is a lot of references in liquidsoap docs to
    > icecast
    > > which is a different package from icecast2. the 2 version I believe
    > allows
    > > for option format playouts, whereas the icecast was restricted to
    > only ogg I
    > > believe; please correct me if I am wrong here. Would that
    > > possibly be an explanation why the mount points aren't showing?
    > >
    >
    > Airtime works with icecast2, thats what we are using by default.
    >
    >
    >
    > > I have tried both types of playlist generation methods, the #EXTINFO
    > type
    > > and the find piped to an m3u file and both give the same result as
    > below.
    > >
    >
    > Not sure what you are referring to here?
    >
    > - Paul
    >
    >
    >

  • Paul,
    I had a look at the link you recommended, and am of the opinion that
    liquidsoap differs
    from other streamer apps, like Darkice/Darksnow in that the user
    creates a custom .liq
    script to run rather than just setting variable values through a GUI
    form or sudo edited
    base config file.

    If this is so, and it wouldn't be too much trouble for you, could you
    point me where to
    find the script.liq file that airtime uses so I can see if that is where
    the ao option is specified?

    It would appear from some of the forums and sites I have researched,
    that I should also be able to
    enable jack as an option in that script as well.

    Thanks
    Andy



    Paul Baranowski wrote:
    > On Thu, Jun 16, 2011 at 5:09 AM, VE4PER / Andy <
    > airtime-support@lists.sourcefabric.org
    > <mailto:airtime-support@lists.sourcefabric.org>> wrote:
    >
    > > **
    > >
    > >
    > > It appears to me that the ao failure is due to jackd and/or
    > liquidsoap not
    > > configured to be aware of each other's existence
    > > and instead is just trying to use alsa alone which won't work with jack
    > > running. A few shortcuts or tips would be appreciated here...
    > >
    >
    > Hi Andy -
    > Currently we support audio out to ALSA and streaming OGG or MP3. At the
    > moment you might be the first person to try to hook it up to JACK.
    >
    > Most of the warnings you saw in the liquidsoap log file you can ignore,
    > except for the ao ones. For more in depth understand of liquidsoap, check
    > out their web page (it is a separate project).
    >
    > The documentation for recompiling liquidsoap is here:
    > http://wiki.sourcefabric.org/x/ZIBr
    >
    >
    >
    > >
    > > I also noticed there is a lot of references in liquidsoap docs to
    > icecast
    > > which is a different package from icecast2. the 2 version I believe
    > allows
    > > for option format playouts, whereas the icecast was restricted to
    > only ogg I
    > > believe; please correct me if I am wrong here. Would that
    > > possibly be an explanation why the mount points aren't showing?
    > >
    >
    > Airtime works with icecast2, thats what we are using by default.
    >
    >
    >
    > > I have tried both types of playlist generation methods, the #EXTINFO
    > type
    > > and the find piped to an m3u file and both give the same result as
    > below.
    > >
    >
    > Not sure what you are referring to here?
    >
    > - Paul
    >
    >
    >


  • Hi!

    By default Liquidsoap bundled with Airitme should *not* attempt to access the soundcard. Take a look at /etc/airtime/liquidsoap.cfg and ensure the following line exists:

    output_sound_device = false


    As for the liquidsoap script, you can find it at /usr/lib/airtime/pypo/bin/scripts/ls_script.liq

    If you do make any changes, please post them here so that we can incorporate it into upcoming versions Smile


    Airtime Pro Hosting: http://airtime.pro
  • liquidsoap.cfg is set to false for the o/p snd device.

    Here is the link that makes reference to including JACKD,

    */http://www.freshports.org/audio/liquidsoap/*

    It appears one has to custom build it to include jack option from the
    looks of this.

    Here are config options for build:

    Configuration Options

    ===> The following configuration options are available for liquidsoap-0.9.3:
    AO=Off (default) "portable and stable, but it does only output"
    * JACK=On (default) "audio connection kit, designed for low latency"
    <------**************
    FAAC=On (default) "AAC encoding"
    FAAD=On (default) "AAC decoding"
    FESTIVAL=On (default) "speech synthesis (say)"
    GAVL=Off (default) "converts from and to many formats"
    LADSPA=Off (default) "audio plugins providing sound effects"
    LAME=On (default) "for MP3 encoding"
    MAD=On (default) "for MP3 decoding"
    OGG=On (default) "ogg/vorbis and ogg/theora encoding and decoding"
    VORBIS=On (default) "ogg/vorbis encoding and decoding (need OGG)"
    SPEEX=Off (default) "ogg/speex encoding and decoding (need OGG)"
    THEORA=Off (default) "ogg/theora encoding and decoding (need OGG)"
    SAMPLERATE=Off (default) "for having better quality resampling"
    SOUNDTOUCH=Off (default) "for changing pitch and tempo of sound"
    PULSEAUDIO=Off (default) "cross-platform audio sound server"
    TAGLIB=On (default) "for MP3 ID3 tag reading"
    WGET=On (default) "for downloading remote files (http, https, ftp)"
    ===> Use 'make config' to modify these settings

    Also, could someone explain what the following snippets of code actually
    do, please? The code options following
    this quoted one obtained from the if--->then --> else group are self
    explanatory by virtue of the associated
    mp3 or ogg format specs, however, "out(s)" I can't locate a description
    in ref manual for this command structure
    standing alone.

    excerpt from ls_script.liq;
    *_______________________________
    if output_sound_device then
    out_device = out(s)
    end
    _______________________________
    *
    To me this says if output sound hardware device exists on the system,
    output to the device is out(s), whatever
    out(s) implies.

    - is output_sound_device a variable set by
    boolean/logical expression set by a liquidsoap confg option ao=true ?
    or is it established by boot-up list of hardware
    devices available and therefore grabbed for use
    here? with the command to output to that device
    formatted using out(s) whatever format that implies?
    In the case of it being hardware list related,
    airtime/liquidsoap on start would logically detect it, require it,
    and therefore commandeer it for it's own exclusive
    use ?/ liquidsoap buffer overload skip protection would need
    an existent device assignment in order to skip??

    Thanks,

    Andy


    Martin Konecny wrote:
    > Hi!
    >
    > By default Liquidsoap bundled with Airitme should *not* attempt to
    > access the soundcard. Take a look at /etc/airtime/liquidsoap.cfg and
    > ensure the following line exists:
    >
    > output_sound_device = false
    >
    >
    > As for the liquidsoap script, you can find it at
    > /usr/lib/airtime/pypo/bin/scripts/ls_script.liq
    >
    > If you do make any changes, please post them here so that we can
    > incorporate it into upcoming versions Smile
    >
    >
    >
    >


  • Quote:
    - is output_sound_device a variable set by
    boolean/logical expression set by a liquidsoap confg option ao=true ?
    or is it established by boot-up list of hardware
    devices available and therefore grabbed for use
    here? with the command to output to that device
    formatted using out(s) whatever format that implies?
    In the case of it being hardware list related,
    airtime/liquidsoap on start would logically detect it, require it,
    and therefore commandeer it for it's own exclusive
    use ?/ liquidsoap buffer overload skip protection would need
    an existent device assignment in order to skip??

    Thanks,

    Andy


    output_sound_device is actually a boolean variable set in /etc/airtime/liquidsoap.cfg.

    As for out(s), this is set-up by liquidsoap using whatever is available on the system. From the liquidsoap utils.liq source code:

    # Output to local audio card using the first available driver in this list:
    # ao, pulseaudio, alsa, oss, dummy

    You can see more of this source in /usr/lib/airtime/pypo/bin/scripts/library/utils.liq
    Airtime Pro Hosting: http://airtime.pro
  • still doesn't answer the question of why liquidsoap running with output_sound_device=false, is showing the sound hardware as unavailable or busy to other programs then (jackd as example).

    stopping airtime and liquid soap services from starting on bootup, and jackd sees the card as available and serviceable and hence, starts qjackctl automatically.

  • This sounds like it could be a problem with the Liquidsoap binaries we are currently using, since they should not be accessing the sound hardware (in the past I have verified that they did not, but could be something strange with the newer version packaged with Airtime 1.8.2). Try stopping both the Airtime and JACK daemons, run

    /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap 'output.icecast(%vorbis, mount="test.ogg", sine())'


    and then try starting the JACK daemon to see if liquidsoap has still locked the soundcard.
    Airtime Pro Hosting: http://airtime.pro