Most radio stations run a 24/7 recording…typically called a “skimmer” or “logger”…of what goes out on their airwaves. Why? CYA! Mostly so if a sponsor asks if their underwriting spot aired at a particular date and time, you’ve got proof that it did. But it’s also quite handy for after-the-fact diagnostics of what, exactly, went out on the air when some piece of equipment failed.

In your Intrepid Engineer’s case at RIPR, the logger also records our local newscasts for automatic feeding into the podcast that drives our Alexa Skill.

In the old-old days, this was done via reel-to-reel tape, and the reels had to changed hourly. Needless to say, this was labor-intensive and mandated the recordings only be held for a few days at most.

Today we can do it entirely automated by computer. There are several programs out there devoted specifically to this purpose, but many of them are surprisingly limited in one way or another. In our case, I wanted a logger that could handle some key functions:

  • Work entirely without human intervention.
  • Archive at least three, preferably six, months’ worth of audio.
  • Record two different files at once, to handle regular logging and newscast recording for podcasts.
  • Provide a web-based interface for users to playback and download the audio, but not modify/delete the underlying files.

That last one was the trickiest. We previously used the Telos Profiler server/client system which required a custom Crystal Fusion sound card, for which software drivers were not available after Windows XP. I kept that ancient XP box going for years past the end of XP support but eventually it died. The new Axia iProfiler system is great and works mostly the same BUT it only records LiveWire. Meaning you need expensive LiveWire IP Audio Driver software or an even more expensive xNode paired with an also-spendy LiveWire-friendly network switch.

Side note: A few years after I cooked up my homebrew solution, we ended up strategically deploying xNodes in a way that I could’ve used the iProfiler system after all, but it’s still $999 and I already had a working solution in place.

So ultimately my “homebrew logger” is composed of the following:

  • Dell Optiplex 7070 SFF Windows 10 Computer (you can use any Windows 10 or newer computer)
  • Total Recorder PE to record the audio to MP3 files in hour-long chunks , and name them according to a specific convention.
  • GoodSync to manage copying the files around in a timely manner, both on the logger computer itself and to certain FTP sites for podcast hosting.
  • SubSonic.org to allow users on the office LAN, or connected to the VPN, to play/download the recorded MP3 files.
  • JustCast to host the podcast for ingestion into the Alexa Skill (and elsewhere).
Total Recorder
TotalRecorder.com

Total Recorder: It is a real pain in the neck to initially set up Total Recorder’s schedule to record all those different files. 24 copies of the hour-long logger, plus recordings for the ~17 local newscasts each weekday and seven every weekend for the podcast/Alexa Skill, plus recording our local Morning Edition in segments so you can listen more on-demand through our Alexa Skill as well. But once you’ve got a pattern going it goes a little quicker. And the nice thing is that TR is endlessly flexible and powerful.

FWIW we record everything at 64kbps mono 44.1kHz sampling 16 bit so that it’s high enough quality to use in a rebroadcast at a later date, if desired. But small enough file size that things stay manageable.

GoodSync: is primarily for synchronizing to FTP sites but it works just as well moving files around on a hard drive, too. The idea is that it detects when a file has been changed (e.g. new audio file for the 4am hour for this Monday has been recorded), checks to see if the file at the other end exists, and if not? It copies it over. Or if a file has been deleted (because it’s aged out) then it deletes it elsewhere, too. Like TR it’s a little difficult to set up, but very flexible and powerful once you do. Why mess with this? So that it’s impossible for anyone to accidentally modify or delete the original recordings.

FWIW: at the time I created this, you could pay once to get GoodSync for about $40, I think. Now they only seem to do annual subscriptions (e.g. SaaS), which is a bummer. It’s not too expensive, though.

SubSonic.org is a free media server. Oddly enough, this was one of the hardest parts to figure out, although it’s obvious why in retrospect: music licensing and copyright is a very contentious topic when it comes to the internet (e.g. music piracy). So a server program that allows easy distribution of MP3 audio could be rather problematic in the eyes of the music industry.

Fortunately, SubSonic exists as a free open-source project and it works pretty well for our needs. The only real problem is that it only updates the index of files once per day at a given hour you can set. So often recently-recorded files are inaccessible until, in our case, 9am the next morning. If you log in as an admin you can force a re-indexing, at least.

And overall the organization and playback is very obviously meant for music playback; it’s a little weird for logger purposes. But it’s free and it works, and only a handful of people in our station really need to know how to use it, so it’s easy to train them.

Subsonic webpage
SubSonic web page

JustCast is something I found after struggling mightily to keep DirCaster working, and ultimately giving up. DirCaster is a PHP script that I was hosting on our PowWeb account, and any MP3 uploaded to a specific folder on the server (e.g. using GoodSync) would be automagically available in an RSS feed…otherwise known as a “podcast”. It worked really well for years but it wasn’t really updated very well to use newer versions of PHP and eventually support for the older versions of PHP were dropped, then blocked. (Ed. note: it does appear DirCaster finally updated from ver0.9k to ver1.0 and fixed the PHP7 compatibility issues, so it’s possible this route may be viable for you again.) I had to find a more actively-supported service and after a lot of searching I found JustCast, which had a really responsive developer who happily engaged with me to figure out what I needed and deliver it – major kudos!

Windows Task Scheduler finally one thing that also proved surprisingly difficult to deal with was deleting old audio files after they reached the six month (180 day) age mark. Windows 10, especially, has proven particularly maddening in just deciding it won’t work with the usual command-line tools for such a thing.

Eventually I made a batch file (called deleteoldfiles.bat) and set it to run every Sunday at 2:07AM ET. The batch file is as follows:

cd\

forfiles /p "C:\audio\skimmer" /s /d -180 /c "cmd /c del /q @file"

forfiles /p "C:\audio\localnews" /s /d -180 /c "cmd /c del /q @file"

:: forfiles -P "C:\audio\skimmer" -D -180 -c "cmd /c IF @isdir == TRUE rd /S /Q @path"

:: forfiles -P "C:\audio\localnews" -D -180 -c "cmd /c IF @isdir == TRUE rd /S /Q @path"

@echo off

:: set folder path

set skimmer_path=c:\audio\skimmer

set localnews_path=c:\audio\localnews

:: set min age of files and folders to delete

set max_days=180

:: remove files from %skimmer_path%

forfiles -p %skimmer_path% -m *.* -d -%max_days% -c "cmd /c del /q @path"

:: remove sub directories from %skimmer_path%

forfiles -p %skimmer_path% -d -%max_days% -c "cmd /c IF @isdir == TRUE rd /S /Q @path"

:: remove files from %localnews_path%

forfiles -p %localnews_path% -m *.* -d -%max_days% -c "cmd /c del /q @path"

:: remove sub directories from %localnews_path%

forfiles -p %localnews_path% -d -%max_days% -c "cmd /c IF @isdir == TRUE rd /S /Q @path"

:: forfiles /S /D -180 /P "C:\audio\skimmer" /M "*" /C "cmd /C if @isdir==TRUE rd @path 2> nul"

:: forfiles /S /D -180 /P "C:\audio\localnews" /M "*" /C "cmd /C if @isdir==TRUE rd @path 2> nul"

Obviously you can change the actual directories/subfolders to be whatever you want for your recording schema. And I’ve found that while this does clean out the actual MP3 files, it won’t remove the old directories/folders. I have no idea why it won’t, but it doesn’t really affect us much so I don’t worry about it.

I also found a freeware CLI utility called EmptyRecycleBin.exe and Task Scheduler runs that once a week as well. You’ll need that since FORFILES will only “delete” files to the Recycle Bin, where they’ll still eat up hard drive space.

And I found yet another freeware CLI utility, the NirSoft BulkFileChanger which allows me to manipulate the daily recordings of Morning Edition to have different “date created” dates/times that force GoodSync to manage them in a specific way that I want. Here’s the text of one of the batch files for that:

cd\

cd batch

TIMEOUT 30

bulkfilechanger.exe /cfg "C:\batch\configs\me0500-0.cfg" /ChangeTimeAttr "C:\audio\morning" "tpr-me1-0bb.mp3" 0 1

TIMEOUT 30

bulkfilechanger.exe /cfg "C:\batch\configs\me0500-1.cfg" /ChangeTimeAttr "C:\audio\morning" "tpr-me1-1aseg.mp3" 0 1

TIMEOUT 30

bulkfilechanger.exe /cfg "C:\batch\configs\me0500-2.cfg" /ChangeTimeAttr "C:\audio\morning" "tpr-me1-2bseg.mp3" 0 1

TIMEOUT 30

bulkfilechanger.exe /cfg "C:\batch\configs\me0500-3.cfg" /ChangeTimeAttr "C:\audio\morning" "tpr-me1-3cseg.mp3" 0 1

TIMEOUT 30

bulkfilechanger.exe /cfg "C:\batch\configs\me0500-4.cfg" /ChangeTimeAttr "C:\audio\morning" "tpr-me1-4deseg.mp3" 0 1

TIMEOUT 10

On that note, I have another batch file that runs every morning after 1pm to remove the Morning Edition podcast because by then the news will be stale. And it moves a generic MP3 announcement telling listeners as much in their place.

cd\

copy c:\audio\morning\*.mp3 c:\audio\morningbkup

TIMEOUT 30

del c:\audio\morning\*.mp3 /q

TIMEOUT 2

del C:\audio\dropbox\Apps\justcast\morning\*.* /q

TIMEOUT 5

copy c:\batch\nomorningedition.mp3 c:\audio\morning\nomorningedition.mp3

timeout 10

Finally, just for kicks, I have Task Scheduler run a batch file every hour that kills off Windows Update, so the damn thing won’t reboot at some random time and get stuck on the “YOU MUST SET UP A MICROSOFT ACCOUNT NOW!” blue screens of ass-painery. Obviously, if you do this, you’re not gonna get Windows Updates, so use at your own risk.

sleep 1

sc stop wuauserv

sleep 3

sc config wuauserv start= disabled

sleep 3

So there you have it! I hope our homebrew solution can be of some help to you as well! 🙂

Aaron Read Avatar

Published by

Categories:

Note: The Engineer’s Corner was an occasional column Aaron penned for
Rhode Island Public Radio before it was discontinued in early 2024.

Leave a comment