Pages

Thursday, November 22, 2007

shell script to convert .rm files to .mp3

#copy this script to downloaded audio files (i.e .rm) directory and execute.
#note at end script removes all .rm files after covertting them to .mp3.
#download latest hindi songs from blogspot.com


#!/bin/sh
for i in `ls *.rm`
do

tmp=$i

mplayer $tmp -ao pcm

mp3=`echo $tmp | cut -d. -f1`

lame -h -b 128 audiodump.wav $mp3.mp3

done

rm *.rm
rm audiodump.wav

1 comment:

Snorre D. Øverbø said...

Many thanks for your script. Worked fine for me. Happy new year!