Tuesday, October 28, 2008

A quick and dirty Lame MP3 Encoder implementation

I have been very frustrated with some of the tools out there that use the LAME MP3 encoder. First off they all have a user interface, or some type of GUI wizard that requires user input to generate an mp3. This is great, however it is not so great when I want to quickly convert a wav file to an mp3 with the click of a button. I haven't found a tool that does this, but be sure to tell me if there one that does.

What I wanted to do was right click on a wav file and select send to -> mp3. Similar to that of winzip when you want to quickly convert a bunch of files to a zip archive.

To solve this issue I downloaded the LAME MP3 encoder source and built it on my XP machine. The compiled files I placed in c:\Lame and in my environment variables I set LAME=c:\Lame

I created a batch file called "Mp3.bat" and placed it into the c:\Documents and Settings\Jamie\Send To folder

The contents of the Mp3.bat file is below:

call "%LAME%\lame.exe" -b 320 -h %1 %1.mp3
pause

Now when I right click on my wav file I can easily convert the file to an mp3!

For anyone wanting a quick and dirty way to convert their files to mp3s this is a good solution.

Here is a snapshot of the process

STEP 1:




STEP 2: Select the wav file for conversion




RESULT: