wma to mp3 shell script
This shell script will convert wma files to variable rate mp3.
#!/bin/sh
find . -name '* *' | sort | while read FILE
do
NEWFILE=`echo ${FILE} | sed 's/ /_/g;'`
mv "${FILE}" "${NEWFILE}"
done
for file in *.wma
do
mplayer $file -ao pcm
mv audiodump.wav $file.wav
lame -m s -V 0 $file.wav
rm $file.wav
rm $file
done
find . -name '*wma.wav.mp3*' | sort | while read FILE
do
NEWFILE=`echo ${FILE} | sed 's/wma.wav.mp3/mp3/g;'`
mv "${FILE}" "${NEWFILE}"
done
Advertisement
Categories: linux, shell script