Wednesday, May 11, 2011

Converting .wav to .mp3 file format in Linux

Bookmark and Share

I just had a requirement to convert a CD with .wav files to .mp3 format. The first thing which I did was to boot into OpenSuse 11.3 box and  launch lame.

e.g. to convert Test.wav file to Test.mp3, we can use following syntax,

# lame –h –b 192 Test.wav Test.mp3

We can use above CLI to process set of files using following one liner assuming all .wav files are in current directory,

# for FILE in `ls *.wav`;do `which lame` –h –b 192 $FILE ${FILE//\.wav}.mp3;done

That's it!

You may also be interested in,
+ Shell script to translate uppercase text to lowercase
+ MD5SUM for all files in directory
+ FTP file upload using shell script on LINUX/UNIX


2 comments:

  1. I really think that its a great software and its very helpful for those who don't wanna use MP3 files, they can easy convert them into Linux with help of this software. Thanks for sharing!!!

    Buy Mobile Phone

    ReplyDelete
  2. Just wanna say thank you for the selective information you have distributed, I failed to convert wav to mp3 on linux many times.

    Alice from drm removal

    ReplyDelete

Your valuable comments are welcome. (Comments will be moderated.)

 




Technology