Help - Search - Members - Calendar
Full Version: lame settings for low bitrate MP3
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
gio
Hi,

I need to stick as much mp3 from my CD collection on my 256MB portable player.
It will be used mostly on trains and bus, so I don't need exact CD-quality.

Can you suggest me the how to achieve the best quality with 96 kbps, 84 kbps and even lower bitrates?? I don't care much about how much time encoding takes.

Should I use --abr (--preset bitrate) or VBR?
lame documentation says that VBR is higher quality than ABR, but how can I tell it "create something very small but at the highest quality you can". Setting max bitrate seems stupid: maybe it need to use something higher that what I've set for a second or two, why shouldn't it?

Should I reduce frequency (--abr 84 reduces frequecy to 32 kHz)?
Should I apply some kind of filters? I listen to pop bands (Oasis and similars), heavy rock and prog metal (Dream Theater, Muse, ...) and others (Radiohead). Should I use different filters?

Right now I tried lame (3.96.1) with -q0 --abr 96 and it sounded very good if you consider how little are the produced files. Is there something more complex that can squeeze some more quality in mp3 with lower bitrates?
audioflex
96 just won't do..but if you dont mind 112 too much i made this command line for 3.96.1, also...make sure you're encoding from original source or it won't work nearly as well as if you had.

( -V7 --athaa-sensitivity 1 -b32 --resample 44 --lowpass 15 )
k.eight.a
You could try: --alt-preset medium and a better one --alt-preset standard -Y

QUOTE (gio @ Sep 19 2004, 06:58 AM)
I listen to pop bands (Oasis and similars), heavy rock and prog metal (Dream Theater, Muse, ...) and others (Radiohead).
*


Muse are heavy rock / prog metal act? biggrin.gif
fairyliquidizer
QUOTE (k.eight.a @ Sep 19 2004, 02:07 PM)
You could try: --alt-preset medium and a better one --alt-preset standard -Y


aps -y is going to be too big for his needs. My advice is to go for 128kbps.

Medium is also worth a look but as you want to squeeze the music in I'd say ABR 128. To be honest I wouldn't go lower.

If you must go lower than 128 then use Ogg or if your portable doesn't do Ogg vorbis then WMA. Oh LAME sucks at very low bit rates and ABR is better than VBR @128.

Fairy rolleyes.gif
fairyliquidizer
oops
jormartr
I had been playing with lots of command line options, and found one very useful. It is not quality based, but the results are really good for the bitrate.

--resample 32 --lowpass 15 -V9

I use it some times when I want the maximum albums/cd. It's easily distingible from the original, but even that is quite enjoyable.

It makes files with a bitrate about 80kbps
analogy
I can't believe you people...

He asks for a good setting for 96 kbps and you give him preset medium and a 128 kbps preset... Unbelievable. He's not looking for pristine quality, he's looking to save space.

Anyway, in general, using one of the -V presets in 3.96.1 will give you the best quality for a given bitrate.

For ~96 kbps, V7
For ~80 kbps, V8
For ~64 kbps, V9

Using -a will downmix to mono and will give an additional bitrate advantage depending on the amount of stereo separation in the original. In my experience, it saves about a third of the bitrate.
tycho
As has been mentioned before, at bitrates ~96, you may as well go for the new free professonal Fraunhofer coder which is bundled with Windows Media Player 10. It is supposedly at least as good as lame at these bitrates. Look for the recent Fhg thread for how to enable the codec in EAC, CDex, Audiograbber. If you have a slow PC, a 4x encoding speedup is nice too...
Polar
QUOTE (analogy @ Sep 20 2004, 00:00 UTC)
I can't believe you people...

He asks for a good setting for 96 kbps and you give him preset medium and a 128 kbps preset... Unbelievable. He's not looking for pristine quality, he's looking to save space.
*
I was wondering the same thing. Of course --alt-preset medium, --alt-preset standard -Y or --abr 128 will all produce better quality than any 96 kbps-like setting. Of course anything below 128 kbps won't be sounding acceptable to some people. Of course Vorbis would be the better choice quality-wise.

But that just wasn't the OP's question. If s/he's OK with 96 or even 80 kbps MP3, then who are we to contradict her/him? All s/he asked for was some advice on the best sounding preset for a given bitrate. After all, s/he's got just 256 MB of portable storage, so at 96 kbps, that's only 6 hours of music.

QUOTE (analogy @ Sep 20 2004, 00:00 UTC)
Anyway, in general, using one of the -V presets in 3.96.1 will give you the best quality for a given bitrate.

For ~96 kbps, V7
For ~80 kbps, V8
For ~64 kbps, V9
*
In my experience, -V7 as such tends to average in triple digit bitrates (i.e. around or even slightly above 100 kbps). In addition, -V6 yields 115 to 120 kbps files. This thread will come in handy.

QUOTE (analogy @ Sep 20 2004, 00:00 UTC)
Using -a will downmix to mono and will give an additional bitrate advantage depending on the amount of stereo separation in the original. In my experience, it saves about a third of the bitrate.
*
True, although I don't think many will actually prefer mono over stereo, even if the former is comparable - quality-wise - to a stereo file at 40 to 50% higher bitrate.

Now to come to the OP's initial question(s).

As there hasn't been conducted any authoritative public listening test at this bitrate range yet, and because I'd be interested in partaking in such a test (like I've mentioned here and here), I've actually been fiddling around a bit with various 96 kbps-like LAME, MPC and Vorbis settings lately. I've been setting each of them at a heterogeneous set of some 20 tracks, ranging from blues, over electronic, pop, (hard) rock, trip-hop, to world music. This is what I came up with (in LAME v3.96.1). (Will get back to those MPC and Vorbis settings in a couple of days.)

CODE
              encoding setting        avg. bitrate   min/max bitrate   lowpass in kHz   sampling rate in kHz

    --preset 96 -q1 (= --abr 96 -q1)       93            90/98              15.4              44.1
                             -V7 -q1       98            75/112             14.9              32.0
             -V7 -q1 --resample 44.1    low 110s      not measured          14.7              44.1
             -V8 -q1 --resample 44.1       90         not measured          12.5              44.1
-V8 -q1 --resample 44.1 --lowpass 16       95            72/112             16.0              44.1

It can be deduced that those last 3 encoding settings either apply too stringent a lowpass, or require to much tweaking to the preset to even qualify for a comparative listening test along --abr 96 or -V7. So just judging by the figures, for a target bitrate of some 96 kbps, pick either --abr 96 or -V7. I haven't been able to ABX them yet, but I'd suspect them to be very tied, as that -V7 32 kHz resampling has me a bit sceptical about VBR -V7 sounding better than --abr 96. So I'd recommend ABXing those 2 and judging for yourself.

What I would hang onto though, are the -h (= -q2, default for any VBR setting), -q1 or -q0 (slow!) switches, as these should bring down the average bitrate by another 0.5 to 2 kbps and still (quoting LAME's command-line switch reference) turn on "some quality improvements".

Good luck. Would love to hear your conclusions.
Gabriel
I would suggest to NOT USE q1 with current Lame versions (right now 3.96.1).

As indicated, -V x is a good start, with x beeing probably 7,8 or 9 in your case
Polar
QUOTE (Gabriel @ Sep 20 2004, 20:59 UTC)
I would suggest to NOT USE q1 with current Lame versions (right now 3.96.1).
Then what's true of the "some quality improvements" statement in LAME's own switch reference? In other words: could you be a bit more elaborate as to why you would advise against -q1?
analogy
If I understand correctly, I think Q 0 or 1 only offers improvements in the lossless compression of each frame's data for a slight size advantage, but not enough to make it worthwhile. Of course, I've never even seen the LAME source so I'm probably wrong.

And V7 did result in an ABR of about 100 in my very limited test to label my diskwriter presets in foobar, but I figured that due to the very limited scope of my test it could be off by a few kbps, so I rounded to the nearest MP3 frame size.

In my experience, the -V presets do a pretty good job of scaling quality in a way that keeps annoying artifacts down and just makes it sound "sorta low-fi" in general.
384kbps
There still are hanging around a lot of rumors about -q0 and -q1. Of course they should improve anyhow the quality/space ratio but they still seem to be quite experimental.
Moreover there haven't been such large listening test like for standard and extreme preset that is using -q2 and since recent times -q3.

Once I have thought -q0 would be ok since 3.93.1 but i remember posts from forum users that -q0 even would waste quality in some case...

I don't know where the beginning of that -q# discussion is, but the serious warnings about -q0/-q1 exist at least as long as i know the hydrogenaudio forum.
And when Gabriel as developer just now again makes a suggestion not to use -q1... - well, it would be maybe a good idea to chose a better-proven setting!?


@gio
Try this (with Lame 3.96.1):
Lame.exe -V8 --resample 32 --lowpass 14 --lowpass-width 1 input.wav output.mp3
or just:
Lame.exe -V7 --resample 32 input.wav output.mp3
(I guess '-V7' will exceed the 100 kbps border.)

If you aren't tired yet about -q# switches and like to set a better one than take '-q2'.

Of course you may check out too '--athaa-sensitivity 1' as audioflex has mentioned, posted here and there but i personnally have no experience with it.
But i really would recommend to downsample to 32kHz! - Compared to 44kHz this will cause a little 'loss of sharpness' but that is the smaller evil because 44kHz below 100kbps often sounds very glassy - specially on rock/pop music with 'more stereo' there are simply not enough kBit per second to store all those 44100 samples. wink.gif
analogy
And really, if you're lowpassing below 16 khz it just doesn't make sense to keep it at 44 khz due to Nyquist.
Polar
QUOTE (384kbps @ Sep 21 2004, 01:23 UTC)
Try this (with Lame 3.96.1):
Lame.exe -V8 --resample 32 --lowpass 14 --lowpass-width 1 input.wav output.mp3
or just:
Lame.exe -V7 --resample 32 input.wav output.mp3
...
But i really would recommend to downsample to 32kHz! - Compared to 44kHz this will cause a little 'loss of sharpness' but that is the smaller evil because 44kHz below 100kbps often sounds very glassy - specially on rock/pop music with 'more stereo' there are simply not enough kBit per second to store all those 44100 samples. wink.gif
*
-V7 and -V8 downsample to 32 kHz by default, so no need to include that in your command-line.
384kbps
Lame 3.96.1 does it indeed - at least at the command line above, but not always at '-V7' or '-V8'.

I must say my concerns where more about a suitable lowpass filter...

Maybe i should add for sure that '-V8' uses a default lowpass value of about 12.7 kHz so it would be a good idea to modify it in this direction specially when encoding music from Oasis (often strongly dynamically compressed) or harder rock with commonly stronger 'e-guitar distortion' (i hope this is the right expression?) that seems to be more pretentious for encoding.

Nethertheless i would try to keep the lowpass frequency as high as possible and trust in Lame's lowpass value(s) management (well, it's rather a lowpass band of course). With too low lowpass frequencies e.g. you eleminate quite soon the clear the sound of a hi-hat out of a rocky track.

QUOTE (analogy @ Sep 21 2004, 02:41 AM)
And really, if you're lowpassing below 16 khz it just doesn't make sense to keep it at 44 khz due to Nyquist.
*

Of course it make no sense to go higher than 15 kHz when using a 32kHz (re)-samling rate. When you e.g. would use the following command line...
Lame.exe -V7 --lowpass 16 input.wav output.mp3
... Lame (3.96.1) won't do any down-resampling to 32 kHz by default and keep the input sampling rate of 44.1 kHz.
gio
Thanks to all the people that reply to my original post.

Here are few conclusion that I realized doing tests at those low bitrates (80/98)
  • -q0 vs -q2
    There is not an audible difference between -q0 and -q1, at least with settings I used. A little improvement can be seen with -q0 instead of -q2 when used with ABR.
  • lowpass
    With a standard audio setup (audio card + desk speakers) different lowpass values will show too much difference. I encoded with --lowpass 13 and 15 and did some test on the portable player + headphones. --lowpass 13 is acceptable with most songs but too bad for songs with highly electronic samples.
  • resample
    32. Period.
  • --preset vs -V9
    a few songs (the most relaxed pieces) has been compressed to ~80 with -V9 without any audible difference vs the same songs encoded with --preset 96. Many pieces got an average of ~88 with -V9 and sounded better than same song at --preset 96 (there are some songs VBR encoded at ~80 with peaks of 160 that are really good). But sometimes (pieces with heavy rythms) -V9 exceded the 100kbps barrier and I had to recode manually with ABR@86/90 with no big loss in quality.
I repeat that when I say no audible difference I mean that you could not tell the difference using a Creative MuVo TX and a very very good no-brand (I think I deleted the brand sticker with the time) pair of headphones.

So my suggestion is a simple -q0 --lowpass 13 -V9 (replace -q0 with -q2 if you don't have time to spare).
384kbps
At low-kbps Mp3s i think the lowpass filter is the switch to play with a bit. You should maybe also take a look on this resampling-/lowpass-thread if you like more information.


QUOTE (gio @ Sep 23 2004, 11:46 AM)
...
[*]--preset vs -V9
a few songs (the most relaxed pieces) has been compressed to ~80 with -V9 without any audible difference vs the same songs encoded with --preset 96. Many pieces got an average of ~88 with -V9 and sounded better than same song at --preset 96 (there are some songs VBR encoded at ~80 with peaks of 160 that are really good).
*
The '-V#' encoding is a pure variable bitrate encoding (VBR), '--preset #' is an approximate bitrate encoding (ABR). Generally VBR is superior to ABR at the same kbps rate.

With ABR resp. '--preset 96' you force Lame to encode in a rather restrictive manner to ensure that at the average kbps rate of the resulting Mp3 is near to 96kbps - unrespected how intensive/difficult the actual music track is for encoding. So with ABR Lame is not fully free to decide and to apply its internal intelligence (models, tables, etc.).
With VBR you only have the possibility to define the 'quality level' (by the '-V#' option) and you give away the absolute control about the kbps rate. - Of course this may be irritating because with VBR you never know exacly what you kbps rate you will get - but Lame does its best than!

Add once '--verbose' to your command line and you will see there are also many others preconditions that change between VBR and ABR encoding mode.


QUOTE (gio @ Sep 23 2004, 11:46 AM)
But sometimes (pieces with heavy rythms) -V9 exceded the 100kbps...
*
100kbps at '-V9' is quite much. I guess your music is not only heavy, it also must be very loud!? Have you no problems with loudness clipping?
If yes add '--scale 0.9' or at least '--scale 0.95'. Indeed this will make the music quieter but will prevent noisy sound at loud places.


QUOTE (gio @ Sep 23 2004, 11:46 AM)
But sometimes (pieces with heavy rythms) -V9 exceded the 100kbps barrier and I had to recode manually with ABR@86/90 with no big loss in quality.
*
'...with no big loss'? - Not big, but so there is a loss! wink.gif
Is there a big difference in file size if the kbps rate is 98 or 102 kbps? - I mean: Give up your decimal minted thinking, your ears can't see numbers! wink.gif
Gabriel
I'd suggest you to no touch the --resample parameter, but only the --lowpass one.

Lame is automatically choosing the best sampling rate based on the lowpass frequency, taking into consideration limitations of the mp3 format (ie sfb21 problem).

As an example, for a 15.5kHz lowpass, 32kHz is NOT optimal when encoding in mp3, that is why in this case Lame is using 44.1kHz.
gio
QUOTE (384kbps @ Sep 23 2004, 07:47 PM)
QUOTE (gio @ Sep 23 2004, 11:46 AM)
But sometimes (pieces with heavy rythms) -V9 exceded the 100kbps barrier and I had to recode manually with ABR@86/90 with no big loss in quality.
*
'...with no big loss'? - Not big, but so there is a loss! wink.gif
Is there a big difference in file size if the kbps rate is 98 or 102 kbps? - I mean: Give up your decimal minted thinking, your ears can't see numbers! wink.gif
*


ABR@86/90 is going to make a big difference vs VBR@100 in file size when encode prog music with 15 or more minutes of music in a single track.

BTW yes, music is also very loud sometimes (and LAME forget to write the ReplayGain tag...) now I'll play with --scale and see if I can gain anything.
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.