Oh boy.... Here... Do this...
Everything that you see below in the code box, highlight ALL of it and then right click and COPY.
Code:
#!/bin/bash
#
# wma to mp3
function wma2mp3 () {
if [ ! -f "$1" ]; then
echo "File $1 not found!"
else
wav=`ls "$1" | sed -e 's/.wma/.wav/' | tr -d "*"`
mplayer -ao pcm "${1%%.[Ww][Mm][Aa]}.wav" "$1" &&
mv audiodump.wav "$wav" && unset wav &&
lame -h -b 192 "${1%%.[Ww][Mm][Aa]}.wav" "${1%%.[Ww][Mm][Aa]}.mp3" &&
rm -f "${1%%.[Ww][Mm][Aa]}.wav" ||
echo "There was a problem with the conversion process!"
fi
}
# convert all wma files in directory
if [ $# -eq 1 -a -d "$1" ]; then
for file in $1/*.[Ww][Mm][Aa]; do
wma2mp3 "$file"
done
exit
fi
# One or more wma files were given
for file in $*; do
wma2mp3 "$file"
done
# Not enough information
if [ $# -lt 1 ]; then
echo
echo "Usage: wma2mp3 myfile.wma"
echo " wma2mp3 /directory/containing/wma/files"
echo " wma2mp3 myfile.wma myfile2.wma myfile3.wma"
# You have to use quotations for the arguement below.
# Failure to do so will result in only one file being
# converted. Namely, the first one it comes across...
echo ' wma2mp3 "*.wma"'
echo
echo "For converting .wma's that have spaces in the"
echo 'name, use the directory option OR "*.wma"'
echo
exit
fi
exit
Once you have that copied, PASTE it into a blank text pad. Gedit, Kedit, Kwrite... Whatever 'notepad' type of program you happen to use in linux.
So when you click on SAVE, it will ask you where you want to save it. Save it in "/usr/bin" and save the file with the name of "wma2mp3". So.... That should give you a "/usr/bin/wma2mp3". You can even click on your desktop's HOME icon, hit the "UP" arrow button twice and then browse to /usr/bin just to make sure you see a file called "wma2mp3" in there.
Once you have that, open up a Terminal. That would be xterm,gnome-terminal,konsole,aterm,eterm or whatever 'Terminal' that you have on your system. Look in your applications menu. If your using Gnome, that's the "foot" icon in the bottom left of your screen. If your using KDE, that's the "K" icon in the bottom left of your screen (atleast I think it's a K). You should find a Terminal somewhere in there. Once you have an open terminal, type this line into it.
Code:
chmod 755 /usr/bin/wma2mp3
and hit ENTER... Now, while you have that same Terminal window open, use it to navigate to the directory where you are keeping your .wma files.... If all your .wma files are hypothetically in "/home/billybob/music" then type this into your Terminal window.
Code:
cd /home/billybob/music
The press ENTER... Now you can type this at that same terminal window.
Sit back and wait a few minutes depending on how many .wma files you may have in that directory. If you get an error like:
Code:
lame: no such file or directory
Then you don't have lame installed. Install that and then try again. Same goes with 'mplayer'