Encode a directory of WAVs to MP3

In order to encode a directory of WAV files to MP3 pop open a shell and type the following:

for i in *.wav; do lame "$i" "`basename "$i" .wav`".mp3; done

To set the bitarte (128 is absolutely ok, though audiophiles may want to use 192 kbit/s) add the following:

for i in *.wav; do lame -b 128 "$i" "`basename "$i" .wav`".mp3; done

Another useful option is

-m s/j/f/d/m

Choose between (s)tereo, (j)oint stereo, (f)orce jpint stereo, (d)ual channel and (m)ono. Useful if you have e.g. voice recordings and want to convert them to stereo.

Have a look at the man page for more.

Keine Kommentare:

Kommentar veröffentlichen