...and while we're discussing transcoding...

I regularly now record some of our favourite CBC Radio shows off the net for later listening. But they annoyingly are transmitted in 32kb/s Microsoft streaming audio (.asf), which the Empeg doesn't grok.

So here's my transcoding script:

#!/bin/sh

while [ "$1" != "" ]; do
wma="$1"
fname="${wma%.*}"
wav="${fname}.wav"
mp3="${fname}.mp3"
echo "Transcoding \"${wma}\" to \"${wav}\":"
/usr/bin/mplayer -vo null -vc dummy -ao pcm:waveheader "${wma}" -ao pcm:file="${wav}" || exit $?
echo "Transcoding \"${wav}\" to \"${mp3}\":"
lame --preset 64 "${wav}" "${mp3}" || exit $?
echo "Transcoding done, removing \"${wav}\""
rm -f "${wav}"
shift
done


If anyone is interested, Randy Bachman ("American Woman", "Takin' Care of Business", etc..) has a Saturday show from 7:05pm through 9pm. Great show.

Cheers


Edited by mlord (18/01/2006 17:08)