Sunday, August 24, 2008

Logging Radio Station Audio

This script looks complicated. But it basically records 30 min (or 29 mins 56 seconds) chunks of our radio station program which is required for legal reasons.
Because each sound recorder process getting killed takes a few seconds to complete, I found it necessary to be 4 seconds short of 30 mins. I don't think 4 seconds being lost every 30 mins is too much of a problem. I heard of a professional solution loosing 10 seconds every 15 minutes.

One way to cure this would be 2 sound cards and alternate between the 2 cards.


Sound recording script
Need one of these for every 30 mins you are recording.

#!/bin/bash
killall sound-recorder

sound-recorder -s44100 -b16 -k -A/dev/dsp -S29:56 -fwav /mnt/250gig/share/wav/0600.wav

sleep 10

lame -b 64 -m m /mnt/250gig/share/wav/0600.wav /mnt/250gig/share/mp3/`date +%y%m%d`-0600.mp3


Crontab entries
New line for every 30 mins you are recording.

crontab -l

00 6 * * * /home/username/scripts/0600.sh > /dev/null 2>&1

1 comment:

Geoff said...
This comment has been removed by the author.