[MPlayer-users] Re: can't rip realaudio

adland adland123 at yahoo.com
Tue Jun 1 01:40:54 CEST 2004


> I'd like to be able to rip (record) a one hour realaudio live
> broadcast once a week. 

part of message I posted 10 days ago which could help you.

this is just a quick example be sure to edit the X value for some
 integer calculated for length desired
 based on bitrate and blocksize used you could calculate a value
   we set blocksize to 1 and count to 
   (bitrate*channels*bytes per sample*seconds) + 48 bytes for wave header
    44100*2*2*3600)+48=  635040048 bytes into lame encoder for an hour
CD audio is 44.1 Khz bitrate, 2 channels, 2 bytes per sample

also of course you may want/need different lame options
see unix manpages of commands for more help

you could just write the raw wav file if you desired
change line
dd bs=1 if=AOFIFO count=X |  lame --quiet -b 128 - "$2"
to
dd bs=1 if=AOFIFO count=X of="$2"

or if you dont want wav output or conversion to mp3 with lame
can also change this line
./mplayer -really-quiet -ao pcm -aofile AOFIFO -vo null -vc dummy "$1" &
to
./mplayer -really-quiet -dumpaudio -dumpfile AOFIFO -vo null -vc dummy "$1" &
(raw audio)

#!/bin/bash
# encode some seconds of audio from infile into outfile as mp3.
# count should be set to (bitrate of input * channels * bytes per sample 
# * # of seconds) + 48 header bytes
# when blocksize (bs) is set to one byte
# for dd you can also add skip=Y to skip first section of audio if desired

if [ $# -ne 2 ]; then
   echo "Usage: "$0" <input> <output>"
else
   mkfifo AOFIFO
   ./mplayer -really-quiet -ao pcm -aofile AOFIFO -vo null -vc dummy "$1" &
   dd bs=1 if=AOFIFO count=X |  lame --quiet -b 128 - "$2"
   # stop mplayer in background and cleanup
   killall -9 mplayer
   rm AOFIFO
fi





More information about the MPlayer-users mailing list