All About Work

LAME (Lame Aint An MP3 Encoder)

  • Sumo

One of my projects requires an audio converter. Sad to say but I’m not familiar with audio applications. So I asked Mr. Google if he could help me with my problem. Mr. Google pointed me to LAME (LAME Aint An MP3 Encoder). So needless to say, I used LAME in the tool that I developed to convert WAV file to MP3. I sent the tool to my client so they could test it. The tool worked after fixing some of the setting issues (it is a desktop application hence most of the defect we encountered were on the desktop setting.). This was November of last year.

Recently, the project I finally go on full live (it was partially live since November). Unfortunately, the tool didn’t worked on the WAV files produced by the client’s answering machine. They filed a defect ticket for this. In order for me to replicate their problem, I requested for a sample WAV file. Indeed, there was a problem with the conversion. To further traced down what was the problem, I tried to convert the file on the command prompt using the native LAME.exe. The application prompted an Invalid Data File 0x0007.

I asked again Mr. Google how to solve the issue. As I searched for the solution, I discovered that there was a winLAME which was also based on LAME. I tried it on the sample WAV file and it successfully converted the sample wav file. I am tempted to send the tool to my client. The only thing that hindered me was I could not open the source code which was written in Visual C. Though I was not that 100% sure if I would give the tool to my client, I already secured my Boss’s approval just in case I could not solve the issue.

Using winLAME, I discovered that the sample WAV file’s audio type was uLaw, the type which the LAME version I use does not support. As I searched for the solution, I discovered that there was a compiled version of LAME which could support uLAW, and that is the LAME 3.99.5 using libsndfile 1.0.25. The conversion tool I made successfully converted the WAV file to MP3 after I replaced the LAME.exe and added the binary for libsnfile.

Thank God for the wisdom that He usually gives me whenever I have to deal with this kind of issue. I am also thankful that there are other people who answer the questions posted on the threads. Their answer really help a lot! I’m also posting this for the same reason, to help others who might be encountering the same issue.

Tagged , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.