Help - Search - Members - Calendar
Full Version: LAME basics
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Gigas-VII
Hey guys, this is my first post here.

I've just gotten back into the MP3 ripping scene. The last time I ripped anything was in 1999, using Audiograbber and an older version of the LAME codec. I decided that my old rips of the Greenday and Prodigy CDs just weren't cutting it, so I decided to rerip them using a more modern compression (I had used CBR 128, because that was the standard).

Here's my question: what happend to LAME? ^_^ I don't know any of these new options in it, and I don't know how to use the commandline parameters people have posted. The last time I used LAME was before Variable Bit Rate MP3s were even heard of.

I'm using CDex for my ripper, because it works well and it's got plenty of options to play with. I already replaced the LAME codec it included with the 3.93 version. I don't know what ABR is, nor do I know anything about the other major settings.

If anyone can give me a brief rundown, or link to a site that has one, it would be GREATLY appreciated.

thanks!

Gigas-VII
Tri
Everything is explained in this sticky thread. Basically your preferred command line for lame is --alt-preset standard
Gigas-VII
problem: how do I do that? also, how do I add single parameters to LAME? I don't have any space to enter parameters in CDex, nor do I know of any way to add it.

CDex does have the --alt-standard option, as well as the other --alt options, but I don't know where/how to add the parameters, and I don't know what some of the other settings do, like the different VBR methods, the VBR quality, the ABR(kbps), the Version, etc.

Also, what's the difference between Stereo and Joint Stereo?

If anyone wants, I can post a screepcap of my current CDex config inside the original window.
magic75
Stick with the -alt something options, don't mess with other settings. The alt-presets will give you the best quality possible with lame today.

ABR is a simplified version of VBR, with the advantage that you can specify a target bitrate and the encoded file usually ends up a only a few kbps from this target bitrate. The implementation of ABR in lame is actually quite good. It is so good that if you feel that alt-preset standard is giving you to high bitrates, using the ABR alt-presets is the recommended choice.

I don't use CDex so I can't help you out with the configuration much more than that.

Joint Stereo is a more efficient way of encoding stereo audio than plain Stereo. For a given bitrate Joint Stereo with Lame will always provide better quality over plain Stereo. Never use plain Stereo.
picmixer
QUOTE (Gigas-VII @ Dec 4 2003, 02:44 AM)
CDex does have the --alt-standard option, as well as the other --alt options, but I don't know where/how to add the parameters, and I don't know what some of the other settings do, like the different VBR methods, the VBR quality, the ABR(kbps), the Version, etc.

You will need to define "External Decoder" in the CDex Encoder options and then use the LAME.exe instead of the .dll normally used in CDex.

You'll also need to point CDex to your LAME.exe and enter the desired options under "parameter string".

You can check the sticky's in the mp3 forum for recommended LAME settings and the CDex help for its own parameter passing scheme.
Gigas-VII
thanks guys ^_^ I really appreciate it! I've decided to use the --alt extreme with a maxbitrate of 256, and a minimum of 128. This puts out files that are usually pretty much 192 average, which was my target.

I'll try getting that lame.exe working, and if I run into trouble, I'll be back with more questions ^_^

Thanks again!
sld
Here we go again mad.gif

If you want files around 192 kbps, use
CODE
--alt-preset standard
. If you have mostly rock music, bitrate tends to ge bloated a bit, and you can use
CODE
--alt-preset standard -Y
. The -Y switch trims mostly inaudible frequencies above 16 kHz.
To make sure that your files really average 192 kbps, use
CODE
--alt-preset 192
.

Do not modify the alt-presets you use, or you risk churning out sub-optimal mp3s. In this case, since you limited your upper limit to 256, your mp3s will be subquality. Whether you yourself can actually hear a difference is another matter, so it is up to you if you want to contend with your current practice.
Gigas-VII
hey, I'll say this much: these new files are much better than the CBR 128 files we all made back in the early days of filesharing. Yeah, back when ID3 tags didn't have a version number. Back when MP3 was the ONLY format of it's kind, and the winamp + napster combo was the feel-good hit of the summer happy.gif

As for limiting the maximum kbps, I don't see why a 256 limit is bad. Raw CD audio files aren't that much higher than that, and 320 (in my experience) is just overkill. I used to believe that 192 was overkill, until I noticed subtle differences. In all seriousness, a good friend of mine once said "Anything over 112kbps is virtually the same. there are only minor differences in the upper and lower tonal ranges, and the small amount of 'white, MPEG noise' you hear on top of the music." I still firmly believe this, to this day, but I have come to respect higher-quality compression rates and methods for their minute differences.
honz318712
QUOTE
As for limiting the maximum kbps, I don't see why a 256 limit is bad.

The alt presets were developed and heavily tested to ensure quality. Trust me, you don't have the knowledge or expertise(neither do I) to modify them if you think you're getting alt preset standard quality limiting the bit rate to 256... you're not

But everyone is entitled to use what they want if it suit their needs.. I'm just saying its best to stick with alt preset standard and that is it.. for me anyway..

QUOTE
Raw CD audio files aren't that much higher than that, and 320 (in my experience) is just overkill.

You're talking apples and oranges here.. 320 kbps MP3 files are still lossy compression.

QUOTE
In all seriousness, a good friend of mine once said "Anything over 112kbps is virtually the same.

Can I have some of the crack your friend is smoking?

I highly advise you read around this forum.. here is great place to start:
http://www.hydrogenaudio.org/show.php/showtopic/7516
honz318712
@ Dibrom..
Perhaps you should link to the Faq somewhere very noticeable on the main page.. just an idea..
Mike Giacomelli
QUOTE (Gigas-VII @ Dec 5 2003, 11:29 PM)
hey, I'll say this much: these new files are much better than the CBR 128 files we all made back in the early days of filesharing.  Yeah, back when ID3 tags didn't have a version number.  Back when MP3 was the ONLY format of it's kind, and the winamp + napster combo was the feel-good hit of the summer happy.gif

As for limiting the maximum kbps, I don't see why a 256 limit is bad.  Raw CD audio files aren't that much higher than that, and 320 (in my experience) is just overkill.  I used to believe that 192 was overkill, until I noticed subtle differences.  In all seriousness, a good friend of mine once said "Anything over 112kbps is virtually the same.  there are only minor differences in the upper and lower tonal ranges, and the small amount of 'white, MPEG noise' you hear on top of the music."  I still firmly believe this, to this day, but I have come to respect higher-quality compression rates and methods for their minute differences.

Once again:

http://www.hydrogenaudio.org/forums/index.php?showtopic=203&
Artemis3
QUOTE (Gigas-VII @ Dec 3 2003, 09:44 PM)
problem: how do I do that?  also, how do I add single parameters to LAME?  I don't have any space to enter parameters in CDex, nor do I know of any way to add it.

CDex does have the --alt-standard option, as well as the other --alt options, but I don't know where/how to add the parameters, and I don't know what some of the other settings do, like the different VBR methods, the VBR quality, the ABR(kbps), the Version, etc.

Also, what's the difference between Stereo and Joint Stereo?

If anyone wants, I can post a screepcap of my current CDex config inside the original window.

You missed 4 years of forum tests and discussion, don't expect them to explain you everything in details.

Please don't mess with the lame options. Only use the following:

--alt-preset standard
--alt-preset standard -Y (if you think the above makes files too big)
--alt-preset 185 (or the average bitrate you prefer)

Thats it. Forget the rest of the options, it would take too long an explanation and the only thing you can do is make it worse.

You can use CDex with "Lame MP3 Encoder" and pick --alt-preset standard or you can get lame 3.90.3 and use CDex with the external encoder option.


About the mods you innocently suggested, let me tell you that the mp3 format is very constrained, with your mods you have basically "strangled" the encoder by not letting it "breathe" properly. Any given bitrate does not guarantee any given quality, sorry if you have believed this, it is wrong. Music complexity is dynamic, sometimes a low bitrate can reproduce exactly the same quality of the cd, sometimes 320kbps won't be enough.

The way the encoder is tuned now, it will try its best all the time to achieve the best quality, and when it can't do, degrade as gracefully as possible. If you mess with the settings, you will alter the delicate balance and produce worse results. You are of course welcome to do your own abx listening tests... But some ppl here have quite a few years of advantage...
Pio2001
QUOTE (Gigas-VII @ Dec 6 2003, 08:29 AM)
As for limiting the maximum kbps, I don't see why a 256 limit is bad.  Raw CD audio files aren't that much higher than that


Raw CD audio is much higher ! It is 1411 kbps ! About six times higher...

QUOTE (Gigas-VII @ Dec 6 2003, 08:29 AM)
In all seriousness, a good friend of mine once said "Anything over 112kbps is virtually the same. [...] I still firmly believe this, to this day, but I have come to respect higher-quality compression rates and methods for their minute differences.
[...]
and 320 (in my experience) is just overkill.


Get the spahm.wav file from http://lame.sourceforge.net/gpsycho/quality.html and encode it to 128 kbps, play it in headphones, original wav, then mp3, and ask your friend if anything above 112 kbps is virtually the same !

For your command line, to make a long story short, I find it to noticeably decrease quality on the fatboy.wav file (same site as above) : I distinguish the "--alt-preset extreme" from the "--alt-preset extreme -b128 -B256" versions without problems : blind ABX test results : 8/8. This is no surprise. On hard samples, high bitrates are needed. This one is encoded with mostly 320 kbps frames by the extreme preset. Limiting the bitrate to 256 kbps decreases quality.
This is partly because of the 320 kbps limitation that MP3 is not suited for audiophiles. On this kind of samples (fatboy, amnesia...), the VBR adjustment needs to go higher than 320 kbps, and that's why samples like fatboy.wav cannot be reproduced faithfully in MP3 whatever settings or encoder are used.

QUOTE (honz318712 @ Dec 6 2003, 09:07 AM)
Trust me

QUOTE (Artemis3 @ Dec 7 2003, 04:28 AM)
Please, don't think.


Guys, thank you for the help otherwise provided in your messages, but I don't agree with these quotes. I think that asking for someone to blindly trust a statement without checking its validity is misplaced in Hydrogenaudio, because it is completely unscientific. Facts must be proved, not believed.
The documentation on which the command lines are based is non existent (Dibrom's tests when he was tuning the command lines), or lost (old r3mix.net threads). But we still have simple tools that allow to test the performance of the alt-presets.
First the test samples archives (by the way, Hydrogenaudio's one is still unavailable).
Then the ABX blind test programs (see the FAQ, Audio compression section).

If a command line is supposed to be better than a preset, or if a preset is supposed to be improved in quality with some additional tweaks, the original preset must first be proven to be inadequate with blind test results. You must recognize the original from the alt-preset MP3 in a blind test. This is, by the way, the very meaning of the Term Of Service number 8 of the forum.
Here, your command line was not supposed to improve quality, but the alt-preset was supposed to be better than your modified version. Thus I chose a difficult sample from the archives, and made a blind test in order to show that the difference was audible, which was the case for me.
h.tuehn
QUOTE (Pio2001 @ Dec 7 2003, 04:09 PM)
QUOTE (Gigas-VII @ Dec 6 2003, 08:29 AM)
As for limiting the maximum kbps, I don't see why a 256 limit is bad.


For your command line, to make a long story short, I find it to noticeably decrease quality on the fatboy.wav file (same site as above) : I distinguish the "--alt-preset extreme" from the "--alt-preset extreme -b128 -B256" versions without problems : blind ABX test results : 8/8. This is no surprise. On hard samples, high bitrates are needed. This one is encoded with mostly 320 kbps frames by the extreme preset. Limiting the bitrate to 256 kbps decreases quality.

This is partly because of the 320 kbps limitation that MP3 is not suited for audiophiles. On this kind of samples (fatboy, amnesia...), the VBR adjustment needs to go higher than 320 kbps, and that's why samples like fatboy.wav cannot be reproduced faithfully in MP3 whatever settings or encoder are used.


The moderator has no headphones! wink.gif Did you remember to trim the silence off the decoded MP3s so each sample was the same length? In the previous testing, was a max of 256 vs. 320 ever actually tested? I didn't uncover anything with searches.

Because I have found limiting the max rate to 256 effective for actually raising the median bitrate and have yet to find any significant difference, I decided to give this a test, too.

Encoding fatboy with Dibrom's 3.90.3 and decoding with FhG, I compared the default extreme with a modified standard using -B 256 -b 32. Nothing obvious in terms of quality. In fact, if I were to pick the one I liked best, it would have been the modified standard. I was able to consistently tell the difference between each and the original and between each other. 6/8 in all 3 cases.

What I found odd are certain variances in how channels were encoded:
APS-256-32
average: 232.2 kbps LR: 30 (15.54%) MS: 163 (84.46%)
APE
average: 279.2 kbps LR: 82 (42.49%) MS: 111 (57.51%)

Shouldn't the stereo stats be the same regardless? So, just for stat comparison, I encoded it with default APS:
average: 265.3 kbps LR: 30 (15.54%) MS: 163 (84.46%)

256 receives bonus points for not causing a variation from default. Odd that APS is so far above 192 and so close to APE. Makes me wonder if the problem in the psycho-acoustics is that it's actually being fooled into using more bits than necessary.

So 2 more tests, preset CBR 192 and ABR 192.
CBR
average: 192.0 kbps LR: 9 (4.663%) MS: 184 (95.34%)
ABR
average: 230.5 kbps LR: 17 (8.808%) MS: 176 (91.19%)

CBR192 8/8. Easy because it added a very noticeable distortion where there had been near silence. Outside of that, there was little if any difference. Maybe the higher lowpass with fewer bits was too much. ABR192 (uses same lowpass as CBR192) 9/9. Easy once again because of the distortion.

More questions, 2 more tests.
preset abr-192 -B 256 -b 32
average: 220 kbps LR: 8.8% MS: 91.2%
preset cbr 192 --lowpass 19 (same as APS)
average: 192.0 kbps LR: 9 (4.663%) MS: 184 (95.34%)

Since I still noticed similar distortion in abr192-256-32, I decided to test it against the default abr192 as opposed to the original. Besides, this is still about 256 vs. 320. 4/9, nothing obvious. cbr192 w/ lowpass vs. default abr192: 4/9.

So, my conclusion is max 256 saves bytes without harming quality and the slight shift in lowpass doesn't change anything.

What disturbs me most about this test is that the model seems to violate joint-stereo integrity in order to pack more bits. All were identified as using safe joint by EncSpot. Still, I didn't identify stereo image issues in any of the samples. To me, that means extreme and standard are playing it overly safe with stereo imaging and artificially inflating the file size. Then again, more expert ears might identify that distortion as phasing as opposed to echo, etc., which would mean that the "safe" model is in fact being violated. sad.gif

A quick check (no test) with FhG CBR 192 simple stereo: sounds cleaner, none of the distortion found in the various 192 modes I tested above.
tigre
h.tuehn - 2 things:
Maybe I've missed it in your long post, but - what sample have you used for your test? -> download link?
You jump to conclusions too quickly. ABX tests with one sample (limiting to 8 trials isn't enough to find small differences IMO BTW) aren't enough to support the general statements you make.
h.tuehn
QUOTE (Artemis3 @ Dec 6 2003, 07:28 PM)
You can use CDex with "Lame MP3 Encoder" and pick --alt-preset standard or you can get lame 3.90.3 and use CDex with the external encoder option.


It's not either/or. You can replace the lame_enc.dll in the CDex folder with the 3.90.3 version. It will recognize it and use it. Just make sure CDex is closed when you overwrite it.
h.tuehn
QUOTE (tigre @ Jan 29 2004, 02:02 AM)
h.tuehn - 2 things:
Maybe I've missed it in your long post, but - what sample have you used for your test? -> download link?
You jump to conclusions too quickly. ABX tests with one sample (limiting to 8 trials isn't enough to find small differences IMO BTW) aren't enough to support the general statements you make.

Same sample as Pio2001 - fatboy. Links are in his post too.

Is 8 enough? Probably not for subtle differences, but Pio2001 used 8 and I wanted to test for any obvious problems.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.