Sunday, September 28, 2008

capture streaming audio

capture streaming audio

wget http://www.bbc.co.uk/radio/aod/rpms/hitchhikers.ram

cat hitchhikers.ram

rtsp://rmv8.bbc.net.uk/radio4/comedy/thu2300.ra

mplayer -dumpstream rtsp://rmv8.bbc.net.uk/radio4/comedy/thu2300.ra

(Time passes while mplayer writes a file named “stream.dump”.)

Now convert the stream.dump file to pcm/wave:

mplayer -ao pcm stream.dump

(Time passes while mplayer writes a file named “audiodump.wav”.)

Convert that wave file into mp3:

lame --preset standard --tt "Episode 1" --ta "BBC Radio 4" --tl "The Hitchhiker's Guide to the Galaxy, Tertiary Phase" --ty "2004" --tn 1 audiodump.wav episode1.mp3

Hooray! One down side I’ve seen so far: the stream.dump RealAudio file is just under 10Mb, while the mp3 produced by this process is over 37Mb. I should probably use different options when running lame.

copied from: http://www.elsewhere.org/journal/archives/2004/09/25/howto-capture-streaming-audio-for-later/

No comments: