recording /dev/dsp radio streams in ogg vorbis

The following will record audio from the input on the sound card and save it in ogg vorbis format in increments of 1 hour /w a time stamp as the file name.

while [ 0 ]
do
filename=`date +”20%y%m%d-%H%M”`

#record 1 hour of audio
arecord -d 3600 -vv -c 1 -f S16_LE -r24000 “$filename.wav”

#convert to ogg vorbis
oggenc -q5 “$filename.wav” &

#remove wav file
(sleep 5;rm “$filename.wav”)&
done

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: