One of the high points of the weekend used to be listening to Car Talk while driving. My travel pattern has changed since moving, and I almost always miss the show now. I had rigged up an FM-radio to audio-in connection to let me capture .wav files to burn to CD, but this never seemed to work out quite right, and that was back before I had a USB MP3 player.
Car Talk keeps the most recent show available as a RealAudio feed. Bits. Hm...
Hypothetically, then, and with the help of a co-worker who knows the sekret of getting mplayer installed on Linux (configure yum to point to freshrpms.net, import their PGP key, use yum to install mplayer, and then figure out how to download and install the essential codecs), one could threw together a script that scrapes the Car Talk site for links to the ReadAudio files, streams them disk, converts them from .rm to .wav, and finally (via lame) to an .mp3 in a Samba directory named for the week. From there, it would be a quick copy into an MP3 player, and from there to a happier commute.
It would be a slow process (the RealAudio feed seems to be throttled), but that's what a 2 AM cron job is for. The basic incantation for ripping a segment of the show would probably look something like
$rtsp = ... link to real audio stream ... mplayer -noframedrop -dumpfile tmp.rm \ -dumpstream $rtsp mplayer -ao pcm -aofile tmp.wav -vo \ -null -vc dummy --playlist tmp.rm lame -h -b 128 tmp.wav segment$n.mp3
I'd be surpised if this same recipe didn't apply to lots of interesting feeds.
Last time I checked Car Talk had stopped Real downloads, I'm glad they are back.
When I wanted to record Hitch Hikers from the Beeb, I used Realplayer and the vsound tool to get wav output that I then converted to Ogg Vorbis. I use Debian, so you just apt-get the right bits and it all works, YMMV.
Do I understand correctly that mplayer can a) play RealAudio files and b) convert those files to
Re:State of the art in Linux audio
dws on 2005-01-31T19:12:21
Yes and yes (and maybe yes). http://www.mplayerhq.hu/homepage/design7/news.html answers nearly all questions.
But alas, in the meantime, there is always the scraping.