Skip navigation

Tag Archives: encoding

If you use iTunes or something else like the dreaded Windows Media Player for your music, you aren’t getting the best sound out of your CDs.  The Mp3 encoders that these programs use are inferior.  Music encoded with them sounds terrible and a lot of the original file has been taken out for compression.  This loss of quality is most noticeable with cymbals.  They have a very weird sound when poorly encoded or compressed.  In other words, your music doesn’t sound like it is supposed to.

LAME fixes this problem, by basically doing a better job.  The algorithms LAME uses are much more effective.  With the right arguments, you can achieve a sound that is very close being perfect.  If you love music, but hate large files or you have a player that doesn’t support open-source formats like Ogg Vorbis, LAME is for you.

To install LAME, go to the site and find a binary for it, download the source code and compile it, or install it (on Ubuntu anyway) by running the command sudo apt-get install lame.  If you want the best performance make sure you compile it.  After installing it, we are ready to use it.  First, rip a track off a CD as a .wav file using a CD ripper.

LAME Encoding a File

Using LAME is very simple.  Open up a terminal window and go to the directory where your .wav file is.  Once there, run the command lame (myfile).wav name.mp3. This will take your .wav file, encode it as a 128kbps Mp3, and put it in the name.mp3 file.  Now, this will not sound great.  It will be an improvement over other encoders, but to use LAME to the best of its ability, I recommend you run LAME like this: lame -V2 -vbr-new (myfile).wav name.mp3. It does the same thing as before, but instead of a 128kbps file, you will get a high-quality variable bit-rate file that sounds nearly perfect.  Many people, including me, use this setting for all of their music.  I actually got these settings from a comment on my Ogg Vorbis post.  Some other settings are recommended here.  Pick the ones that sound the best to you.

While I prefer Ogg Vorbis, my iPod doesn’t, so I have to have an alternative.  LAME is just what I was looking for.  The files are small, they sound excellent, and best of all, I don’t have to use a bloated program like iTunes to rip my music.  It is a great tool for all of us Linux users who want the excellent sound of open-source formats without having to search for an obscure player that can play them.  If you don’t have it yet, LAME is an awesome program to have on your system.

P.S. LAME isn’t Linux only.  It is on a variety of systems like Windows, but since this is a Linux blog, I will not cover them here.

Update: If you are running a recent version of LAME, you don’t have to use the -vbr-new argument.  It will use this automatically.  So, your command should look like this: lame -V2 myfile.mp3 mynewfile.mp3.