Help - Search - Members - Calendar
Full Version: Encoding smaller files / fixed-quality encoders
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
BigWelshSteve
I'm quite filesize-conscious, want to stick with mp3 format for now, and I'm willing to sacrifice some quality for smaller files (on most stuff anyway - bearing in mind my usual listening environment and equipment). Currently I'm using CDex 1.51 with LAME 3.90.3, on a 2000Mhz Athlon-XP based machine with a mostly up to date build of Win XP SP1. I still use good old Winamp2 at the moment for playback (v2.91), but I'm also considering buying a high capacity ipod type device.

Q1 (part 1): For a small filesize, VBR should enable me to get better quality than CBR right?

Q1 (part 2): Most of the discussion here seems to concern higher quality encoding - an advice summary of how to maximise quality at various lower compression ratios would be really useful for people like me. A table of a range of suggested LAME settings to use, with the approximate filesize/minute values they deliver would be ideal. What do you think - any chance? (Sorry if something like this is already out there somewhere and I've missed it!)

Q2: I still want to maximise the sound quality I get out of each kilobyte (of course!), so am I right in thinking "--preset medium" could be the way forward for me?

Q3: LAME v3.96 has the best implementation of "--preset medium", doesn't it?

Q4: I've heard about the lame_enc.dlls (on rarewares.org) which ignore their inputs and always encode with a hardwired quality setting - what a great, simple idea to bypass your ripper's inadequacies! In CDex, "--preset medium" isn't available, so (assuming a yes to Q2 & Q3) I'd really like to get hold of a v3.96 dll hardwired with "--preset medium". Who should I ask, and d'you think there'd be any chance?

Q5: In fact, could we expand this idea and create a similar lame_enc.dll which ignores it's command line inputs but uses a set of quality settings which you can define (via a .ini file for example)? Obviously this is a bit cumbersome, but I think it might still be useful. Any thoughts?

Superfluous chitchat:

I must admit to being a bit overwhelmed by how many ways there are to skin this particular proverbial cat (and that's just mp3 encoding, let alone all the other formats). It's clear that things have to some degree reached a stage of being in the realm of opinion and subjective perception. As a bit of a newbie around here, I'm impressed by the amount going on, but also rather fazed by the mindboggling quantity of often conflicting opinion. I've spent a few hours trawling around last few days when I should be working, but I've learnt quite a lot! smile.gif

I'm actually quite tech-savvy and was in fact a fairly early mp3 adopter - I ripped a couple of hundred of my CDs back in 1997/8, I think and haven't really done any myself since (too busy/lazy!). Things seemed less complicated back then, (usually things get easier, not harder!). Most of it is 128Kbps (or even mono/64Kbps!) - CBR of course, there was no VBR back then! It's not great quality, but I still listen to it all - it's it's easier than digging for CDs, and much better than the tinny radio in our office! Things have come on a long way since then, however, and it's high time I redid everything - and ripped some newer CDs too.


What do you all think, anyway? Thanks in advance,

BigSteve.
john33
First, welcome! smile.gif Nice to see a well put together, intelligent first post. wink.gif

I'll leave some others to comment on some of your questions, but regarding Q4, I see no reason why you shouldn't have a 'hard-wired' preset medium version of the 3.96 dll. Give me a day, or so, and I'll post it at Rarewares. Q5 isn't a bad idea, but will take a bit more time to think about than I have spare at the moment.

I'll post here when the dll is available. I may wait until after the mooted move of the Rarewares hosting.
BigWelshSteve
Wow! biggrin.gif Fantastic - Thanks very much John! smile.gif

BigSteve
john33
I'll put these into Rarewares later, but for now, you can d/l from:
LAME 3.96 Dll MEDIUM only
and
LAME 3.96 Dll FAST MEDIUM only smile.gif
These are Intel 4.5 compiles.
kalmark
Really noone else noticed that there are TWO Q1-s? biggrin.gif

Not that it matters, though.
Jebus
I think the parent's idea of having a hard-wired DLL which can be configured from an .ini file is an excellent one!
magic75
Q1 (2):
Recommended settings thread in MP3 forums.
john33
QUOTE(Jebus @ May 20 2004, 05:32 PM)
I think the parent's idea of having a hard-wired DLL which can be configured from an .ini file is an excellent one!

I also thought it was a pretty good idea! wink.gif So here is a suitably modified 3.96 dll for testing: http://homepage.ntlworld.com/jfe1205/LAME/...Dll3.96_MOD.zip smile.gif

The bundle contains the dll, the initial .ini file and a ReadMeFirst.txt file. It should all be self explanatory, I think.

Let me know what you think. If people like it, I'll do the same for the 3.90.3 dll, instead of providing all the different hard-wired versions and post them to Rarewares.
glauco
Nice way to bypass limitations in some programs.

A very good idea indeed.
echo
Nice! Works fine as far as I can tell. Thanks john33. smile.gif
robert
one another possibility to make a custom default setting is, set the environment variable LAMEOPT to whatever options you would like as your default ones and call "lame infile.wav oufile.mp3". (will work with the LAME.exe only, not the dll)
---
(thanks to Frank Klemm)
glauco
QUOTE
one another possibility to make a custom default setting is, set the environment variable LAMEOPT to whatever options you would like as your default ones and call "lame infile.wav oufile.mp3". (will work with the LAME.exe only, not the dll)


It works !!

I didn't know that trick. Seems very useful for re-organizing LAME coding scripts.

Thanks a lot!!
adamr
No-one's answered most of big Steve's questions, so despite being a clueless newbie unsure.gif I'll have a shot...

[quote]Q1:  For a small filesize, VBR should enable me to get better quality than CBR right?[/quote]Guess so...

[quote]Q1:  Most of the discussion here seems to concern higher quality encoding[/quote]I think that's 'cause this is a forum aimed at audiophiles - not too much for regular punters like you and me around here wink.gif

[quote] - an advice summary of how to maximise quality at various lower [/quote]You could try:
CODE
-V5 --athaa-sensitivity 1
with 3.96, as mentioned in this thread.

[quote]compression ratios would be really useful for people like me. A table of a range of suggested LAME settings to use, with the approximate filesize/minute values they deliver would be ideal.[/quote]Sounds useful to me too.

[quote]Q2:  I still want to maximise the sound quality I get out of each kilobyte (of course!), so am I right in thinking "--preset medium" could be the way forward for me?[/quote]Blimey; only on question 2, I feel like I've done about 4 already... Anyway, see suggestion above.

[quote]Q3:  LAME v3.96 has the best implementation of "--preset medium", doesn't it?
[/quote]Someone else here ("medium balloons") pointed out that this isn't so great in terms of filesize sad.gif

[quote]Q4:  I've heard about the lame_enc.dlls (on rarewares.org) which ignore their inputs and always encode with a hardwired quality setting[/quote]This one's been fantastically sucessful hey!

[quote]Q5:  In fact, could we expand this idea and create a similar lame_enc.dll which
[/quote]Well, that's just an extension of Q4!

[quote]Superfluous chitchat:[/quote]Phew, this could take some time.

[quote]I must admit to being a bit overwhelmed by how many ways there are to skin this particular proverbial cat[/quote]Yes, it's a shame the presets aren't better publicised.

[quote] (and that's just mp3 encoding, let alone all the other formats)[/quote]ogg is the answer smile.gif Pick a number between -1 and 10. Dead easy!

That's all for now I think...
Adam
Jebus
One other feature that I would find useful:

A scale=x.xxxx option, with scale=1 of course being the default value. This way I (and whoever else does this now) can input my replaygain scalefactors right into LAME as I do now with the .exe

Oh and by the way, John33 you rule for this stuff!
john33
QUOTE(Jebus @ May 21 2004, 09:00 PM)
One other feature that I would find useful:

A scale=x.xxxx option, with scale=1 of course being the default value. This way I (and whoever else does this now) can input my replaygain scalefactors right into LAME as I do now with the .exe

As requested, a new dll is on the same link above that now includes the option to input a Scale value. smile.gif The default is, in fact, 0, as required by the LAME libs.

http://homepage.ntlworld.com/jfe1205/LAME/...Dll3.96_MOD.zip
glauco
1 hour 9 minutes in reading, coding, compiling testing and posting a new version !!!

John33, you are the fasttest guy solving feature requests I've ever seen biggrin.gif
BigWelshSteve
Thank you very much indeed John! I agree with Glauco below - I wish I could get such an amazingly prompt response elsewhere in my life - fantastic!

QUOTE(glauco @ May 21 2004, 03:35 PM)
John33, you are the fastest guy solving feature requests I've ever seen biggrin.gif
BigWelshSteve
Although the recommended settings thread does give settings to use, it doesn't really indicate what they deliver in terms of filesize / quality - I think this would make it much more useful for us mere mortals. smile.gif
A table sorted by sound quality and one by filesize would be much handier (actually, would they be the same or not?)

QUOTE(magic75 @ May 21 2004, 07:10 AM)
Q1 (2):
Recommended settings thread in MP3 forums.
QUOTE
Q1 (2): Most of the discussion here seems to concern higher quality encoding - an advice summary of how to maximise quality at various lower compression ratios would be really useful for people like me. A table of a range of suggested LAME settings to use, with the approximate filesize/minute values they deliver would be ideal. What do you think - any chance? (Sorry if something like this is already out there somewhere and I've missed it!)
magic75
I can agree that it is not perfectly obvious but the settings are ordered in the recommended settings thread actually. To make things clearer, here is a short list valid for 3.90.3 (

insane (320 kbs CBR)
extreme (~250 kbps VBR)
standard (~200 kbps VBR)
standard -Y (~170 kbps VBR)

and below that the ABR settings are recommended. (--alt-preset <bitrate>)

For 3.96 (which is not yet recommended) other settings may be recommended...

EDIT: Ah, you wanted file size as well.
File size (kB) = time (s) * bitrate (kbps) / 8
So one minute @ 128 kbps is 960 kB or roughly 1 MB.

EDIT2: Some more info while I am at it.
The insane, extreme and standard presets deliver what is called transparancy, meaning that the MP3 cannnot be distinguished from the original except for some rare problem samples. The standard -Y settings cuts some, but not all, of the content above 16 kHz to reduce bitrate. Content above 16 kHz is usually very difficult to hear in real music. Pure test tones is a totally different thing.

ABR is a simpler version of VBR with the attractive feature of bitrate predictability. Meaning that the final bitrate is usually within +-5 kbps of what you specify.

What each setting/bitrate deliver in terms of quality is difficult to describe objectively as it depends a lot of the requirements of the listener. I suggest you try doing some blind listening tests your self using for instance foobar2k. Maybe start with testing --alt-preset 128 against the original?
Never_Again
QUOTE(john33 @ May 21 2004, 01:55 PM)
So here is a suitably modified 3.96 dll for testing: http://homepage.ntlworld.com/jfe1205/LAME/...Dll3.96_MOD.zip :)

The bundle contains the dll, the initial .ini file and a ReadMeFirst.txt file. It should all be self explanatory, I think.

Let me know what you think. If people like it, I'll do the same for the 3.90.3 dll, instead of providing all the different hard-wired versions and post them to Rarewares.

Unfortunately, the hardwired DLL doesn't seem to work with PlexTools - output files are still L+R stereo and the bitrates are clearly wrong. A great concept, though.
BigWelshSteve
QUOTE(magic75 @ May 23 2004, 10:12 PM)
I can agree...

Thanks for this Magic. Of course filesize is a function of bitrate! (duh! I feel stupid now!) Therefore ordered by bitrate is the same thing as by filesize, so actually that info is already there.

Really the other thing I was asking for was a table ordering all the CBR/ABR/VBR settings (together) by the sound quality delivered, but really what you're saying is that the sound quality is not really an absolute thing, and comparison is (to quote myself!) in the realm of opinion and subjective perception, right?

I shall get myself a copy of foobar2k and start those listening tests forthwith!
magic75
QUOTE(BigWelshSteve @ May 24 2004, 12:19 PM)
Really the other thing I was asking for was a table ordering all the CBR/ABR/VBR settings (together) by the sound quality delivered, but really what you're saying is that the sound quality is not really an absolute thing, and comparison is (to quote myself!) in the realm of opinion and subjective perception, right?

Umm, maybe you misunderstood me a little bit, not sure...
The table you ask for is there (in my post and the rec. settings thread), and it is in quality order. That part is not really subjective, insane is always better than standard for instance.

What can't be described is the quality of a certain setting, in words like "transparant" or "good enough for portable", beacuse only you can judge what is transparant for you or what is sufficient for portable use.

Doing your own listening tests is a good thing. Before i tried it I thought I could hear the difference between 128 kbps and the original fairly easy. After some listenign tests it turned out that i actually can't for most material...
john33
QUOTE(Never_Again @ May 24 2004, 08:17 PM)
Unfortunately, the hardwired DLL doesn't seem to work with PlexTools - output files are still L+R stereo and the bitrates are clearly wrong. A great concept, though.

Hmmm, let me check through the code again. This shouldn't really be possible in terms of how the dll works; the 'quality/preset' settings are almost the last thing to be processed in setting up the encoding parameters and should, therefore, overwrite anything set prevously. However, let me just check again.
megar
The forced APS dll seems not to produce the same file at all than lame.exe --preset standard.

Lame 3.96 MMX (from rarewares.org).
lame --preset standard file01.wav:
user posted image

Lame 3.96 dll (with LamePreset=3)
(I am sure that the used dll was the right one):
user posted image

Tested with EAC 0.95 prebeta5.

As you can see, the lame_enc.dll seems NOT to ignore some of the commands EAC sent.

EDIT: John33 acknowledged that the DLL does not behave the way it should in the next post. I will re-test as soon as he posts a new DLL As usual, thank you John33, this dll is a *great* idea for the ripping community.
john33
QUOTE(john33 @ May 25 2004, 08:00 AM)
This shouldn't really be possible in terms of how the dll works; the 'quality/preset' settings are almost the last thing to be processed in setting up the encoding parameters and should, therefore, overwrite anything set prevously. However, let me just check again.

Just as well I did!! The position in the code where the presets are initialised has been changed and I hadn't noticed!! sad.gif This means that certain of the parameters can indeed be changed, such as appears to be happening with PlexTools. I'll see if I can fix this later today. I'll post when it's done.
john33
OK, I think this is now fixed. There is a new dll here: http://homepage.ntlworld.com/jfe1205/LAME/...Dll3.96_MOD.zip

I'm pretty certain this is OK, but please let me know if it's not. wink.gif
megar
Oh my god !
Now it works !

THANK YOU A *LOT* !

Now I can use EAC with LAME_ENC.DLL and get true lame APS !

lame.exe --preset standard
your forced lame_enc.dll
both produce this repartition:
user posted image

Also tried with foobar bitcompare:
INFO (foo_bitcompare) : no differences in decoded data found
INFO (foo_bitcompare) : finished successfully
john33
QUOTE(megar @ May 25 2004, 01:39 PM)
Oh my god !
Now it works !

Thanks for letting me know.

I'll produce a 3.90.3 version of this over the next day, or two.
Tec9SD
Awing us as always, john33.

Thanks for all the work you put in for us, john33.
I'm sure many will find this useful (not to mention Jebus and the others can finally automate scaling).

bowing, tec
john33
QUOTE(john33 @ May 25 2004, 05:14 PM)
I'll produce a 3.90.3 version of this over the next day, or two.

Both versions are now at Rarewares. smile.gif
naturfreak
Is it possible to add also a standard -Y preset to the 3.90.3 lame dll mod?
This would be useful for me using a application to do scheduled recordings from radio.
john33
QUOTE(naturfreak @ May 28 2004, 05:16 PM)
Is it possible to add also a standard -Y preset to the 3.90.3 lame dll mod?
This would be useful for me using a application to do scheduled recordings from radio.

I've coded this. I'll test it out in the morning and upload if it's OK. wink.gif I'll post here when it's available. BTW, I'll make the same change to the 3.96 dll.
john33
QUOTE(naturfreak @ May 28 2004, 05:16 PM)
Is it possible to add also a standard -Y preset to the 3.90.3 lame dll mod?
This would be useful for me using a application to do scheduled recordings from radio.

New versions uploaded to Rarewares that include the option to set the 'Experimental Y' switch. smile.gif
naturfreak
QUOTE(john33 @ May 29 2004, 10:43 AM)
QUOTE(naturfreak @ May 28 2004, 05:16 PM)
Is it possible to add also a standard -Y preset to the 3.90.3 lame dll mod?
This would be useful for me using a application to do scheduled recordings from radio.

New versions uploaded to Rarewares that include the option to set the 'Experimental Y' switch. smile.gif

Thanks smile.gif
Never_Again
QUOTE(john33 @ May 25 2004, 08:49 AM)
OK, I think this is now fixed. There is a new dll here: <link snipped>

I'm pretty certain this is OK, but please let me know if it's not. ;)

re: PlexTools

john33, I've run some tests with the new DLLs, using --alt-standard (LamePreset=3 in the .ini).

The new INI versions are a noticeable improvement: there's little difference between the bitrates (and their distribution) of the PlexTool-ed files and their stand-alone-LAME-d counterparts. Also, the stereo mode is JS now. But the PlexTool-ed files have no LAME tag for some reason.

That may be the only difference. If you want a sample Plex-ed MP3 (or PlexTools itself, perhaps?) please let me know where, when and how.

Thank you very much for your efforts john33!
john33
QUOTE(Never_Again @ May 29 2004, 05:16 PM)
re: PlexTools

john33, I've run some tests with the new DLLs, using --alt-standard (LamePreset=3 in the .ini).

The new INI versions are a noticeable improvement: there's little difference between  the bitrates (and their distribution) of the PlexTool-ed files and their stand-alone-LAME-d counterparts. Also, the stereo mode is JS now. But the PlexTool-ed files have no LAME tag for some reason.

That may be the only difference. If you want a sample Plex-ed MP3 (or PlexTools itself, perhaps?) please let me know where, when and how.

Thank you very much for your efforts john33!

Glad it works. wink.gif Do PlexTools work with non-Plextor drives?
Never_Again
PlexTools' DAE function works with the Pioneer DVD-R drive I got here sitting alongside the Plex Premium. The install prog may check for the presence of a Plex drive though.
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.