89.3FM 2GLF with the assistance of the Community Broadcasting Foundation (CBF) has created an On Demand audio system that can be used within our station and adopted by other similar sized community radio stations around Australia.
The system is a mix of commercial software and customised coding that allows a station to automate the process of uploading programs for listeners to stream at a later date. See the bottom of the page for the current scope of future plans.
This is an ongoing open source project and tailored to the needs of smaller stations looking for a simple On Demand streaming solution.
We will be providing source code and documentation for our current system that we have in place via this webpage. The live version of the system is available at all times on our website.
Any Community Radio or Non Profit radio station can use the system or use the code/information on a Creative Commons basis (just credit the work, make any changes that suit and share what might be useful to the greater project).
We would be happy to include within this page any work completed to improve the code in order to share it with all the other stations.
– Total Recorder – Records the audio (US $99)
– WinAutomate – Automates the FTP upload process (US$ 285)
– JW Player – MP3 interface for our main player (Free for non-commercial use – upgrade to remove the logo from the player but it is not that obvious)
– Dreamweaver or similar web editor (optional) – Used for making changes to the HTML pages and managing the files between the FTP server and local machine. Notepad and basic FTP editor can be used.
These are not the only programs that could perform these tasks, but the ones we have selected. Our documentation refers to these items and any code provided works with this package.. Apart from the HTML the code would not be useful with any other program.
A basic PC with a good sound card would be the main requirement as the computer does not require much processing power to complete the task. All the work is in the uploading and hosting of the files. You can use an existing PC (maybe your streaming PC) but a stand alone machine is recommended. Ideally it should be placed in your Master Control Room with remote access to resolve any issues that may occur.
You will need to connect the audio Output from your studio feed into the Line In.
We recommend that you take a studio feed rather than an off air feed if possible. This allows a program to be recorded as normal in case your transmitter is not operating.
Also remember the WinAutomate software can be used for a range of different tasks. For example we use it to reset our router each night.
The most important link is the connection between the PC and the Web server.
Upload speeds vary by location but unless you are lucky to be in an NBN (National Broadband Network) connected area, your upload speed is your weakest link.
Generally an ADSL2+ line will average about 500-1000 Kbps and cable internet between 1000-2000 Kbps. This is generally enough, but you also have to consider the other connections operating through your network including your online stream and general internet usage.
Net Balancer is a good tool to help manage and monitor your traffic on your internet connection. We have set it to restrict the upload speed of our uploads, while they will take longer to upload (15 minutes instead of 7 minutes at full throttle) it allows other traffic to use the connection.
There is a range of hosting options available at very competitive pricing. Shop around to get the best deal for your situation. Generally, local Australian providers cannot match the pricing provided offshore from providers in the United States. There is very little difference to the local audience for streaming audio for the average station.
Be mindful of the following
– Disc space: You need about 7GB of webspace for each week of programming uploaded. For four weeks of programming that is 28 GB. From our experience the first week of programs is the most popular accounting for about 70% of the audience.
– Traffic: A number of hosting providers provide unlimited data transfer which will give you piece of mind in keeping costs under control. For 5,000 listeners you will require about 200 GB of data transfer a month. You also need to ensure that your hosting provider can cope with that amount of traffic.
– PHP and HTTP streaming support.
– It is best to host the On Demand system on a separate sub domain. This also allow you to host your On Demand service on a different server to your main website.
We are currently using http://www.site5.com.au/.
You will need to ensure that you hold an On Demand streaming license from AMCOS / APRA and Podcasting if you are publishing an RSS feed of the files.
How does it work?
In simple terms, this is how the system works:
– Total Recorder records each program, every hour every day.
– Using the Total Recorder scheduler it will save the file in the working directory in a set format dddhh00.mp3 (using 24 hour time)
– WinAutomate has an automatic job that monitors the working directory for any new MP3 files that…….(appear?) then conducts the following actions:
Uploads the file to the web server working directory
Renames the existing files on the web server and moves them. Each week has a different directory /01/, /02/, /03/ or /04/
The week /04/ file is deleted
Updates the upload date file
The same actions occur on the local machine files (acts as a backup)
– Each programming hour and day has a .php page which includes the JW Player, this can be linked from anywhere on the main website. This is linked to the MP3 file.
– The user clicks on the link and the player opens on screen.
1) Setup your PC including the inbound audio and internet connection
2) Set up the web hosting (ideally with an on demand sub domain) and upload .php and player files. You can also update the Program Names.
3) Set up the folder structure (on the local machine and webserver)
4) Install Total Recorder and the MP3 encoder
5) Import Total Recorder source files
6) Edit the program names for each hour of programs – this controls the file info within the MP3 file
7) Check the files produced on the local machine – note; these will overwrite the files as they are not currently set to move
8) Install WinAutomate
9) Import WinAutomate jobs
10) Check WinAutomate folder locations and FTP details (details to come on which elements need to be edited)
11) Delete all the existing files produced by Total Recorder in the working directory to give you a clean slate
12) At the top of the next hour, the system should automatically upload the file to the server. Test and check. You can also upload a blank .txt file in the working directory to test on an ad-hoc basis.
13) You will need to allow the system to run for a full week before you can start publishing files (this will ensure the next hour and later hours do not have an issue.)
14) Setup failure alert e-mail addresses
15) Publish links to the player on your website
16) Block direct access to the .MP3 files
17) Ensure that your presenters are aware of the system, as starting programs at the top of the hour is important. If they are late the On Demand start time won’t sync with the time.
18) Promote, Promote, Promote. You are now On Air, On Demand and Online – Anytime, Anywhere
We are working on more detailed instructions and uploading the source files.
– Checking no files are stuck in the working directory.
– Update program names in Total Recorder and on the Webserver when required
– Publish links to the player files
Since launching the service at 89.3FM 2GLF we have doubled our on-line audience and are able to broadcast twenty four hours a day, seven days a week.
The system has run with little service interruption. However some common issues that occurred in the Beta testing phase were:
– Internet connection slow or stopped.
– The system did not restart the services automatically after a Windows Update or Anti Virus update.
– Programs are uploaded to our server after broadcast, generally about ten minutes after broadcast
– The system runs 24 hours a day, 7 days a week
– Four weeks of programming is available
– The player is provided for every hour of programming and provides shortcuts to the next and previous hours, also to four of the most recent programs.
– The program upload date is provided (which is also provided in the menu in the player to access the most four recent programs)
– Program names are stored both in the file info of the MP3 file and the on screen player
– 96 kbps MP3 format files are using HTTP streaming
– Live stream player and link with the current program name
– Basic alerting if there is an issue (only works if the internet connection is active)
– Podcasting, creation and updating of RSS feeds
– Use record files for a second stream
– Google Analytics
– Player refresh
– Easier updating of program names, integration with a program guide function