Page 1 of 1
MP3 compression for fun and profit
Posted: Sat Jul 16, 2011 2:15 pm
by fluffy
Well, for fun, anyway.
A lot of people still struggle with crappy MP3 converters with terrible quality. For example, the one built-in to iTunes and most DAW systems is rather sub-par; they don't make very good use of bandwidth, they're optimized for speed rather than quality, or they're built on a terrible psychoacoustic model that does a bad job of prioritizing frequencies. To make matters worse, many of them still default to a constant bitrate of 128Kbps, which is roughly on par with FM radio on a good day.
However, there is one MP3 encoding engine out there that is miles above the other. It's called
LAME (which is originally short for "LAME Ain't an MP3 Encoder," for various historical reasons). It's still plenty fast, BUT it's optimized for quality and efficiency, and they are constantly tuning the psychoacoustic model to provide even better fidelity.
There are plenty of tutorials out there for the use of LAME. Personally I install it for use on the command line (using MacPorts on the Mac, or Cygwin on Windows), and my usual command line is something like:
Code: Select all
lame -b 32 -V 3 -q 3 -m j input.wav output.mp3 --tt "Track Name" --tl "Album Name" --ta "Sockpuppet"
which makes good-sounding but compact files for Internet streaming purposes. There are also a number of built-in presets for different purposes. But this part scares a lot of people off! Fortunately, there are a number of good graphical front-ends to LAME as well. For Windows there's
WinLAME, and for Mac there's
Max. Linux users probably know how to find this stuff on their own (and are probably using LAME already anyway).
So anyway, if you're unhappy with how your current MP3 encoder completely destroys your audio quality, give LAME a try.
Re: MP3 compression for fun and profit
Posted: Sat Jul 16, 2011 2:42 pm
by king_arthur
Isn't lame what comes in audacity? I've been using audacity for my post-processing stuff (eq, compression, trimming and adding silence) and then saving to mp3 from there, and I'm pretty sure it's a LAME variant of some sort. It does give you lots of options for quality settings, anyway... several different levels of VBR.
I started using lame a while ago after fluffy recommended it, and I liked the (lack of) user interface for that - you'd edit a batch script, put it on the desktop and drag and drop .wav files, I figured out how to get it to put the .mp3 back in the same directory as the .wav file. The last couple times I tried downloading a standalone lame, the interface seemed more user friendly but less useful. So it's working fine for me to just use the stuff that's bundled into audacity. And the compression/EQ in audacity sounds so much better than anything I'm able to do on my digital workstation or, back in the old days, running through an external ART all-in-one unit.
It also used to be nice that I could have several different lame batch files on the desktop - one to do lo-fi mono files for spoken word stuff where file size mattered, one for best quality for my own archives, a good-but-not-great setting for my songfight mp3s.
Charles (KA)
Re: MP3 compression for fun and profit
Posted: Sat Jul 16, 2011 3:04 pm
by fluffy
Yes, Audacity uses LAME as its default MP3 engine, so that's a pretty easy way to get started as well. I wouldn't really recommend it for the workflow though.
I guess I do still have
my old writeup from the last time I brought this stuff up, which includes a .bat that you can drag-and-drop onto, but I don't know how valid any of those setup instructions are anymore (the particular LAME build I linked to has disappeared, for example). The rest of the page is also a bit outdated; iTunes-LAME hasn't worked for years, and anyway it kind of sucks to use your library manager to encode intermediate mixes.
Re: MP3 compression for fun and profit
Posted: Sat Jul 16, 2011 7:51 pm
by Billy's Little Trip
I've been using AltoMP3gold since I started at SF. I think it's good. I've been using 192 bps forever but 2 weeks ago started using 320 bps. (I think that's the next step up)
How do I know if this one I'm using is the best or equal in quality to "the best"?
Re: MP3 compression for fun and profit
Posted: Sat Jul 16, 2011 7:53 pm
by fluffy
There is absolutely no reason to encode at 320Kbps CBR, unless you really like wasting bandwidth. Not that that's a big deal anymore, but hey.
Also the next step up from 192 is 224. But it's better to use VBR, which adjusts the bitrate as needed.
I have no idea how the sound quality is of that MP3 encoder, which I've never heard of before. I'm sure there are listening tests online but really the point to using LAME is that you can reduce your bandwidth while also improving your quality, because it's really good at adjusting the bitrate as necessary and producing very high-quality output.
Re: MP3 compression for fun and profit
Posted: Sat Jul 16, 2011 8:15 pm
by Billy's Little Trip
I used the VBR thing once after you mentioned it years ago. It made my 3 minute song like 20 minutes or something crazy like that. Obviously I did it wrong.
And you are right on the 320kbps. I hear no difference or see a difference other than it's almost double the kb. My songs average 3200-3700 kb, but now they've been in the 7000kb + range.
Re: MP3 compression for fun and profit
Posted: Sun Jul 17, 2011 5:41 am
by king_arthur
Billy's Little Trip wrote:I used the VBR thing once after you mentioned it years ago. It made my 3 minute song like 20 minutes or something crazy like that. Obviously I did it wrong.
And you are right on the 320kbps. I hear no difference or see a difference other than it's almost double the kb. My songs average 3200-3700 kb, but now they've been in the 7000kb + range.
"Years ago" there were MP3 players (software and otherwise) that couldn't handle VBR, or at least got the song length wrong (they assume that the whole song was done at the rate of the first sample, multiplied by the number of samples, and got some wrong answer - at least, I think that's what the problem was.). Nowadays, VBR files seem to play just fine everywhere.
Charles
Re: MP3 compression for fun and profit
Posted: Sun Jul 17, 2011 8:53 am
by fluffy
king_arthur wrote:"Years ago" there were MP3 players (software and otherwise) that couldn't handle VBR, or at least got the song length wrong (they assume that the whole song was done at the rate of the first sample, multiplied by the number of samples, and got some wrong answer - at least, I think that's what the problem was.). Nowadays, VBR files seem to play just fine everywhere.
Not quite it, but on the right track - early MP3 players would take the song file size and divide by the packet size of the first frame to determine the frame count (and therefore length), since the MP3 format was originally just a stream format and thus didn't have any information about the file in general. Every decent VBR encoder (including LAME) now adds a little bit of metadata to the first frame to indicate how many more frames there are.
The mp3 file format itself is actually pretty hackish and ad-hoc and wasn't ever really standardized. What we have now is a piecemeal collection of workarounds around the fact that MP3 stream data was intended to be included into another richer container format like RIFF (aka .wav) or MPEG-TS, but early experimenters just started using the raw program stream itself, and then adding on other hackish things like ID3 and whatever.
"Years ago" there were MP3 players that would shit a brick if you gave it a file with an ID3v2 tag. Or they should shit a brick when they hit the end of the file and hit the ID3v1 tag. Or they should shit a brick if it had a sample rate other than 44100Hz. And so on. Things are way better now. Use them!
Re: MP3 compression for fun and profit
Posted: Sun Jul 17, 2011 9:36 am
by Billy's Little Trip
So, up above you posted links for LAME codes, etc. Do you have a link to a quality free MP3 converter that you approve of with the latest and greatest features? If so, it should also go into nyjm's collection of freeware site.
Re: MP3 compression for fun and profit
Posted: Sun Jul 17, 2011 9:44 am
by fluffy
I linked to WinLAME and King Arthur mentioned Audacity. What more do you want from us?
Re: MP3 compression for fun and profit
Posted: Sun Jul 17, 2011 9:51 am
by Billy's Little Trip
Yes, I see that now. Thanks.
Re: MP3 compression for fun and profit
Posted: Tue Jul 26, 2011 12:49 pm
by HeuristicsInc
I use LAME. One of the best things is that when you open it, you can sing "LAME!" to the tune of "Blame" by Soul Coughing. Or maybe that's just me.
-bill