Airtime for Broadcasters


The Debian/Ubuntu package of Airtime sets PHP preferences in the file /usr/share/airtime/public/.htaccess but if you have used one of the manual installation methods, you should check that the PHP time zone matches local time at your station. You can edit the .htaccess file in the nano editor with the command:

$ sudo nano /usr/share/airtime/public/.htaccess

Find the following line, and change it to the correct timezone for your station, for example:

php_value date.timezone "Europe/London"

You can find the correct timezone value for your location in the Appendix of this book.

Press Ctrl+O to save the .htaccess file, then Ctrl+X to exit the nano editor.

Configure Liquidsoap

The broadcast playout from Airtime is configured via Liquidsoap. You can open the liquidsoap.cfg file for editing with the command:

$ sudo nano /etc/airtime/liquidsoap.cfg

If you require output to an ALSA soundcard device on the Airtime server, in addition to a direct Icecast or Shoutcast stream, you should change the value of output_sound_device from the default of false to true:

output_sound_device = true
If you do not require a stream in either Ogg Vorbis or MP3 format, you can set the values of output_icecast_vorbis, output_icecast_mp3 or output_shoutcast to false. Disabling unused streaming features will reduce the CPU load on your server, because stream encoding places a continuous demand on system resources. If your server is underpowered, you may prefer to perform the stream encoding on a separate machine.   


If using the Debian/Ubuntu package, you may have set up direct streaming to Icecast during the installation. To set up the Airtime server for direct streaming manually, set the value of icecast_pass to the <source-password> value that you set in the Icecast configuration file. If you are streaming to a separate Icecast server, set the value of icecast_host to the domain name or IP address of the other machine. The value of icecast_port can be left as the default of 8000, unless you have been provided with a different port number by the system administrator of the Icecast server. Shoutcast has similar settings, except with a default port of 9000.

You can also configure the values of mount_point_mp3, mount_point_vorbis, icecast_url, icecast_description, and icecast_genre to suit your station. Shoutcast has similar options shoutcast_url and shoutcast_genre. The option output_icecast_vorbis_metadata defaults to false because some media player clients are known to disconnect from the stream when Ogg Vorbis metadata changes to show new track information.

Once you're done, save and close the /etc/airtime/liquidsoap.cfg file with Ctrl+O and Ctrl+X. Then restart Airtime's playout engine to enable the new settings, with the command:

$ sudo invoke-rc.d airtime-playout restart

The server should respond:

Restarting Airtime Playout: Done.

Configure the database

Optionally, you may wish to edit the file /etc/airtime/airtime.conf to set the PostgreSQL database host, and the username and password to connect to the database with.

$ sudo nano /etc/airtime/airtime.conf

You can also set options for RabbitMQ messaging, the Airtime API and Soundcloud in this file, although you should not normally need to adjust the defaults.

Save and close the file with Ctrl+O and Ctrl+X. If you have changed the database settings, you should now run the command:

$ sudo airtime-update-db-settings

to make sure all of Airtime's database configuration files are updated. This command should output a large amount of text to the server console, ending with:


and a report of the total time taken to update the configuration.

You should now be able to log in to the Airtime administration interface, as shown in the Getting started chapter.