Streaming with Airtime
  • Vote Up0Vote Down Micz FlorMicz Flor
    Posts: 184Administrator
    Airtime is streaming using icecast. just wanted to share this in the forum under a seperate thread, after i stumbled across the information in other posts:

    On Tue, 2011-01-18 at 22:48 +0100, Paul Baranowski wrote:
    "mplayer http://localhost:8000/airtime.mp3"
    is what allows you to hear what is being played.

    On Tue, 2011-01-18 at 21:51 +0100, Martin Konecny wrote:
    By default the software is setup to output to icecast server, which allows streaming over the internet. You can get sound on your speakers by connecting to the icecast server with VLC or mplayer.

    any testing, issues, discussion regarding the streaming can happen here.
  • 26 Comments sorted by
  • I have installed Airtime and I have it configured. I followed the instructions from source and I have my Icecast2 Server up and running as well. My problem is that the mplayer http://localhost:8000/airtime.mp3 does not work to connect to I checked the icecast2 admin panel and not mount points are active. I do not know what I need to do to fix this so I can make this function correctly. Please advise.

    Nick
  • Hi Nick.

    Are you running a 32-bit version of Ubuntu? We recently found some issues that have been addressed in the latest revision in the Git repository. If you feel comfortable enough, download this and then do an uninstall/reinstall + reboot.

    Otherwise, you can wait until this Monday (Feb 14) for the final release.
    Airtime Pro Hosting: http://airtime.pro
  • Yes I am running 32 bit, I tried the new git and I uninstalled and reinstalled. I rebooted then scheduled a 30 minute block it plays and goes into On-Air but I still have no connection to the icecast2 server. There are no mount points listed in the icecast2 server admin and when I got to localhost:8000 icecast2 comes up but if I add the /airtime.mp3 it is not there.
  • I have the same problem. I have followed the above instructions to install the lastest git. I did some digging and found that the pypo-liquidsoap service is not running. when I run
    sudo -u pypo /opt/pypo/bin/liquidsoap/liquidsoap /opt/pypo/bin/scripts/ls_script.liq
    manually, it says Quote:
    /opt/pypo/bin/liquidsoap/liquidsoap: error while loading shared libraries: libgavl.so.1: cannot open shared object file: No such file or directory
    . I guess some dependency is missing?

  • However, if I run
    cd liquidsoap/src && ./liquidsoap 'output.icecast(%vorbis, mount="test.ogg", sine())'
    it creates an ogg sine wave output mountpoint as expected. So I'm pretty sure my liquidsoap and Icecast2 are setup correctly.
  • So after installing libgavl with apt-get I reran

    sudo -u pypo /opt/pypo/bin/liquidsoap/liquidsoap /opt/pypo/bin/scripts/ls_script.liq


    and I got:

    Quote:
    Fatal error: exception Sys_error("/usr/share/camomile/database/general_category.mar: No such file or directory")


    There are no subfolders from camomile and below.

    So now what?
  • Hi Jeremy,

    We have been able to recreate this issue in the office on another 32-bit machine. Hopefully we have this sorted by Monday Smile
    Airtime Pro Hosting: http://airtime.pro
  • Great! I installed Camomile from source although there seems to be a .deb . I suppose libgavl and Camomile have to do with the package config of liquidsoap not matching the setup page for liquidsoap. I guess it's necessary to copy the new liquidsoap file created from source to /opt/pypo/bin/liquidsoap. Otherwise, it still has portaudio and other stuff in it from the git version??

    When I run

    cd /opt/pypo/bin/scripts/ && sudo -u pypo /opt/pypo/bin/liquidsoap/liquidsoap /opt/pypo/bin/scripts/ls_script.liq


    I get

    Quote:
    Failed to stat home directory /home/mediashout: Permission denied
    W: core-util.c: Failed to open configuration file '/home/mediashout/.pulse//daemon.conf': Permission denied
    W: daemon-conf.c: Failed to open configuration file: Permission denied
    init: exception encountered during main phase:
    Pulseaudio.Error(6)
    exception: Pulseaudio.Error(6)




  • Jeremy,

    A temporary solution to fix the libgavl problem and other linking issues is compile liquidsoap from source on your own machine.

    It appears that you have already compiled your own version, please take your own compiled binary from liquidsoap/src/ and overwriting airtime/pypo/liquidsoap/liquidsoap32

    Then try running "sudo php airtime-install.php" again.
    Airtime Pro Hosting: http://airtime.pro
  • Hi Martin,

    Thanks, yes, I've copied my compiled liquidsoap as you suggest above and reran the install. I checked that it had copied to the liquidsoap sub-folder of /opt and indeed it had. However, I still get the same error about Pulseaudio when liquidsoap is invoked with the svc command. This is just because the user Pypo does not have write permissions there. When I run the test line from the Liquidsoap developer page it works, naturally.

    Do I comment or uncomment items in the liquidsoap PACKAGES file to disable packages? I read the information in it and it left me confused. It seems pulseaudio, portaudio and some others are still compiling anyway judging by the summary after ./configure is run. I know it is reading the PACKAGES file because it complains when I delete it. I copied in the PACAKGES.default and removed # as per the developer wiki page but same thing. ??

  • We actually made the choice the drop pulseaudio this week since it is a layer that brings nothing to us in terms of features.

    I havent had time to update the wiki yet, will do it tonight.

    For now just do a "sudo apt-get purge pulseaudio"

    also make sure the "pypo" user is in the audio group and not in the pulse-access group.

    To check what groups he is in do:

    su pypo (password is pypo)
    groups (to see user's groups).

    If pypo is in group pulse-access type
    sudo deluser pypo pulse-access
    and then
    sudo adduser pypo audio


    After you restart your computer, pypo should lock the soundcard during boot and your sound should play.
    Airtime Pro Hosting: http://airtime.pro
  • Ok I have checked and completed everything above.

    I still have one error and it's relating to Alsa. It just occured to me, reading the last line above, that I am using a server with no sound card. In the past I used snd_aloop to create a dummy for playback with Darkice or used Jack.

  • if you want to use for streaming only, try the following:

    open airtime/pypo/scripts/ls_script.liq

    and on line 63 put a # symbol to make the line look as follows:
    "#out(radio)"

    Then run the install script again.

    Let me know how this works out for you.
    Airtime Pro Hosting: http://airtime.pro
  • Thanks for the tip.

    The good news is that liquidsoap is working now having loaded snd-aloop from Alsa 1.0.23. I compiled and installed alsa-drivers, alsa-libs, and alsa-utils according to the INSTALL file in each and this page:
    http:// monespaceperso.org/blog-en/2010/05/02/upgrade-alsa-1-0-23-on -ubuntu-lucid-lynx-10-04/


    Then:
    sudo modprobe snd-aloop


    After reboot it worked! I have an airtime mountpoint showing silence.mp3 in icecast.

    This way I can also use the Ubunutu Virtual Machine on a box with a sound card.

  • Martin Konecny wrote on Fri, 11 February 2011 06:41
    if you want to use for streaming only, try the following:

    open airtime/pypo/scripts/ls_script.liq

    and on line 63 put a # symbol to make the line look as follows:
    "#out(radio)"

    Then run the install script again.

    Let me know how this works out for you.


    BTW I just installed airtime 1.6-release on Ubuntu server 10.04 and this 'fix' worked just fine and it makes sense (I don't need alsa/sound card on my VPS).
  • Zdravko, glad to hear that. For version 2.0 configuring these output types should be much more user friendly Smile
    Airtime Pro Hosting: http://airtime.pro
  • Hi.
    I have a trouble with the playback.
    I'd added a show and it has started right in web-interface ("ON-AIR" had been highlighted).
    But when I've ran mplayer all I heard - it's just a silence (ICY Info: StreamTitle=' - silence30min'Wink.
    Here is the content of log/pypo/ls_script.log: http://pastie.org/1583181
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    hi Boris,

    you need to set up properly the timezone parameter in php.ini. It should be the same as system timezone.

    For example: date.timezone = "Europe/Moscow"



  • Timezone is set correctly (I'd installed the airtime by follow the instructions from here: http://wiki.sourcefabric.org/display/CC/Installing+Airtime+% 28v1.6%29).
    But my airtime is situated in /var/www/airtime and has address airtime.local.
    There is /etc/apache2/sites-enabled/airtime: http://pastie.org/1583504

    Also I've got error messages in apache log: [Sat Feb 19 23:39:01 2011] [error] [client 127.0.0.1] File does not exist: /var/www/api


  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    by default airtime uses just localhost address. I recommend to install airtime with localhost and to make sure that is working ok. After then you can change the settings to work with non-localhost (I'll explain later).
  • Thanks, Andrey.
    It works now.
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    good,

    as I've promised there are changes in config files to get working airtime on non-localhost:
    ./application/configs/conf.php: 'storageUrlHost' => 'your.new.host.name',
    ./application/configs/conf.php: 'archiveUrlHost' => 'your.new.host.name',
    ./pypo/config.cfg:base_url = 'http://your.new.host.name/'
    
  • I've changed the configuration files, but I've got the same error:
    [error] [client ::1] File does not exist: /var/www/api

    Link to application config.php: http://pastie.org/1586778
    and to pypo/config.cfg: http://pastie.org/1586792

  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    check that airtime.localhost is properly installed: open in the browser http://airtime.localhost/api/schedule/
    You should see "You are not allowed to access this resource."
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    ok,

    then reinstall airtime again:
    cd ./install
    sudo php ./airtime-uninstall.php
    sudo php ./airtime-install.php