Help - Search - Members - Calendar
Full Version: Lame setting suggestion for certain situation...
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Polarbear
Hello All,

I'm fairly new to encoding mp3's myself, and after seeing the numerous settings of Lame, I'm very confused. Any of you guys who are experts in Lame and audio encoding in general, please offer some suggestions in the following settings. For all scenarios, size are the primary issue, followed immediately by quality (for portable mp3 players). *The source music will be primarily pop/rock.* Please provide example command lines please.

1) Best quality at and around 128bps using VBR. Should I use joint stereo? Low pass? or even use CBR / ABR?

2) Best quality at and around 96bps using VBR. Should I use joint stereo? Low pass? or even use CBR / ABR?


Thank you all in advance for this,
-Polarbear
AstralStorm
You should certainly try --alt-preset <bitrate>. (ABR)
It utilizes the best settings known as of today.

You might also want to add -Y switch (I don't know whether it's already in the preset).
It might reduce artifacting,
but will remove much of high frequencies above 16kHz.

You might also want to try (with lame 3.93.1) --preset medium and friends. (VBR)
I haven't tried them, so I won't comment on their quality.

All of these use joint stereo. There is really no reason to turn it off - it would only add artifacts.
Polarbear
Thanx AstralStorm,

That helped out a little, if it's okay, let me get a little more nitty-gritty about this issue. Given the premises from the 1st post, let me elaborate a little upon those premises and my needs. The source music is ~3:40 seconds, ~40megs .wav ripped from CD. Pop.

In the case of VBR 128bps, I need to have that reduced to ~3.5 megs. And in the case of VBR 96bps, I need to reduce that to even much lower.

Now, I want to fine tune the VBR settings, while maintaining essentially the same file size, and possibly maximize the quality of those encodings. I simply wish to find ONE setting for around 128bps (~3.5megs) and ONE setting for around 94bps; and I know, settings are fairly suggestive, but I simply wish to hear from you experts' personal experience.

For instance, using the following setting with the above mentioned .wav:
lame in.wav out.mp3 --lowpass 19.7 -V3 --vbr-new -q0 -b96 --scale 0.99

the resultant file size is ~5.78megs, way too big and too far away from the ~3.5meg mark.

Given all this, please offer more help and suggestions.

Cheers,
-Polarbear
NeoRenegade
WOAH... that is a pretty ugle commandline ph34r.gif (no offense)

But since anything at 44kHz at that bitrate would be ugly, try...

--alt-preset 128 --abr 96 --resample 44100 --lowpass 15.5 --lowpass-width 1

I really dunno. Maybe it won't sound TOO bad.
sld
In this forum, all practical biggrin.gif commandlines start with --alt-preset <something>.
Don't use -q0, because it is not well tuned (yet). The VBR alt-presets use -q2 by default, but I don't know what --alt-preset 128 (being ABR) would use.
Anyway, using a lowpass at 19.7 kHz for a 128 kbps mp3 file is way overkill.
M
Polarbear, the simplest way to accomplish what you want in terms of a filesize/quality tradeoff would be to restrict yourself to CBR encoding.

For your ~3:40 source, the following line will yield a 128kbps/44.1kHz MP3 of ~3.4 Mb: --alt-preset cbr 128

With the same source, this line should yield a 96kbps/32kHz (automatically resampled at this bitrate) MP3 of ~2.5 Mb: --alt-preset cbr 96

Hope this helps.

- M.
Polarbear
Thank everyone who offered suggestions to my problem here, it offered interesting perspectives to me about this issue. (And sorry for being so picky, simply trying to get a 'general' setting from you guys in order to attain the best encoding under the listed circumstances.)

Essentially, there seems to be varying opinion here which can be summarized as below, I feel, in terms of dealing with a strict SIZE requirement while quality being secondary (Pop/Rock, ~3:40, ~3.5megs):


For 128kbps encoding:
1) Using 'tweaked' VBR or ABR to ensure the approximate file size in the neighborhoods of ~3.5megs. What about the following setting? I tried it, it yielded ~3.6megs, and sounded "good" for me, though the speakers I am using here is horrible, so it could sound horrible with better speakers.

-v -V 5 -b 96 -B 160 -h -d
(if this above setting is BAD, or even STUPID, please explain why.)

2) Stick with CBR of 128kbps.

(of the above two, which would you guys go with, meaning VBR/ABR || CBR?)




For 96kbps encoding:
Basically stick with CBR and lower the samplying frequency. But for you experts with sharp ears, is there noticeable differences between 44.1kHz && 32kHz at 96kbps?


Thanx again to all of you guys who pitched in for help,
Cheers,

-Polarbear

PS:
CODE
http://jthz.com/mp3/
offers some interesting, though I feel VERY controvertial suggestions in terms of Lame settings from what I see here. Check it out.
NumLOCK
QUOTE
For 128kbps encoding:
[...]
-v -V 5 -b 96 -B 160 -h -d
(if this above setting is BAD, or even STUPID, please explain why.)

Around 128kbps, ABR is safer (and usually better) than VBR. Thus the recommendation: --alt-preset 128. Everything you need is already in the alt-preset.

For 96kbps I'd avoid mp3 altogether (I found no setting that I can stand). If target platform permits it, there are better alternatives wink.gif

Hope this helps.
Kblood
I would suggest exactly this:

--alt-preset 128

and

--alt-preset 96

or any number in-between.

Quite simply put: if "--alt-preset 128" gives you a file that is too big, then use 127, or 126, or 125...

It will use ABR, which is the best approach in this bitrate range. It has been extensively tested and tuned by experts to give the best compromise in that bitrate range. And simply, it is very very very unlikely that you can come up with a better command line.

Just give it a shot. Bigger command lines don't always mean better quality, but actually can seriously destroy it.

And I agree, that 19.7 kHz lowpass is quite a really bad idea for this bitrate range.

PS: At
CODE
http://jthz.com/mp3/
they seriously need to go read the FAQ posted at the top of the MP3 area of this forum... They seem to know about --alt-presets, but have the idea that itīs only for high bitrate... Professionals?... ph34r.gif
tigre
QUOTE(Polarbear @ Jun 24 2003 - 01:35 AM)
<snip> I feel, in terms of dealing with a strict SIZE requirement while quality being secondary (Pop/Rock, ~3:40, ~3.5megs):


For 128kbps encoding:
1) Using 'tweaked' VBR or ABR to ensure the approximate file size in the neighborhoods of ~3.5megs. What about the following setting? I tried it, it yielded ~3.6megs, and sounded "good" for me, though the speakers I am using here is horrible, so it could sound horrible with better speakers.

-v -V 5 -b 96 -B 160 -h -d
(if this above setting is BAD, or even STUPID, please explain why.)

"--alt-preset xxx" is already tweaked ABR (add --verbose switch when encoding to see what settings are used).
Below --preset medium bitrates it will be very hard (if possible at all) to find a tweaked VBR commandline that gives equal or better results than "--alt-preset xxx" at the same bitrate. To be sure that the bitrate is always 128kbps or lower you can use e.g. --alt-preset 120 - just try. I'm pretty sure that this gives better results than your commandline. If you have space left, just use a higer "xxx".

QUOTE
2) Stick with CBR of 128kbps.

(of the above two, which would you guys go with, meaning VBR/ABR || CBR?)

ABR (-alt-preset) ...

QUOTE
For 96kbps encoding:
Basically stick with CBR and lower the samplying frequency. But for you experts with sharp ears, is there noticeable differences between 44.1kHz && 32kHz at 96kbps?

ABR (--alt-preset 96) should be better than CBR here too. You might want to give some fraunhofer codec a try for this bitrate as it uses intensity stereo which saves bits and helps avoiding other problems.
Lowering sampling frequency gives better results as bits are saved for encoding audible information.

QUOTE
PS:
CODE
http://jthz.com/mp3/
offers some interesting, though I feel VERY controvertial suggestions in terms of Lame settings from what I see here. Check it out.

Some things they say are true, but the truth is mixed with dangerous BS. They spread opinions without providing evidence. Here everything accepted as "fact" widely has been backed up with tests (double blind aka "ABX").
AstralStorm
MAJOR BS:
QUOTE
So; Compressed audio in the form of MP3 can be used professionally, as long as you use a high enough bitrate, like, for example VBR level 0, or CBR at 320 kbps. At those levels even a computer will have a very hard time showing differences between the original and the compressed version of the audio.


Properly trained (wo)man can differentiate blindly many MP3s from original (even at 320kbps),
because there are many problem samples in the format.
An untrained person can easily pick the worst ones...

But they say that 'EVEN A COMPUTER' will have a problem.
Did they try to use 'Compare Wave' function of any audio processing package?

Another thing:
QUOTE
We like to emphasize that you should NOT rely on any of the so-called "test results" available on the www; Often these tests are no longer valid (2000 is OLD where LAME is concerned!). There are some very slick charlatans busy spreading lies about audio quality issues involving LAME, MP3 and VBR.

/SNIP\

Make sure you check different LAME settings YOURSELVES, do not blindly follow comments written by self-appointed 'experts', especially in cases where they seem to have too much time for the issues at hand.


Hehe, they say that you shouldn't trust their settings rolleyes.gif

/EDIT\: small 'fixs' /EDIT\
Joseph
Well I tried and tried and tried, but I couldn't pick out any differences in alt-preset Insane and the original on 10 samples.
eltoder
QUOTE(Joseph @ Jun 24 2003 - 05:15 AM)
Well I tried and tried and tried, but I couldn't pick out any differences in alt-preset Insane and the original on 10 samples.

Nothing strange here... wink.gif

-Eugene
2Bdecided
Can we not have a discussion about jthz or his website please. The guy is very old news (He was Julius IIRC in the r3mix forum days) and isn't going to change his mind. If we need to explain why his suggestions are bad to newbies, that's fair enough, but don't waste too much time disecting and correcting his website. He loves music and knows something about audio, but (again, IIRC) he can't hear artefacts very well at all. This led to some very strange behaviour from him, mostly towards people who can hear artefacts easily. Let's not go there again.


Now, it should be apparent from the FAQ, but it isn't:

The reason we suggest you use one of the alt presets is because these are designed to offer the best quality at that bitrate. They actually include several switches within the preset, and some also include some direct tweaks to the code that you can't activate with other switches - all tested very carefully on lots of signals to get the very best quality possible.

The baseline --alt-preset is "standard" - this is designed to be transparent. "Perfect", if you like - at least as close to perfection as you can get with mp3 (unless you want to use the maximum possible bitrate all the time). If you can find fault, report it here. It averages around 180-200kbps.


At bitrates below this, you're not going to achieve perfection, so you're just aiming at the best possible result. There are abr (average bitrate presets) for every allowed value (whole numbers in range), and also cbr presets for the mpeg allowed values (the 96, 128, 160, 192 etc values we're familiar with). You can play with these and add other switches if you want, but they're a very good starting point. It's much easier to make them worse than to make them better, because they're very good already, and have been designed very carefully.

You can try something different, and for your particular track (are you only wanting to encode one track?) and your particular tastes, you might get lucky (though you probably won't!) - however, overall, the alt-presets offer the best quality.


Forget the line you quoted to start with - it's nowhere near the best you can do at that bitrate.


If you give us some context (i.e. why the limitations? portable? website?), we might be able to offer other advice, but you should be getting the message by now: use the alt presets!


Cheers,
David.
AstralStorm
@eltoder:
Try some problem samples from the FAQ section 'General audio compression'.
With ABX utility preferably.

/EDIT\ You might want to try castanets. /EDIT\
eltoder
QUOTE(AstralStorm @ Jun 24 2003 - 05:48 AM)
@eltoder:
Try some problem samples from the FAQ section 'General audio compression'.
With ABX utility preferably.

/EDIT\ You might want to try castanets. /EDIT\

He have not said that he tried 10 special hand-picked samples, where API has problems. tongue.gif
Attempt to ABX insane on 10 random samples is hopeless, IMHO.

I'm not an expert in ABX tests. I can easily ABX castanets at --alt-preset 128, but not even at APS, so at insane I have no chances wink.gif

-Eugene
Artemis3
PolarBear: Use --alt-preset 128 or --alt-preset 96 (maybe 95 or 94 if you need it smaller). Do not use anything else, and do not even think of using any other custom command line, you can ONLY get it worse.

Long and detailed information about "why" is stored in the past 2 or 3 years in this forum and another, just know that docs in lame are way outdated, and the best results can be made with lame 3.90.3 (see FAQ).

And yes, 128kbps is very low, you may even get better results using an FHG encoder.
sven_Bent
i would suggeste
-alt-preset >bitrate>

This is a preset tuned for over several months (years?)by many people on almost every test sampel availabel.
Thanx to dibrom we got this, and sofar nobody semed to have surpassed it in terms of quality.
Jebus
QUOTE
-v -V 5 -b 96 -B 160 -h -d
(if this above setting is BAD, or even STUPID, please explain why.)


As others have said, it is a common misunderstanding among new users of LAME that you need to tweak the hell out of the command line in order to get something good. Plus, it's kinda fun in a l33t sort of way. I know, I did it to.

The fact is, the --alt-presets already include all that, plus code-level tweaks you can't even access. They are far better than anything you can come up with yourself.

VBR doesn't work well with LAME at those bitrates. ABR does. This is why --alt-preset 128 and --alt-preset 96 use ABR. No good reason exists for CBR beyond perhaps streaming applications.

I might add that with the ABR presets, you can use non-standard bitrates (since it's an average) for example --alt-preset 100.

Anyhow, hope this helps. If you don't believe me, listen to your ears. Try your custom command line and compare it to an --alt-preset at the same bitrate. You should be plesantly surprised.
Optimod
QUOTE
Some things they say are true, but the truth is mixed with dangerous BS. They spread opinions without providing evidence. Here everything accepted as "fact" widely has been backed up with tests (double blind aka "ABX").

I'm truly amazed by the attention you people bring to our website, all in the same "look at these lunatics" manner, reminding each other about the battles you lost with me about audio-quality, mpeg encoding and L.A.M.E. on the r3mix.net forum(s). Either way, Roel's r3mix.net would never even have existed if it wasn't for our pages here and there on the internet, but he would probably never admit to that, since he was the one asking me to be a moderator on his forum, so even crediting r3mix.net again and again is bullshit. Roel knew he was only posting what many already knew for years

And the 'evidence' provided here is not convincing either. Most of the times when someone disagrees with the conclusions, this person will be ignored or dissed. Being highly involved in coding for ISDN MP2/MP3 hardware codecs lately, I must say there are still some of you around using the same talk over and over again, clearly not once having checked the actual audio quality resulting from those dreaded command-lines (on our own lame compiles!). Many still base their conclusions in here on hear-say, not on double blind listening tests at all! I read a lot of strange assumptions in your FAQ as well, based merely on the opinions of a chosen few, not on actual fact or research, as you repeatedly try to tell everyone.

Furthermore, I'm surprised about the value you hand to these alt-presets. Believe me, I've tried, but never ever have they proven to be worth all that you make of them. Instead, in our use at the broadcasting uplinks and digistreams for FM and digital sat. tuners, time and again they turn out to be full of strange artifacts involved with either the psycho-acoustics you chose to prefer, or that overestimated 'average bit rate' concept, or when chaining several mpeg steps in one STL.

Then there's those among you who think mp3 should be an extremely high-end audio format for archiving purposes, while it was never intended to be even close to that. It makes no sense to expect a compression ratio like the one MP3 users want and then refuse to accept that there will be consequences to the audio involved. If you really like transparency (a very vague term I would never even use where audio-quality is concerned) and don't give a rats ass about the size of the resulting file, then what are you doing with mp3 anyway?

I'm very much disappointed about the fact that none of those I recognize have understood what I tried to explain back in the r3mix.net forum. The sheer stupidity I've read on this site referring to our site again and again is something you people should be ashamed of. All your prejudice is still full of delusions of grandeur, the base of which I can't have much understanding for. But indeed, if this site is founded by that heavy metal fool with his never proven to be superior hearing capabilities, I'm not surprised you are all his lame-ass followers.

So, expect no responses, you're lucky I even subscribed to this forum to be able to post this.

Julius

P.S. If I would be sennheiser, I'd complain about you using this picture in the upper-left corner.
To annoy those 'Julius & Hens' haters among you, I'll be posting a true photograph of my personal pair of HD600's on me and my cousin's
fewtch
QUOTE(Optimod @ Jun 28 2003 - 11:28 AM)
So, expect no responses, you're lucky I even subscribed to this forum to be able to post this.

Julius

Oh boy... I feel so lucky, Julius. Does anyone else feel lucky to be graced by the presence of this "great soul"... it's like a thunder came down from God Himself and restored the universe to its former glory. (w00t) (w00t) (w00t) shifty.gif
JohnV
QUOTE(Optimod @ Jun 28 2003 - 11:28 AM)
reminding each other about the battles you lost with me about audio-quality, mpeg encoding and L.A.M.E. on the r3mix.net forum(s).

LOL.. For your information Julius, r3mix-forum is still up at http://www.audiofora.com (although you can't access it from r3mix main page) so you better not talk total BS here because the evidence is still there, and many of the old timers here remember very well how things infact went there and anybody can still go check it out... wink.gif

I think the rest of your message speaks for itself... rolleyes.gif
ff123
QUOTE(JohnV @ Jun 28 2003 - 11:31 AM)
QUOTE(Optimod @ Jun 28 2003 - 11:28 AM)
reminding each other about the battles you lost with me about audio-quality, mpeg encoding and L.A.M.E. on the r3mix.net forum(s).

LOL.. For your information Julius, r3mix-forum is still up at http://www.audiofora.com (although you can't access it from r3mix main page) so you better not talk total BS here because the evidence is still there, and many of the old timers here remember very well how things infact went there and anybody can still go check it out... wink.gif

I think the rest of your message speaks for itself... rolleyes.gif

Hehe,

Some of those messages from J may not be there any more, because when he lost an argument he was just as likely as not to delete his posts! I remember a couple in which he proved just how insensitive he was to certain artifacts.

QUOTE
But indeed, if this site is founded by that heavy metal fool with his never proven to be superior hearing capabilities, I'm not surprised you are all his lame-ass followers.


It's always good to quote directly from one of J's messages before the particularly offensive parts get edited or deleted smile.gif

I think J must be referring to "Dubrim" or was it "Dubris"? (he's quite the persuasive fellow with those debating tricks of his). The samples which Dibrom used to tuned the --alt-presets are documented and were verified to be improved over other Lame settings by multiple people. Where are J's samples, I wonder?

ff123
JohnV
QUOTE(ff123 @ Jun 29 2003 - 12:54 AM)
Some of those messages from J may not be there any more, because when he lost an argument he was just as likely as not to delete his posts!  I remember a couple in which he proved just how insensitive he was to certain artifacts.

Hehe, you bring back old memories. smile.gif Yeah, now I remember those mysteriously disappearing messages by J, which made him legendary back then.. some "battle wins" ,huh.. laugh.gif

QUOTE
Where are J's samples, I wonder?
What samples? He prefers the "highly praised" frequency analysis method:
CODE
http://www.jthz.com/mp3/lamespecs.htm
rolleyes.gif
Seems that not much has changed since few years ago..
AstralStorm
Why the hell tune something if you can't hear the increase in sound quality?
(really hear - confirmed by an ABX test, long enough (like 16 tries))

This kind of people just doesn't seem to get it...
Jebus
QUOTE(AstralStorm @ Jun 28 2003 - 03:33 PM)
Why the hell tune something if you can't hear the increase in sound quality?
(really hear - confirmed by an ABX test, long enough (like 16 tries))

This kind of people just doesn't seem to get it...

Some people apparently prefer to look at pretty pictures of their music, rather than listen to it. For those sorts of people, spectral analysis makes perfect sense biggrin.gif
Gabriel
My own opinion is that the tests conducted here are reliable. They were blind, and have a statistical value.

One isolated test subject can have some conclusions that while beein true for him(her)self, are not representative of the overall population. The tests done here were done on several people (do not know the exact number, my guess is around 20), and so are more reliable (related to the overall population) than some tests done by only 1 test subject.

If the results (in similar conditions) of tests by a single test subject are not going in the same direction as the results of the rest of the test pool, it does not really matter. This particular subject still have a value (even if perhaps not statistically significant). His (her) results are added to the pool of results, and then only the results of the overall pool are really importants.

What this means is that if someone has results different from the results found here, this is not relevant (statistically). If a several people have different results, then this can be relevant.

I think that what is perhaps missing here is an explanation about the tests along with results, like we can read in D. Robinson's thesis.
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-2008 Invision Power Services, Inc.