02/22 Updated Code to Fix Timer
What happens when radio stationâs go offline - or after their broadcast hours end? Dead air. Well, I am not sure if it is also the term being used in 24/7 audio servers.
This âdead airâ not only affects the usability of streaming apps but also prevents users who differ in time zones. These users will be deprived of any content thus affecting possible audiences for the station.
I recently brought up to the team by letting our stations utilize the audio servers 24/7 by adding program replays during off-air hours. The servers, which use CentovaOS, allow uploading audio files to be played during âoff-streamâ called AutoDJ. The stations can also let their PCs run 24/7 but the cost, manpower, and effort to implement such system seem to be a struggle as operations differ from each station.
Since I have been letting my work PC âonâ all of the time, I proceeded to make it as a client to stream filler programs at times all stations are off-the-air.
Multi-port Stream with AltaCast
Weâve been using butt (broadcast using this tool) and/or WinAmp Shoutcast DSP to upload a single stream to the servers (each station) - and running 12 instances of it is highly unrecommended.
My internet search led me to a program called AltaCast - which supports multiple streams. The standalone app initially supports OGG encoded streams but downloading MP3Lame encoders now supports MP3 (duh).
I started off streaming one port, and it works well. Then 3, then all 12. But the app crashes. Further troubleshooting let me conclude that it might be limited to 6 simultaneous streams.
Now with that limitation, this thing would be impossible. Then I tried to âcopyâ the standalone app on another location and reconfigured the remaining 6 streams, and it worked!
The only problem is that there is no way to rename the configurations as to which is which.
Virtual Cable
There should be nothing wrong to use the desktop audio to stream, but to avoid any unwanted noise/audio, I installed VB Virtual Audio Cable which installed a virtual audio I/O on Windows to re-route certain appsâ audio.
I used the VB Cable Output as the input for two instances of AltaCast.
Media Playback
I will be using VLC as the media player since it supports network streams. Right now, I will be âhooking-upâ to DWIZ 882 (one of our affiliate station) programs upto 12 midnight. Then use CNN Philippines programs 12-3am.
Programming a Console App
This app will be a timer to check set times:
- 10PM - Start Client Stream
- 12MN - Change Media Source
- 3AM - Stop/Quit Stream
UPDATE
- Fixed various bugs (time check)
- Changed every second tick to every minute
- Adjusted Trim Extension to remove seconds
Below is the full code:
|
|
Â
|
|
Iâve only tested it for a day and made some fixes to continue the app running.
You can tune in at https://tunein.rpnradio.com/ and weâll debug any errors. đ
Future Plans
As of now, stationsâ broadcast hours differ (sign on and sign off) and I want the app to be dynamic. Some plans for the app:
- Detect actual âdead airâ time
- Detect actual âon airâ time
- Custom playlist in VLC (not relying on âhook upsâ)
Thanks for reading the blog post.