Help setting up a music server on vps
  • Hi so I have a simple vps with ubuntu installed and I wanted to set up Airtime to stream audio using Darkice. There is no sound card so I was going to use Alsa and Jack to hook everything up. I'm using this guide:

    http://wiki.sourcefabric.org/display/CC/Installing+without+a +Sound+Card+(v1.4)

    It uses Campcaster which now is Airtime so is it fine to just follow the Airtime install and then go back to this guide to finish the setup?

    Also Airtime, Darkice, Alsa and Jack all need to be on the server...if I have it right:

    Airtime: Manage and schedule, upload songs to server etc
    Darkice: The actual streaming uses Icecast
    Alsa: To process sound with no card
    Jack: To hook it all together

    Okay so in the airtime install it says to add users to the www-data group but I'm doing everything with command line so how would I do that? I tried running cat /etc/group/ | more to list all the groups but www-data didn't show up.

    Finally this seems really extreme but cool:
    http://wiki.sourcefabric.org/display/CC/Installing+All+Softw are+for+a+Radio+Station

    Do I have the necessary setup for this or no? It seems like it requires a local computer, a remote server and another machine just to run darkice....so I'm guessing no.

    Anyway thanks for all the help I'm kinda clueless atm.
  • 14 Comments sorted by
  • Hi Cameron. Airtime contains liquidsoap which is now the playout engine. So in other words you don't need neither jack nor darkice.
    Liquidsoap (http://savonet.sourceforge.net/) which is included in airtime as I said does it all Wink

    You just need to have airtime up and running. I'm runing it on a VPS just like you.

    Please follow this tutorial and complete every step: http://wiki.sourcefabric.org/display/CC/Installing+Airtime+% 28v1.7.0%29

    With Airtime you can make a schedule and broadcast it to remote server (Icecast2) or to local one. So you don't need to VPS`es - 1 should be pretty enough Wink

    Please click the link I've provided above - everything you need to know is there. Here you can find some pretty good reading as later on: http://en.flossmanuals.net/airtime/

    P.S. make sure you are downloading Airtime 1.7.0 and NOT 1.6.1.

    I'm really sleepy at the moment I hope that the things I'm talking about make sense. Good luck with Airtime! I's awesome project!
  • Double post removed.
  • fixed
  • fixed
  • next post
  • Okay I got everything set up and airtime is now playing songs, but when I open the stream no sound plays.

    mplayer won't open the mp3 stream.
  • Oh wait I'm an idiot I'm guessing mplayer won't work without a sound card. But my show is still not playing the On Air symbol is grey even tho the now playing track is up. One thread mentioned changing the timezones so I'll try that but I remember setting everything to Los Angeles
  • Yes, please try dpkg-configure tzdata and set the time zone correctly there as well. (not only in php.ini)

    Then restart the whole vps (just in case) and after that enter something linke that to be able to monitor the logs in almost real time:

    tail -n100 -f /etc/service/pypo*/log/main/current

    After that just schedule a new show with playlist in it in Airtime and then if "ON AIR" is still grey just take a look in the logs shown by tail command above (you can stop tail by pressing CTRL-C). The logs should say what's wrong etc.

  • So I reset my servers timezone to LA before it was set to Pacific. Same time, but w/e maybe it makes a difference. Anyway I ran the tail command and waited for a show to come on...on air is still grey and these messages just kept being repeated by tail:

    @400000004d9d80a60050ae4c 2011-04-07 02:15:08,005 DEBUG - [cue_file.py : __init__() : line 20] - init
    @400000004d9d80a600532eec 2011-04-07 02:15:08,005 DEBUG - [api_client.py : __get_airtime_version() : line 121] - Trying to contact http://http://173.255.254.162:80/api/version/api_key/%%api_key%%
    @400000004d9d80a60066786c Traceback (most recent call last):
    @400000004d9d80a600667c54   File "/opt/pypo/bin/pypo-cli.py", line 133, in <module>
    @400000004d9d80a6006733ec     g.selfcheck()
    @400000004d9d80a600677a3c   File "/opt/pypo/bin/pypo-cli.py", line 79, in selfcheck
    @400000004d9d80a60067f354     if (not self.api_client.is_server_compatible()):
    @400000004d9d80a600681294   File "/opt/pypo/api_clients/api_client.py", line 177, in is_server_compatible
    @400000004d9d80a60068e584     version = self.__get_airtime_version(verbose)
    @400000004d9d80a6006904c4   File "/opt/pypo/api_clients/api_client.py", line 155, in __get_airtime_version
    @400000004d9d80a60069b874     logger.error("Unable to detect Airtime Version - %s, Response: %s", e, response)
    @400000004d9d80a60069fec4 UnboundLocalError: local variable 'response' referenced before assignment
    @400000004d9d80a6359ea194 *** Daemontools: starting daemon
    

  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    I'm running a guest Ubuntu Lucid on a VMWare 4 server without a soundcard. It works fine in 1.6.1 and 1.7.0 . You can also play the songs in the library via the web browser from the playlist creation screen.

    Make sure your airtime and apache2 installs are _clean_ and that you follow the instructions exactly at
    http:// wiki.sourcefabric.org/display/CC/Installing+Airtime+%28v1.7. 0%29 and then anything applicable at http://wiki.sourcefabric.org/display/CC/FAQ+and+Support.

    If you have changed your Icecast config passwords, you need to change the password for Liquidsoap to be able to access it. This is mentioned on the FAQ page as well.

    After this, reboot and *then* schedule.

    Airtime starts playing at the beginning of a show only so you would need to cancel the current show and schedule a new one for it to start playing if it has been interrupted mid-show.

    Jeremy
  • Okay I reinstalled everything and I still have the same issue. Airtime can play the mp3 from the playlist builder but I just can't get it to stream it's stuck in Airtime offline mode. The only error my log shows is:

    @400000004d9d80a60069fec4 UnboundLocalError: local variable 'response' referenced before assignment

    Also all the localhost entries in the config files...should those be changed to my ip or left as localhost (except for the one I already changed to get the airtime site to show up in pypo.cfg)
  • OMG I'm such an idiot. It was trying to contact:

    http://http://173.255.254.162:80/api/version/api_key/%%api_k ey%%

    I can't believe I didn't see that till just now! After removing the http:// from the base url (should've realized this was without that http stuff) all is good. It's broadcasting on ogg and mp3, thanks for the help guys!

    One last question:

    I have all my music in a bunch of folders pertaining to artist and album, is there anyway for me to get them all into airtime without having to explicitly select all the individual mp3 files and either drap/dropping them or uploading via ssh to server?

  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    That's the weird stuff that happens.

    Use the import script ~/airtime/utils/airtime-import . You can either link to them or copy them. Probably best to copy or else you have to keep the source files' location static.

    Jeremy
  • Happy to hear you managed to find the problem.

    You can use the script as Jeremy wrote,
    and you can drag and drop bulk selected files through the ADD MEDIA menu