Firstly you'll need to get
realplayer and
vsound also it helps to the ogg encoder
oggenc (type
which oggenc). If you have no ogg encoder on your system then just comment out the last two lines of the script.
then create and chmod +x this script.
Code:
#!/bin/bash
# initial script by some random guy
# shufted about a bit to my liking by Sean McLemon
# records realplayer stream to an ogg file using vsound and realplayer
# (usage ./record myRealaudiofile.ram)
# kill any instances of realplayer already running
kill `ps ax | grep realplay | awk '{ print $1 }'` 2>/dev/null
# Use vsound to record
vsound -t -f $*.wav realplay $* &VSOUND_PID=$!
# wait till user is done with realplayer
while ps ax | grep realplay > /dev/null
do
sleep 5
done
# Wait for vsound to terminate, creating vsound.wav
wait $VSOUND_PID
# Encode the output ($name.wav) as an ogg
oggenc $*.wav
rm -f $*.wav
and to record from realaudio stream using this script, enter
./realrecord r1live.ram and close realplayer after the clip is finished playing. (if realrecord is the name of the script, and r1live.ram the name of the realplayer file). It's a bit of a kludge but it seems to work nicely
edit- the filename thinger was causing problems so it looks like r1live.ram.ogg may have to do for the encoded filename for now.