Encoding MP3s or how to shoot yourself on the foot

I wrote this for a different site I used to touch once or twice a year. Yes, it is in English. Yes, I’ll post a translation soonish than laterish, but this sets the bilingual tone of the blog

Encoding MP3s or how to shoot yourself on the foot

Summary: Don’t. Use Ogg Vorbis or FLAC instead.

It would seem that most people I know, and most people out there, never remember the golden rule: “I need to read the manual of my VCR”.

Even if you get something free, it doesn’t mean you know how to use it correctly. I dislike those who think that they can get their hands on anything and pretend —even believe!— they already know how to use it. We don’t let children play with guns (except in certain areas of the Near and Middle East), yet we allow people to play with MP3 encoders and, worse!, to release their deformed children into the world.

And this is my beef. I have a small collection of MP3s I have collected from friends and kind strangers out there. The main complain I have about these files is quality. The only ones I can vouch to range from decent to outstanding are the ones I have encoded myself. Of course, I always say thanks, you can’t never be too grateful when you receive a gift, but I still have this fuzzy warm feeling of anger and contempt when I open my frame analyzer and realize their quality. Most have clicks and the high-frequency range is horrid. I can listen to better Stereo FM in my pocket radio, a little gadget made in Singapore that I bought a couple of years ago on the street for less than 10 bucks.

Before 2000 there were no really good MP3 encoders out there. You know, encoders you could use with ease and stuck with standards. Yet, it was feasible to produce high quality MP3s with those old buggy encoders if you took the time to read the manual. Nowadays, there is no excuse to encode poor sound files, when you can use LAME for the task. Of course you need a good “ripper” to extract the sound files from your CDs, and the best for the task is EAC, at least on Windows. Forget those commercial packages with names of precious metals or loony Roman emperors in their names. EAC has its glitches but in general performance and quality are superb. Why would you want to pay so much for something I rather leave unnamed that you can find in one of them fangled PC software download portals, say Tucows?

Now the fact is that you can have the tools in your hands, but you need to know the magic incantation. You are sure too busy to bother doing the five minute research needed on the matter, so here is mine. Following the analysis and advice developed by the late r3mix group, I use the command line encoder with this incantation:

lame --r3mix --new-vbr --nspsytune -p in.wav out.mp3

from the command line or using it as an external encoder with EAC. I sometimes add a “-b 128 -F” to make sure it ends up being smallish.

When I have some time in my hands I like to experiment and after some manic-obsessive testing I’ve come to agree with the opinions of the people at Men without Plans Enterprises.

But… I wonder why I even bothered to tell you this. One should burn all MP3s and use Ogg Vorbis instead:

oggenc --quality 6 in.wav

produces a compressed file equivalent to the command above, and most importantly:

  1. Sounds far better because it doesn’t clip the high-frequency range.
  2. Files are smaller the longer the time of the piece. I have seen 1.5 MB difference in size in a 10 minute concerto movement.

Or use FLAC for lossless compression:

flac --best -M -p in.wav

works great for me.

Don’t take my word for it, try it out. If you don’t find a difference, surely you spent your Army days firing 50mm mortars…

Advertisements