PDA

View Full Version : Free shell script (for Linux and other Unices) to convert real audio .ra files to mp3


Stream Recorder
03-24-2006, 09:11 AM
Converting Real Audio RA files to mp3 with MPlayer using free shell script

The script will convert every *.ra file below the current directory.

#!/bin/bash
for i in $(find -iname *_*.ra); do
filename=`basename "$i" .ra`
#Rip with Mplayer / encode with LAME
echo "Ripping $i"
mplayer -quiet -vo null -vc dummy -af volume=0,resample=44100:0:1 -ao pcm:waveheader "$i"
echo "Encoding $i to "$filename".mp3"
lame --preset voice -m s audiodump.wav -o "$filename".mp3

rm audiodump.wav