Recursively Convert .wav files to .mp3 in one line

Recursively Convert .wav files to .mp3 in one line

Linux

Using lame (Linux tool) you can convert WAV files to MP3 . To install it in Debian like OSs use apt-get command:

sudo apt-get install lame

If you want to convert all files inside many sub directories just try this shell command:

for x in find <DIRECTORY> -name "*.wav"; do MP3=$(dirname $x)/$(basename $x .wav).mp3; /usr/bin/lame -b 96 -t -F -m m --bitwidth 16 --quiet $x $MP3; chown asterisk:asterisk $MP3 ;done