About this manual

Copyright (C) 2012 Sourcefabric o.p.s

This manual was written for Sourcefabric by Daniel James, using the tools at FLOSS Manuals. Please add your comments and contributions at: http://en.flossmanuals.net/airtime-en-2-1/

This documentation is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this documentation; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS

0. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.

The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

7. Additional Terms.

“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.

A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

Add media

If you do not have direct access to the Airtime server, you can add files to the Airtime library using the Add Media page of the administration interface. (The Add Media page is not visible to Guest users). This page includes an upload queue for media files, which supports drag and drop from your computer's file manager if you are using the Mozilla Firefox 3.6 (or later) web browser.

On an Ubuntu Lucid desktop machine, Firefox supports uploading files to Airtime of up to 200MB in size. Other browsers and platforms may set an upload limit at 2GB. If you need to upload files larger than 200MB to the Airtime server on a regular basis, you may find it more convenient to perform the upload using SFTP, rather than through the browser. See the chapter Automated file import for more details.

If your web browser does not support drag and drop, you can use the Add files button, which has a white plus sign in a green circle icon, to open a file selection window on your computer.


After you have added all the files that you require to the upload queue, click the Start upload button, which has a green arrow icon.

The row of the file currently being uploaded is highlighted in pale green. At the bottom of the upload queue, a progress bar and percentage indicates how much of the upload has taken place so far. The upload speed will depend on the network connection between your computer and the Airtime server.

Once it has been uploaded successfully, each file row displays a white check mark in a green circle icon.

 

Your files are now imported into the Airtime library, ready to be included in your broadcast playlists and shows.

Automated file import

The airtime-import script can be combined with the standard SFTP (secure FTP) program and cron daemon on a GNU/Linux server to enable automated file import from multiple remote computers. This could save time for your station staff when using distributed production methods, or content syndication.

Traditional FTP servers use plain text passwords (without encryption) and are therefore not recommended for upload accounts on Airtime servers accessible from the public Internet. SFTP is a cross-platform protocol which works with many desktop programs including gFTP for GNU/Linux (http://www.gftp.org/). This program can be installed on Debian or Ubuntu desktop computers with the command:

 sudo apt-get install gftp

Other popular SFTP clients include FileZilla for Windows (http://filezilla-project.org/) and Cyberduck for Mac and Windows (http://cyberduck.ch/).

To enable SFTP uploads, first invoke the adduser command to create the uploads account on the server. For security reasons this user account is restricted to using SFTP only; it cannot be used for executing other commands in a login shell.

sudo adduser --home /srv/airtime/uploads --shell /usr/lib/sftp-server uploads

The server will then invite you to type in the password for the new uploads user, and once again for confirmation. The security of your Airtime server depends on the strength of the password that you set, so be sure to use a long and complex password with upper case, lower case and numerical characters. It is not necessary to set a full name or other details for this account. 

Adding user `uploads' ...
Adding new group `uploads' (1003) ...
Adding new user `uploads' (1002) with group `uploads' ...
Creating home directory `/srv/airtime/uploads' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for uploads
Enter the new value, or press ENTER for the default
    Full Name []:
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n] Y

 Next, create a folder to contain the incoming files:

 sudo mkdir /srv/airtime/uploads/incoming/

Then create a script to run once per hour:

 sudo nano /etc/cron.hourly/airtime-upload

The script should import the newly uploaded files from the incoming folder specified, using the copy option, and then remove the original uploaded files. This step, rather than simply using the watch option on the /srv/airtime/uploads/incoming/ folder, ensures that the uploads SFTP account does not have direct write access to the Airtime storage archive. That could be a security risk if the password was compromised.   

#!/bin/sh

# Run the import script on fresh uploads

airtime-import copy /srv/airtime/uploads/incoming/

# Clean the incoming directory to save disk space

rm -r /srv/airtime/uploads/incoming/*.mp3
rm -r /srv/airtime/uploads/incoming/*.ogg

Finally, the script should be made executable so that the cron daemon can run it.

sudo chmod +x /etc/cron.hourly/airtime-upload

By default, Debian and Ubuntu GNU/Linux run cron.hourly tasks at 17 minutes past each hour. This value can be adjusted in the file /etc/crontab on the server, if required.

Remote users should connect to the Airtime server using their client software of choice, making sure that they specify an SFTP rather than FTP connection. The remote directory for the clients to use would be /srv/airtime/uploads/incoming/ as configured above.


For additional security, you could configure your Airtime server to use an encryption key pair for the uploads account, instead of a password. See https://help.ubuntu.com/community/SSH/OpenSSH/Keys for details of how to do this on an Ubuntu server.

 

Automated installation

This installation method is intended for computers running Ubuntu or Debian GNU/Linux, and is the recommended method for production Airtime systems. If you have previously performed a manual installation of Airtime on the server, you should run the airtime-uninstall script to remove it before setting up the server for automated installation.

Set up repositories for Ubuntu

When installing on an Ubuntu server, a few of the packages that Airtime relies on are in the Ubuntu universe or multiverse repositories. If either of these repositories is disabled, you can enable them in the /etc/apt/sources.list file, by opening the nano editor in your server's console. The nano editor should be installed by default, but if not, you can install it with the command:

sudo apt-get install nano  

Then open the sources.list file with the command:

sudo nano /etc/apt/sources.list
For an Ubuntu 10.04 Lucid server, find the lines which begin deb and end with lucid universe or lucid-updates universe, adding multiverse to the end of these lines, if it is not there already. Other versions of Ubuntu will have similar lines. The multiverse repository is required for the libmp3lame0 library, which is an MP3 encoder.

The exact repository mirror URLs in your sources.list file will differ from the above screenshot, depending on your location.

The Sourcefabric repository contains packages for Airtime, and any other packages which Airtime requires. To add the Sourcefabric repository to an Ubuntu Lucid server, scroll to the end of the sources.list file and add the following line:

deb http://apt.sourcefabric.org/ lucid main

For Ubuntu 10.10 Maverick, 11.04 Natty, 11.10 Oneiric or 12.04 Precise substitute maverick, natty, oneiric or precise in place of lucid in the line above.

Press Ctrl+O (the Ctrl key and the letter O together) to save the file, then Ctrl+X to exit the nano editor.

Set up repositories for Debian

On a Debian squeeze server, you can edit the /etc/apt/sources.list file as root with the command:

nano /etc/apt/sources.list

Packages for MP3 encoding are not included in the Debian squeeze repositories. You can obtain the necessary libmp3lame0 package by adding the following repository to the end of the file:

deb http://backports.debian.org/debian-backports squeeze-backports main

To add the Sourcefabric repository to a Debian squeeze server, add the following line to the end of the file:

deb http://apt.sourcefabric.org/ squeeze main

Press Ctrl+O (the Ctrl key and the letter O together) to save the file, then Ctrl+X to exit the nano editor.

Install the Sourcefabric signing key 

Reload the system's package list with:

sudo apt-get update

You will see an error message about a missing public key.

To fix this system error, you need to install the sourcefabric-keyring package, which contains the package signing key. This encryption key is a security measure which helps ensure that the Airtime packages you will be downloading in future have not been tampered with by a third party. You can install the key with the command:

sudo apt-get install sourcefabric-keyring

When prompted, press the y key on your keyboard to install the sourcefabric-keyring package without verification. If you wish to verify the authenticity of the package signing key, please contact Sourcefabric for assistance.

Update your computer's software sources again, to confirm that you are now using a trusted software repository:
sudo apt-get update
You should no longer see the error message about the missing public key.

Install the database management system

Airtime uses a PostgreSQL database to keep track of media assets and associated metadata in its storage server. Depending on the scale of your Airtime installation and the hardware available, you may wish to install PostgreSQL on a separate server. If you only have one server, you can install the postgresql package on the same machine as Airtime with the command:

sudo apt-get install postgresql

Install a streaming server

Optionally, you may wish to stream directly from Airtime to an Icecast media distribution server, without requiring a soundcard or mixer in the broadcast chain. This option is particularly suitable for fully automated stations, in which all shows are played out using Airtime. You can install the icecast2 package on your server with the command:

sudo apt-get install icecast2

In some scenarios, you may wish to stream from Airtime to a remote Icecast server, for example when Icecast is installed on a server in a data center with greater bandwidth available than an Airtime server located at your broadcast studio has. This separation may become necessary if your stream becomes popular, because each additional listener which connects to the Icecast stream uses additional bandwidth. In this case, you do not need to install the icecast2 package on the same server as Airtime.

Before running Icecast for the first time, you should edit the file /etc/icecast2/icecast.xml to change the default <source-password>, <relay-password> and <admin-password> values from hackme to something more secure. On more recent GNU/Linux distributions, such as Ubuntu 12.04 'Precise Pangolin', you may be prompted for these settings during the installation of Icecast.

sudo nano /etc/icecast2/icecast.xml

You should also set the value of <hostname> to the domain name of the Icecast server, for example:

<hostname>icecast.example.com</hostname>

This step ensures that stream URLs are generated correctly by the Icecast server.

Save and close the icecast.xml file with Ctrl+O and Ctrl+X. Then set the Icecast server to start automatically when the server boots in the /etc/default/icecast2 file:

sudo nano /etc/default/icecast2

by setting the value of ENABLE to true on the last line of that file:

ENABLE=true

Save and close this file with Ctrl+O and Ctrl+X, then start Icecast:

sudo service icecast2 start

The server should respond:

Starting icecast2: Starting icecast2
Detaching from the console
icecast2.

Install Airtime

You can now install the Airtime package with:

sudo apt-get install airtime

This command will install all of the Airtime components, plus any other packages that Airtime requires in order to run.

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  liquidsoap
Suggested packages:
  airtime-audio-samples
The following NEW packages will be installed
  airtime liquidsoap
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,631kB/10.1MB of archives.
After this operation, 41.5MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get: 1 http://apt.sourcefabric.org/ lucid/main airtime 2.1.3-1 [8,631kB]
Fetched 8,631kB in 8s (989kB/s)
Preconfiguring packages ...
Selecting previously deselected package liquidsoap.
(Reading database ... 598365 files and directories currently installed.)
Unpacking liquidsoap (from .../liquidsoap_1.0.0~lucid~sfo-7_amd64.deb) ...
Selecting previously deselected package airtime.
Unpacking airtime (from .../airtime_2.1.3-1_all.deb) ...

Once all the packages have been downloaded and installed, you will be asked a few questions about the configuration of the Airtime system. You can accept the default settings by pressing the Enter key, or use the Tab key to change your selection.

Firstly, you will asked if you wish to create an Apache virtual host web server configuration automatically.

If so, you will need to enter the domain name that your station staff will use to access Airtime. For a test server that will only be accessed directly from the same machine, you can use the default setting of localhost here.

Next, set the contact email address of the server administrator, which is good practice in case of any server problems. For a test server, using an address at the localhost is acceptable.

Debian and Ubuntu servers are set up with a default Apache configuration, which might block station staff from accessing Airtime. If you wish, this default configuration can be removed automatically for you.

If you are setting up Airtime to stream directly to Icecast without using a soundcard in between, you can set the hostname and passwords for the Icecast server during the Airtime installation.

First, set the hostname of the Icecast server. If you have Icecast installed on the same machine as Airtime, you can use localhost here.


The security of your streaming server depends on the strength of the passwords that you choose. You should set strong passwords for source, relay and admin access.


By default, Airtime stores media files under the path /srv/airtime/stor/ but you can specify an alternative path if you wish. If you change this setting, the new path must end with a slash. This main storage path is separate from the watched folders which are configured after installation, in the Airtime administration interface. See the chapter Media Folders for details of how to add watched folders.


Finally, you have the option to set a more secure password for Airtime's admin user than the default of admin. You could change the password for the admin user later, in the Airtime administration interface, but this would mean that your installation would be insecure until you carried out that task.


On some GNU/Linux distributions, you may be warned about upgrading the rabbitmq-server package, even if you have never installed this package before. If RabbitMQ is only being used by Airtime on your server, it is safe to press the Enter key to continue.


The Airtime installer will then run a script to check that your server environment is set up correctly.

*** Verifying your system environment, running airtime-check-system ***
AIRTIME_STATUS_URL             = http://localhost:80/api/status/format/json/api_key/%%api_key%%
AIRTIME_SERVER_RESPONDING      = OK
KERNEL_VERSION                 = 2.6.32-41-generic
MACHINE_ARCHITECTURE           = x86_64
TOTAL_MEMORY_MBYTES            = 6128212
TOTAL_SWAP_MBYTES              = UNKNOWN
AIRTIME_VERSION                = 2.1.3
OS                             = Ubuntu 10.04.4 LTS x86_64
CPU                            = Dual Core AMD Opteron(tm) Processor 170
WEB_SERVER                     = Apache/2.2.14 (Ubuntu)
PLAYOUT_ENGINE_PROCESS_ID      = 13552
PLAYOUT_ENGINE_RUNNING_SECONDS = 11
PLAYOUT_ENGINE_MEM_PERC        = 0.2%
PLAYOUT_ENGINE_CPU_PERC        = 0.4%
LIQUIDSOAP_PROCESS_ID          = 13557
LIQUIDSOAP_RUNNING_SECONDS     = 11
LIQUIDSOAP_MEM_PERC            = 0.2%
LIQUIDSOAP_CPU_PERC            = 9.9%
MEDIA_MONITOR_PROCESS_ID       = 13502
MEDIA_MONITOR_RUNNING_SECONDS  = 12
MEDIA_MONITOR_MEM_PERC         = 0.4%
MEDIA_MONITOR_CPU_PERC         = 4.4%
RABBITMQ_PROCESS_ID            = 1774
RABBITMQ_RUNNING_SECONDS       = 10
RABBITMQ_MEM_PERC              = 0.3%
RABBITMQ_CPU_PERC              = 0.4%

-- Your installation of Airtime looks OK!

************ Install Complete ************

You should now be able to log in to the Airtime administration interface, as shown in the Getting started chapter. See the Configuration chapter for advanced settings.

Enhanced Liquidsoap package for Ubuntu Precise

The Ubuntu 12.04 'Precise Pangolin' distribution includes an official Liquidsoap 1.0.0 package that will work with Airtime, but Sourcefabric's own package of Liquidsoap includes a patch which enables smoother stream transitions.

After setting up the apt.sourcefabric.org repository as shown above, you can search for other versions of the Liquidsoap package available to your server with the following command:

apt-cache show liquidsoap

This command will list the versions available, with short descriptions. You can then specify the version that you require using an equals sign after the package name, for example:

sudo apt-get install liquidsoap=1.0.0~precise~sfo-7

where '1.0.0~precise~sfo-7' is the version reported by the apt-cache show liquidsoap command. The system may warn that this package installation represents a downgrade, but this is not actually the case. This warning is caused by the numbering system used for non-official Ubuntu packages.

Backing up the server

The following shell commands can be used for database backup and restore on a running PostgreSQL server in an Airtime system.

You can dump the entire database to a zipped file with the combination of the pg_dumpall command and gzip. The pg_dumpall command is executed as the user postgres, by using the sudo command and the -u switch. It is separated from the gzip command with the pipe symbol.

sudo -u postgres pg_dumpall | gzip -c > airtime-backup.gz

This command can be automated to run on a regular basis using the standard cron tool on your server.

When restoring a production database on a cleanly installed Airtime system, it may be necessary to drop the empty database that was created during the new installation, by using the dropdb command. Again, this command is executed with sudo as the user postgres

sudo -u postgres dropdb airtime

This dropdb command above is necessary to avoid 'already exists' errors on table creation when overwriting an empty Airtime database in the next step. These errors might prevent some data from being restored, such as user account data.

To restore, first unzip the backup file with gunzip, then use the psql command as the postgres user:

gunzip airtime-backup.gz
sudo -u postgres psql -f airtime-backup postgres

You should now be able to log in to the Airtime web interface in the usual way.

For safety reasons, your regular database backups should be kept in a directory which is backed up by your storage backup tool of choice; for example, the /srv/airtime/database_backups directory. This should ensure that a storage restore can be made along with a matching and complete version of the Airtime database from the day that the storage backup was made. 

Storage backup

Backing up the Airtime database with pg_dumpall will not back up the Airtime media storage server, which is likely to need a great deal more backup space. Creating a compressed file from hundreds of gigabytes of storage server contents is likely to take a very long time, and may have little benefit for the amount of CPU power used, if the media files are already stored in a highly compressed format. It is also impractical to copy very large backup files across the network on a daily basis.

Instead, it is preferable to use an incremental backup technique to synchronize the production Airtime server storage with a backup server each day or night. If the backup server also contains an Airtime installation, it should be possible to switch playout to this second machine relatively quickly, in case of a hardware failure or other emergency on the production server.

A standard incremental backup tool on GNU/Linux servers is rsync (http://rsync.samba.org/) which can be installed using the package manager of your GNU/Linux distribution. However, incremental backup alone cannot help in the scenario where a file which later proves to be important has been deleted by an administrator. For backups that can be rolled back to restore from an earlier date than the current backup, the tool rdiff-backup (http://www.nongnu.org/rdiff-backup/) can be deployed.  

Calendar

The Calendar page of the Airtime administration interface has three views: day, week and month, which can be switched using the grey buttons in the top right corner. By default, the month view is shown, with today's date highlighted by a pale green background.

In the top left corner of the page, you can go back or forward through the Calendar by clicking on the buttons which have a small grey triangle in a white circle. Click the today button to jump to today's date in the current view. (The today button will be greyed out if you are already viewing that date). In the day or week views, there is also a drop-down menu which allows you to set the resolution displayed for the calendar, ranging from one minute per row to sixty minutes per row.

Adding a show

Only Admins and Program Managers can use this feature. To add a new show to the Calendar, click the + Show button in the top left corner of the page, or click on any future row or box in the Calendar which is empty. Either of these actions opens the Add this show box, which has six sections, arranged vertically: What, When, Live Stream Input, Record & Rebroadcast, Who, and Style. Click the small black triangle to the left of the section name if you wish to minimize or maximize it.

What

In the What box, enter the Name, public website URL, Genre and Description for the show that you are creating.

When

Next, in the When section, if you clicked on a date in the Calendar this should already be entered in the Date/Time Start field. To set another date for the show, click on the date in the Date/Time Start field and select the date that you require from the small pop-up calendar which will appear. Click on the adjacent time field to set the start time for the show, with the pop-up Hour and Minute box. The Minute values in the pop-up time boxes are rounded to the nearest five minutes. You can also adjust the times manually by clicking into the fields and typing. Repeat the process to set the Date/Time End fields. The Duration of the show will be displayed automatically, based on the start and end times you have set.

Airtime will only allow you to enter valid times for shows. If you attempt to schedule show times which would be impossible, Airtime will display a warning message.

To schedule a regular show, check the Repeats? box and select either weekly, bi-weekly or monthly from the Repeat Type drop-down menu that will appear. Then check the boxes for the days of the week that you want to schedule the regular show on. Uncheck the No End? box and set the Date End for the regular show to finish, or leave the No End? box checked to schedule the show indefinitely.

Live Stream Input

The Live Stream Input section can be used to enable live input streams during the show, and also to configure authentication for them. If you check the Use Airtime Authentication box, the DJs (presenters) of the show will be able to connect a live stream to Airtime's Show Source Mount Point using their login name and password. See the chapter Stream Settings for details.

If you check the Use Custom Authentication box instead, you can set a one-time username and password pair for live stream input to the show. For example, you may wish to create an authenticated live stream input for a particular remote news reporter, without providing any further access to your Airtime server for that person.

A reminder of the Connection URL for the live input stream to use is shown at the end of the Live Stream Input section.

Record & Rebroadcast

In the Record & Rebroadcast section, checking the Record from Line In? box enables automatic recording of the soundcard line input, if your Airtime server has one, at the time of the show. Shows set for live recording should not also contain files or playlists. The audio format for live recordings is 256kbps Ogg Vorbis, and the files are saved in the recorded folder, under the Import Folder path set in the Media Folders page on the System menu.

If you wish the recording to be played out at a later time, check the Rebroadcast? box, and then select up to ten date and time slots in the Choose Days box.

Shows set for recording have a small red dot icon in the calendar, while rebroadcast shows have a white loop icon.

Who

In the Who section, type the first few letters of the name of the show's DJ (presenter) in the Search Users field to select a name from the Airtime database, or check one of the DJs boxes in the vertical list below. This association of a DJ name with a particular show enables that presenter to add playout media to the show, and also to connect a live input stream (if that has been enabled), so it is important to get the DJ's name right.

Style

Finally, select a Background Colour and Text Colour by clicking the boxes in the Style section, so that the new show can be easily identified in the Calendar. Click the coloured circle icon in the lower right corner to close this pop-up window.

 

Click the Add this show button at the top or bottom of the box. The new show will now be displayed in the Calendar, with a regular slot if you have chosen to schedule one. 

Editing a show

Show configuration and metadata can be changed at any time until broadcast of that show commences. Click the show in the Calendar, and select Edit Show from the pop-up context menu. This opens the Update Show box, which is almost exactly the same as the Add this Show box. Click the + Update show button at the top or bottom of the box when you are done.

Alternatively, individual shows can be clicked on and dragged to new days and times in the calendar. However, Airtime will not allow you to drag a future show into the past, or drag and drop instances of a repeated show. In the Day and Week views, show length can be adjusted by clicking on the lower edge of the show box, and dragging the edge of the box upwards or downwards. The new show length is calculated automatically.

Adding content to a show

To add content to a show, click the show in any view on the Calendar, and select Add/Remove Content from the pop-up menu.

This action opens a window with the name of the show. Like when using the Playlist Builder to find files, you can search for files or playlists and drag them into the show schedule on the right side of the page.

Alternatively, use the selection button (with the square icon) or the checkboxes in the first column of the search results to add items to the show, by selecting the items you require, then clicking the plus icon button.

The pink row at the end of the show items table updates automatically to display how much time remains of the allocated show duration, in a red font. Also, a red exclamation mark indicates if the show is not yet complete. This changes to a green check mark when the show duration is reached.

If you add too much media for the duration of the show, Airtime will display the extra minutes and seconds in the last row, in a green font, and playout will be faded when the show ends. Click any item you wish to remove from the show, then click Delete on the pop-up menu, or check the box in the item's row then click the Trashcan icon at the top of the table.

When your show has all the required content, click the OK button in the bottom right corner to close the window. Back in the Calendar, click the show and select Show content from the pop-up menu to view a list of content now included in the show.

The Contents of Show window is a read-only interface featuring an orange bar which indicates how much media has been added to the show. Click the OK button in the bottom right corner, or the white x icon in the top right corner, to close the window.

Removing content from a show

To remove an individual file or playlist from a show, click on the show in the Calendar, and select Add/Remove Content from the pop-up menu. In the window which opens, click any item you wish to remove from the show, then click Delete on the pop-up menu, or check the box in the item's row then click the Trashcan icon at the top of the table. To remove all files and playlists from a show, click on the show in the Calendar, and select Remove All Content from the pop-up menu. 

Deleting a forthcoming show

To delete one instance of a forthcoming show, click on the show in the Calendar, and select Delete, then Delete This Instance from the pop-up menu. If you wish to delete all future instances of this particular show, select Delete This Instance and All Following from the pop-up menu.

You cannot delete or remove content from shows that have already played out. These shows have only one option on the pop-up menu, which is Show Content.

Canceling playout

If you wish to cancel playout of a playlist-based or pre-recorded show while it is running, click on the show in the Calendar and select Cancel Current Show from the pop-up menu. Airtime will ask you if you are sure about this action in a dialog box, as it cannot be undone.


Configuration

The broadcast playout configuration for Airtime is shown in the file /etc/airtime/liquidsoap.cfg which is automatically generated by the Streams page, found on the System menu of the Airtime administration interface. For this reason, you would not normally edit the configuration manually, as any changes are likely to be overwritten by the administration interface.

Advanced settings

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 server and SoundCloud uploads in this file, although you should not normally need to adjust the defaults.

[database]
host = localhost
dbname = airtime
dbuser = airtime
dbpass = airtime

[rabbitmq]
host = 127.0.0.1
port = 5672
user = guest
password = guest
vhost = /

[general]
api_key = XXXXXXXXXXXXXXXXXXXX
web_server_user = www-data
airtime_dir = /usr/share/airtime
base_url = localhost
base_port = 80

;How many hours ahead of time should Airtime playout engine (PYPO)
;cache scheduled media files.
cache_ahead_hours = 1

[monit]
monit_user = guest
monit_password = airtime

[soundcloud]
connection_retries = 3
time_between_retries = 60
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 the following text to the server console:

Airtime root folder found at /usr/share/airtime
Updating /usr/share/airtime/application/configs/application.ini
Updating /usr/share/airtime/build/build.properties
Updating /usr/share/airtime/build/runtime-conf.xml
Success!

Easy setup

The airtime-easy-setup package sets up a typical Airtime configuration without prompting you for any settings. You can then install the latest Airtime package from the Sourcefabric repository with a few clicks.

After that, the Airtime administration interface can be accessed at the default domain name of the computer (such as http://airtime.example.com). If you have not yet set a fully qualified domain name for the computer, you can use a URL such as http://ubuntu/ on the localhost for testing purposes. Whichever domain name you use, the Icecast administration interface will be at port 8000 of the same URL (such as http://airtime.example.com:8000).

You can download the airtime-easy-setup package from http://apt.sourcefabric.org/misc/airtime-easy-setup.deb which is a link to the latest version of the package. You should stay connected to the Internet throughout the installation, as a number of dependency packages have to be installed from online repositories.

On Ubuntu 10.04 'lucid' or Debian 6.0 'squeeze', you can run the airtime-easy-setup package from your browser using the program GDebi.

 

If you have chosen to save the package to your computer instead, in the desktop file manager, right-click on the airtime-easy-setup package and select Open with GDebi Package Installer:

 

Or for an Ubuntu lucid or Debian squeeze server without a desktop, you can use gdebi on the command line:

sudo apt-get update
sudo gdebi airtime-easy-setup.deb

If gdebi is not installed, you can run this command first:

sudo apt-get install gdebi

Later versions of Ubuntu have replaced GDebi with the program software-center. On a desktop installation, right-click on the package and select Open with Ubuntu Software Center. This desktop program can also be run from the command line, for example: 

software-center airtime-easy-setup.deb

Any of the methods above should resolve package dependencies automatically.

Install Airtime

Once the installation of airtime-easy-setup has completed, you can install the latest Airtime package on a desktop system using your usual package manager, such as Ubuntu Software Center, or Synaptic on Debian.

 

On a server, you can use the commands:

sudo apt-get update
sudo apt-get install airtime

Configure for production

To convert a test installation into a production installation, you can run the command:

sudo dpkg-reconfigure airtime
The dkpg-reconfigure command will run through the configuration steps shown in the Automated installation chapter, so that you can set the correct hostnames and passwords for your production Airtime server.

Expert install

These quick install steps are suitable for experienced GNU/Linux system administrators who have already followed the steps shown in the chapter Preparing the server earlier in this book. For a more detailed explanation of the steps below, please read the chapter Automated installation.

1. Edit the repositories file for your server:

sudo nano /etc/apt/sources.list

For Ubuntu Lucid [or Maverick, Natty, Oneiric, Precise] servers, use the Sourcefabric repository:

deb http://apt.sourcefabric.org/ lucid main

and make sure you have enabled the multiverse repository for MP3 encoding support:

deb http://archive.ubuntu.com/ubuntu/ lucid multiverse

For Debian Squeeze servers, use the Sourcefabric repository:

deb http://apt.sourcefabric.org/ squeeze main

and enable the backports repository for MP3 encoding support:

deb http://backports.debian.org/debian-backports squeeze-backports main

2. Install the Sourcefabric package signing key:

sudo apt-get update
sudo apt-get install sourcefabric-keyring

3. Install the database management system:

sudo apt-get install postgresql

4. Install the streaming media server (optional):

sudo apt-get install icecast2

5. Remove PulseAudio, if installed:

sudo apt-get purge pulseaudio

6. Install Airtime:

sudo apt-get install airtime

Refer to the Configuration chapter for configuration options. Now you should be able to log in to the Airtime administration interface, as shown in the Getting started chapter.

Exporting the schedule

Airtime has a feature which enables your station's current show and schedule information to be displayed on remote websites. This feature is included in Airtime because you would not usually invite the general public to access your Airtime server directly. If you had very large numbers of people requesting data from the Airtime server at once, the burst of network traffic might overload the server, potentially disrupting your broadcasts. If carried out maliciously, this network overload is known as a denial of service attack.

Instead, your public-facing web server can retrieve the schedule information from Airtime. This information can then be displayed on your broadcast station or affiliate websites by a content management system, such as Sourcefabric's Newscoop (http://newscoop.sourcefabric.org/). It can be presented using Javascript widgets and styled with CSS, in any format that you require.

There are two kinds of information that can be retrieved remotely from Airtime; the metadata for the current show plus the following show (live-info), or the schedule for the current week (week-info). This metadata includes show names, times, descriptions and individual show URLs on your public website. That way, the audience for your station can click through from the schedule information to find out more about a particular show, or download a previous show recording that you might have made available.

If your Airtime server was accessible at http://air1.example.com the live show information could be retrieved by your web server using this URL:

http://air1.example.com/api/live-info/?callback

The comma-separated text metadata returned to your web server might be something like this:

({
"env":"development",
"schedulerTime":"2011-05-09 15:01:18",
"currentShow":[{"start_timestamp":"2011-05-09 16:00:00",
"end_timestamp":"2011-05-09 17:00:00",
"name":"Funk Show",
"id":"8",
"instance_id":"8",
"record":"0",
"url":"http:\/\/funk.example.com\/"}],
"nextShow":[{"id":"9","starts":"2011-05-09 17:00:00",
"ends":"2011-05-09 18:00:00",
"show_id":"9",
"record":"0",
"rebroadcast":"0",
"instance_id":null,
"file_id":null,
"soundcloud_id":null,
"time_filled":null,
"name":"Dance show",
"url":"http:\/\/dance.example.com",
"genre":"Dance",
"description":"Techno, techno, techno, techno!",
"color":"000000",
"background_color":"ffea00",
"start_timestamp":"2011-05-09 17:00:00",
"end_timestamp":"2011-05-09 18:00:00"}],
"timezone":"BST",
"timezoneOffset":"3600"
})

The information for the current week's schedule could be retrieved using the URL:

http://air1.example.com/api/week-info/?callback

In this case, the metadata returned would be in a different format from the above example, something like the following. To keep the example short, this particular schedule export only contains four shows on a Monday. A full weekly schedule export would contain a great deal more text.  

({
"sunday":[],
"monday":[
{"show_starts":"2011-05-09 14:25:00",
"show_ends":"2011-05-09 14:35:00",
"show_name":"Elvis Show",
"url":"http:\/\/elvis.example.com\/"},
{"show_starts":"2011-05-09 14:50:00",
"show_ends":"2011-05-09 14:55:00",
"show_name":News",
"url":"http:\/\/news.example.com\/"},
{"show_starts":"2011-05-09 16:00:00",
"show_ends":"2011-05-09 17:00:00",
"show_name":"Funk Show",
"url":"http:\/\/funk.example.com\/"},
{"show_starts":"2011-05-09 17:00:00",
"show_ends":"2011-05-09 18:00:00",
"show_name":"Dance show",
"url":"http:\/\/dance.example.com"}
],
"tuesday":[],
"wednesday":[],
"thursday":[],
"friday":[],
"saturday":[]
})

If you see the message You are not allowed to access this resource when attempting to display schedule information in your web browser, log in to the Airtime administration interface, click System in the main menu, then Preferences. Set Allow Remote Websites To Access "Schedule" Info? to Enabled, click the Submit button, then refresh the browser window opened on the schedule export URL.

 

Caching schedule information

If the Airtime server is behind a firewall, or you want to protect the Airtime server from large numbers of schedule requests, you may wish to cache the schedule information on a public-facing or intermediate server. You can then create a firewall rule that only allows the schedule server to connect to the Airtime server, in addition to any remote users of the Airtime web interface.

Your system administrator can set up schedule caching on a standard Apache and PHP enabled web server with the curl program installed, using the following steps:

1. Create a bash script on the schedule server (schedule.example.com) that polls the remote Airtime server (air1.example.com), and writes the metadata returned into a pair of local temporary files:

sudo nano /usr/local/bin/airtime-schedule.sh

The content of this file should be like the following script, replacing air1.example.com with the name of your Airtime server:

#!/bin/sh

curl -s "http://air1.example.com/api/live-info/?callback=***" > /tmp/live-info

curl -s "http://air1.example.com/api/week-info/?callback=***" > /tmp/week-info

2. Make the bash script executable:

sudo chmod +x /usr/local/bin/airtime-schedule.sh

3. Create an Apache VirtualHost configuration for the schedule server:

sudo nano /etc/apache2/sites-available/schedule

containing a definition like the following, replacing schedule.example.com with the name of your schedule server:

<VirtualHost *:80>
   ServerName schedule.example.com
   DocumentRoot /var/www/schedule/
</VirtualHost>
4. In the schedule server's DocumentRoot folder, create the folders api/live-info/ and api/week-info/
sudo mkdir -p /var/www/schedule/api/live-info/
sudo mkdir -p /var/www/schedule/api/week-info/

5. Create an index.php file in the api/live-info/ folder:

sudo nano /var/www/schedule/api/live-info/index.php

containing the following code:

<?php
$filename = '/tmp/live-info';  // define here the path and name of uploaded live-info file

header('Content-Type: text/javascript');
header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");

$callback = empty($_GET['callback']) ? null : $_GET['callback'];
$content = file_get_contents($filename);
$content = str_replace('***', $callback, $content);
echo $content;
?>

6. Create an index.php file in the api/week-info/ folder:

sudo nano /var/www/schedule/api/week-info/index.php

containing the following code:

<?php
$filename = '/tmp/week-info';  // define here the path and name of uploaded week-info file

header('Content-Type: text/javascript');
header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");

$callback = empty($_GET['callback']) ? null : $_GET['callback'];
$content = file_get_contents($filename);
$content = str_replace('***', $callback, $content);
echo $content;
?>

7. Enable the new configuration and reload the Apache web server:

sudo a2ensite schedule
sudo /etc/init.d/apache2 reload

8. Create a cron job to run the bash script each minute:

sudo nano /etc/cron.d/airtime-schedule

containing the line:

* * * * * www-data /usr/local/bin/airtime-schedule.sh

The schedule server will now be serving the same show information as the Airtime server, with a cache lifetime of one minute. You can adjust the cache lifetime by altering the frequency of the cron job that polls the Airtime server.

Website widgets

Example HTML, Javascript and CSS code for your public website are provided in the widgets folder of the Airtime installation tarball. If you have performed an automated installation on Debian or Ubuntu, the widgets can be found in the /usr/share/doc/airtime/examples/ directory.

For the widgets to work on a typical web server, links to the Javascript and CSS code have to be included in the HTML page <head> element, like the following example:

<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Airtime widgets</title>
   <script src="js/jquery-1.6.1.min.js" type="text/javascript">
    </script>
   <script src="js/jquery-ui-1.8.10.custom.min.js" type="text/javascript">
    </script>
   <script src="js/jquery.showinfo.js" type="text/javascript">
    </script>
  <link href="css/airtime-widgets.css" rel="stylesheet" type="text/css" />
</head>

A full example is shown in the widgets/sample_page.html file in the Airtime installation tarball, or /usr/share/doc/airtime/examples/ directory if you have installed the Debian/Ubuntu package of Airtime.

The following code is for a small airtimeLiveInfo widget that displays information about the current show (show time elapsed, and show time remaining), as well as some information about the next show (start time and end time). In this example, the label text for onAirNow is translated into French for local language support:

<script>
    $(document).ready(function() {
        $("#headerLiveHolder").airtimeLiveInfo({
            sourceDomain: "http://schedule.example.com/",
            text: {onAirNow:"Sur Les Antennes", offline:"Offline", current:"Current", next:"Next"},
            updatePeriod: 20 //seconds
        });
    });
</script>

On the public website, this widget can be made to look like the following screenshot:

 

The CSS properties color: and text-transform:uppercase have been used to style the onAirNow label. There is a full example CSS file widgets/css/airtime-widgets.css in the Airtime installation tarball or /usr/share/doc/airtime/examples/ directory.

The next widget airtimeShowSchedule is medium sized, and displays the upcoming show schedule for that day.

<script>
    $(document).ready(function() {
        $("#onAirToday").airtimeShowSchedule({
            sourceDomain: "http://schedule.example.com/",
            text: {onAirToday:"On air today"},
            updatePeriod: 5 //seconds
        });
    });
</script>

 The widget code above can be styled to look like this screen shot:


Finally, the following code creates a large widget airtimeWeekSchedule that enables site visitors to browse through the show schedule for that week. In this example, all widget labels have been translated into French:

<script>    
    $(document).ready(function() {
        $("#scheduleTabs").airtimeWeekSchedule({
            sourceDomain:"http://schedule.example.com/",
            dowText:{monday:"Lundi", tuesday:"Mardi", wednesday:"Mercredi", thursday:"Jeudi", friday:"Vendredi", saturday:"Samedi", sunday:"Dimanche"},
            miscText:{time:"Temps", programName:"Nom du Programme", details:"Détails", readMore:"Lire La Suite"},
            updatePeriod: 600 //seconds
        });
    });
</script>

Using the code above and CSS, the first six hours of the schedule each day can be styled to look like this:

 

The value of sourceDomain in the code examples above should match the URL that you wish to serve schedule information to the public from. If you have used the Caching schedule information method detailed above, this would be the URL of your schedule server, not the Airtime server directly.

Getting started

If the Airtime server has a web browser installed, you can access the administration interface by opening the address:

http://localhost/

If you have set up Airtime so that it can be accessed from other computers, you would use a domain name instead. For example:

http://airtime.example.com/

You can log in for the first time with the user name admin and the password set during installation. Your browser should automatically focus on the Username field.

If you enter the password incorrectly three times, you will be presented with a reCAPTCHA challenge to prove that you are a human, and not a password-guessing robot. This feature helps protect your Airtime installation against brute force attacks.

If configured, you will see a link Reset password below the password field, which enables you to obtain a password reminder by email. See the chapter Preferences to configure this feature.

Register Airtime

After you have logged in as admin for the first time, a pop-up window will ask if you wish to send technical support data about your server to Sourcefabric.

These details can be viewed by clicking on the Show me what I am sending link, which expands a scrolling window. The data helps Sourcefabric engineers resolve any problems with your Airtime installation, as well as count the number of installations worldwide.

Sourcefabric has a privacy policy regarding data collection, which you can read by clicking the link to http://www.sourcefabric.org/en/about/policy/ further down. After checking the Send support feedback and privacy policy boxes, you can submit the data by clicking the Yes, help Airtime button.

This window also offers the opportunity to Promote my station on Sourcefabric.org (on the page http://www.sourcefabric.org/en/airtime/whosusing/) by checking the box. Fill in the form which will appear with some details about your station. The contact details are only requested for verification purposes, and will not be made available to the public. Click the Browse button to select a Station Logo image from the file manager on your computer.

The Master Panel

After the pop-up window is closed, you should now see the Master Panel, which is present at the top of every page of the Airtime interface. On the left hand side, the Master Panel displays the details of the Previous file played out, the current file playing (with an orange progress bar and time elapsed/time remaining), and the details of the Next file due to play. It also displays the name and scheduled time of the current show, with a blue progress bar.

Beneath this side of the Master Panel is the main navigation menu, with sub-menus labelled Now Playing, Add Media, Playlist Builder, Calendar, System and Help. We'll be looking at the contents of these menus in the following chapters of this book.

On the right hand side of the Master Panel are the switches for the Source Streams, which enable you to switch from scheduled play to remote live sources, and back. (See the chapter Stream settings for details of this feature). The On Air indicator turns from dark grey to red whenever audio is being played out. Underneath this indicator is a Listen button, which opens a pop-up player that can be used to audition the available playout streams.

There is also a clock indicating the Station time and time zone. Beneath the clock, the name of the user currently logged in is displayed, and there is the link to Logout

On the right of the Logout link, clicking the green check mark opens a pop-up window with some information about the version of Airtime installed. If your Airtime installation is not the latest version available, the green check mark changes to a green upgrade arrow. Should your Airtime installation get too far out of date, this arrow will change to a red exclamation mark.

Checking an Icecast server

If you have enabled the Icecast streaming option when you installed Airtime, you can check that the Icecast server is running by opening port 8000 of the server in your web browser. For example, on the server itself, you can use:

http://localhost:8000

or from another machine, using the domain name of the Icecast server:

http://streaming.example.com:8000

You should see the Icecast status page, with details of the connection that Airtime has made to Icecast. If you have only just installed Airtime, there won't be any media playing out yet.

HD Audio Models

This listing is provided to help ensure that the correct model parameter is passed to the ALSA kernel module for an Intel HDA soundcard, if one is fitted to your Airtime server. See the chapter Preparing the server in this book for more details.

  Model name       Description
  ----------    -----------
ALC880
======
  3stack        3-jack in back and a headphone out
  3stack-digout 3-jack in back, a HP out and a SPDIF out
  5stack        5-jack in back, 2-jack in front
  5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
  6stack        6-jack in back, 2-jack in front
  6stack-digout 6-jack with a SPDIF out
  w810          3-jack
  z71v          3-jack (HP shared SPDIF)
  asus          3-jack (ASUS Mobo)
  asus-w1v      ASUS W1V
  asus-dig      ASUS with SPDIF out
  asus-dig2     ASUS with SPDIF out (using GPIO2)
  uniwill       3-jack
  fujitsu       Fujitsu Laptops (Pi1536)
  F1734         2-jack
  lg            LG laptop (m1 express dual)
  lg-lw         LG LW20/LW25 laptop
  tcl           TCL S700
  clevo         Clevo laptops (m520G, m665n)
  medion        Medion Rim 2150
  test          for testing/debugging purpose, almost all controls can be
                adjusted.  Appearing only when compiled with
                $CONFIG_SND_DEBUG=y
  auto          auto-config reading BIOS (default)

ALC260
======
  hp            HP machines
  hp-3013       HP machines (3013-variant)
  hp-dc7600     HP DC7600
  fujitsu       Fujitsu S7020
  acer          Acer TravelMate
  will          Will laptops (PB V7900)
  replacer      Replacer 672V
  favorit100    Maxdata Favorit 100XS
  basic         fixed pin assignment (old default model)
  test          for testing/debugging purpose, almost all controls can
                adjusted.  Appearing only when compiled with
                $CONFIG_SND_DEBUG=y
  auto          auto-config reading BIOS (default)

ALC262
======
  fujitsu       Fujitsu Laptop
  hp-bpc        HP xw4400/6400/8400/9400 laptops
  hp-bpc-d7000  HP BPC D7000
  hp-tc-t5735   HP Thin Client T5735
  hp-rp5700     HP RP5700
  benq          Benq ED8
  benq-t31      Benq T31
  hippo         Hippo (ATI) with jack detection, Sony UX-90s
  hippo_1       Hippo (Benq) with jack detection
  sony-assamd   Sony ASSAMD
  toshiba-s06   Toshiba S06
  toshiba-rx1   Toshiba RX1
  tyan          Tyan Thunder n6650W (S2915-E)
  ultra         Samsung Q1 Ultra Vista model
  lenovo-3000   Lenovo 3000 y410
  nec           NEC Versa S9100
  basic         fixed pin assignment w/o SPDIF
  auto          auto-config reading BIOS (default)

ALC267/268
==========
  quanta-il1    Quanta IL1 mini-notebook
  3stack        3-stack model
  toshiba       Toshiba A205
  acer          Acer laptops
  acer-dmic     Acer laptops with digital-mic
  acer-aspire   Acer Aspire One
  dell          Dell OEM laptops (Vostro 1200)
  zepto         Zepto laptops
  test          for testing/debugging purpose, almost all controls can
                adjusted.  Appearing only when compiled with
                $CONFIG_SND_DEBUG=y
  auto          auto-config reading BIOS (default)

ALC269
======
  basic         Basic preset
  quanta        Quanta FL1
  laptop-amic   Laptops with analog-mic input
  laptop-dmic   Laptops with digital-mic input
  fujitsu       FSC Amilo
  lifebook      Fujitsu Lifebook S6420
  auto          auto-config reading BIOS (default)

ALC662/663/272
==============
  3stack-dig    3-stack (2-channel) with SPDIF
  3stack-6ch     3-stack (6-channel)
  3stack-6ch-dig 3-stack (6-channel) with SPDIF
  5stack-dig     5-stack with SPDIF
  lenovo-101e    Lenovo laptop
  eeepc-p701    ASUS Eeepc P701
  eeepc-ep20    ASUS Eeepc EP20
  ecs           ECS/Foxconn mobo
  m51va         ASUS M51VA
  g71v          ASUS G71V
  h13           ASUS H13
  g50v          ASUS G50V
  asus-mode1    ASUS
  asus-mode2    ASUS
  asus-mode3    ASUS
  asus-mode4    ASUS
  asus-mode5    ASUS
  asus-mode6    ASUS
  asus-mode7    ASUS
  asus-mode8    ASUS
  dell          Dell with ALC272
  dell-zm1      Dell ZM1 with ALC272
  samsung-nc10  Samsung NC10 mini notebook
  auto          auto-config reading BIOS (default)

ALC680
======
  base          Base model (ASUS NX90)
  auto          auto-config reading BIOS (default)

ALC882/883/885/888/889
======================
  3stack-dig    3-jack with SPDIF I/O
  6stack-dig    6-jack digital with SPDIF I/O
  arima         Arima W820Di1
  targa         Targa T8, MSI-1049 T8
  asus-a7j      ASUS A7J
  asus-a7m      ASUS A7M
  macpro        MacPro support
  mb5           Macbook 5,1
  macmini3      Macmini 3,1
  mba21         Macbook Air 2,1
  mbp3          Macbook Pro rev3
  imac24        iMac 24'' with jack detection
  imac91        iMac 9,1
  w2jc          ASUS W2JC
  3stack-2ch-dig        3-jack with SPDIF I/O (ALC883)
  alc883-6stack-dig     6-jack digital with SPDIF I/O (ALC883)
  3stack-6ch    3-jack 6-channel
  3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
  6stack-dig-demo  6-jack digital for Intel demo board
  acer          Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
  acer-aspire   Acer Aspire 9810
  acer-aspire-4930g Acer Aspire 4930G
  acer-aspire-6530g Acer Aspire 6530G
  acer-aspire-7730g Acer Aspire 7730G
  acer-aspire-8930g Acer Aspire 8930G
  medion        Medion Laptops
  targa-dig     Targa/MSI
  targa-2ch-dig Targa/MSI with 2-channel
  targa-8ch-dig Targa/MSI with 8-channel (MSI GX620)
  laptop-eapd   3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
  lenovo-101e   Lenovo 101E
  lenovo-nb0763 Lenovo NB0763
  lenovo-ms7195-dig Lenovo MS7195
  lenovo-sky    Lenovo Sky
  haier-w66     Haier W66
  3stack-hp     HP machines with 3stack (Lucknow, Samba boards)
  6stack-dell   Dell machines with 6stack (Inspiron 530)
  mitac         Mitac 8252D
  clevo-m540r   Clevo M540R (6ch + digital)
  clevo-m720    Clevo M720 laptop series
  fujitsu-pi2515 Fujitsu AMILO Pi2515
  fujitsu-xa3530 Fujitsu AMILO XA3530
  3stack-6ch-intel Intel DG33* boards
  intel-alc889a Intel IbexPeak with ALC889A
  intel-x58     Intel DX58 with ALC889
  asus-p5q      ASUS P5Q-EM boards
  mb31          MacBook 3,1
  sony-vaio-tt  Sony VAIO TT
  auto          auto-config reading BIOS (default)

ALC861/660
==========
  3stack        3-jack
  3stack-dig    3-jack with SPDIF I/O
  6stack-dig    6-jack with SPDIF I/O
  3stack-660    3-jack (for ALC660)
  uniwill-m31   Uniwill M31 laptop
  toshiba       Toshiba laptop support
  asus          Asus laptop support
  asus-laptop   ASUS F2/F3 laptops
  auto          auto-config reading BIOS (default)

ALC861VD/660VD
==============
  3stack        3-jack
  3stack-dig    3-jack with SPDIF OUT
  6stack-dig    6-jack with SPDIF OUT
  3stack-660    3-jack (for ALC660VD)
  3stack-660-digout 3-jack with SPDIF OUT (for ALC660VD)
  lenovo        Lenovo 3000 C200
  dallas        Dallas laptops
  hp            HP TX1000
  asus-v1s      ASUS V1Sn
  auto          auto-config reading BIOS (default)

CMI9880
=======
  minimal       3-jack in back
  min_fp        3-jack in back, 2-jack in front
  full          6-jack in back, 2-jack in front
  full_dig      6-jack in back, 2-jack in front, SPDIF I/O
  allout        5-jack in back, 2-jack in front, SPDIF out
  auto          auto-config reading BIOS (default)

AD1882 / AD1882A
================
  3stack        3-stack mode (default)
  6stack        6-stack mode

AD1884A / AD1883 / AD1984A / AD1984B
====================================
  desktop       3-stack desktop (default)
  laptop        laptop with HP jack sensing
  mobile        mobile devices with HP jack sensing
  thinkpad      Lenovo Thinkpad X300
  touchsmart    HP Touchsmart

AD1884
======
  N/A

AD1981
======
  basic         3-jack (default)
  hp            HP nx6320
  thinkpad      Lenovo Thinkpad T60/X60/Z60
  toshiba       Toshiba U205

AD1983
======
  N/A

AD1984
======
  basic         default configuration
  thinkpad      Lenovo Thinkpad T61/X61
  dell_desktop  Dell T3400

AD1986A
=======
  6stack        6-jack, separate surrounds (default)
  3stack        3-stack, shared surrounds
  laptop        2-channel only (FSC V2060, Samsung M50)
  laptop-eapd   2-channel with EAPD (ASUS A6J)
  laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
  ultra         2-channel with EAPD (Samsung Ultra tablet PC)
  samsung       2-channel with EAPD (Samsung R65)
  samsung-p50   2-channel with HP-automute (Samsung P50)

AD1988/AD1988B/AD1989A/AD1989B
==============================
  6stack        6-jack
  6stack-dig    ditto with SPDIF
  3stack        3-jack
  3stack-dig    ditto with SPDIF
  laptop        3-jack with hp-jack automute
  laptop-dig    ditto with SPDIF
  auto          auto-config reading BIOS (default)

Conexant 5045
=============
  laptop-hpsense    Laptop with HP sense (old model laptop)
  laptop-micsense   Laptop with Mic sense (old model fujitsu)
  laptop-hpmicsense Laptop with HP and Mic senses
  benq          Benq R55E
  laptop-hp530  HP 530 laptop
  test          for testing/debugging purpose, almost all controls
                can be adjusted.  Appearing only when compiled with
                $CONFIG_SND_DEBUG=y

Conexant 5047
=============
  laptop        Basic Laptop config
  laptop-hp     Laptop config for some HP models (subdevice 30A5)
  laptop-eapd   Laptop config with EAPD support
  test          for testing/debugging purpose, almost all controls
                can be adjusted.  Appearing only when compiled with
                $CONFIG_SND_DEBUG=y

Conexant 5051
=============
  laptop        Basic Laptop config (default)
  hp            HP Spartan laptop
  hp-dv6736     HP dv6736
  hp-f700       HP Compaq Presario F700
  ideapad       Lenovo IdeaPad laptop
  lenovo-x200   Lenovo X200 laptop
  toshiba       Toshiba Satellite M300

Conexant 5066
=============
  laptop        Basic Laptop config (default)
  hp-laptop     HP laptops, e g G60
  asus          Asus K52JU, Lenovo G560
  dell-laptop   Dell laptops
  dell-vostro   Dell Vostro
  olpc-xo-1_5   OLPC XO 1.5
  ideapad       Lenovo IdeaPad U150
  thinkpad      Lenovo Thinkpad

STAC9200
========
  ref           Reference board
  oqo           OQO Model 2
  dell-d21      Dell (unknown)
  dell-d22      Dell (unknown)
  dell-d23      Dell (unknown)
  dell-m21      Dell Inspiron 630m, Dell Inspiron 640m
  dell-m22      Dell Latitude D620, Dell Latitude D820
  dell-m23      Dell XPS M1710, Dell Precision M90
  dell-m24      Dell Latitude 120L
  dell-m25      Dell Inspiron E1505n
  dell-m26      Dell Inspiron 1501
  dell-m27      Dell Inspiron E1705/9400
  gateway-m4    Gateway laptops with EAPD control
  gateway-m4-2  Gateway laptops with EAPD control
  panasonic     Panasonic CF-74
  auto          BIOS setup (default)

STAC9205/9254
=============
  ref           Reference board
  dell-m42      Dell (unknown)
  dell-m43      Dell Precision
  dell-m44      Dell Inspiron
  eapd          Keep EAPD on (e.g. Gateway T1616)
  auto          BIOS setup (default)

STAC9220/9221
=============
  ref           Reference board
  3stack        D945 3stack
  5stack        D945 5stack + SPDIF
  intel-mac-v1  Intel Mac Type 1
  intel-mac-v2  Intel Mac Type 2
  intel-mac-v3  Intel Mac Type 3
  intel-mac-v4  Intel Mac Type 4
  intel-mac-v5  Intel Mac Type 5
  intel-mac-auto Intel Mac (detect type according to subsystem id)
  macmini       Intel Mac Mini (equivalent with type 3)
  macbook       Intel Mac Book (eq. type 5)
  macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
  macbook-pro   Intel Mac Book Pro 2nd generation (eq. type 3)
  imac-intel    Intel iMac (eq. type 2)
  imac-intel-20 Intel iMac (newer version) (eq. type 3)
  ecs202        ECS/PC chips
  dell-d81      Dell (unknown)
  dell-d82      Dell (unknown)
  dell-m81      Dell (unknown)
  dell-m82      Dell XPS M1210
  auto          BIOS setup (default)

STAC9202/9250/9251
==================
  ref           Reference board, base config
  m1            Some Gateway MX series laptops (NX560XL)
  m1-2          Some Gateway MX series laptops (MX6453)
  m2            Some Gateway MX series laptops (M255)
  m2-2          Some Gateway MX series laptops
  m3            Some Gateway MX series laptops
  m5            Some Gateway MX series laptops (MP6954)
  m6            Some Gateway NX series laptops
  auto          BIOS setup (default)

STAC9227/9228/9229/927x
=======================
  ref           Reference board
  ref-no-jd     Reference board without HP/Mic jack detection
  3stack        D965 3stack
  5stack        D965 5stack + SPDIF
  5stack-no-fp  D965 5stack without front panel
  dell-3stack   Dell Dimension E520
  dell-bios     Fixes with Dell BIOS setup
  volknob       Fixes with volume-knob widget 0x24
  auto          BIOS setup (default)

STAC92HD71B*
============
  ref           Reference board
  dell-m4-1     Dell desktops
  dell-m4-2     Dell desktops
  dell-m4-3     Dell desktops
  hp-m4         HP mini 1000
  hp-dv5        HP dv series
  hp-hdx        HP HDX series
  hp-dv4-1222nr HP dv4-1222nr (with LED support)
  auto          BIOS setup (default)

STAC92HD73*
===========
  ref           Reference board
  no-jd         BIOS setup but without jack-detection
  intel         Intel DG45* mobos
  dell-m6-amic  Dell desktops/laptops with analog mics
  dell-m6-dmic  Dell desktops/laptops with digital mics
  dell-m6       Dell desktops/laptops with both type of mics
  dell-eq       Dell desktops/laptops
  alienware     Alienware M17x
  auto          BIOS setup (default)

STAC92HD83*
===========
  ref           Reference board
  mic-ref       Reference board with power management for ports
  dell-s14      Dell laptop
  hp            HP laptops with (inverted) mute-LED
  hp-dv7-4000   HP dv-7 4000
  auto          BIOS setup (default)

STAC9872
========
  vaio          VAIO laptop without SPDIF
  auto          BIOS setup (default)

Cirrus Logic CS4206/4207
========================
  mbp55         MacBook Pro 5,5
  imac27        IMac 27 Inch
  auto          BIOS setup (default)

VIA VT17xx/VT18xx/VT20xx
========================
  auto          BIOS setup (default)

Help

The first entry on Airtime's Help menu offers a Getting Started guide for new users. Further down, there is also a link to the online version of this User Manual and an About page, which displays version and licensing information.

You can visit the Airtime online support forum, and sign up for the mailing list, at http://forum.sourcefabric.org/categories/airtime-support

This forum is mirrored by the mailing list, so posts on the forum appear on the mailing list and vice versa. You can therefore also post a message there by emailing airtime-support@lists.sourcefabric.org

To subscribe to forum updates via mail, please register or login to the forum by clicking the appropriate link. Then click the 'Subscribe' button at the top of each forum page.

Bug reporting

Airtime needs your input to improve. If you think you've found a bug, please visit http://dev.sourcefabric.org/ and sign in, using the same login and password that you registered for the Airtime forum. Create a bug report by selecting Create Issue, then Airtime, and then Bug. That way, the Airtime team can keep track of your problem and notify you when it has been fixed. You can also suggest improvements and new features for Airtime on that site.

Contact

Finally, when all other avenues have been exhausted, email us directly at contact@sourcefabric.org and we'll try to help!

Other help

The UNESCO publication Community Radio - A user's guide to the technology: http://en.flossmanuals.net/airtime-en-2-0/help/_booki/airtime-en-2-0/static/CommunityRadioUserGuide.pdf features a very comprehensive guide to setting up a community radio station. This guide is aimed at people thinking about setting up a radio station in India, but includes lots of practical advice that would be useful in any country.

Icecast and SHOUTcast

Airtime supports direct connection to two popular streaming media servers, the open source Icecast (http://www.icecast.org) and the proprietary SHOUTcast (http://www.shoutcast.com). Apart from the software license, the main difference between these two servers is that Icecast supports simultaneous MP3 and Ogg Vorbis streaming from Airtime, whereas SHOUTcast supports MP3 but not Ogg Vorbis. The royalty-free Ogg Vorbis format has the advantage of better sound quality at lower bitrates, which has a direct impact on the amount of bandwidth that your station will require to serve the same number of listeners.

Ogg Vorbis playback is supported in Mozilla Firefox, Google Chrome and Opera browsers, via jPlayer (http://jplayer.org/), and is also supported in several popular media players, including VideoLAN Client, also known as VLC (http://www.videolan.org/vlc/). (See the chapter Stream player for your website on how to deliver jPlayer to your audience).

Streaming MP3 below a bitrate of 128kbps is not recommended for music, because of a perceptible loss of high audio frequencies in the broadcast playout. A 96kbps or 64kbps MP3 stream may be acceptable for voice broadcasts if there is a requirement for compatibility with legacy hardware playback devices which do not support Ogg Vorbis streams.

Because Airtime supports simultaneous streaming in both formats, it is possible to offer one stream via your website, and another independent stream for direct connection from hardware players. You can test whether Ogg Vorbis streams sound better at low bitrates for yourself, by using the LISTEN button in Airtime's Master Panel to switch between streaming formats.

Conversely, you may have a music station which wants to stream at 160kbps or 192kbps to offer a quality advantage over stations streaming at 128kbps or less. Since both Ogg Vorbis and MP3 formats use lossy compression, listeners will only hear the benefit of higher streaming bitrates if the media files in the Airtime storage server are encoded at an equivalent bitrate, or higher.

UTF-8 metadata in Icecast MP3 streams

When sending metadata about your stream to an Icecast server in non-Latin alphabets, you may find that Icecast does not display the characters correctly for an MP3 stream, even though they are displayed correctly for an Ogg Vorbis stream. In the following screenshot, Russian characters are being displayed incorrectly in the Current Song field for the MP3 stream:

The solution is to specify that the metadata for the MP3 mount point you are using should be interpreted using UTF-8 encoding. You can do this by adding the following stanza to the /etc/icecast2/icecast.xml file, where airtime.mp3 is the name of your mount point:

  <mount>
       <mount-name>/airtime.mp3</mount-name>
       <charset>UTF-8</charset>
  </mount>

After saving the /etc/icecast2/icecast.xml file, you should restart the Icecast server:

sudo invoke-rc.d icecast2 restart
Restarting icecast2: Starting icecast2
Detaching from the console
icecast2.

Live shows with Mixxx

Mixxx is a cross-platform Open Source application for DJs, available from http://www.mixxx.org/

Installed on a desktop or laptop computer, Mixxx complements your Airtime server to provide a complete system for both live and scheduled broadcasting. Although Mixxx has many features designed for dance music DJs that require beat matching and pitch independent time stretching, the program can be used for any kind of manually triggered broadcast playout, including live speech shows such as news or current affairs.

Mixxx supports a wide variety of popular hardware control surfaces, which can be connected to your computer using a USB cable. A control surface might replace or augment an analogue mixer in your studio, depending on your live mixing and playout requirements.

Sound cards

If you wish to use Airtime and Mixxx on the same machine, you will need two or more sound cards, as each program requires exclusive access to the sound hardware. Otherwise, you may see an error message that Mixxx cannot access the sound device.

 

The solution is to configure Mixxx to use additional sound cards by clicking Options, Preferences, then Sound Hardware in the main Mixxx menu. Select devices other than the ALSA default of hw:0,0 for at least the Master and Headphones outputs. Then click the OK button.


Sharing storage

If you make the Airtime server's storage directory /srv/airtime/stor/ accessible to a desktop machine as a read-only location, Mixxx will accept that location as its default music library when starting up for the first time. (This location can also be configured after installation by clicking Options, Preferences, then Library in the main Mixxx menu).

You may need to adjust file and directory permissions so that the storage directory has read access from the desktop user account. Enabling write access directly to the storage server is not recommended, as this would allow desktop users to delete files which might be needed for playout later.

If the filesystem path has been configured correctly, the metadata for the files in the Airtime storage server will be displayed in the main window of the Mixxx interface. Individual files from the Airtime storage server can then be added to either of Mixxx's live players with a right-click on the filename, or by using the appropriate hardware buttons on a control surface. Therefore it is possible to manage the station's storage archive remotely and collaboratively through Airtime, while using Mixxx as the live playout client in multiple, remote studios.

The Airtime storage archive can be exported like any other file server share. The method that you implement would depend on the operating system of your desktop client machines, and whether they were on the same local network as the Airtime server, or remote.

For performance and redundancy reasons it is advisable to cache files required for a particular show on the client machine where Mixxx is installed. For example, for a GNU/Linux client machine, a nightly rsync download of new media in the archive would guard against network problems at playout time potentially disrupting a broadcast at a remote studio.

Mixxx users can also record a show, and then upload it through the Airtime web interface on a local or remote server for collaborative or user-generated broadcasts.

Streaming from Mixxx into Airtime

Mixxx 1.9.0 or later includes a live streaming client which, like Airtime, is compatible with the Icecast and SHOUTcast media servers. This feature can also be used to stream from Mixxx directly into a show in the Airtime schedule.

To configure Mixxx for streaming into Airtime, click Options, Preferences, then Live Broadcasting on the main Mixxx menu. For server Type, select the default of Icecast 2. For Host, Mount, Port, Login and Password, use the settings configured in the Airtime Streams page, on Airtime's System menu. See the chapter Stream settings for remote input connection details.

Airtime skins for Mixxx

Airtime-themed skins for Mixxx, designed with broadcast users in mind, are available for download from https://sourceforge.net/projects/airtime/files/

These skins provide a simplified interface for live broadcasting which do away with EQ, flange effect, looping and other features required by dance music DJs. Instead, the emphasis is on a clear and uncluttered interface which does not require large mouse movements to operate the most important controls. There are versions available both with and without pitch/tempo controls for beat matching.

After downloading one of the skins, extract the zip file and copy it to the skins directory on the computer where Mixxx is installed. For example, on Debian or Ubuntu:

unzip Airtime1280x1024_skin_for_Mixxx.zip
sudo cp -r Airtime1280x1024 /usr/share/mixxx/skins/

Then, start Mixxx and select the Airtime skin by clicking Options, Preferences, then Interface in the Mixxx main menu.

 

Interface customization

The Airtime administration interface, as a web application, is fully customizable using the same methods that you might use to modify a website. For instance, you may wish to increase certain font sizes or change the colours in the Airtime interface to better suit staff users with impaired vision. To do this, open one of the CSS files in the /public/css/ directory under the Airtime DocumentRoot directory in an editor such as nano:

sudo nano /usr/share/airtime/public/css/styles.css

To change the background colour of the administration interface from dark gray to white, the background: property of the body tag could be changed to #ffffff as follows:

body {
      font-size: 62.5%;
      font-family:Arial, Helvetica, sans-serif;
      background: #ffffff;
      margin: 0;
      padding: 0;
}

Save the file with Ctrl+O, then refresh your browser to see the change to the interface background colour.

Any custom changes that you make to the administration interface should be backed up before upgrading Airtime to a newer version, otherwise they could be overwritten. If you have made improvements that you think might be useful to other Airtime users, please contact Sourcefabric and tell us about them.

Modifying the Icecast interface

If you have installed Icecast, in the directory /etc/icecast2/web/ you will find several XSLT and other files which are used to generate the Icecast web interface. If you are familiar with HTML you should be able to modify these pages, as they are well commented. You do have to be careful with syntax, because something as simple as a missing bracket can cause the Icecast web interface to break down.

For example, you could change the status.xsl page:

sudo nano /etc/icecast2/web/status.xsl

Modifying the status.xsl page is a good place to start, because this is the default page that site visitors see when they browse port 8000 on your Icecast server. The most obvious change to make in the XSLT pages is the content of the <title> and <h2> tags, to announce the name of your station. You can also modify the style.css file in this directory to change colour and layout options.

After saving the file with Ctrl+O, refresh your web browser, and the new look should now be visible.

Listen

In the Master Panel, beneath the ON AIR indicator, you will find the LISTEN button.

This button opens a pop-up Live stream window, which enables you to monitor the streams that have been configured previously in the Streams page on the System menu. In the Live stream window, a drop-down menu enables you to switch between the streams which are currently available. Both the streaming server and name of the stream are shown. Your station logo is shown in the top left corner of the window, if you have uploaded one via the Support Feedback page on the System menu.

Beneath the drop-down menu for stream selection is an orange volume control bar. This volume control only adjusts the output level of the pop-up Live Stream window, not the output level of the Airtime server itself. To adjust output level between muted and maximum, click on the corresponding place in the orange bar, with maximum level on the right side. Click on the left side speaker icon to mute the output. 

 

When you have finished monitoring the streams, you can close the pop-up window in the normal way, depending on the browser you are using. In Firefox, you can close the window by clicking the X button in the top right corner. This action will not shut down the output from the Airtime server, only the stream monitoring on your desktop computer.

Introduction

Memorize is a memory game of finding matching pairs of tiles. These may be identical pairs or related pairs. For example, you could match a sound to a picture or text to a picture.

Each tile can consist of text, a picture, a picture with text, sound, or pronounced text during tile flip.

Memorize is more than playing an existing memory game, you can also create new games as well.

Modify a Memorize Game

Load Game

  1. Launch the Memorize activity.
  2. Click the Create tab.
  3. Click Load game. The Journal opens.

Click the game name. The Journal closes.

Modify Game

  1. Scroll through the list of pairs on the right side to find the pair of tiles to update.
  2. Click to highlight the pair of tiles. The original options are displayed on the left side.

Update the tiles

Delete the tiles


Save Game

Click Save, to the save the updated game.


About This Book

Everyone can be affected by disasters whether personally or indirectly. Disaster Management professionals are kept busy responding to events of all scales, yet find time  to explore the use of more sophisticated toolsets. The Sahana Project was conceived by people on the front lines of the 2004 Sri Lanka tsunami in order to coordinate the rescue efforts. The word "sahana" means "relief" in Sinhala. This has evolved to provide solutions to both prepare for and respond to disasters no matter where they happen.

Sahana Eden is an open source software platform which provides a range of solutions for Disaster Management practioners to help them reduce the impact disasters have on our communities through tracking the needs of the affected populations & coordinating the responding agencies & their resources.

The latest version of this book is available to either read online or order a printed copy from http://bit.ly/sahanaedenbook

Who is this book for ?

This book has been imagined to meet the needs of three kinds of persons: 1) Decision Makers looking for an appropriate solution for disaster management; 2) Deployers who are ready to deploy Sahana Eden; and 3) Developers who are extending Sahana Eden for more specialized solutions or want to contribute to the project. 

Decision Makers

Preparing and planning for crisis and disaster scenarios is an important part of every community. Whether it is at a global, national, regional or local level, leaders who understand the complexities of disaster response make better decisions and can quickly respond to changing situations. Decision Makers should read the "Introduction" section. This content covers the Sahana Eden platform overview, capabilities and selected case studies. This material will help decision makers in strategic planning and give them important insight into the deployment process.

Deployers

Those who are thinking about or who are ready to deploy Sahana Eden should read the "Introduction", "Getting Started" and "Administration" sections.

In order to deploy Sahana Eden, a deployer should be comfortable with the following system administration processes:

Developers

Developers should read the entire book as they should have an overview of how the software can be used and will need to maintain their local deployment.

Basic customization doesn't require any more skills than those required for a Deployer, however, more advanced development will require being familiar with or learning the following skills:

Language

In this tutorial, you will learn how to create and play a Memorize activity matching English numbers to French numbers. The tiles are grouped meaning all the English numbers are numbered '1' tiles while the French numbers are numbered '2' tiles. You will learn how to use the Pronounce text during tile flip along with adding plain text.

Preparation

There is no preparation for this tutorial.

Create Game

Launching Memorize

Launch a new Memorize activity. For further details about launching activities, refer to the Sugar manual.

Name the Game


  1. Click the Create tab.
  2. Type in a Game name.
  3. Click grouped game.

Insert Pictures and Text


  1. Type <English number> in Text box.
  2. Click Pronounce text during tile flip. Select <English> language from drop down list.
  3. Type <French number> in Text box.
  4. Click Pronounce text during tile flip. Select <French> language from drop down list.
  5. Click Add. The new pair of tiles are displayed on the left side.

    1. Repeat steps until all pairs are added.

    2. Click Save.

    Play


    1. Click the Play tab.
    2. Click Load game. The Journal opens.
    3. Click the file name. The Journal closes.


    1. Play game.
    2. To replay the same game, click Restart Game.

    Who Uses Sahana Eden?

    Sahana Eden is used by many diverse organizations throughout the world to assist  the response to traumatic events such as natural disasters. From hosted deployments by Foundation Team members to on-site deployments within organizations, Sahana Eden's versatility is demonstrated in some of the following case studies and use cases for the software. While some first responders are coming to assist after an earthquake, others are attempting to reduce risk by gathering information and helping to network and raise awareness prior to a disaster. Coordination of resources, understanding the inventory of available resources, raising awareness, and providing early warning all reduce risk and empower responses that can literally save lives. Here are some stories about deployers and responders using Sahana Eden.

    APBV - Portuguese Volunteer Firefighters

    With little to no budget, the president of the Associação Portuguesa dos Bombeiros Voluntários (APBV), was seeking better solutions to manage their limited resources.  In the past they had tried proprietary software based solutions which were not maintainable and did not address their needs.  These solutions were costly and did not offer a sustainable method for data management or migration.

    After seeing a demonstration of Sahana Eden at the Information Systems for Crisis Response and Management (ISCRAM) conference in Lisbon, APBV deployed the Human Resources module to help manage personnel and are planning to deploy the vehicle management system and connecting their GPS-enabled Tetra radios to Sahana Eden's mapping capabilities. They hope that this will become the national standard for disaster planning and crisis management for all of Portugal.

    Disaster Risk Reduction Project Portal

    www.drrprojects.net

    The Disaster Risk Reduction (DRR) Project Portal collects information on all multi-country and national level DRR projects and initiatives in the Asia Pacific region implemented since 2005. By facilitating information sharing across the region, the Portal aims to advance the Hyogo Framework for Action (HFA) goals in building the resilience of nations and communities to disasters. This includes making disaster risk reduction a high priority on local and national levels. There are many priorities for action, such as knowing the risks, enhancing early warning systems to reduce vulnerabilities, and building a culture of safety and resilience for all people by strengthening networks and working with the media.

    This Sahana Eden-powered portal was deployed at the Asian Disaster Preparedness Center.

    The Project Portal:

    Haiti 2010 Earthquake Response

    We all recall the awful event in early 2010 when an earthquake hit the town of Léogâne, near Port of Prince, Haiti. The loss of life, building, and damage estimates were shocking but trained response organizations went into action immediately.

    Anticipating the need for overall organization coordination, the Sahana Software Foundation deployed a public emergency response portal site using the Sahana Eden software. The site was hosted at http://haiti.sahanafoundation.org and the community managed access for registered users - those from charitable organizations, government agencies and educational institutions were given create/edit permissions to the site; while most of the data remained publicly available (read access) excluding sensitive information (such as personal contact information for agency staff). The site went live the day of the disaster.

    In the first 48 hours after the earthquake, responders wanted to know was who else was responding, what organizations already had staff in Haiti that could assist, where were they located, and what assets and resources they had available to them. To meet this need, Sahana's Organization Registry (OR) tracked organizations and offices working on the ground in Haiti. The Organization Registry provided a searchable database of organizations responding to the disaster, the sector where they are providing services, their office locations, activities and their contact details. The Sahana database became one of the primary repositories of organization, office and contact information for the relief operation during the first couple of weeks of the response. Organizations were encouraged to self-register and report their office locations or to simply send the Sahana team an e-mail indicating their office locations. Volunteers entered data from pre-disaster lists of organizations working in Haiti available from United Nations Office for the Coordination of Humanitarian Affairs (UN OCHA), as well as active contact lists used by United Nations Disaster Assessment Coordination (UNDAC), InterAction and other sources with official and accurate points of contact.

    During the second week of the relief operation, requests came from all directions seeking to identify the location and operating status of hospitals and medical facilities within Haiti. Sahana Eden's Hospital Registry organized a volunteer effort to geo-locate approximately 100 hospitals with names and known coordinates over a 24-hour period. The results of this effort added over 160 hospitals to the Sahana Hospital Registry that had been set up to manage medical and health facility capacity and needs assessment. Because avoiding overcrowding and ensuring medical personnel and equipment availability is crucial to its success, this registry was designed to be compliant with the OASIS EDXL-HAVE interoperability standard that provides a schema for tracking hospital capacity and bed availability data during emergencies. A KML feed built from Sahana’s hospital location data provided a visual customizable display of geographic data in Google Earth. This feed remained the most accurate and complete source of operating hospital facilities throughout the first two months of the relief operation and was accessed by thousands of users world-wide.

    The technology community's response to the Haitian earthquake was an unprecedented collaborative and cooperative effort on the part of different organizations to come together and to help each other and to not replicate efforts. The Sahana Software Foundation team worked from outside Haiti to deploy and manage the infrastructure being used by local and international responders and contributors.

    International Federation of Red Cross and Red Crescent Societies

    The International Federation of Red Cross and Red Crescent Societies (IFRC) developed a Resource Mapping System in Sahana Eden to allow their National Societies to share information on their Inventory, Assets, Staff and Volunteers. Neighboring National Societies and the IFRC can quickly see what is available in the event of a major disaster. This information is blended with data from other Geographic Information Systems (GIS), such as Population Density, Rainfall and Topography to allow for a more informed planning of the response.

    The solution allowed agencies to share a common server, yet retain full control over their data and who can have access to it (i.e. a multi-tenancy system). The open source nature of the software was important because it meant there was no vendor lock-in and the software was easy to maintain. For this deployment the Sahana team deployed using Amazon Web Services in the regional data center to guarantee low latency.

    HELIOS Supply Chain and Inventory Sharing

    The HELIOS foundation (helios-foundation.org) in the United Kingdom wanted to create a portal to allow Humanitarian Non-Governmental Organizations (NGOs) working in the field to be able to track and share information on their inventory of relief items. The system is planned to allow them to use up surplus items, avoid items expiring and avoid duplicate procurement. Data can be automatically uploaded from HELIOS instances or via manual data entry or uploading of spreadsheets.

    Sahana Eden was chosen to allow various methods of data entry as well as to scale for use by other NGOs. Future iterations will include sharing of information on planned procurements to allow bulk discounts shared freight movement and import costs.

    This work was done for the Consortium of British Humanitarian Agencies and funded by the Department for International Development (DfID), part of the UK government.

    What is streaming?

    Streaming Media is the term used to describe the real-time delivery of audio and video over the internet.  Streaming Media allows for live transmission of audio or video over the internet, transforming the internet into a broadcasting medium. Content can also be archived in streaming file formats? , allowing internet users to experience recordings of events after they happen.

    Varieties of Streaming

    There are three types of delivery of audio and video data over the internet: Download and Play, Progressive Download, and True Streaming.

    Download and play

    To experience Download and Play media you must first download the entire media file to your hard disk before you can play it. For this reason Download and Play media cannot be used for live broadcasts, however it is often a good way to deliver high quality media content over any bandwidth. A high quality movie, for example, can be downloaded over any internet connection. However because you cannot play the movie until you have downloaded the entire file, download time becomes a factor. To download a DVD movie (usually about 4.6 GB in size) over a dial-up modem (56kbps) it would take over 8 days! Most people would find this quite tedious!

    Download and Play media is not streaming media (more on this later) but it is a lot more popular than streaming. File sharing networks are Download and Play mechanisms, and this is an extremely popular activity on the internet. As many countries make high bandwidth connections more accesible there is an increasing popularity of trading Download and Play movies on these networks.

    Progressive download

    This enables you to experience media as it downloads to your harddrive. Progressive Download is useful but is less efficient than True Streaming and cannot provide some functionality such as multiple bitrate encoding. However this method has an advantage over Download and Play as you do not have to wait for the file to finish downloading before you can start playing it. There are some constraints - for example, if the file does not download as fast as you are playing it, then you will find that playback will stop while you wait for more of the file to download. This can be annoying and it is often the reason why some choose True Streaming as a preferred method of delivery.

    Quicktime (Apple's suite of streaming technologies) calls Progressive Download "Fast Start". This highlights one of the difficulties of learning streaming -  in the effort to differentiate technologies, each technology provider has made up their own jargon. However throughout this manual I will stick to the more generic terminologies wherever possible.

    True streaming

    This enables the user to view or listen to the media as it is delivered over the internet in real-time. True Streaming is the only variety of streaming that allows for live broadcasting, and it also supports more advanced functionality than Progressive Download, enabling the user to control the media experience by pausing, skipping forward, or rewinding. Although different terms have been used to describe True Streaming, including webcasting, livecasting, web tv, or net.radio, the term that has prevailed is "streaming media" (more often it is just refered to as "streaming").

    The difference between Progressive Download and True Streaming is not always obvious. If, for example, a user has a very fast connection to the internet then Progressive Download may appear to behave in exactly the same way as True Streaming.

    Within Download and Play, Progressive Download, and True Streaming there are two distinct varieties : static file streaming and live streaming.

    Static file streaming

    The delivery of pre-recorded media files over the internet in real time. Typically when we refer to archives of online media we are discussing static file streaming. A large archive of video art encoded into streaming files is an example of a collection of static file streaming files. This content is also known as on-demand or archived content. This content can be delivered by Download and Play, Progressive Download, or True Streaming processes.

    Live streaming

    The delivery of live audio and/or video over the internet. This allows the user to experience an event as it occurs in realtime. There are many examples of this such as online radio or viewing live performances. Only True Streaming supports live streaming.

    This manual will mainly deal with True Streaming of both live and archived content.

    Encoding

    To stream static files over the internet the files must be compressed and encoded into a 'streaming format'. Ripping CDs into MP3 is doing just this and is done using encoding softwares. In this process a CD audio recording is converted by the encoding software from a CD (Compact Disc) audio format into a 'streaming audio format' (MP3). This will involve compressing the data, which reduces its quality and file size, and converting the data into a 'streaming format' (for example MP3).

    Compression

    There are two forms of compression - lossy, and lossless compression.

    When the encoding process compresses the source file so that it can be delivered over internet connections in real-time this process degrades the quality of the audio and video. The more a file is compressed, the lower bandwidth required to be able to play the file, but the more the quality is reduced. A compromise has to be achieved whereby the level of compression achieves an acceptable audio and video experience, while reducing the amount of data enough to enable delivery over the internet.

    Live encoding is similar except that an audio or video (or both) input is encoded instead of a file. With this process the encoding software delivers the encoded data in a continuous stream to the streaming server.

    Lossless compression

    This is the process of compressing data information into a smaller size without removing data. To visualise this process imagine a paper bag with an object in it. When you remove the air in the bag by creating a vacuum the object in the bag is not affected even tough the total size of the bag is reduced 

    Lossy compression

    Sometimes called 'Perceptual Encoding', this is the process of 'throwing away' data to reduce the file size. The compression algorithms used are complex and try to preserve the qualitative perceptual experience as much as possible while discarding as much data as necessary.

    Lossy compression is a very fine art. The algorithms that enable this take into account how the brain precieves sounds and images and then discards information from the audio or video file while maintaining an aural and visual experience resembling the original source material. To do this the process follows Psychoacoustic and Psychovisual modelling principles.

    Codecs

    The algorithms used to compress and encode audio and video and create the file format are known as "codecs". The word is made from two common terms compress and decompress. The encoding software uses a codec to 'compress' the streaming content for delivery over the net, and the player softwares use a codec to 'decompress' the content for replay.

    The codec is mathematical wizardry and is the heart and soul of streaming. It is on this ground that we have the various technology providers battling it out for dominance. Each codec has its own unique way of doing things depending on what the developer believes is best, and some come with their own minefield of licencing issues too.

    Bitrate

    Compression is the process of reducing the amount of data

    Multiple bitrate encoding allows the server and player to negotiate the best quality (highest bandwidth) stream to be delivered from a single static file or live stream. Hence the player is delivered the best quality stream possible over the user's internet connection. Multiple bitrate? encoding produces only one encoded stream.

    Choosing the bitrate(s) will require the consideration of several factors, including: The target audience's connectivity; The desirable frame size of the video (if including video); The amount of movement in the frame (if including video); The level of video contrast (if including video); The type of audio encoded (e.g. ambient noise/voice/stereo music);The amount of camera movement (if including video); The quality of the camera and camera lens (if including video).

    Delivery

    Streaming static ("archived") files can be achieved using a normal web server. This is often the cheapest way to deliver content on a small scale. This method cannot be used for live streaming and does not allow for the advanced features of True Streaming such as multiple bitrate encoding. This method will also enhance the likelihood for time-outs ('buffering') and cannot deliver the same amount of simultaneous player connections as True Streaming.

    To enable live streaming and to gain full functionality and efficiency a streaming media server is required. This server is usually standard server hardware but with the necessary streaming server softwares installed. It is quite normal to install a streaming server on the same machine as an existing web server.

    Streaming servers

    Perhaps a good way to understand what a streaming server does is to imagine a radio station. A radio station comprises of three components - a studio, a transmitter, and the receivers that your audience has.

    radio.gif

    Above is a basic diagram showing how a transmitting radio station works. The radio studio is the source of the audio. In this space there are usually mixing desks, cd-players, minidisc players, turntables etc. Then from the studio an audio signal is sent to the transmitter. This can be sent from the studio to the transmitter by either a cable (sometimes called a "landline") or by a microwave link. Then the transmitter sends the audio via FM so that radio receivers (tuners) can pick it up and play it.

    Radio works this way because it is trying to distribute the studio audio to as many people as possible. If you imagine the radio studio without the transmitter then the station would have have a fairly reduced audience! Essentially only people that could fit into the studio would be able to listen. So the transmitter works as a distributer, allowing more people to connect via their radio receivers and hence the potential audience is enlarged.

    This is a close analogy to why streaming exists and how it works. If you were just playing audio on a computer in your room then the audience isn't going to be so big... so, we utilise streaming to distribute this audio to more people.

    transmit_server.gif

    The analogy is obvious....the computer replaces the radio studio, the streaming server replaces the transmitter, and your listeners connect by computers to the server rather than with radio receivers to the broadcast signal. The analog can be taken quite a long way. Having a bigger radio transmitter is like having more bandwidth available at the streaming server - both allow more people to connect.

    plumi_logo.gif

    Plumi

    Plumi is a Free Software Content Management System designed for video-sharing, based on Plone and produced by EngageMedia. Plumi enables you to create your own video-sharing site; by installing Plumi on your web server your can use a wide array of functionality to facilitate video distribution and community creation.

    Features include video podcasting, server-side flash/ogg transcoding and embedded playback, open content licensing, a sophisticated publishing workflow and large file uploading via FTP. You can also utilise many of Plone's other built in features including news, events, comments and user profiles.

    plumi.jpg

    This manual covers a basic guide to features for ordinary users, use of site administration tools, and installation and configuration of a new Plumi website on a Linux web server. The sections on installation and configuration require some prior knowledge as listed here.

    Key Terminology

    Throughout this manual, various external documentation is referred to - often using the term "Plone" as opposed to "Plumi". This is because Plumi is based on the Plone content management system, and most documentation on the web is written for Plone more generally, rather than specifically for Plumi.

    For Users

    For Site Administrators and Developers


    Edit Content

    Permissions to Edit Content

    On a Plumi site you need permission to edit content. You automatically have permission to edit any content that you have personally added and you can share ownership of content using the Sharing tab to give others permission to edit or view the content also. More information on this can be found in the Sharing Content chapter.

    If you are a site Manager, you have permission to edit any content added by any user. You can also change the owner of an item (see the end of this page for details).

    Publication Workflow - Is My Content Published?

    Plumi uses what is called a "work-flow" for the publishing of content. It means that members of the site create content and submit it for publishing, and editors of the site then review that content and approve it or reject it on the basis of the site's editorial policy.

    Once you've submitted content for publishing it goes into a work-flow state of "pending" - so site editors know that it is pending review. At this point the content is no longer editable by the member who created it - the "creator". The content remains unable to be edited when it is actually published.

    Now this makes good sense - if content was editable after being submitted for publishing then the original creator could change the content into something inappropriate, for example it could be a way for spammers to get advertising onto the website.

    However it means that as a content creator, you need to know how to retract your video once you have submitted it for publishing ("pending") or it is actually published ("published").

    More info can be found in the Publication States chapter, but we cover the basics of what to do to retract your content, so you can edit it, in the section below.

    Editing Content

    This section explains how to edit a video, news item, callout, event or other content after you have added it, or submitted it for publishing.

    Here's how to do it:

    1. Navigate to the content you wish to edit. We will use an event as an example.

    editcontent1  

    4. Click the drop-down menu that says pending if the content has not yet been approved, or published if it has already been approved.

    editcontent2

    5. Choose retract from this drop-down menu.

     

    6. Click the Edit tab that now appears, as your content is in public-draft state (this means it is available on the web, but does not come up in listings such as Latest Videos).



    7. Edit your content as you wish.



    8. Save your content by clicking the Save button.



    9. Submit for publishing once again by clicking Submit for publication from the drop-down menu (videos are submitted automatically each time you save them) by clicking.



    10. The item will once more be in the pending review state, waiting for review and approval by content editors (note you cannot see the Edit tab anymore).

    Changing Ownership

    When logged in as a manager, it is possible to change the owner of a piece of content. This is done via the "Ownership" tab.

    OwnershipTab1 

     

    Once in the Ownership tab, you can enter the name of the new owner and then click on the Perform Search button.

    OwnershipTab2 

    This will return a drop down box with a list of all the users who match your search value. Select the one you want and then click the Save button.

    OwnershipTab3 

    Once completed, you will be returned to the content item's display and a confirmation message will be shown.

    OwnershipTab4 

     

    The Vision for Open Translation

    Open Translation describes a nascent field of practice emerging at the crossroads of three dynamic movements of the information and internet eras:

    Open Content encompasses a diverse range of knowledge resources available under open licenses such as Creative Commons (CC) and Free Document License (FDL), from books to manuals to documents to blog posts to multimedia. These resources are published on terms that encourage their redistribution, modification, and broad re-use. Open content resources like Wikipedia have dramatically changed the way knowledge is authored, maintained, and accessed.

    The Free/Libre/Open Source Software (FLOSS) movement is a vibrant global phenomenon which has, over the past 30-plus years, generated a sprawling ecology of software tools that are freely and openly available to anyone who wants them. This movement has established an alternative to proprietary, corporate-controlled software and corresponding closed data formats, which greatly benefits translators and localization practitioners. Given access to the underlying source code, they can create new versions of tools to support underserved audiences.

    Open- or peer-production models use the internet's connected-but-distributed nature to bring broad human resources to bear on specific tasks or problems. Wikipedia is the flagship example of this, existing today as the single largest knowledge set in history. Other examples of peer production include Project Gutenberg's distributed proofreading community (www.gutenberg.org) and the FLOSSManuals authoring platform (www.flossmanuals.net) on which this book is produced.

    Open Translation synthesizes these three models of open production and open collaboration into a new discipline. It is the set of practices and work processes for translating and maintaining open content using FLOSS tools, and using the the internet to make that content and those tools and processes available to the largest number of writers and readers. Open Translation tools comprise a body of software that supports or performs language translation and is distributed under a FLOSS license. 

    Open Translation's open components are fundamentally interrelated.

    Open translation can be viewed as translation's movement from an individual sport to a team sport. Additionally, social translation on the Internet is, as Ethan Zuckerman has suggested, a way for communities of translators to become journalists, deciding which content to move between language communities. Journalism on the web, as a social practice, is as much about curating, annotating, rating, and linking as it is about writing. This is a powerful and emergent form of journalism, encyclopedia creation, social networking, and much more.

    The Promise of Open Translation

    Open content projects like Wikipedia have rewritten conventional wisdom on who can publish knowledge. Global Voices Online has dramatically prefixed the role of 'journalist' with the adjective 'citizen'. The Free and Open Source software movements have inverted software production models from centralized, opaque and often lurching processes into decentralized, transparent and frequently agile endeavors.

    Open Translation promises to profoundly broaden access to knowledge across language barriers. Wikipedia may exist in hundreds of languages, but many language versions lag in terms of coverage. General cross-lingual access to open content and digital knowledge is still the exception rather the rule. The future of Open Translation lies in establishing richer, better-connected sets of online and offline tools while growing a global network of volunteer translators who understand and follow best practices for translating content and building open translation memories.

    The vision for Open Translation is predicated on the notion that anyone can be a translator by contributing to Open Translation projects. Just as FLOSS projects have project managers, testers, community moderators, and documenters in addition to developers, Open Translation projects welcome the efforts of proofreaders, editors, and project managers in addition to actual translators.

    But there are also opportunity costs to adhering to a vision of Open Translation. Open Translation tools are in many instances not as mature or full-featured as their proprietary counterparts. Those wishing to blaze the trail of an all-open approach to translation face a worse-before-better situation, where near-term sacrifice is necessary to support the improvement and evolution of the open tool set.

    Getting to Open Translation

    As the field of Open Translation continues to emerge and evolve, there are a number of projects, networks, issues and trends driving and gating that evolution.

    As much as open content, FLOSS, and peer production models have profoundly impacted our world and culture, they are not yet well integrated for the purposes of Open Translation. Open Translation tool coverage is incomplete, and existing tools rarely inter-operate or share standards for data interchange. Ubiquitous web publishing platforms like Drupal and Wordpress have minimal built-in support for maintaining multi-lingual sites. Add to these facts that open content license publishers like Creative Commons have not fully resolved licensing implications for translated works, and it is clear there is still much work to be done.

    Open Translation is synonymous with a new ecology of participation, and one for which the roles are still being established. What is known is that there are two under-tapped human resources which can be brought to bear: translators who want to volunteer their skills, and poly-lingual individuals who want to serve as volunteer translators. But leveraging such contributions is dependent on having well-defined ways in which to get involved. Global Voices and Wikipedia have fundamentally different models for volunteer translation, and are still evolving their community processes. Most open content projects have no idea how to establish sustainable volunteer translation models, and many that do utilize rudimentary processes centered on exchanging large email attachments.

    Scaling the pool of volunteer translators is its own challenge. Bi-lingual abilities are but a pre-requisite to being an effective translator; practice and experiential learning are required to effectively translate. Establishing community hubs for open translators is also an unsolved problem; while several professional translation communities such as ProZ thrive on the internet, open translator communities are only now beginning to gain momentum, and individuals who translate for open content projects are usually operating in project-specific networks.

    A fundamental challenge in an open environment is quality control. Traditional, centralized translation models have dedicated editors and proofreaders whose job it is to verify accuracy and consistency of translation. It remains for the Open Translation movement to establish quality processes and transparent mechanisms for reputation measurement.

    Also, the significance of regional and cultural issues in translation work can not be overstated; as norms and values vary, a range of secondary connotations and associations must be considered in crafting appropriate translations. While professional translators spend years learning the nuances of idiom and linguistic mapping in specific language pairs, open translators will not as often have the benefit of such learning curves. Creating better open repositories of essential empirical knowledge and best practices will further accelerate the ramp-up of volunteer translators and the quality of translations.

    The Vision Turns on When, Not Whether

    An openly translated internet is ultimately a matter of time, and the great unknown is how long it will take to realize the vision. Open Translation will scale in proportion to the open tools and open content upon which it rests, and on the corresponding efforts of those leading the way. 

    This book exists as a step along the path, an attempt to both capture essential knowledge and take measure of the tools, processes and learnings of Open Translation to date. As you read on, consider yourself a part of this movement by virtue of your very interest. We invite you to contribute to the Open Translation movement in any way that taps your passion and inspires your participation.

    Dictionaries and Glossaries

    Most domains have their own terminology; in this way a jaguar can be several types of aeroplane, an animal, a protein in the fruit fly or a car brand. Many texts including this manual have a glossary defining terminology used. Dictionaries and particularly translation dictionaries often do not include the specialized terminology needed in specific texts.

    When a set of connected documents is translated, it is important to standardize the use of the underlying terminology, because this will improve comprehension of the translated texts. Another achievement of standardized terminology is that it can help identify hyperlinks within web based content. However, before using a term, the terminology has to be cross-checked by means of reliable ressources in order to ensure usage of the correct term for the respective domain. 

    Glossaries

    Many publications contain a glossary or wordlist that includes the definition of the term as used in a specific publication. By means of these definitions it is easier to find the equivalent concepts in the target language. This helps to improve consistency in the translated text.

    Online Dictionaries

    Audacity

    The Audacity program is an example of an 'audio editor'. Which means Audacity can record and edit audio. Typically, one uses Audacity for recording sounds, like interviews or musical instruments. You can then use Audacity to combine these sounds and edit them to make documentaries, music, podcasts, etc.

    In the old days, audio editing was done with huge machines that recorded sound to tape (similar to the tape in tape cassettes).

    audacity_cover2c.gif

    Audio engineers would then edit these tapes using razor blades and sticky tape. Much of the jargon used in audio editing today comes from this process. Making a "cut" meant literally cutting the audio tape at a certain point. "Multitrack" referred to recording many separate sounds onto extra wide tape to fit more 'tracks'. The recording industry still uses these terms, and more, today. Many of the fundamental techniques which formed good audio recording and editing practices then, laid the foundation for recording and editing software.

    While many of the terms and techniques remain the same today, computers replaced tape machines, and digital files succeeded tapes. Hence, one records audio and edits with a computer (using software like Audacity), and stores these sounds in files on a computer. This makes the process faster and requires a lot less physical storage space.

    audacity.gif

    Audacity is a powerful tool for recording and editing audio on a home computer. Its is a very sophisticated program and can do everything one would expect from a modern audio editor. Audacity perhaps falls short of meeting the needs of professional recording studios, but not by much.

    One can install and run Audacity on Linux, Mac OS X and Windows

    Mp3 Capability Installation

    Software name : Audacity
    Software version : 1.3  

    By default Audacity can play and edit mp3 files. However it can't export a project as an mp3 file unless you install an extra bit of software called  'library'. 

    This sounds complicated but what it really involved is downloading the right file and then linking to it in Audacity.

    To download the file we need, which is called the 'Lame Mp3 Library'. Please point your browser to the following page http://lame.buanzo.com.ar/

    You should see the following text or something similar.  

    a_au_lame

    You should click on the link to 'Lame x for Audacity on Windows.exe' and download that file to your computer.

    a_au_lame_2 

    Click on Save File when you see the above dialogue box. And choose where you want to save your file.

    a_au_lame_3

    When you have downloaded the file, find it on your computer and double click it. This will start the installation process.

    a_au_lame_4

    Click OK when asked 'Open Executable File?'

    Click on Next for the following steps and then when you are asked to choose a folder to install the Lame library in keep this as the default.

    a_au_lame_5

    Click on Install.

    Click on Finish.

    When you come to use Audacity and need to export a file, if you haven't already told Audacity where the Mp3 Encoder is located it should prompt you to locate it. 

    It's best to do this now while you remember where it is installed. So open up Audacity and with a small test project open click on File > Export

    Fill in some test entries for the Metadata and then click OK on the following screen.

    a_au_lame_7

    Choose a file name and a place to save it. Then select mp3 from the drop down menu.

    a_au_lame_8


    If you are prompted to locate the Lame Library then you can locate this in the location you saved it in - by default in Windows this would be C:\Program Files\Lame for Audacity

    You may not need to do this as from version 1.3 Audacity will scan your hard drive looking for the relevant file. If it succeeds then it will save your file without asking you anything.

    When you save the mp3 you have the option to change the bit rate by clicking on the Options box.

    a_au_lame_9

    You can see more on this in other chapters about Exporting.

    Track Area

    Software name : Audacity
    Software version : 1.2 

    In Audacity, a channel of sound is represented by one mono audio track, a two channel sound by one stereo audio track.  The example below is a stereo track :

    audio.jpg

    Lets look at some of the controls available to you from this interface :

    audio_drop.jpg

    option action
    Name edit the name of the track
    Move Track Up/Down move Track Up or Down in the display
    Waveform traditional display of audio material.
    Waveform (dB) like Waveform, but logarithmic instead of linear vertical units .
    Spectrum displays the frequency spectrum of the audio over time.
    Pitch (EAC) tries to detect the pitch of the current audio and displays that information over time.
    Mono set playback of this single channel track on the left and right channels.
    Left Channel set playback of this single channel track on the left channel.
    Right Channel set playback of single channel track on the right channel.
    Make Stereo Track the selected track and that beneath it is turned in to one stereo track.
    Split Stereo Track turn one stereo track in to two single channel tracks.
    Set Sample Format pick the sample format for this track.
    Set Rate set the sample rate of this track.

    Solo and Mute Mode

    track_solo.jpg
    In solo mode, only tracks that have the solo button activated.

    track_mute.jpg

    With mute a track is switched off without deleting it.

    Gain and Pan Controls

    track_controls_pan.jpg

    This slider set the panning position of the track in the stereo field.

    track_controls_volume.jpg 

    This slider controls the track volume, or rather the overall gain of that particular track.


    Menu Bar

    Software name : Audacity
    Software version : 1.2

    Lets look at the basic elements of the Audacity Menu Bar :

    menubar.jpg

    The Menu Bar is a typical element in many applications. It will look slightly different to this if you are not using Linux, most notably in Mac OSX this Menu Bar is not located on the application window itself but at the top of the screen in the "Apple Menu".  Lets go through the Menu Bar one item at a time.

    File

    By clicking on "File" in the Menu Bar you get a drop down menu with several options to choose from. Some options maybe "greyed out" meaning you can't select them, you will only be able to choose the options that appear in solid black. The options available depend on the state of Audacity at the time. For example the following image was taken from Audacity with when the program had just been opened and no recording or editing had been started:

    filemenu.jpg

    The File Menu is where you can process all the things related to the audio and project (.aup) files.

    option action
    New creates a new empty project window.
    Open... selecting "Open" presents you with a dialog where you can choose a file to open. 
    Close closes the current project window.
    Save Project saves the current Audacity project (AUP) file.
    Save Project As... allows you to save the current Audacity project (AUP) file with a different name or in a new location.
    Recent Files... gives a list of recent files you ahve been working on.
    Export As WAV... exports the current Audacity project as a standard audio file format such as WAV or AIFF.
    Export Selection As WAV... this is the same as Export, but it only exports the part of the project that is selected. 
    Export As MP3... exports the current Audacity project as an MP3 file. 
    Export Selection As MP3... this is the same as Export MP3, but it only exports the part of the project that is selected. 
    Export As OGG... exports the current Audacity project as an Ogg Vorbis file.
    Export Selection As OGG... this is the same as Export As OGG, but it only exports the part of the project that is selected. 
    Export Labels... if you have any Label Tracks, this command will export them as a text file. This feature is commonly used in Speech Recognition.
    Export Multiple... this allows you to do multiple exports from Audacity.
    Exit/Quit closes all project windows and exits Audacity. It will ask you if you want to save changes.

    Edit Menu

    The Edit Menu is only accessible when you are editing an audio file.

    editmenu.jpg

    option action
    Undo this will undo the last editing operation you performed to your project. 
    Redo this will redo any editing operations that were just undone. 
    Cut removes the selected audio data and places it on the clipboard. 
    Copy copies the selected audio data to the clipboard without removing it from the project.
    Paste inserts whatever is on the clipboard at the position of the selection cursor in the project.
    Trim deletes everything but the selection.
    Delete removes the audio data that is currently selected without copying it to the clipboard.
    Silence erases the audio data currently selected, replacing it with silence.
    Split moves the selected region into its own track or tracks.
    Duplicate makes a copy of all or part of a track or set of tracks into new tracks.
    Select...
    selects part of the audio depending on the option chosen.
    Find Zero Crossings moves the cursor or the edges of the selection to the nearest point where the audio waveform passes though zero. 
    Selection Save saves the current selection and position. 
    Selection Restore restores the selection to the project. 
    Move Cursor... these commands provide quick and accurate ways to manoeuvre the cursor around the project to the start and end of tracks and selections.
    Snap-To... turns snapping of the cursor to a grid of time values on or off. 
    Preferences opens a dialog window that lets you configure Audacity.

    View

    The View Menu is used to manage the display of the tracks ("channels") and various options to show and hide some interface elements :

    menuview.jpg
    name action
    Zoom In zooms in on the horizontal axis of the audio displaying less time.
    Zoom Normal zooms to the default view, which displays about one inch per second.
    Zoom Out zooms out displaying  more time.
    Fit in Window Zooms out until the entire project just fits in the window.
    Fit Vertically adjusts the height of all the tracks until they fit in the project window.
    Zoom to Selection zooms in until the selected audio fills the width of the screen to show the selection in more detail.
    Set Selection Format sets the format in which selections are measured in at the bottom of the application window. 
    History brings up the history window. It shows all the actions you have performed during the current session.
    Float or Dock Control Toolbar toggles between displaying the Tool Bar docked at the top of each project window, or in a separate floating window.
    Float or Dock EditToolbar toggles between displaying the Edit Tool Bar docked at the top of each project window, or in a separate floating window.
    Float or Dock Mixer Toolbar toggles between displaying the Mixer Tool Bar docked at the top of each project window, or in a separate floating window.
    Float or Dock Meter Toolbar toggles between displaying the Dock Meter Bar docked at the top of each project window, or in a separate floating window.

    Project

    The Project Menu is used to add / remove / align tracks in the existing project :

    menuproject.jpg

    name action
    Import Audio... imports audio into your project.
    Import Labels... import Label Tracks (text files).
    Import MIDI... imports MIDI files. 
    Import Raw Data... tries to open a file in virtually any format, as long as it is not compressed. 
    Edit ID3 Tags... opens a dialog allowing you to edit the ID3 tags associated with a project, for MP3 exporting. 
    Quick Mix this command mixes all of the selected tracks down to one or two tracks.
    New Audio Track this creates a new empty audio track. 
    New Stereo Track creates a stereo version of the new audio track above. 
    New Label Track creates a new Label track.
    New Time Track creates a special track that can be used to speed up and slow down playback over the course of the project. 
    Remove Track(s) this command removes the selected track or tracks from the project. 
    Align Tracks
    aligns tracks according to the options chosen.
    Align and move cursor
    same as "Align Tracks" but it also followed by the "Move Cursor" command (from the Edit Menu).
    Add Label at Selection this menu item lets you create a new label at the current selection. 
    Add Label at Playback Position like "Add Label at Selection" but the label is added at the current position during playback.

    Generate

    The Generate Menu allows you to insert various generated audio elements into a track :

    menugenerate.jpg

    The length of the generated audio is determined by the length of your selection and the position by the left boundary of your selection.  If no selection is made, the default length inserted at the cursor position is 30 seconds.

    name action
    Silence

    inserts silence.

    Tone inserts a wave of chosen type, frequency and amplitude. 
    White Noise inserts white noise. 
    Plugins
    there are too many plugins to describe here, experiment!

    Effect

    The Effect Menu allows you to apply effects to audio. Note : this menu cannot be accessed while any tracks are in Playback or Record mode.

    menueffects

    name action
    Amplify this effect increases or decreases the volume of a track or set of tracks. 
    Bass Boost this is a smooth filter which can amplify the lower frequencies while leaving most of the other frequencies alone.
    Change Pitch changes the pitch/frequency of the selected audio without changing the tempo.
    Change Speed changes the speed of the audio by resampling. Making the speed higher will also increase the pitch.
    Change Tempo changes the tempo (speed) of the audio without changing the pitch.
    Click Removal this effect is designed to remove the annoying clicks on recordings from vinyl records without damaging the rest of the audio. 
    Compressor compresses the dynamic range of the selection so that the loud parts are softer while keeping the volume of the soft parts the same. 
    Echo this effect repeats the audio you have selected again and again, softer each time. There is a fixed time delay between each repeat.
    Equalization boost or reduce frequencies. 
    Fade In applies a linear fade-in to the selected audio. 
    Fade Out applies a linear fade-out to the selected audio. 
    FFT Filter
    you define a curve that shows how much louder or quieter each frequency in the signal should be made.
    Invert this effect flips the audio samples upside-down. This normally does not affect the sound of the audio at all.
    Noise Removal this effect is ideal for removing constant background noise such as fans, tape noise, or hums. It will not work very well for removing talking or music in the background.
    Normalize allows you to amplify such that the maximum amplitude is a fixed amount, -3 dB. 
    Nyquist Prompt allows you to express arbitrary transormations using a powerful functional programming language (for advanced users).
    Phaser
    the name "Phaser" comes from "Phase Shifter", because it works by combining phase-shifted signals with the original signal.
    Repeat repeats the selection a certain number of times. 
    Reverse
    this effect reverses the selected audio.
    Wahwah
    just like that guitar sound so popular in the 1970's.
    Plugins
    there are too many plugins to describe here. Experiment!

    Analyze

    The Analyze Menu gives you many options for measuring your audio : 

    menuanalyze.jpg

    name action
    Plot Spectrum
    displays the Power Spectrum of the audio over a selected region.
    Envelope Tracker (Maximum Peak)

    Envelope Tracker (Maximum RMS)

    Envelope Tracker (Peak)
    Envelope Tracker (RMS)
    Null

    Peak Monitor

    Silence Finder
    Marks periods of silence within a selection.

    Tool Bar

    Software name : Audacity
    Software version : 1.2

    The Tool Bars are where you choose tools to directly work on the tracks. There are three main Tool Bars in Audacity :

    Main Tool Bar

    toolbarmain.jpg

    Lets look at each button:

    button action
    tool_select.jpg
    this is the main tool you use to select audio.
    tool_envelope.jpg
    the envelope tool gives you detailed control over how tracks fade in and out.
    tool_timeshift.jpg
    this tool allows you to change the relative positioning of tracks relative to one another in time.
    tool_zoom.jpg
    this tool allows you to zoom in or out of a specific part of the audio.
    tool_draw.jpg
    enables the user to draw in to the actual waveforms.
    transport_rewind.jpg
    places the cursor at the start of the project.
    transport_play.jpg
    press the play button to listen to the audio in your project.
    transport_record.jpg
    press the record button to record a new track from your computer's sound input device.
    transport_pause.jpg
    will pause during playback, or during recording. Press again to unpause.
    transport_stop.jpg
    press the stop button or hit the spacebar to stop playback immediately.
    transport_ff.jpg
    places the cursor at the end of the project.

    Mixer Tool Bar

    toolbar_io.jpg

    These sliders control the mixer settings of the soundcard in your system. The selector on the right controls what audio input you wish to use.

    Input Selector

    toolbar_io_select.jpg 

    Pick the input source you wish to record from. All these items are exposed by the soundcard driver, so the this of options will vary with different soundcards.

    Output Slider

    toolbar_io_output.jpg

    This is the left hand slider that lets you control the output level of your soundcard. It actually controls the output setting of the soundcard driver.

    Input Slider

    toolbar_io_input.jpg

    This is the right hand slider that lets you control the level of the input selected in the Input Selector. It actually controls the recording level setting of the soundcard driver.

    Edit Tool Bar

    toobar_edit.jpg

    All these tools perform the exact same function, as those accessible through the "Edit" menu, "View" menu. Lets look at each button individually :

    button action
    tool_edit_cut.jpg
    removes the selected audio data and places it on the clipboard.
    tool_edit_copy.jpg
    copies the selected audio data to the clipboard without removing it from the project.
    tool_edit_paste.jpg
    inserts whatever is on the clipboard at the position of the selection cursor in the project.
    tool_edit_trim.jpg
    deletes everything but the selection.
    tool_edit_silence.jpg
    erases the audio data currently selected, replacing it with silence instead of removing it completely.
    tool_edit_undo.jpg
    this will undo the last editing operation you performed to your project.
    tool_edit_redo.jpg
    this will redo any editing operations that were just undone.
    tool_edit_zoomin.jpg
    zooms in on the horizontal axis of the audio displaying less time.
    tool_edit_zoomout.jpg
    zooms out displaying  more time.
    tool_edit_zoomselection.jpg
    zooms in until the selected audio fills the width of the screen to show the selection in more detail.
    tool_edit_zoomproject.jpg
    shows entire project

    Open a Sound File

    You will need to have an audio file available to edit. If you don't have one and you are online then download an MP3 from somewhere. Make sure its not too big, a 1 minute file is fine. Choose the 'Open' option from the File menu :

    open.jpg

    You will then be presented with a window where you can browse to the location of the audio file on your computer :

    filebrowser.jpg

    You can see in the above example there are a couple of audio files. I will click on one (06_ice_cake.mp3) :

    filebrowser2.jpg

    If I now press OK the file will be imported into Audacity.


    import.jpg

    Now its worth noting that Audacity has its own way of storing audio files. These are known as 'Audacity project files'. So when audio is imported into Audacity it is stored in the Audacity format. You cannot then go and edit these files with another audio editor unless you first export the file to another format (for example, to MP3).

    Once the import has finished you will see the audio file displayed in the Audacity window :

    audio.jpg

    Recording a sound

    Software name : Audacity
    Software version : 1.2 

    Recording sound with Audacity is very straightforward you just need to have a computer that has a sound card with at least a microphone (mic) or line input.

    Getting started

    Before making a recording you need to make sure that what you want to record from ( the "sound source") connected to the audio input of your computer's sound card. Once you have done that you can launch Audacity.

    MacOSX  

    OS X has a unique way to configure the audio hardware, which is not shared by other operating systems (Windows, and Linux). So if you use OSX you will need to make sure that it is set up appropriately. To do this first open the "Preferences" window by clicking on "Preferences" under "Audacity" in the Menu Bar :

    Audacity_menu_prefs_01.jpg

    The Preferences window open and look something like this:

    Audacity_prefs_audio_io_01_1.jpg

    Click on "Audio I/O". The use of "I/O" means "Input or Output", so "Audio I/O" means "Audio Input or Output". The Audio I/O preferences page is where you can choose the sound source  (audio input) and how you play back the sounds so you can hear them (the output settings). This can turn into a jungle of terms but essentially these things are the same:

    and these are the same :

    The way you configure the input effects how you will record sounds. The configuration of the output effects how you will play back sounds so you can hear them.

    Lets start with the output settings, these are refered to within the "Playback" section. In the "Playback" section use the "Device:" dropdown menu to select the audio output you wish to use. Unless you have another sound card installed "Built-in Audio" will be the only option available.  

    Audacity_prefs_audio_io_playdev.jpg 

    The input settings are chosen from the "Recording" section. In the "Recording" section use the "Device:" dropdown menu to select the audio input device you wish to use. Unless you have another sound card installed "Built-in Audio" will be the only option available. 

    Audacity_prefs_audio_io_recdev.jpg 

    In the "Recording" section use the "Channels" dropdown menu to select the number of channels you wish to use. A "Channel" (also known as a "track") refers to the number of audio signals you wish to use to record or playback. A mono recording uses one audio signal (1 channel), and a stereo recording records two audio signals (2 channels).

    Audacity defaults to "1 (mono)" so you can leave it at this if you are recording from a mono audio input. Most microphones are only capable of producing a mono signal.  Select "2 (stereo)" if you are recording from a stereo audio input such as a cassette or mini disc player (or a stereo microphone). It is possible to select up to 16 channels but do not select more than 2 unless you have something other than a 'normal' sound card.

    Below the "Playback" and "Recording" sections are three check boxes.

    Audacity_prefs_audio_io_01_1_1.jpg 

    The first check box is not important for this exercise because we are only recording one channel. If you want to listen to the sound as you are recording it you will need to have either "Hardware Playthough" or "Software Playthrough" ticked. "Hardware Playthrough" lets you hear the sound directly from the input source while "Software Playthrough" lets you hear the sound as it will be when the recording is played back.

    Now click on "Quality" to bring up this page of preferences:

    Audacity_prefs_quality_01.jpg

    For this exercise you only need to worry about the first two settings; Default Sample Rate and Default Sample Format. Unless you really know what you are doing, use the dropdown menus to set Default Sample Rate to "44100 Hz" and Default Sample Format to "16-bit". This will give you CD quality recording.

    Those are the only preferences you need to adjust before beginning to record so click "OK" to save the changes and close the Preferences Window. Audacity remembers these preferences so the next time you go to make a recording you will not have to repeat the steps above unless you wish to make changes.

    Windows and Linux

    Windows and Linux use the same kind of controls. First you need to choose the input device. The Mixer Toolbar has three controls, used to set the volume levels of your audio device and choose the input source.

    toolbar_mixer.png

    The leftmost slider controls the output volume, the other slider controls the recording volume, and the control on the right lets you choose the input source (such as "Microphone", "Line In", "Audio CD", etc.). You will need to choose "Mic" or "Line In" as one of the inputs. If you are using a microphone choose "Mic". If you are using another audio device (CD Player, Mini disc etc), choose "Line In". 

    Testing Audio Levels

    Now that you have everything set up and ready to go you can begin the recording process. 

    Before making the recording it is important to preview the loudest section of the source audio so that you do not end up with a distorted recording.

    First you need to switch the input meter on. This can be set in the main interface :

    input_level_meter_02.jpg

    Simply click on the bars above the microphone symbol or click on the arrow next to the microphone symbol and select "Monitor input" like so :

    monitor_input_01.jpg

    Now play the loudest passage of the audio you are recording and, while doing so, look at the input level meter.

    input_level_meter_01.jpg

    At the loudest point the red bars should be at about -12. You can adjust the input level by moving the slider next to the microphone symbol.

    input_volume_01.jpg

    Keep playing back the loudest passage while adjust the input level until it peaks at about -12. Once you have done that click the "Stop" button :

    stop_button_01.jpg

    Recording

    Now you are ready to make your proper recording.

    Click the "Record" button,

    record_button_01.jpg

    then play the audio you wish to record. Once the sound source has finished click the "Stop" button.

    Your recording is now complete so save it immediately by selecting "Save Project" from the "File" menu.

    Audacity_file_save_01.jpg

    That's it! Your recording is completed and saved. You can play it back by clicking the "Play" button.

    play_button_01.jpg

     

    Troubleshooting - Linux

    Linux :: Host Error?

    If you are a Linux user and you see a message similar to this  "Error Initializing Audio: There was an error initializing the audio i/o layer. You will not be able to play or record audio. Error: Host error." then you may have to try one of the following :

    Kill esd 

    It maybe that the esd sound server is running which is not permitting Audacity to access the sound card. You can try running this in a terminal:

    ps ax | grep esd
    

    If you see an output similar to this :

    5164 ?        Ss     0:00 /usr/bin/esd -terminate -nobeeps -as 1 -spawnfd 18
    10352 pts/1    R+     0:00 grep esd
    

    Then you can see from the first line that esd is running ("/usr/bin/esd"). To kill the esd sound server you need to type this in a terminal (you need to have the permissions to run the sudo command) :

    sudo killall esd
    

    You will then be prompted for a password, enter your password notthe superuser password (also known as the "root" or "admin" password). Then try and start Audacity again, hopefully you won't get this error.

    Start with aRts

    You could also try running Audacity through the aRts sound server ("analog Real time synthesizer").  To do this quit Audacity if you already have it opened and restart it with this command in a terminal:

    artsdsp audacity
    

    Kill aRts

    Lastly, you may wish to try starting Audacity after killing the aRts sound server.  You can try this:

    sudo killall artsd
    
    Then try starting Audacity again.

    Add Another Sound File

    Software name : ­Audacity­
    Software version : 1.2

    Audacity enables you to mix multiple sounds together. You will need Audacity open and an audio file already loaded, and then you can add as many new files as you like.

    Adding your new track

    Ok, so Audacity should be open in front of you and you will have some audio already loaded. In this example we will be working with a sound file I have opened from my computer, and so my Audacity window looks like this :

    aud_1.jpg

    Now, we wish to add another sound file. To do this you will need to have another sound piece on your computer ready to go, and you will need to know where this file is located on your computer. Then click on Project and choose 'Import Audio...' :

    project.jpg

    When you have done this a file browser will open :

    browser2.jpg

    In the above example I am very lucky as the file I wish to load is in the directory shown. If the file was not here I would have to use the file browser to locate the file on my computer. To do this you would open directories by double-clicking on the directory icons, or you can go 'up a directory' by clicking on the button with the directory icon and green arrow :

    up.jpg

    In my case I will click on the 'myfile.ogg' :

    selected.jpg

    I know press OK and the file will be imported. 'Importing' means that the file will be converted into a format that Audacity understands and appear in the Audacity window as a new track. So you when you press 'OK' the importing process begins :

    importing.jpg

    When it is complete the new track can be seen in the Audacity window :

    added_1.jpg

    You will notice that in the above example there is a new stereo track added at the bottom of the window. If you don't see this then you might need to scroll down on your Audacity window.

    Note on Playback and Exporting

    If you now press the 'Play' Button :

    play_button_01.jpg

    you will hear both tracks playing back at once. If you were now to export this file the tracks would be combined together into one sound file.

    Envelope Tool

    The envelope tool is probably the most important tool for Audacity users. It allows you to alter the volume of the sounds in Audacity which is especially important when you are combining ('mixing') several tracks together.

    ­Open Audacity

    You will first have to have Audacity open with more than one track. We will use two stereo music files to mix together using the Envleope Tool. So my Audacity initially looks like this :

    added_1.jpg

    Activating the Envelope Tool

    The Envelope Tool has an icon in the Audacity Tool Bar, it looks like this :

    tool_envelope.jpg

    When you click on it there are two parts of the Audacity interface that change, the first is that the Envelope Tool button looks like it has been pressed :

    pressed.jpg

    The second is that the tracks are surrounded by a blue line. Before pressing the Envelope Tool a track looks like this :

    before.jpg

    After pressing it looks like this:

    after.jpg 

    You can see the blue line around the track in the above image. This means the Envelope Tool is activated.

    Alter the volume

    The thin blue line actually represents the volume of the track. You can now lower the volume on chosen sections of the track by changing the shape of this blue line. To do this click on the blue line, you will see small white squares appear where you clicked :

    sqs.jpg

    Now you can 'grab' the blue line at the point where these squares appear. To show you how this can change the volume of just one part of the audio click on the blue line close to where you first clicked :

    sqs2.jpg

    Now point your mouse cursor on the top white square on the left side, and while your mouse finger is still down, drag the square downwards :

    sq3.jpg

    You will notice the area to the left gets smaller (the volume is lowered), and the area to the right gets bigger until it reaches the second set of squares.  If you now play back the track you will hear the volume levels follow the lines you have made.

    Mixing 2 tracks together

    Using the Envelope Tool is the secret to mixing two or more tracks together into one sound piece. You can now experiment using the Envelope Tool and playing back the audio so you can hear how the tracks blend together. At the end you might have a lot of sections affected to create a single sound piece :

    heaps_1.jpg

    Basic Editing with Audacity

    Software name : Audacity
    Software version : 1.2 

    As far as audio editing software goes, Audacity is about as easy as it gets. Thats not to say­ its easy, if you haven't edited audio before then the whole concept can get a little bewildering. However with a minimal of practice you should be able to make fast work of editing.

    Firstly, you will have to have some audio to edit. You can either record some using Audacity, or open an audio file from your computer. 

    There are some simple methods that form the basis of editing with Audacity. We will look at deleting sections of audio ('cutting') and shifting audio. With these two methods you can already do quite a lot.

    Cutting

    You will of course have Audacity open in front of you with an audio file ready to edit. The process of editing requires that you first know your source file (the file you will edit). You need to know where a cut needs to be made so play the audio file and listen for where you want to make your first edit.

    Lets assume you have chosen the area to be cut. You need to know select the area by clicking on where the cut should start, holding down the mouse button, and dragging the mouse to the end of the area to be cut. If you do this correctly the area to be deleted will be highlighted in grey :

    select.jpg

    In the above example you can see that I have highlighted the area from 1 minute (1:00) to one and a half minutes (1:30). A selection of thirty seconds. To delete the file I can now click on the Edit menu and choose 'cut' :

    cut.jpg

    When you release the mouse button you will see that the selected area has disappeared and the length of your file will have been reduced.

    Focusing on the area to be cut

    If you have just opened an audio file just press the green play button to listen to the entire file :

    play_button_01.jpg

    Once you have listened to it you may wish to take some notes to help you decide which area you wish to delete ('cut'). It is also a good idea to replay the area that you will cut to make sure you are selecting the right area. To do this you can select the area, as described above, and then press the play button and Audacity will only playback the selected area. This will help you decide if the selected area is actually the audio you wish to delete. If its not the right area then start again by selecting another area.

    If you need to focus closer to the audio to make a 'finer' cut, then press on the magnifying glass icon :

    tool_edit_zoomin.jpg

    This will enlarge the time scale shown and give you a 'closer' view of the audio. You can 'zoom out' of the audio again by pressing the magnifying glass with the minus sign in it:

    tool_edit_zoomout.jpg

    Pasting

    If you wish to shift audio from one place to another then you can easily do so with Audacity. First select the area you wish to shift. I will use the same area I used in the cutting example :

    select.jpg

    Now choose cut like you did in the above example.

    cut.jpg

    The audio will now be cut from the track. Now click on the audio that is left at the point you where you want this audio to be shifted to.

    insertpoint.jpg

    In the above example you can can see that I ahve decided to insert the audio at the 4 minute mark. Now choose the Edit menu and select Paste:

    paste.jpg

    The audio will now be inserted and you if you look at the Audacity window you should see the selected audio in its new place :

    pasted.jpg

    Now experiment with cutting and pasting audio!

    Advanced Editing

    Software name : Audacity
    Software version : 1.3 

    There are some more advanced steps for editing that you can carry out with Audacity. Some of these include, adding silence, trimming audio, splitting and joining tracks, using panning.

    Add Silence

    You may want to add a silence to a track for several reasons. If we take the example of a two track project with one track as music and the other track as a voice track then we can imagine a situation where we would want to insert a silence in the voice track for several seconds to allow us to fade up the music. This would work in an advert or introduction for a radio show. 

    To start with your workspace should look a little like the still below.

    adv_audacity_01

    Click in the voice track where you want to insert your silence.

    When the voice track is selected you will see the whole track go a darker colour.

    adv_audacity_02 

    You are now ready to insert some silence. Do this by selecting Generate > Silence from the menus at the top of the screen.

    adv_audacity_03 

    When you are inserting a number of seconds for your Silence, it is easier to add more and then delete some silence later than to add to it. So I'm going to over estimate and put in 20 seconds of silence, as shown below. 

    adv_audacity_04

    Enter the number of seconds silence you want to insert and then click 'OK'. You'll see the silence appear as a flat line on the relevant track of your project.

     adv_audacity_05

    What we are going to do next is to decrease the volume of the music track while the voice track contains some voice audio.

    This is done using a combination for the Time shift tool and the Envelope tool.

    Time Shift Tool

    The time shift tool allows you to alter the time location of the audio on a particular track. This is useful when you are arranging audio on different tracks to be placed on after the other in a sequence.

    In the example below we have imported two audio files into a project. They both are set to start at 0.00 seconds.

    adv_audacity_07 

    Our goal is to place the music track after the audio track. To do this use the mouse to select the Time Shift tool adv_audacity_09  from the menu at the top of the workspace.

    adv_audacity_08

    You can select the track you want and drag it left or right to occupy a new time location. 

    adv_audacity_10

    As you click and drag the second track to the right you may see some yellow guidelines appear to shows you the ending point of the other tracks. In the shot above the yellow guideline appeared when the start of the second track matched up with the end of the first one.

    You should let go of the mouse when you are happy with the new time location of the track you a shifting.

    Trimming Audio

    Trimming audio tracks is useful when you only want to keep one part of the track. It is also different from using the cutting function as it maintains the time location of the part of the track you want to keep.

    As an example we are going to trim a music track to only include the first 30 seconds or so. To do this select only the part of the track that you want to keep. Use the Selection tool to do this adv_audacity_12

    adv_audacity_11

    When you have selected the part of the audio that you want to keep it should show up in a darker colour. You should then select 'Edit > Trim' .

    adv_audacity_13

    If all works well then only the part you had selected will still be present on your track

     

    adv_audacity_14

     

    Splitting Stereo Tracks 

    Sometimes when you are recording you may only record one channel of your track correctly. Or there may be another reason that you want to only work with either the left or right channel.

    Below shows a track with one channel much louder than the other.

    adv_audacity_15

    We are going to work on only the left channel (the top one). So we need to Select 'Split Stereo Track' from the drop down menu by the right of the track.

    adv_audacity_16

    We can then delete the Right channel signal, as it has now become a separate track. Click on the X on the left of the track area.

    adv_audacity_17

    If we play the remaining track then we'll be able to hear that the sound is only coming through one channel. This can be seen in the green signal in the screenshot below.

    adv_audacity_18

    To adjust this we can select 'Mono' from the drop down menu on the left of the track bar.

    adv_audacity_19

    This track will now play the same mono audio signal through both channels. You can export it to a stereo track if you need to.


    Exporting A File

    Software name : ­Audacity
    Software version : 1.2

    Projects created in Audacity are always saved in Audacity's own unique file format that cannot be opened by most other software. It is therefore necessary to export projects to more common file formats in order to use them with other audio software or media players.

    Audacity can export the following formats: AIFF, MP3 and Ogg Vorbis.

    AIFF files provide uncompressed CD quality audio so this format should be used if you want to open your Audacity project with other music production software or CD authoring software.

    MP3 and Ogg Vorbis are both compressed? audio formats so they have lower sound quality but much smaller file sizes making them ideal for use in media players. The most important difference between these two formats is that Ogg Vorbis is completely open while MP3 is not. For this reason you will need to download and install the LAME MP3 encoder before you can export in MP3 format.

    To export a file from Audacity you need to have an Audacity file open.  If you do not already have a file open from a recording or editing session then you can open one by pressing the Apple and O keys together or by clicking on "Open" in the Audacity File menu.

    Audacity_open_01_1.jpg

    You should now see a window like this:

    Audacity_open_02.jpg

    Use this window to browse to the file that you wish to open. Once you have selected the file simply click "Open" to open it. You should now see something a bit like this:

    Audacity_open_03.jpg

    To export the file click "File" then click on the format that you want to export as.

    Audacity_export_01.jpg

    You should now see a window like this:

    Audacity_export_02.jpg

    Use this window to edit the file name and select or create an appropriate folder into which to save the new file. Once you are happy with that simply click on "Save" to begin exporting.

    You should now see a window like this:

    Audacity_export_03.jpg

    The time it takes to export the project will depend on the length of the recording and the speed of your computer.

    When exporting is complete the above window will disappear. You should now be able to see the file in the folder that you chose to save it into looking something like this:

    Audacity_export_04.jpg

    That's it. You can now enjoy listening to the results of your Audacity project through other audio software or transfer it on to your portable media player.

    Media folders

    Airtime's media library is inside the /srv/airtime/stor/ folder on your server, by default. In Media folders on the System menu, you can change this default location, or add extra folders to be watched by Airtime.

    If you specify a network drive as a media folder and that network becomes disconnected for any reason, Airtime's media monitor will flag the files as 'missing' in its database until the drive is reconnected. If those files are still missing at the time of the show, the broadcast output could be silenced.

    For the same reason, if a removable drive (such as a USB memory stick or MP3 player) is specified as a watched folder, that drive has to be present and powered on until the corresponding show time, so that the Airtime playout engine can download the files needed for the show. If your station staff use removable drives to store media files, it is safer to use the Add media page of the Airtime administration interface or the airtime-import copy command to copy the files to the main storage server. See the chapters Add media and Using the airtime-import script for more details.

    The metadata for new media files you add to the organize folder or a watched folder will be automatically imported into the Airtime database. The organize or watched folders can be exported to computers on the local network. This would enable dragging and dropping of media uploads using the file managers on the desktop computers at your studio.

    A file dropped into the organize folder will appear to vanish as the metadata is read, and the file is moved to the correct location under the imported directory, according to its creator and title. This means you can find files for download and editing using a file browser on your server, as well as in the Search table in the Playlist Builder. This location could be under a filesystem path such as /srv/airtime/stor/imported/Beck/Midnite Vultures/ in the screenshot below.

    If a media file is corrupted and cannot be played by Liquidsoap, Airtime will move the file to the problem_files folder in the storage archive, and its metadata will not be added to the database. This feature ensures that all files are tested for encoding errors before playout time.

    Files in watched folders are not moved into the main Airtime storage folder. However, just like in the main storage, files deleted from a watched folder will be automatically flagged as missing in any playlist or show that they are part of.

    Edits to your stored and watched media files are noticed by Airtime. If you edit any file known to the database and change its duration, Airtime will automatically adjust the duration of playlists and shows that the file is included in.

    Changing the storage folder

    To change Airtime's storage folder, click the upper choose folder button. In the pop-up window that opens, double-click on the folder names to select the folder that you require. Then click the Open button to open that folder.

    Back on the Manage Media Folders page, click the Set button to change the storage folder. Airtime will ask if you are sure about this action. Click the OK button to confirm your choice.

    The Manage Media Folders page will now display the new storage location.

    The storage folder cannot be changed while a file import is in progress. If you attempt to do this, an error message will be displayed.

    Watching a folder

    Under Watched Folders, click the lower choose folder button, open the folder you require, and then click the Add button. You can add as many watched folders as you require.

    To remove a watched folder, click the small x on the right side of its row in the list. Again, you will be asked to confirm if you are sure about the action.

    Users

    If your Airtime server is accessible from the public Internet, it will not be secure until you set your own, strong password for the all-powerful admin user. Should the password for the admin user still be set to admin, you should set a new password immediately, via the Users page on the System menu. Only users with the User Type of Admin can see the System menu when they log in.

    Setting passwords and contact details

    On the left side of the Users page, click on admin in the table. The details for this user will appear in the box on the right side. To begin with, on a freshly installed Airtime server, the admin user only has a Username, Password and User Type set.

    Enter a secure password (as long and as varied as is practical) into the Password field. Keeping this password secret is essential for the smooth running of your station, because it enables access to all scheduling and management features. You can also enter other details for the admin user account on this page, including full name and contact details. Then click the Save button.

    Adding user accounts

    To add further user accounts to the system, one for each of your station staff that need access to Airtime, click the New User button with the plus icon. Enter a user name, password and contact details, and then select the User Type from the drop down menu, which can be Admin, Program Manager, DJ, or Guest. The difference between these user types is:

    Editing or deleting user accounts

    New user accounts that you add will be shown in the table on the left side of the Users page. If you have a large number of users on the system, you can use the search tool above the table (which has a magnifying glass icon) to identify specific user accounts. Click on the chevrons in the table headings to sort the search results by Username, First Name, Last Name or User Type.

    To edit a user account, click on that user's row in the table, change the user's details in the box on the right side, and then click the Save button. To remove a user account, click the small x icon to the right side of its row in the table. You cannot delete your own user account.

    Manual installation

    You do not normally need to install Airtime manually, unless you are testing a development version of the software. Versions of Airtime recommended for production use are available for download and upgrade via secure apt, as shown in the Automated installation chapter.

    Updating python-virtualenv

    Airtime requires a version of python-virtualenv later than 1.4.8, but Ubuntu Lucid includes the older version 1.4.5 of this package. Before performing a manual installation on Lucid, you should update python-virtualenv using the backported package available from the http://apt.sourcefabric.org/ repository. This step is not necessary when performing an automated installation, in which dependencies are resolved automatically.

    Full install

    The airtime-full-install script has been tested on Ubuntu GNU/Linux servers and is designed to configure your server for you, using typical default settings.

    1. In the server terminal or console, download Airtime from https://sourceforge.net/projects/airtime/files/ with wget. For example, to download version 2.1.3, you could use the command:

    wget http://downloads.sourceforge.net/project/airtime/2.1.3/airtime-2.1.3.tar.gz
    

    2. Unzip the downloaded file in your home directory. This action will create a subdirectory called airtime-2.1.3:

    sudo tar -xvzf airtime-2.1.3.tar.gz -C ~/
    

    3. Run the airtime-full-install script:

    sudo ~/airtime-2.1.3/install_full/ubuntu/airtime-full-install
    

    The installation script will indicate which files are being installed on your system, and the directories they are being unpacked into. Finally, it will run the airtime-check-system script to confirm that your server environment is set up correctly.

    *** Verifying your system environment, running airtime-check-system ***
    
    AIRTIME_STATUS_URL = http://localhost:80/api/status/format/json/api_key/%%api_key%% AIRTIME_SERVER_RESPONDING = OK KERNEL_VERSION = 2.6.32-41-generic MACHINE_ARCHITECTURE = x86_64 TOTAL_MEMORY_MBYTES = 6128212 TOTAL_SWAP_MBYTES = UNKNOWN AIRTIME_VERSION = 2.1.3 OS = Ubuntu 10.04.4 LTS x86_64 CPU = Dual Core AMD Opteron(tm) Processor 170 WEB_SERVER = Apache/2.2.14 (Ubuntu) PLAYOUT_ENGINE_PROCESS_ID = 13552 PLAYOUT_ENGINE_RUNNING_SECONDS = 11 PLAYOUT_ENGINE_MEM_PERC = 0.2% PLAYOUT_ENGINE_CPU_PERC = 0.4% LIQUIDSOAP_PROCESS_ID = 13557 LIQUIDSOAP_RUNNING_SECONDS = 11 LIQUIDSOAP_MEM_PERC = 0.2% LIQUIDSOAP_CPU_PERC = 9.9% MEDIA_MONITOR_PROCESS_ID = 13502 MEDIA_MONITOR_RUNNING_SECONDS = 12 MEDIA_MONITOR_MEM_PERC = 0.4% MEDIA_MONITOR_CPU_PERC = 4.4% RABBITMQ_PROCESS_ID = 1774 RABBITMQ_RUNNING_SECONDS = 10 RABBITMQ_MEM_PERC = 0.3% RABBITMQ_CPU_PERC = 0.4% -- Your installation of Airtime looks OK! ************ Install Complete ************

    You are now ready to proceed to the Configuration chapter.

    Minimal install

    The alternative airtime-install script does not attempt to configure your server, an option which you may find more suitable if you have special requirements.

    1. In the server terminal or console, install the list of dependencies. For example, on Ubuntu 10.04 (Lucid Lynx) LTS you could enter the command:

    sudo apt-get install apache2 curl ecasound gzip icecast2 lame \
    libao-ocaml libapache2-mod-php5 libcamomile-ocaml-data libesd0 \
    libmad-ocaml libmp3lame-dev libportaudio2 libpulse0 libsamplerate0 \
    libsoundtouch-ocaml libtaglib-ocaml libvorbis-ocaml lsb-release \
    monit mpg123 multitail odbc-postgresql patch php-pear php5-curl php5-gd \
    php5-pgsql postgresql python2.6 python-virtualenv rabbitmq-server sudo \
    tar vorbis-tools
    
    2. Check that the Apache web server modules that Airtime requires are enabled:
    sudo a2enmod php5 rewrite
    

    The server should respond:

    Module php5 already enabled
    Module rewrite already enabled
    

    3. Create a directory to contain the Airtime web interface:

    sudo mkdir -p /usr/share/airtime/public
    

    4. Next, create the Airtime virtual host configuration file for Apache:

    sudo nano /etc/apache2/sites-available/airtime
    

    and enter the information below, substituting your server's hostname for airtime.example.com and your system administrator's email address for admin@example.com. Make sure you set the DocumentRoot and Directory paths correctly. This should match the public directory that the installer will unpack the web interface into, which by default is the /usr/share/airtime/public/ directory.

    <VirtualHost *:80>
       ServerName airtime.example.com
       ServerAdmin admin@example.com
       DocumentRoot /usr/share/airtime/public
       php_admin_value upload_tmp_dir /tmp
    
      <Directory /usr/share/airtime/public>
          DirectoryIndex index.php
          AllowOverride all
          Order allow,deny
          Allow from all
      </Directory>
    </VirtualHost>
    

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

    5. Create the PHP configuration file /etc/airtime/airtime.ini in nano:

    sudo nano /etc/airtime/airtime.ini
    

    with the following contents:

    [PHP]
    memory_limit = 512M
    magic_quotes_gpc = Off
    file_uploads = On
    upload_tmp_dir = /tmp
    

    Save and exit nano, then link this file to the system's PHP configuration with the command:

    sudo ln -s /etc/airtime/airtime.ini /etc/php5/conf.d/airtime.ini
    

    6. Enable the new configuration by entering the command:

    sudo a2ensite airtime
    

    The server should respond:

    Enabling site airtime.
    Run '/etc/init.d/apache2 reload' to activate new configuration!
    

    You may also need to disable the default site configuration, which may otherwise interfere with your Airtime installation:

    sudo a2dissite default
    

    As suggested by the output of the command above, reload the web server configuration.

    sudo /etc/init.d/apache2 reload
    

    The server should respond:

     * Reloading web server config apache2
    
    7. Download Airtime from https://sourceforge.net/projects/airtime/files/ with wget. For example, to download version 2.1.3, you could use the command:
    wget http://downloads.sourceforge.net/project/airtime/2.1.3/airtime-2.1.3.tar.gz
    

    8. Unzip the downloaded file in your home directory. This action will create a subdirectory called airtime-2.1.3:

    sudo tar -xvzf airtime-2.1.3.tar.gz -C ~/
    
    9. Monit is a utility which Airtime uses to make sure that the system runs smoothly. Enable it by opening the /etc/default/monit file in the nano editor: 
    sudo nano /etc/default/monit
    

    Find the line that begins with startup and change the value to 1:

    startup=1
    

    Save the file with Ctrl+O and close nano with Ctrl+X. Now copy the Monit configuration from the Airtime install directory to the /etc/monit/conf.d/ directory:

    sudo cp ~/airtime-2.1.3/python_apps/monit/airtime-monit.cfg /etc/monit/conf.d/
    

    Open the /etc/monit/monitrc file in nano:

    sudo nano /etc/monit/monitrc
    

    At the end of the file, add the line:

    include /etc/monit/conf.d/*
    
    Save the file with Ctrl+O and close nano with Ctrl+X. Then start Monit with:
    sudo invoke-rc.d monit start
    

    More information about monit is available in the chapter Using Monit.

    10. On Debian squeeze, make sure the rabbitmq-server daemon has started:

    sudo invoke-rc.d rabbitmq-server start
    

    11. Finally, run the airtime-install script: 

    sudo ~/airtime-2.1.3/install_minimal/airtime-install 
    

    Once the airtime-check-system script confirms that the install has been successful, you should now be able to log in to the Airtime administration interface, as shown in the Getting started chapter, with the username admin and the password admin. See the Configuration chapter for advanced settings.

    Install script options

    By default, the airtime-install script preserves any existing configuration or installation that it finds on the server. However, it is also possible to dictate the behaviour of the script with a command line option, as follows:

    --help|-h            Displays usage information.
    --overwrite|-o       Overwrite any existing config files.
    --preserve|-p        Keep any existing config files.
    --no-db|-n           Turn off database install.
    --reinstall|-r       Force a fresh install of this Airtime version
    

    Manual uninstall

    To manually uninstall Airtime from the server, run the airtime-uninstall script from the original installation directory, for example:

    sudo ~/airtime-2.1.3/install_minimal/airtime-uninstall
    

    Optionally, you can also delete the Airtime storage and configuration folders, if you have backups and are not going to need the data on this particular server again. The rm command should be used with caution, because it has no undo feature.

    sudo rm -r /srv/airtime
    sudo rm -r /etc/airtime
    

    Now playing

    The Now Playing page provides a view of the files your station will play out, or has already played out, which defaults to showing the 24 hours ahead. If you've only just installed Airtime, there might not be any files shown yet. Click the calendar and clock icons above the table to change the date and time range, then click the magnifying glass icon to the right.

    On the left side of the page, the Start and End times, Duration and Title of each file are shown. On the right, Creator, Album, and Cue or Fade times can also be shown. Click the Show/hide columns button on the right to configure the metadata displayed, by checking the boxes in the pop-up window.

    The row for the currently playing file is displayed with a bright green background. Any underbooked shows (shows with insufficient content to fill the time allowed) are displayed with a row indicating the length of the underbooking in minutes and seconds. These rows contain a red exclamation mark and have a pink background.

    If a show is overbooked, which means the total playout length is longer than the time allowed for the show, a brown row indicates that the file will be faded out when the show ends. A red row indicates that the file will not be played at all. The length of the overbooking is shown in minutes and seconds in the last row of the show.

    To remove the extra files from the end of an overbooked show, click the Scissors button at the top left of the table. Alternatively, check the boxes for files which have not yet played out, and click the Trashcan button, to the right of the Scissors, to remove them from the schedule.

    If you have a long schedule displayed, and you wish to skip to the currently playing item, click the button with the Down arrow icon, to the right of the Trashcan. To cancel the current show, click the Eject button, which is to the right again. A pop-up window will ask you to confirm the cancellation.

    Files which are no longer available have an exclamation mark icon in the second column. This may happen for files which were part of previous shows, and were removed from Airtime's main storage or watched folders subsequently. Files which are included in forthcoming shows cannot be removed from the library through the Airtime administration interface.

    Changing the schedule

    The Now Playing page enables you to make last-minute changes to running shows. In the top left corner of the page is an arrow icon which enables you to open Airtime's library of files and playlists.

    In the library table which opens, use the drop-down menu at the top to choose from Files, Playlists, or All items. By default 10 items are listed, but you can click the Show drop-down menu to change the list length to between 5 and 100 items. The search field on the top left (with a magnifying glass icon) can be used to refine your selection. Like an Internet search engine, you do not have to type in the correct upper or lower case, press the Enter key, or even type the whole of the search term before matches from the Airtime library are displayed.

    This search field enables the selection of items based on any tag metadata stored in the Airtime database, whether that metadata is displayed in the table or not. (Click the Show/hide columns button in this table to determine which metadata is displayed).

    For example, if all of your jingles are tagged with the Genre of Jingle, you can very easily find your jingles, regardless of their Title, Creator or Album, by searching for jingle. The same technique can be used to find advertising and promo files. (See the chapter Using the airtime-import script for tips on batch tagging files with metadata).

    Multiple words in a search term are matched using 'and' rather than 'or' logic, to narrow your search. Perhaps you have tagged some jazz-flavoured station idents intended for use in a particular show called 'Jazz Maverick' with the Album tag of Jazz Maverick and a Genre of Ident. You could then find exactly the idents you are searching for by typing maverick ident into the search field.

    Clicking on a file or playlist in the library table opens a pop-up menu which enables you to audition the item, or remove it from the Airtime library. You can also download a file to your local computer using this menu, or edit its metadata.

    After you have found the items that you want, you can then drag and drop them from the library table on the left side of the interface into the running show schedule on the right side.

    You can also select multiple items using the Select button, just beneath the search field, which has a square icon. Alternatively, use the checkboxes on the left side of the library table, then click the Add button, which has a plus icon. If you wish, you can also use the Delete button to permanently remove items from Airtime's storage server or watched folders. Only admin users have permission to delete all items.

    To insert the items at a specific time in the show schedule, click one of the grey and white triangle icons on the left of the schedule table, which will change to red and white. A red horizontal line will be shown at the insertion point.

    Another way to create an insertion point is to click a file in the schedule table, then click Select cursor on the small pop-up menu that will appear. This pop-up window also enables you to listen to the show in advance, or remove the file from the Airtime library. 

    Multiple insertion points can be created, so that the same file is inserted into the schedule at different times. For example, you may wish to play a news report every hour, or a station ident after every five music files.

    A live show that is set for recording is displayed with a red dot icon in the left column. It might not contain any files or playlists, depending on your configuration for live shows.

    On air in 60 seconds!

    Here's how you can use Airtime to automate your broadcasts. Chapter names in this book are shown in italics, to help you find the details of each step (if you need to read more).

    1. Log in to your Airtime server with your username and password (Getting started).

    2. Add your files to the Airtime library by clicking Add media on the main menu, then using the Add files button. You can drag and drop your files into this window too (Add media).

    3. Create a show by clicking Calendar on the main menu, and then clicking the + Show button (Calendar). Only admins and program managers can add shows (Users).

    4. Set at least a date and time for your show in the When section of the box, then click the + Add this show button (Calendar).

    5. Add media to the show by clicking your show in the Calendar and selecting Add / Remove Content (Calendar).

    6. Click media in the search results on the left side of the pop-up window, and drag it to your show on the right side (Calendar).

    7. When show time arrives, you're on air!

    Playlist builder

    This page of the Airtime interface enables you to search the media library, sort and display the search results by the criteria that you choose, audition files and playlists, and drag and drop search results into an open playlist. You can also re-arrange the currently open playlist by dragging and dropping. The Playlist Builder page is not visible to Guest users.

    Searching the library

    On the left side of the Playlist Builder page, a table displays both the media files and the playlists in the Airtime library, with ten items shown per page by default. Use the drop-down menu at the top to choose from Files, Playlists, or All items. Click the Show drop-down menu in the top right corner to set the display of between 5 and 100 items per page, according to your preference. You can also click the Show/hide columns button to determine which metadata is displayed.

    Click the metadata column headings such as Title, Creator, Album, or Genre to sort the entries in ascending or descending order. In the second column, audio files are represented by a loudspeaker icon, while playlists are represented by a document icon.

    At the bottom of the window, click the First, Previous, Next, Last or individual page number buttons to browse the library.

    Type a search term into the box in the upper left corner, with the magnifying glass icon. You can search by any library metadata stored in Airtime's database, whether that data is currently displayed or not. For example, to search for all files and playlists between four and five minutes long, enter 00:04 into the search box (for hours and minutes). Like an Internet search engine, the filtered entries shown are refined as you type - there is no need to press the Enter key on your keyboard.

    Auditioning, downloading and uploading files

    Clicking a file row in the table opens a pop-up menu which enables you to Play the file for audition in a pop-up window, Delete it from the Airtime library, Edit Metadata for that file, or Download it to your local computer for editing. The Delete option should be used with caution, because this action cannot be undone.

    If you have checked the Enable SoundCloud Upload box on the Preferences page, there will be an additional option on the pop-up menu, Upload to SoundCloud. As mentioned previously, you should only upload audio files to SoundCloud with the permission of the copyright holder.

    Right-clicking a file or playlist row in the search results will display all the available metadata for that item in a pop-up window.

    Creating a new playlist

    Once you have found the media that you require using the search box, you can create a new playlist on the right hand side of the Playlist Builder page. Click the New button to begin.

    At first, the new playlist will be shown as Untitled Playlist. Click on the pencil icon to the right to give the playlist a name.

     

    Enter the name you have chosen, then press the Return key on your keyboard to save the new name. You can edit the name of the playlist later by clicking on the pencil icon again.


    Click the link View / edit description to expand a box where you can enter a Description for the playlist, then click the Save button. Setting good quality metadata here will help you find the playlist using the search box later, so you should be as descriptive as possible. 

    Editing a playlist

    With a playlist open, click on a file in the search results and then click Add to Playlist on the pop-up menu. Or drag and drop files from the search results on the left into the playlist on the right.

    You can also select or deselect a whole page of search results using the button with the square icon, just below the search box. Alternatively, use the checkboxes in the first column of the table to select individual files. Then click the button with the plus icon to add your selection of files to the playlist. Files that you no longer require can be deleted from Airtime's library using the Trashcan button. 

    After adding files to the playlist, the total playlist time is displayed in the top right corner. The duration of an individual file is shown in each row of the playlist in a white font, and beneath this figure the time since the beginning of the playlist is displayed in a smaller light grey font.

    To audition a playlist file in your web browser, click the white triangle play button on the left side of its row. A pop-up audition window will open, with the playlist starting at the file you clicked. Click the small white x icon on the right hand side of each row to remove a file from the playlist. You can also drag and drop files to re-order them.

    Click the playlist Fade button (two horizontal white arrows crossing in a grey rectangle), to the right of the New and Delete buttons, to open a beige bar in which you can set the Fade in and Fade out times for this playlist. The default fade time is set in the Preferences page on the System menu.

    Click any one of the smaller Fade buttons between file rows to open another beige bar, which enables you to set fade in and fade out times between two adjacent files in the playlist. The fade buttons for adjacent files change to an orange background when you click them.

    Each file in the playlist also has a button with two square brackets, which enables you to set cue in and cue out times for that particular file. Like the fade button, it changes to an orange background when you click it. The length of the file in the playlist is updated automatically, but the Original Length of the file is also displayed for your reference.


    When your playlist is complete, click the New button in the top left corner to create another playlist, or browse to another page of the Airtime interface.

    If you want to edit the playlist content or metadata later, you can find it by Title, Creator, Length or Uploaded Date using the search box on the Playlist Builder page. Click the playlist in the search results list, and then click Edit from the pop-up menu. You can also Play the entire playlist in a pop-up audition window, or Delete a playlist from this menu.

    Playout history

    On the System menu, the Playout History page enables you to view a list of files played within a specific date range, or matching a specified search term. This page is designed to help your station prepare reports for music royalty collection societies and regulatory agencies.

    Select a date and time range by clicking the calendar and clock icons in the upper left corner of the page. Then click the search button, which has a magnifying glass icon, to the right. A list of files played during that date and time range will appear further down the page. The number of times each file was played and the length of the files are also shown.

    You can refine the search results within the specified date and time range by entering a keyword in the field beneath the calendar and clock boxes, such as the name of a musician.

    On the right side of the page are buttons which enable you to download the playout history in the specified date and time range. This history data is available in several formats, including Copy to your computer's clipboard (for pasting into a document), CSV (comma separated values), and PDF (Portable Document Format). There is also a Print option which opens a view that can be printed from your web browser. Press the Esc key to return to the Airtime interface once the print job is complete.

    To make optimal use of this feature for royalty reporting purposes, your audio files must be tagged with Composer and Copyright metadata. The artist performing a piece of music may not be the original composer of the work, or the copyright holder of the sound recording.

    Preferences

    On the System menu, click Preferences to set your Station Name. This text is shown in your web browser's title bar when your station staff are logged into Airtime, and optionally in stream metadata.

    The Default Fade time for automated fades is initially set to half a second. Custom fade in and fade out times can be set for adjacent items in a playlist. See the chapter Playlist builder for details.  

    You can also enable live, read-only access to the Airtime schedule calendar for your station's public website with the Allow Remote Websites to Access "Schedule" Info? option, if you wish. (There is more about this feature in the Exporting the schedule chapter, in the Advanced Configuration section of this book).

    Use the Timezone drop-down menu to set local time at your station. Airtime stores show times internally in UTC format (similar to Greenwich Mean Time), but can display local time for the convenience of your station staff. Also, you can set the day of the week that you wish to start your station's weekly schedule on, which defaults to Sunday. Then click the Save button.

    The Enable System Emails (Password Reset) box is not checked by default, because although enabling staff users to retrieve their lost password for themselves may be convenient, this option does have security implications. If the email account of the staff user is compromised, an attacker could very easily gain access to your Airtime server by clicking the Reset Password link on the login page.

    Should you wish to enable the password reset option, your Airtime server must have an SMTP mail program installed. (See the chapter Preparing the server for details). Also, you should enter a valid email address into the Reset Password 'From' Email field. Then click the Save button.

    SoundCloud settings

    If your station has a SoundCloud account (on http://soundcloud.com), you may wish to upload files and show recordings to this service, in order to broaden distribution and balance the bandwidth load on your own servers. Click the small black triangle next to SoundCloud Settings to show the options available. Check the Enable Soundcloud Upload box, then optionally check the Automatically Upload Recorded Shows box. You will also need to enter your SoundCloud login email address and password, and the tag metadata that SoundCloud will use to categorize your show recordings.

    Check the box Automatically Mark Files "Downloadable" on SoundCloud if you wish to enable this option. You can also set a default genre, track type and copyright license here, including public domain, all rights reserved, or one of the Creative Commons licenses (see http://creativecommons.org). Then click the Save button again.

    Please note that like most online distribution services, SoundCloud terms of service require you to have copyright in, or permission for Internet distribution from the copyright holder of, any media that you upload. Commercially released music files uploaded to SoundCloud are likely to be automatically removed from your station's SoundCloud page.

    Preparing media for ingest

    Before uploading media to an Airtime server, there are a number of factors which should be considered. Getting your ingest workflow right will save you a lot of time later.

    Metadata quality

    Airtime automatically imports any metadata that is in the files' ID3 tags. If these tags are incorrect or are missing information, you will have to either edit the metadata manually, or suffer the consequences. For example, if the tags have creator or genre metadata missing, it will be impossible to search for, playlist or schedule the media according to these criteria.

    There are a number of programs available which can be used to correct mistakes or incomplete information in ID3 tags. On GNU/Linux, the program Ex Falso (http://code.google.com/p/quodlibet/) can be useful for batch setting and editing ID3 tags before importing files into your Airtime server. On an Ubuntu desktop machine, you can install this program with the command:

    sudo apt-get install exfalso
    

    After installation, you can run the program with the command:

    exfalso
    

    The Tags From Path feature of this program is a particularly useful time saver if you have a large archive of untagged files. Sometimes there is useful creator or title information in the file name or directory path structure, which can be converted into an ID3 tag automatically.

    Metadata in legacy character sets

    Airtime expects file tag metadata to be stored in the international UTF-8 character set. Programs such as Ex Falso (described above) encode metadata in UTF-8 by default. If you have an archive of files encoded with metadata in a legacy character set, such as the Cyrillic encoding Windows-1251, you should convert these files before import.

    The program mid3iconv (part of the python-mutagen package in Debian and Ubuntu) can be used to batch convert the metadata character set of files on the command line. You can install python-mutagen with the command:

    sudo apt-get install python-mutagen
    

    For example, to preview the conversion of tags from Windows-1251 (CP1251) character set to UTF-8 for a whole archive of MP3 files, you could use the command:

    find . -name "*.mp3" -print0 | xargs -0 mid3iconv -e CP1251 -d -p
    

    in the base directory of the archive. The -d option specifies that the new tag should be printed to the server console (debug mode), and the -p option specifies a preview run. This preview will enable you to confirm that the metadata is being read and converted correctly before writing the new tags.

    To actually convert all of the tags and strip any legacy ID3v1 tag present from each file at the same time, you could use the command:

    find . -name "*.mp3" -print0 | xargs -0 mid3iconv -e CP1251 --remove-v1
    

    The name of the original character set follows the -e option. Other legacy character sets that mid3iconv can convert to UTF-8 include:

    KOI8-R: Russian
    KOI8-U: Ukrainian

    GBK: Traditional Chinese
    GB2312: Simplified Chinese

    EUC-KR: Korean
    EUC-JP: Japanese

    CP1253: Greek
    CP1254: Turkish
    CP1255: Hebrew
    CP1256: Arabic

    Audio loudness

    On file ingest, Airtime analyzes each file's loudness and stores a ReplayGain value for that file in its database. At playout time, the ReplayGain value is provided to Liquidsoap so that gain can be automatically adjusted to provide an average output of -14 dBFS loudness (14 decibels below full scale). See http://www.replaygain.org for more details of ReplayGain.

    Because of this automatic gain adjustment, any files with average loudness higher than -14 dBFS will not sound louder than quieter files at playout time, but the lack of crest factor in the louder files (their low peak-to-average ratio) may be apparent in the output, making those files sound less dynamic. This may be an issue for contemporary popular music, which can average at -9 dBFS or louder before ReplayGain adjustment. (See http://www.soundonsound.com/sos/sep11/articles/loudness.htm for a detailed analysis of the problem).

    Your station's producers should therefore aim for 14dB between peak and average loudness to maintain the crest factor of their prepared material (also known as DR14 on some dynamic range meters, such as the command-line DR14 T.meter available from http://dr14tmeter.iblogger.org/).

    Large transient peaks in otherwise quiet files should be avoided, to guard against the need for peak limiting when ReplayGain is applied to those quieter files.

    The vorbisgain command-line tool, available in the vorbisgain package in Debian/Ubuntu, can be used to indicate the ReplayGain of an individual Ogg Vorbis file before ingest into Airtime. (A similar tool for MP3 files is available in the mp3gain package in Debian/Ubuntu).

    Here is an example of a very quiet file where the use of ReplayGain would make the output more than 17dB louder:

    $ vorbisgain -d Peter_Lawson-Three_Gymnopedies.ogg
    Analyzing files...
    
       Gain   |  Peak  | Scale | New Peak | Track
    ----------+--------+-------+----------+------
    +17.39 dB |   4536 |  7.40 |    33585 | Peter_Lawson-Three_Gymnopedies.ogg
    

    And here is an example of a very loud file, with lower crest factor, where the output will be more than -7dB quieter with ReplayGain applied:

    $ vorbisgain -d Snoop_Dogg-Doggfather.ogg
    Analyzing files...
    
       Gain   |  Peak  | Scale | New Peak | Track
    ----------+--------+-------+----------+------
     -7.86 dB |  36592 |  0.40 |    14804 | Snoop_Dogg-Doggfather.ogg
    

    In the output from vorbisgain, Peak is the maximum sample value of the file before any ReplayGain has been applied, where a value of 32,767 represents full scale when decoding to signed 16 bit samples. Note that lossy compressed files can have peaks greater than full scale, due to encoding artifacts. The New Peak value for the Snoop Dogg file may be relatively low due to the hard limiting used in the mastering of that piece of music.

    Silence in media files

    Before importing media, it is good practice to check for any silent sections in the media files. While Airtime can compensate for leading and trailing silence with the use of cue-in and cue-out points in the Playlist Builder, it is better to trim these files to the intended length before upload. This is because trimmed files do not require station staff to set cue points manually, as media in the Airtime library could potentially be re-used for many different shows. Audacity is a cross-platform editor suitable for the task of trimming audio files, available from http://audacity.sourceforge.net/

    Very quiet introductions or over-long fades can also lead to apparent gaps in your broadcast playout. Some audio CDs feature a 'hidden track' at the end, which in fact uses a long period of silence within the final track, rather than an actual separate track on the disc. This means that CD encoding programs will encode both the hidden material and the silence in the media file. For example, the track Debra from the CD Midnite Vultures by Beck includes hidden material preceded by seven minutes of silence, as shown in the screen shot from Audacity below.

    Preparing the server

    The following instructions assume that you have root access (sudo on Ubuntu) to a GNU/Linux server, and are familiar with basic command line tasks. Experienced system administrators may prefer to skip to the Expert install chapter in the appendix of this book after preparing the server as shown in the steps below.

    The recommended Airtime server platform is Ubuntu 10.04 'Lucid Lynx' LTS. Ubuntu 12.04 'Precise Pangolin' and Debian 6.0 'squeeze' are also supported options. Users of other GNU/Linux distributions may be able to adapt these instructions to suit their needs.

    The server should have at least a 1GHz processor and 512MB of RAM, preferably 1GB RAM or more. If you are using a desktop environment and web browser directly on the server you should install at least 2GB RAM, to avoid swapping to disk.

    The Airtime installation does not use much disk space, but you should allow plenty of storage capacity for the Airtime library. A hot-swap RAID array is recommended for media storage, in case of disk failure. You should also consider a UPS or other battery-powered system to offer some protection against short-term power failures.

    The Airtime web administration interface is intended to work with any browser, on any desktop or mobile platform with a minimum display size of 1024x768 pixels. Airtime looks its best on a high definition display of 1920x1080 pixels. The recommended web browser is Mozilla Firefox 13 (or a later version). Google Chrome 20 (or later) and Apple Safari 5 (or later) are also supported.

    Sound cards

    If your Airtime machine will only be used to stream directly to an Icecast or SHOUTcast streaming media server, you do not require a sound card to be installed on the Airtime server side. This option is suitable for Airtime installations at your ISP's data centre, remote from any transmitter. However, you will not be able to take advantage of Airtime's live show recording feature (yet).

    If you intend that your Airtime server will have a direct audio output to a broadcast transmitter or a separate stream encoder, your server machine must have a sound card supported by an ALSA driver. Almost all standard sound cards have ALSA drivers built into the Linux kernel, which do not need to be installed separately. If in doubt about driver support for your sound card, check the ALSA support matrix at: http://www.alsa-project.org/main/index.php/Matrix:Main

    USB audio device index

    Some server motherboards do not have a default ALSA device (index number zero), and a USB sound card is often prevented from getting index zero by the GNU/Linux distribution's configuration. This setting may be in a file such as /etc/modprobe.d/alsa-base.conf in Ubuntu, which can be edited with nano:

    sudo nano /etc/modprobe.d/alsa-base.conf
    

    Comment out the lines beginning options snd-usb- to fix the problem:

    # Prevent abnormal drivers from grabbing index 0
    
    # options snd-usb-audio index=-2
    # options snd-usb-us122l index=-2
    # options snd-usb-usx2y index=-2
    # options snd-usb-caiaq index=-2
    

    Save the file with Ctrl+O and close nano with Ctrl+X. Then remove and re-insert the cable connecting the USB sound card to the server (making sure any mixer or amplifier connected is faded down, to avoid a 'thump' on the output). The command aplay -l should now confirm that the USB Audio device has index 0:

    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: MobilePre [MobilePre], device 0: USB Audio [USB Audio]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    

    When using a USB sound card with ALSA, some how-to documents advocate setting the nrpacks=1 option, but this is not recommended for Airtime because it can increase CPU load significantly.

    Intel HDA mixer labels

    If you have an Intel HDA sound card, as built in to many contemporary motherboards, you may discover that the recording controls in alsamixer have incorrect labels. This problem can make it difficult to adjust mixer levels except by trial and error. To fix these labels, you can pass a specific model= parameter to the snd-hda-intel module of the Linux kernel. On Debian or Ubuntu GNU/Linux, you can do this by first identifying the model you have, with the command:

    cat /proc/asound/card0/codec* | grep Codec
    

    The server should respond with a line such as:

    Codec: Realtek ALC882
    

    Referring to the appendix HD Audio Models in this book, find the matching codec and model. In this example, the codec is ALC882 and the motherboard has six analogue jacks and two S/PDIF sockets, so the model is 6stack-dig.

    ALC882/883/885/888/889
    ======================
      3stack-dig    3-jack with SPDIF I/O
      6stack-dig    6-jack digital with SPDIF I/O
    

    Edit the file /etc/modprobe.d/alsa-base.conf with nano as follows:

    sudo nano /etc/modprobe.d/alsa-base.conf
    

    Add an appropriate line for your soundcard model to the end of the file, such as:

    # Realtek ALC882
    options snd-hda-intel model=6stack-dig
    
    Save the file with Ctrl+O and close nano with Ctrl+X. Then reboot the server. After the reboot, you should now see that the mixer controls are correctly labelled.

    Disable desktop and other sounds

    If you are installing Airtime on a desktop computer, make sure you disable or remove any programs that could send unintended audio to a sound card you are using for broadcast output. This includes alert sounds which play when the computer is ready for use, or when a user logs in. On Ubuntu, these sounds are configured using System -> Preferences -> Sound on the main desktop menu. (This configuration dialogue only works when the PulseAudio sound server is installed).

    You may prefer to remove all system sound files from the computer, in case they could be played unintentionally via the sound card. For example, on Ubuntu you may wish to remove the ubuntu-sounds package, with the following command:

    sudo apt-get purge ubuntu-sounds
    

    PulseAudio

    The PulseAudio sound server is not recommended for Airtime sound card output, but is installed by default on Ubuntu. To remove PulseAudio from an Ubuntu machine, type the following command:

    sudo apt-get purge pulseaudio
    

    Removing the pulseaudio package on a desktop Ubuntu machine may force the removal of the ubuntu-desktop metapackage. However, this metapackage is only installed on the system for managing upgrades; removing it does not remove the GNOME desktop.

    After removing PulseAudio, if your Airtime machine has a desktop, you can install a mixer applet which can control the ALSA soundcard driver directly, such as gnome-alsamixer:

    sudo apt-get install gnome-alsamixer
    

    On a server with a sound card but without a desktop, you can control sound input and output levels using the command line program alsamixer:

    This program should already be installed on an Ubuntu or Debian machine with a sound card. If not, you can install it with the command:

    sudo apt-get install alsa-utils
    

    Remove webmin, if installed

    The webmin control panel (http://www.webmin.com) has been known to remove Apache and PHP packages on Debian and Ubuntu systems, which can cause the Airtime package to be removed in turn. This problem is easily reversed by re-installation of the affected packages, but it has the potential to disrupt your broadcast playout from Airtime. Webmin is not likely to be installed on your server unless your system administrator has installed it manually. This is because webmin was removed from official Debian and Ubuntu package repositories some years ago.

    RabbitMQ hostname

    RabbitMQ requires a fixed and resolvable hostname (see http://www.rabbitmq.com/ec2.html#issues-hostname), which is normal for a server. For a desktop or laptop machine where the hostname changes frequently or is not resolvable, this issue may prevent RabbitMQ from starting. When using a desktop or laptop computer with a dynamic IP address, such as an address obtained from a wireless network, the rabbitmq-server daemon must not start up before the NetworkManager service.

    RabbitMQ on Debian

    In Debian 6.0 (Squeeze) the rabbitmq-server daemon does not start automatically after a reboot. This should be fixed before installing Airtime, to prevent problems at playout time. If the rabbitmq-server package was installed before the last reboot, you will need to run:

    invoke-rc.d rabbitmq-server start
    

    as the root user before the installation of Airtime. If it is not already installed, run the following command as root:

    apt-get install rabbitmq-server
    

    After a fresh installation, rabbitmq-server will start automatically, so there is no need to run the invoke-rc.d command mentioned above.

    In either case, you should then edit lines 13 and 14 of the file /etc/init.d/rabbitmq-server (as root) to show:

    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    

    and then run the command (as root):

    update-rc.d rabbitmq-server defaults
    

    This should make sure that rabbitmq-server starts after the next reboot.

    Mail server

    If you wish Airtime to be able to send password reminder emails to your staff users, the server must have a working SMTP program installed, such as the postfix package in Debian or Ubuntu. For configuration options, refer to the documentation for your mail server of choice.

    Proceed to installation

    Now your server should be ready for Airtime to be installed. Depending on your requirements, you should now proceed to either the chapter Easy setup, the chapter Automated installation, the chapter Manual installation or the Expert install appendix.

    Promoting your station

    If you have an Icecast server, you can put a link to the Icecast status page at port 8000 on your station's homepage, to provide an overview of available streams. See the chapter Interface customization for tips on theming the Icecast status page. You can also use Now Playing widgets (see the chapter Exporting the schedule) or HTML5 stream players (see the chapter Stream player for your website) to help grow your audience.

    You can also uncomment the <directory> section in the /etc/icecast2/icecast.xml file to have your new station automatically listed on the Icecast directory website http://dir.xiph.org which could help you pick up more listeners.

        <!-- Uncomment this if you want directory listings -->
    
        <directory>
            <yp-url-timeout>15</yp-url-timeout>
            <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
        </directory>
    

    Another stream directory service is provided by the Liquidsoap Flows! site at http://flows.liquidsoap.fm/. The following section can be added to the file /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq after add_skip_command(s) on line 174, for a stream named 'ourstation':

    ourstation = register_flow(
      radio="Rock 'n Roll Radio",
      website="http://radio.example.com/",
      description="Canada's most rockin' radio!",
      genre="Rock",
      user="",
      password="",
      streams=[("ogg/128k","http://streaming.example.com/airtime_128")],
      ourstation)
    

    For the time being, a stream can be registered on the Liquidsoap Flows! site with any username and password. Authenticated services may be offered in future.

    Recording shows

    Live show recording from the input of the server's sound card, if one is fitted, can be enabled in the Add Show box of Airtime's Calendar (see the Calendar chapter for details). During a recording, a red light is shown in the Master Panel, and the word Recording appears in a red font to the left of the show name.


    Before the first broadcast show scheduled for recording begins, you should check that the level of recording is sufficient to ensure a good signal to noise ratio, but not so high a level that clipping (distortion) occurs in the recorded file. You can perform this check using the command alsamixer on the Airtime server. This command opens a soundcard mixer application in the server console.

    Press the F4 key on your keyboard to set capture levels. Some experimentation may be required to find the correct control on the mixer, using the Left and Right arrow keys on your keyboard. Levels are set with the Up and Down arrows, and Capture is toggled with the Space bar. Capture dB gain should be set to 0.00, 0.00 initially.

    If you hear nothing at all in the recording, you may need to set the value of Input Source to Line, using the Up or Down arrows. Depending on the particular sound card and sockets you are using, you may have to enable other inputs, such as Digital or S/PDIF. If a test recording is too quiet, try raising the line output level of your broadcast mixer towards 0dB before increasing gain above 0dB on the sound card, in order to achieve the optimal gain structure.

    Using recordings

    After the recording has finished, you can find the recorded file in the Playlist Builder, by searching for recorder. The file will be labelled with a Title containing a date and time stamp, as well as the name of the show.

    Click a file and select Edit Metadata from the pop-up menu to enter additional details of the recording which will help you find it in searches later, such as Album or Language. Then click the Save button.

     

    Cancelling a recording

    If you wish to cancel the recording of a live show, click on the show in the Calendar and select Cancel Current Show from the pop-up menu.

    Airtime will ask you if you are sure about this action, as it cannot be undone. The recorded show file in the Airtime storage server will be truncated if you click the OK button.

     

    Rights and royalties

    If you're new to broadcasting, or have not streamed your station online before, reading the following brief explanation of compensation rules for songwriters, musicians and other copyright holders may save you a great deal of trouble later.

    Independent music radio on the Internet is not what it might have been, due to royalty demands from SoundExchange in the USA, and similar organisations in other territories. These organisations are usually membership societies or government-sanctioned national authorities which are intended to collect money from broadcasters to compensate copyright holders. The royalty collection societies require payment before you can stream just about any music released commercially to the general public — whether you make any money out of streaming, or not. It's not so much the percentage of revenue demanded, but that there are usually annual minimum fees to pay, which hurts small stations disproportionately.

    For example, in the UK, the MCPS-PRS Limited Online Music Licence covers non-commercial music streaming by groups and individuals, as long as their gross revenue is less then £12,500 per year. The cost is on a sliding scale, up to £1,120 plus 20% tax per year for delivering up to 450,000 individual streams or serving 25,000 files; after that, you have to apply for a full MCPS-PRS Online Music Licence. That doesn't sound too bad at first, but 25,000 files per year works out at less than four downloads per hour for a round-the-clock website. This particular licence only covers publishing (songwriter) rights, not recording (record label and musician's performance) rights, so you have to negotiate an additional licence from Phonographic Performance Limited (PPL) to play music online, including digital recordings converted from commercially released CDs, vinyl or tape.

    Typically, you have to provide full statistical details to the royalty society of all music streamed or downloaded from your site, which can be onerous. Even if your radio station is mostly speech, there are many limitations in the small print of these music licences. For instance, you can't use music for promotional purposes, and you can't stream a whole opera, without negotiating separate licences. Weirdly, you are not allowed to play a piece of music in a 'derogatory context' to the writer or performers; no drummer jokes allowed, then.

    However, the biggest pitfall is that these MCPS-PRS licences for publishing rights only cover listeners in the UK. For recording rights, PPL is a member of the IFPI reciprocal scheme for webcasters, which means its licenses cover listeners in some European countries, Australia, New Zealand and a few other countries, but not listeners in the USA or Canada. So if your Internet station picked up a significant number of listeners in countries not covered by the MCPS-PRS licences or the IFPI reciprocal scheme, you would have to pay for similar music licences in those countries as well. It's no wonder that many not-for-profit radio stations have disappeared from the virtual airwaves over the last few years, since not having the right licences could leave the operator liable to legal action.

    If you want to go down the commercial music route, check out the http://www.prsformusic.com and http://www.ppluk.com websites for UK licence details. The http://www.soundexchange.com website currently quotes a 500 dollar minimum annual fee for non-commercial webcasters, plus a usage fee above a certain number of listener hours, for the right to stream music recordings to listeners in the USA. See the websites of ASCAP, BMI and SESAC for details of music publishing royalties payable by webcasters streaming to the USA.

    Free content streaming offers the chance that DIY Internet radio could rise again. Since royalty collection societies like MCPS-PRS and SoundExchange can only represent the interests of their own members, it follows that if you are not a member, you can stream your own self-produced content without paying for their licences. If you state somewhere on your website that the stream is of your own copyrighted material, and is made available to the public under a specific licence, then no-one should misunderstand your intentions. You might be able to persuade other people to allow you to stream their content too, as long as they do not have a conflicting legal obligation, such as having previously joined one of the many royalty collection societies around the world. You can ask for permission to stream when website visitors upload their own music files to you via a HTML form, much as the likes of SoundCloud do. Or you can collect files licensed under an appropriate Creative Commons (http://www.creativecommons.org) or other free content licence.

    Explicit permission to stream on your particular server is always going to be the ideal, so think about your own terms and conditions before you accept files from third parties for streaming. How, for example, would you know if someone uploaded a file to your online radio station that unknown to you, had been ripped from a commercially released CD? That's the kind of thing that could get you in trouble with the licensing authorities and copyright holders.

    Setting the server time

    Accurate time keeping on your server is vital for optimal Airtime performance. You can confirm that the date and time of your server are set correctly with the date command:

    date
    

    The server should respond with the date, time, time zone and year in a format similar to the following example:

    Tue Jul  3 15:08:57 BST 2012
    

    Configuring NTP

    Although it is possible to set the date and time of the server manually, this is not recommended because the server clock can drift over time, compromising the accuracy of your broadcast schedule. If your Airtime server is permanently connected to the Internet, you can synchronize your server to a time server with the ntp program. If ntp is not yet installed, you can enter the following command on Debian or Ubuntu:

    sudo apt-get install ntp
    

    Optionally, open the ntp configuration file in the nano editor to add further time server names:

    sudo nano /etc/ntp.conf
    

    On Ubuntu GNU/Linux, the default time server is ntp.ubuntu.com, but there are many other time servers available on the public Internet, including the group of servers listed at http://www.pool.ntp.org/ for each country. Using a variety of NTP servers located closely to your Airtime server should produce the most accurate results. For example, for a server in the United Kingdom you could use the following list:

    # You do need to talk to an NTP server or two (or three).
    server ntp.ubuntu.com
    server 0.uk.pool.ntp.org
    server 1.uk.pool.ntp.org
    server 2.uk.pool.ntp.org
    server 3.uk.pool.ntp.org
    

    Enter the server names you require, press Ctrl+O to write out the /etc/ntp.conf file, then Ctrl+X to exit nano. Restart the ntp service with:

    sudo invoke-rc.d ntp restart
    

    The server should respond:

    * Stopping NTP server ntpd                                 [ OK ]
    * Starting NTP server ntpd                                 [ OK ]
    

    Then use the ntpq -p command to confirm that ntp is working. This command should produce output similar to the following:

    ntpq -p
         remote           refid     st t when poll reach  delay  offset  jitter
    ===========================================================================
     europium.canoni 193.79.237.14   2 u   28   64    3  39.571  12.600   3.590
     norb.v4.colo.m. 46.227.200.72   3 u   28   64    3  47.856  -6.908  10.028
     82.113.154.206  193.62.22.82    2 u   29   64    3  11.458  -0.513   2.629
     ntppub.le.ac.uk 158.43.192.66   2 u   91   64    2 122.781  44.864   0.001
     dns0.rmplc.co.u 195.66.241.3    2 u   27   64    3  22.171   1.464   4.242
    

    Adjusting the server time zone

    The data centre which hosts your Airtime server could be located anywhere in the world. Some servers are set to Coordinated Universal Time or UTC (similar to Greenwich Mean Time or GMT), regardless of their location. If this is not appropriate for your station, on a Debian or Ubuntu server you can reconfigure the tzdata (time zone data) package with the command:

    sudo dpkg-reconfigure tzdata
    

    This command opens a menu in which you can select the continent that you require, by pressing the Enter key.

     

    The next step is to select your nearest city, again by pressing the Enter key. The appropriate time zone is selected according to the information that you have entered.

     

    The console output from the dpkg-reconfigure tzdata command will confirm the new setting:

    Current default time zone: 'Europe/London'
    Local time is now:      Tue Jul  3 15:18:01 BST 2012.
    Universal Time is now:  Tue Jul  3 14:18:01 UTC 2012.
    

    Smartphone journalism

    Using an ordinary smartphone and Airtime, you can upload your audio reports to the studio library or put them straight on the air. Here's how...

    The basic voice recorder app on your phone may not have all the features you need for journalism, but there are plenty of more suitable recording apps available for both iPhone and Android. For instance, searching for 'ogg recorder' in the Play Store on an Android phone yields plenty of alternatives. The following example uses RecForge Lite because of its configurable recording formats. This free app is limited to three minutes per recording, but there is an unrestricted version available at very modest cost.



    In the Settings window of the app, set the recording format as Ogg Vorbis, 44.1KHz sample rate, mono. Disable automatic gain control to get a consistent recording level, rather than artificially boosting quiet sounds, which should result in less distortion. Under 'Limit folders browsing' give the app access to all of the SD Card storage of the phone.

    Back in the main recording window of RecForge, create a directory such as 'recordings' under the /mnt/sdcard/media/audio/ path, which is normally used by the phone's music application. You can then make recordings using the big red button, watching the input level meter to ensure a good signal to noise ratio. The recorded files are automatically named with date and time stamps, but can be renamed in the app later by selecting the Edit feature. The latest recordings are listed in the main recording window; individual files can be auditioned by tapping on them.



    Open the web interface of your station's Airtime server in the phone's browser, log in with your username and password, and tap Add Media on Airtime's main menu. After tapping the Add Files button, the phone will offer a choice of file to upload. By tapping Select music track you can browse the /mnt/sdcard/media/audio/ directory on the SD card filesystem, without requiring the installation of a file manager app on the phone.



    Tap one of the date-and-time-stamped files listed from the 'recordings' directory to select it, then tap the OK button. The files are credited to 'Unknown artist' because they have not yet been tagged with creator metadata.



    After tapping the Start upload button on the Add Media page, the files are now copied into the remote Airtime library.



    You can now add these files directly to a forthcoming show, use them in the Playlist Builder, or edit their metadata to make them easier to find in searches later. One of the limitations of mobile recording is that it isn't always convenient to enter large amounts of text metadata when you're on the move. So a phone app that tagged audio recordings with creator, location and other relevant metadata would be very useful.        

    Alternatively, phone apps which enable you to stream directly into Airtime's live rebroadcast feature include Papaya Broadcaster for iOS: http://shift-left.net/2012/03/10/papaya-broadcaster-1-8-4-arabola/

    DemoIcesShout for Android also shows promise, although it can only stream a static file at the moment: http://droidtools.sourceforge.net/content/icecast-client-android

    A live workflow does of course depend on a steady network connection between the phone and Airtime server.

    Status

    On the System menu, the Status page provides an overview of the health and resource usage of the various services that make up an Airtime system. If all is well, you will only see green check mark icons in the Status column. This page also shows how much Disk Space you have used on the disk partition containing the main Import Folder, as well as any disks or partitions with watched folders.

    If any of the check mark icons in the Status column have changed to a red warning sign, contact your system administrator for assistance. Airtime will do its best to restart any failing services, but sometimes manual intervention may be required; for example, in the case of hardware failure.

    If you have run out of storage space, an Airtime user with admin privileges could log in and delete media files that are no longer required from the Playlist Builder. Alternatively, you could move some files to a watched folder on another disk, or ask your system administrator to install additional storage capacity.

    Icecast handover

    In a typical radio station configuration, the live output from the broadcast studio and the scheduled output from Airtime are mixed together before being sent further along the broadcast chain, to a transmitter or streaming media server on the Internet. (This may not be the case if your Airtime server is remote from the studio, and you are using the Show Source Mount Point or Master Source Mount Point to mix live and scheduled content. See the Stream Settings chapter for details).

    If your Icecast server is hosted in a remote data centre, you may not have the option to handover the streaming media source manually, because you have no physical access to connect a broadcast mixer to the server. Disconnecting the stream and beginning another is less than ideal, because the audience's media players will also be disconnected when that happens.

    The Icecast server has a fallback-mount feature which can be used to move clients (media players used by listeners or viewers) from one source to another, as new sources become available. This makes it possible to handover from Airtime output to a show from another source, and handover to Airtime again once the other show has ended.

    To enable fallback mounts, edit the main Icecast configuration file to define the mount points you will use, and the relationship between them.

    sudo nano /etc/icecast2/icecast.xml
    

    The example <mount> section provided in the icecast.xml file is commented out by default. Before or after the commented section, add three mount point definitions. The default mount point used by Airtime is /airtime_128 which is shown in the /etc/airtime/liquidsoap.cfg file. You must also define a mount point for the live source (called /live.ogg in this example) and a mount point for the public to connect to (called /stream.ogg in this example).

       <mount>
            <mount-name>/airtime_128</mount-name>
            <hidden>0</hidden>
       </mount>
    
       <mount>
            <mount-name>/live.ogg</mount-name>
            <fallback-mount>/airtime_128</fallback-mount>
            <fallback-override>1</fallback-override>
            <hidden>0</hidden>
       </mount>
    
       <mount>
            <mount-name>/stream.ogg</mount-name>
            <fallback-mount>/live.ogg</fallback-mount>
            <fallback-override>1</fallback-override>
            <hidden>0</hidden>
       </mount>
    

    These mount point definitions mean that a client connecting to a URL such as http://icecast.example.com:8000/stream.ogg will first fall back to the /live.ogg mount point if it is available. If not, the client will fall back in turn to the /airtime_128 mount point for Airtime playout.

    Setting the value of <fallback-override> to 1 (enabled) means that when the /live.ogg mount point becomes available again, the client will be re-connected to it.  If you wish to hide the /airtime_128 and /live.ogg mount points from the public Icecast web interface, set the value of <hidden> in each of these definitions to 1.

    Source configuration

    Connect the other source to the Icecast server with the same parameters defined in the /etc/airtime/liquidsoap.cfg file, except for the mount point. This should one of the mount points you have defined in the /etc/icecast2/icecast.xml file, such as /live.ogg in the example above.

    To configure Mixxx for streaming to Icecast, click Options, Preferences, then Live Broadcasting. For server Type, select the default of Icecast 2 when streaming to Debian or Ubuntu servers, as this is the current version of Icecast supplied with those GNU/Linux distributions.

     

    By default, Icecast streams are buffered to guard against network problems, which causes latency for remote listeners. When monitoring the stream from a remote location, you may have to begin the live stream a few seconds before the previous stream ends to enable a smooth transition.

    Stream player for your website

    If you are using Airtime for web streaming, you can embed a player applet into your website. jPlayer is a player applet (available under the GNU GPL from http://jplayer.org/) which uses the <audio> tag feature of HTML5 to play your streams. If the listener's browser does not support HTML5, the applet falls back to using Adobe Flash instead.

    Proprietary browsers, such as Internet Explorer on Windows or Safari on Apple OS X, may not support Ogg Vorbis streams. Listeners who do not wish to install a browser with Ogg Vorbis support (such as Mozilla Firefox, Google Chrome or Opera) can listen to these streams using a separate media player such as VideoLAN Client, also known as VLC (http://www.videolan.org/vlc/).

    Example code

    You can download the example code for this chapter from:

    http://en.flossmanuals.net/airtime-en-2-0/index/_booki/airtime-en-2-0/static/jPlayer_demo2.zip

    Unzip this file on your computer, and then open the file jplayer-demo.html in your editor:

    nano jplayer-demo.html
    

    We'll focus on the two areas that you need to concern yourself with. Firstly, in the <head> tag of the document, you'll see some code like this:

    $(document).ready(function(){
    
     $("#jquery_jplayer_1").jPlayer({
    
      ready: function () {
       $(this).jPlayer("setMedia", {
         oga: "http://localhost:8000/airtime_128"
          }).jPlayer("play");
      },
    
       ended: function (event) {
        $(this).jPlayer("play");
       },
    
        swfPath: "js",
        supplied: "oga"
    
     });
    
    });
    

    This code loads jPlayer, and specifies the source of the Airtime stream. The stream setting of http://localhost:8000/airtime_128 will work if you are testing jPlayer directly on the Icecast server that Airtime is connecting to. When testing on a remote server, you should change this setting to the IP address or domain name, port number and mount point of the Icecast server you are using.

    As soon as jPlayer has finished loading, it will automatically begin to play the stream. The parameters ready, ended, swfPath and supplied are arguments passed to jPlayer. A full list of constructor arguments is available in the jPlayer Developer Guide at http://www.jplayer.org/latest/developer-guide/

    jPlayer controls

    Secondly, the <body> tag of the file jplayer-demo.html defines the controls displayed by jPlayer. These controls can be as simple as just one Play/Pause button, or a fully-fledged playback interface with a playlist, progress bar and volume control. This example code uses one of the simpler skins available for jPlayer, Blue Monday.

    A stop button or progress bar is not useful when we are streaming continuously from Icecast, so we can remove these tags from the demo code, along with the tags specifying the playback time and file duration. The simplified HTML creates a play/pause button and a mute button, and looks as follows:

    <div id="jquery_jplayer_1" class="jp-jplayer"></div>
    
     <div class="jp-audio">
      <div class="jp-type-single">
    
       <div id="jp_interface_1" class="jp-interface">
    
        <div class="label">Airtime Radio! 99.9 FM</div>
    
         <ul class="jp-controls">
          <li><a href="#" class="jp-play" tabindex="1">play</a></li>
          <li><a href="#" class="jp-pause" tabindex="1">pause</a></li>
          <li><a href="#" class="jp-mute" tabindex="1">mute</a></li>
          <li><a href="#" class="jp-unmute" tabindex="1">unmute</a></li>
         </ul>
    
       </div>
    
       <div id="jp_playlist_1" class="jp-playlist"></div>
    
      </div>
     </div>
    

    When you open the HTML file jplayer-demo.html in a web browser, your player should appear as follows:

    The original version of this demo code and skin are available from http://jplayer.org/download/ for further experimentation.

    Stream settings

    You can configure direct Icecast and SHOUTcast streams and a sound card by clicking Streams on the System menu.

    At the top left of the Stream Settings page are global options including Hardware Audio Output, which enables playout from the default sound card on the server, if one is fitted. The default Output Type of ALSA on the drop-down menu will be suitable for most servers with a sound card. If not, you have the option to choose from other Liquidsoap interfaces available, such as OSS or PortAudio. If you are only using the hardware audio output, and will not be streaming directly to Icecast or SHOUTcast, you can click the Save button on the right side of the page at this point.

    The second checkbox under Global Settings enables the sending of Icecast Vorbis Metadata with direct streams. This setting is optional, because some media players have a bug which makes them disconnect from Ogg Vorbis streams when an Icecast server notifies the player that a new track is starting.

    The Stream Label radio button allows you to set the metadata that will be sent with direct streams; Artist and Title, Show, Artist and Title, or Station name and Show name.

    Input stream settings

    On the lower left side of the Stream Settings page you can configure remote live input streams from DJ programs such as Mixxx or IDJC, or smartphone applications used by broadcast journalists. Airtime supports two types of live input stream; the Show Source, which enables a specific person to stream in during their own show, and the Master Source, which can override the Show Source if necessary. If neither type of live input is available, Airtime will fall back to Scheduled Play (playlists and files scheduled in Airtime, in advance of a show).

    The Auto Source Transition checkbox enables playout to be switched automatically to the highest priority source whenever an authenticated input source connects to or disconnects from Airtime. The field Switch Transition Fade sets the length of the audio fade as scheduled playout is switched to a remote input stream, and back. The default transition fade setting is half a second.

    Each type of input stream requires a username and password before the remote broadcaster can connect to Airtime. The Master Username and Master Password can be set in the Input Stream Settings box, while the authentication for individual Show Sources is set up in Airtime's schedule calendar. See the Calendar chapter for details.

    Input streams must have a Port for the remote broadcaster to connect to, which should be a number in the range from 1024 to 49151. If you have the Icecast or SHOUTcast streaming server running on the same machine as Airtime, you should avoid using port 8000 or 8001 for either type of Airtime input stream. This is because both Icecast and SHOUTcast use port 8000, and SHOUTcast also uses port 8001. If the usernames and passwords were similar, remote broadcasters might accidentally connect to the streaming server directly, bypassing Airtime.

    To avoid further confusion, it is also recommended that you set a different Mount Point (the specific filename for broadcasters and listeners to connect to) from that used on your public Icecast or SHOUTcast server.

    If your Airtime server is behind a firewall, and you wish remote broadcasters to connect input streams to it across the public Internet, you may need to click the Override link to set a Connection URL which is available from outside your local area network. This URL might be based on the domain name assigned to the router which forwards the appropriate port to your Airtime server. Then click OK to save the new connection URL.

    Switching input streams

    In the Master Panel, available input source streams are shown with an orange line connecting the source to the switch, which you could think of like a patch cable connecting a source to a broadcast mixer. When that switch is active, another orange line connects the switch to the On Air indicator, like a patch cable connecting a mixer to a transmitter.

    If you have checked the Auto Source Transition box in the Stream Settings page, the Master Source switch will move automatically to the active position, on the left, when an authenticated master source connects to Airtime. Otherwise, you can activate the switches manually by clicking the left side of each switch, or deactivate them by clicking the right side. The switches do not have to be dragged with the mouse, in the way that a switch on a hardware mixer would be pushed sideways. Show Source live input streams and Scheduled Play can be manually activated or deactivated in the same way.

    To force disconnection of a live remote source, for example when the remote input source has crashed and is no longer sending audio data, click the X icon to the left of the source name.

    Output stream settings

    On the right side of the page, you can configure up to three independent output streams with different bit rates, and send these streams to different Icecast or SHOUTcast servers. By default, only Stream 1 is enabled, with this stream being sent to Icecast on the same server at the localhost IP address of 127.0.0.1.

    To configure another stream, click the bar with the stream number to expand its box, and make sure Enabled is checked. Enter at least the streaming Server IP address or domain name, and Port details. The default port for Icecast and SHOUTcast servers is 8000.

    Click Additional Options to expand a box in which you can enter the Username, Password and metadata to send to the streaming server. The default Username for Icecast servers is source, and if this the name in use on your streaming server, you can leave this field empty. You can also set the specific Mount Point that listeners will connect to here. Then click one of the Save buttons in the upper or lower right corner to update the Airtime server's settings.

    When selecting a SHOUTcast server from the Service Type drop-down menu, you are restricted to using MP3 format only, so the choice of Ogg Vorbis format is greyed out in the Stream Type drop-down menu. The SHOUTcast username for stream sources is fixed, so you do not need to enter this value under Additional Options, but you will usually have to enter a password.

    Any connection problems between Liquidsoap and Icecast or SHOUTcast are shown on the Stream Settings page. For example, if you enter the wrong password, you will see an Authentication Required error message. To fix this, enter the correct password in the Additional Options box, and click the Save button.

    Support feedback

    If you did not already register Airtime when you installed it, as shown in the Getting Started chapter, you can click Support Feedback on the System menu to display Airtime's automated feedback options. Check the Send support feedback box in order to post technical details about your Airtime installation to Sourcefabric, over the Internet. These details help Sourcefabric diagnose any problem that you might be having with your Airtime system.

    You may also wish to send details of your station to Sourcefabric, so that your station has the opportunity to be promoted with other Airtime users on the http://www.sourcefabric.org website. This feature also helps Sourcefabric target its support services to the countries where they are needed most. Check the box Promote my station on Sourcefabric.org and fill in the details of your station. You can upload a station logo file (of up to 600 x 600 pixels) from your desktop computer by clicking the Browse button.


    Click on the Show me what I am sending link to expand a box which displays the technical data being returned to Sourcefabric. The data is collected according to the Sourcefabric privacy policy (http://www.sourcefabric.org/en/about/policy/) which you are required to agree to before you can submit the information.

    The airtime-log command

    The airtime-log command provides convenient access to the logging output from the services which make up the Airtime system: media-monitor, recorder, playout, liquidsoap and web.

    Using this command requires root privileges (sudo on Ubuntu). Entering the command without any options returns a list of options that you can specify:

    sudo airtime-log
    
    Usage: airtime-log [options]
    
    --view|-v <string> Display log file
            media-monitor|recorder|playout|liquidsoap|web
    
    --dump|-d <string> Collect all log files and compress into a tarball
            media-monitor|recorder|playout|liquidsoap|web (ALL by default)
    
    --tail|-t <string> View any new entries appended to log files in real-time
            media-monitor|recorder|playout|liquidsoap|web (ALL by default)
    

    For example, to view the media-monitor log, you could use the command:

    sudo airtime-log -v media-monitor
    

    The server console will display something like the following output:

    2011-11-29 09:32:45,750 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 32 -
    
    *** Media Monitor bootup ***
    
    2011-11-29 09:32:45,864 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 39 - Setting up monitor
    2011-11-29 09:32:46,058 INFO - [MainThread] [api_client.py : setup_media_monitor()] : LINE 405 - Connected to Airtime Server. Json Media Storage Dir: {u'watched_dirs': [], u'stor': u'/srv/airtime/stor/'}
    2011-11-29 09:32:51,061 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 47 - Storage Directory is: /srv/airtime/stor/
    2011-11-29 09:32:51,066 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 54 - Initializing event processor
    2011-11-29 09:32:51,364 INFO - [MainThread] [airtimemediamonitorbootstrap.py : scan()] : LINE 29 - watched directories
    found: {u'1': u'/srv/airtime/stor/'}
    

    Use the PageUp and PageDown keys on your keyboard to navigate through the log file, or press the q key to quit the viewer.

    To dump all log files and compress them into a tarball placed in the working directory, you could add the -d switch to the command:

    sudo airtime-log -d
    
    Creating Airtime logs tgz file at /root/logs/airtime-log-all-2011-11-29-12-43-20.tgz
    

    To view just the Liquidsoap log output in real-time, you could enter the command:

    sudo airtime-log -t liquidsoap
    
    Tail liquidsoap log2011/11/29 11:44:41 [fallback_4892:3] Switch to src_4890 with forgetful transition.
    2011/11/29 11:44:41 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --data='2' --media-id=
    2011/11/29 12:10:06 [server:3] New client: localhost.
    2011/11/29 12:10:06 [server:3] Client localhost disconnected.
    2011/11/29 12:10:06 [server:3] New client: localhost.
    2011/11/29 12:10:06 [server:3] Client localhost disconnected.
    2011/11/29 12:10:29 [server:3] New client: localhost.
    2011/11/29 12:10:29 [server:3] Client localhost disconnected.
    2011/11/29 12:10:29 [server:3] New client: localhost.
    2011/11/29 12:10:29 [server:3] Client localhost disconnected.
    

    Press the Ctrl+C keys to interrupt the real-time log output and return to the server console.

    Troubleshooting

    If your Airtime server is not working as expected, individual components of the system can be started, stopped, restarted or checked in the server console using the invoke-rc.d command:

    sudo invoke-rc.d airtime-playout        start|stop|restart|status
    sudo invoke-rc.d airtime-media-monitor  start|stop|restart|status
    sudo invoke-rc.d apache2                start|stop|restart|status
    sudo invoke-rc.d rabbitmq-server        start|stop|restart|status
    

    For example, to restart the Airtime playout engine, you could enter the command:

    sudo invoke-rc.d airtime-playout restart
    
    The server should respond:
    Restarting Airtime Playout: Done.
    

    The status option for airtime-playout and airtime-media-monitor runs the airtime-check-system script to confirm that all of Airtime's dependencies are installed and running correctly.

    Log files

    Airtime stores log files under the directory path /var/log/airtime/ which can be useful for diagnosing the cause of any problems. Copies of these log files may be requested by Sourcefabric engineers while they are providing technical support for your Airtime deployment. See the chapter The airtime-log command for more details.

    Test tones

    Liquidsoap output can be tested using two commands provided by Airtime. The airtime-test-soundcard command enables you to send a test tone to the default sound card
    on the system, so you can check that your audio equipment is working. Press Ctrl+C on your keyboard to stop the tone.

    airtime-test-soundcard [-v]
                           [-o alsa | ao | oss | portaudio | pulseaudio ]
                           [-h]
    Where:
         -v verbose mode
         -o Linux Sound API (default: alsa)
         -h show help menu
    

    The airtime-test-stream command enables you to send a test tone to a local or remote streaming media server. Press Ctrl+C on your keyboard to stop the tone being streamed.

    airtime-test-stream [-v]
                        [-o icecast | shoutcast ] [-H hostname] [-P port]
                        [-u username] [-p password] [-m mount]
                        [-h]
    Where:
         -v verbose mode
         -o stream server type (default: icecast)
         -H hostname (default: localhost)
         -P port (default: 8000)
         -u user (default: source)
         -p password (default: hackme)
         -m mount (default: test)
         -h show help menu
    

    Upgrading

    Airtime 2.1.x versions support upgrading from version 1.9.0 and above. If you are running a production server with a version of Airtime prior to 1.9.0, you should upgrade it to version 1.9.0 before continuing. 

    Before upgrading a production Airtime server, you should back up both the PostgreSQL database and the storage server used by Airtime. This is especially important if you have not already set up a regular back up routine. This extra back up is a safety measure in case of accidental data loss during the upgrade, for example due to the wrong command being entered when moving files. See the chapter Backing up the server in this book for details of how to perform these back ups.

    If you have deployed Airtime using the method shown in the Automated installation chapter, you can upgrade in the same way. A new Airtime package available in the Sourcefabric repository can be installed with:

    sudo apt-get update
    sudo apt-get upgrade
    

    If you have used the method shown in the Manual installation chapter, you should repeat the installation steps of downloading and unpacking the tarball to an installation directory, and running the airtime-install script. The installation script will detect an existing Airtime deployment and back up any configuration files that it finds.

    After the upgrade has completed, you may need to clear your web browser's cache before logging into the new version of the Airtime administration interface. If the playout engine starts up and detects that a show should be playing at the current time, it will skip to the right point in the track and start playing.

    In Airtime 1.9.0 onwards, the concept of linked files was replaced with the concept of watched folders. If you are upgrading from a version of Airtime earlier than 1.9.0 and you have previously linked files, the folders they are in will not be watched until you add them to your watched folder list. See the chapter Manage Media Folders for more details. 

    Using Monit

    Monit is a utility which can be used to manage and monitor processes, files, directories and filesystems on your Airtime server. It is installed by default when you install Airtime.

    To view the Monit web interface, open port 2812 of your server in a web browser. For example, on the localhost you can use:

    http://localhost:2812/
    

    You will have to log in to see the Monit web interface. The username to use is guest and the default password is airtime.

    Clicking on the name of a service in the Process column, such as airtime-playout, opens another page with details of that service.

    By default, the Monit guest login is configured for read-only access, which means you cannot restart services through its web interface. To log in as the admin user, you will need the randomly generated password set by Airtime in the /etc/monit/conf.d/monit-airtime-generic.cfg file. You can see this with the command:

    sudo less /etc/monit/conf.d/monit-airtime-generic.cfg
    

    The random password for the admin user should follow on the line allow admin: such as the this example of LHR32YP7H1:

     set daemon 10 # Poll at 10 second intervals
     set logfile /var/log/monit.log
    
     set httpd port 2812
        allow admin:LHR32YP7H1
        allow guest:airtime read-only
    

    Logging in as the admin user, you will now see buttons for controlling a service at the end of each service page:


    Monit does not have a logout button, so if you have already logged in as guest, you may have to clear the active login from your web browser before logging in as admin. In Firefox on Ubuntu, this is accomplished using Clear Recent History on the Tools menu.

    Locking down remote access

    To make remote access more secure, you can edit the file /etc/monit/conf.d/monit-airtime-generic.cfg with nano:

    sudo nano /etc/monit/conf.d/monit-airtime-generic.cfg
    

    If you wish to enable access from the localhost only, append an and use address statement to the end of the line which sets the server port:

     set httpd port 2812 and use address localhost
    

    To enable access from other servers, comment out the part of the line use address localhost and then append an 'allow' line with the IP address and netmask of the machine to connect to Monit from, such as a local network address of 10.0.1.2 and netmask of 255.255.255.0:

        allow 10.0.1.2/255.255.255.0
    

    If you enable remote admin access, be sure to change the randomly generated password in the line beginning allow admin: on a regular basis, like you would for any important password. The password for the read-only guest access should remain as airtime, because Airtime uses this password to collect information for the Status page of the administration interface.

     set httpd port 2812 and # use address localhost
        allow localhost
        allow 10.0.1.2/255.255.255.0
        allow admin:LGW12WB9J7
        allow guest:airtime read-only
    

    Press Ctrl+O to save the file, then Ctrl+X to exit nano. Then restart Monit with:

    sudo invoke-rc.d monit restart
    

    Sending email alerts

    To configure Monit to send email alerts, edit the file /etc/monit/monitrc to uncomment the set mailserver parameter. Change this line to show the name of the SMTP server on your Airtime server's network, as provided by your system administrator.

    sudo nano /etc/monit/monitrc
    

    Further down the configuration file, you can set the From: and To: addresses for the alert emails using the set mail-format and set alert parameters. Then uncomment these lines for the parameters to be read by Monit.

    Press Ctrl+O to save the file, then Ctrl+X to exit nano. Then restart Monit with:

    sudo invoke-rc.d monit restart
    

     More information about using Monit is available at http://mmonit.com/monit/documentation/

    Using the import script

    If you have a large number of files in your media library, importing these files one at a time into a broadcast automation system would be time-consuming and tedious. That's why Airtime includes a script that can import an entire directory of files in one go.

    Copying versus watching

    There are three main options when using the airtime-import script: Either to copy or move files into Airtime's main storage folder, or to watch files elsewhere. Each option has advantages and disadvantages, so you will have to think about how the files will be used in your station in the long term.

    The airtime-import script works from the command line, so you must first log into a console on the Airtime server. In recent versions of Airtime, you no longer need to specify the full file system path to the media files that you wish to import. Copying is specified with the copy sub-command:

    airtime-import copy <directory>
    

    where <directory> is the base directory of the media files that you wish to import.

    Alternatively, you may wish to delete the files from the original location after copying them to the storage archive, which is accomplished with the move sub-command:

    airtime-import move <directory>
    

    If the new files are exact duplicates of files that have already been imported, the airtime-import script will detect this.

    Any users logged into the administration interface will be warned if a File import is in progress... Users assigned the admin privilege should not attempt to change Airtime's default storage directory while an import is taking place.

    Watching a new folder is specified by using the watch add sub-command:

    airtime-import watch add <directory>
    

    The script will report the name of the folder now being watched, for example:

    airtime-import watch add /home/daniel/Music/mp3/Beck
    /home/daniel/Music/mp3/Beck/ added to watched folder list successfully
    

    The watched folder will also be listed on the Manage Media Folders page in the Airtime administration interface. To obtain a list of currently watched folders in the server console, you can use the watch list sub-command:

    airtime-import watch list
    /home/daniel/Music/mp3/Beck/
    

    Any new files copied to a watched folder (for example, using your desktop computer's file manager) will automatically appear in the Airtime database, and are then ready for playout. In the same way, if you delete a media file using your file manager, it will be automatically removed from the Airtime database, and will no longer be available for playout.

    If you wish to no longer watch a particular folder, use the watch remove sub-command:

    airtime-import watch remove /home/daniel/Music/mp3/Beck
    /home/daniel/Music/mp3/Beck/ removed from watched folder list successfully 
    

    Get or set the storage folder path

    The airtime-import script also enables you to read or write Airtime's storage path configuration. You can find out the current setting with the storage-dir get sub-command:

    airtime-import storage-dir get
    /srv/airtime/stor
    

    A new storage folder path can be configured using the storage-dir set sub-command:

    airtime-import storage-dir set /home/daniel/Music/mp3/
    Successfully set storage folder to /home/daniel/Music/mp3/
    

    The storage-dir set sub-command should be used with caution on a production server, because moving the storage folder during scheduled programming has the potential to disrupt your broadcast playout.