Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: LAME + Dibrom\'s presets/switches + remarks (Read 39315 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME + Dibrom\'s presets/switches + remarks

ok...i have read and read and read trying to learn the technical details of the "--alt-presets" but i still have some questions:

1. what are the current switches in each of the presets [i.e. extreme, standard, and their "fast" counterparts].

2. could someone explain what the non-obvious switches do for those that aren't involved in programming/developing LAME

i think it would be a good idea, and probably save some newbie questions [not unlike this post, *tears*] to sticky all the information conceivably possible in regards to the "--alt-presets" and why these switches are used.  i don't desire "the history of the presets" just what they do in the current/recommended compile. also, differences in the "fast" and "non-fast" presets [i.e fast standard vs standard] would be GREATLY appreciated [why? because, well...they seem pretty much the same to me audibly]

3. and could somebody explain to me the reason for writing or not writing the Xing Header?

4. what is a good program for analysing mp3's [i.e. to see the differences between encoding switches and the quality they produce within the same sample] that is exhaustive...

5. can anyone REALLY hear a difference between a CD track and their LAME "alt preset standard/extreme" counterpart?


ok...now for some remarks


1. this forum is awesome, i am learning just a phenomenal amount of information in minutes/hours/etc.  thanks for this resource and don't let the "powers that be" get you down...[i.e. the official developers of LAME]

2. if LAME is open-source, and their are quite alot of people creating compiles, why is there still an "official" version...why not just release versions like "3.90dm1.1" and "3.90mitiok1.1" etc...this would clear up alot of confusion/egos/etc. and allow those that use certain aspects of LAME [i.e. dibrom's presets in dibrom's compiles] for those that desire them without all this feminine, drama...[damn flaccid ninnies]

3. to dibrom [and other devs w/ PM]: don't let this opposition worry you.  anyone who is even *slightly* knowledgeable in regards to encoding/LAME/mp3 would use this site as their primary resource for EVERYTHING [compiles/information/forum]...i am sure that the opposition derives from lowly emotions, "if you know what i mean"

4. in no way shape or form do i think that releasing 3.90.2 was in bad taste, disrespectful, unbecoming, etc. and all who think so have some sort of issues...as far as i am concerned compiles from this forum ARE the official versions and i use and inform others only of this site.

5. man, 700+ posts in a couple months...geesh Dibrom...why do i have such a comfortable feeling that this post will be responded to quickly...thanx, again...

i don't really expect a complete response to all of this...it was more to just post my questions/comments.  but responses to the questions would be greatly appreciated


and just a side note, it sucks having to "un-learn" everything from r3mix.net...man does that guy has issues...he seems like some sort of deluded fool after coming to this site, oh well...


issues, issues, issues, issues, and more issues...geesh

[btw...i have been reading these forums for about a month now, but this is my first post and i just registered not too long ago...i hope my questions seem more than retarded...just slightly more...]

LAME + Dibrom\'s presets/switches + remarks

Reply #1
Quote
Originally posted by xmixahlx
1. what are the current switches in each of the presets [i.e. extreme, standard, and their "fast" counterparts].
The actual switches are irrelevant. Due to use of code level tweaks the switches used are not comparable to normal use of external switches.
Just some special tweaks in alt-preset vbr settings:
- tweaked block switching threshold (short blocks/long blocks)
-Adaptive noise measurement (uses X3 when needed)
-Tweaked noise shaping functions (uses -h/-q2 but the use of scalefac_scale is more intelligently controlled)
-short block tweaks (bitrate, nsmsfix values)
etc.etc.
These and many other things can't be done with external switches, and the meaning of the swithces is not the same anymore.
Quote
2. could someone explain what the non-obvious switches do for those that aren't involved in programming/developing LAME
Define non-obvious..

Quote
also, differences in the "fast" and "non-fast" presets [i.e fast standard vs standard] would be GREATLY appreciated [why? because, well...they seem pretty much the same to me audibly]
The tweaks used are mostly samekind for fast and "non-fast", but the implementation is a bit different due to different vbr-mode used. (fast uses vbr-mtrh, non-fast uses vbr-old)

Quote
4. what is a good program for analysing mp3's [i.e. to see the differences between encoding switches and the quality they produce within the same sample] that is exhaustive...
There is no good programs for that. EAQUAL ITU-R BS.1387 based PEAQ software certainly isn't very reliable method to rate high quality files.

Quote
5. can anyone REALLY hear a difference between a CD track and their LAME "alt preset standard/extreme" counterpart?
Depends on the track, but it certainly is possible.
Quote
5. man, 700+ posts in a couple months...geesh Dibrom...why do i have such a comfortable feeling that this post will be responded to quickly...thanx, again...
Dibrom is in the middle of moving to another apartment. Hopefully he will be back again soon..
Juha Laaksonheimo

LAME + Dibrom\'s presets/switches + remarks

Reply #2
thank you JohnV for responding to my post, and thanx for your comments...

from JohnV: Define non-obvious..
 
well, if i knew the commandline i could explain what i mean better...but switches like bitrate and quality and vbr modes i understand, but things like npsytune? what is that? and why use a lowpass when you can just encode the whole file? doesn't that produce an inexact "replica"?


from JohnV: ...(fast uses vbr-mtrh, non-fast uses vbr-old)

i understood this to be the main difference between the two modes, but on my comp [with both standard and extreme] "non-fast" does ~2x-2.5x but "fast" does ~3.5x-4x so i guess my question was..."why use non-fast when fast is 75% faster?" and "is the only significant difference between the two modes the vbr setting used?"

NOTE: with sgt pepper's track 13 [dog whistle] doe s this sample indicate that the vbr-mtrh is a more accurate than the standard mode vbr-old?

my question about using fast or non-fast came from my re-encoding, and encoding alot of my cd's to generate mp3 cds and when using fast and non-fast settings, the files were very similar but the time difference was extreme...thus my inquiry of the differences...

fast-extreme/extreme produced ~240kbs average
fast-standard/standard produced ~195kbs average

but i don't think my ears are "good" enough to tell much of a difference...if i can tell of any

and also...are there any settings that are widely used in addition to the "--alt-preset" switches? [e.g. "--alt-preset fast standard -X...etc."]

thanx again JohnV...

LAME + Dibrom\'s presets/switches + remarks

Reply #3
Quote
Originally posted by xmixahlx
thank you JohnV for responding to my post, and thanx for your comments...

from JohnV: Define non-obvious..
 
well, if i knew the commandline i could explain what i mean better...but switches like bitrate and quality and vbr modes i understand, but things like npsytune? what is that? and why use a lowpass when you can just encode the whole file? doesn't that produce an inexact "replica"?


To start off, FAQs are in the planning, they just haven't been implemented due to a lack of time yet.  I'm hoping that can change soon.

As for non-obvious switches, I'd request that you ask on a switch by switch basis to make it easier to respond.  In regards to the ones you mentioned:

--nspsytune uses a different psymodel than the one defaulted by LAME.  In fact, it is the same psymodel but modified and improved.  It usually performs better in the area of joint stereo handling, noise measuring, pre-echo, dropout prevention, etc.  I use --nspsytune and then build upon it with my own modifications, further improving it, to provide a better overall psymodel than what LAME normally uses.

A lowpass is used to save bits.  MP3 will never provide an "exact replica" so in regards to that, the issue is moot to start with.  A more ideal solution however would be to use an adaptive lowpass (using different frequency cutoffs per frame).  Maybe this will be implemented in LAME at some point, but I don't know.

Quote
from JohnV: ...(fast uses vbr-mtrh, non-fast uses vbr-old)

i understood this to be the main difference between the two modes, but on my comp [with both standard and extreme] "non-fast" does ~2x-2.5x but "fast" does ~3.5x-4x so i guess my question was..."why use non-fast when fast is 75% faster?" and "is the only significant difference between the two modes the vbr setting used?"


Because vbr-old is still on average, higher quality than vbr-mtrh.  This assertion is based on extensive testing of difficult clips with and without my custom modifications implemented.

It is true that the quality difference is usually small to unnoticeable but given the fact that I'm already trying to tune quality down to such a precise level, it doesn't make sense to forsake a higher quality option.  At the same time, I realize that this last little extra bit of quality may be irrelevant to some and that they would prefer speed instead... thus you have a choice

Quote
NOTE: with sgt pepper's track 13 [dog whistle] doe s this sample indicate that the vbr-mtrh is a more accurate than the standard mode vbr-old?


Apparently so.  This is not directly related to the vbr modes themselves though (I think), but instead to another code level difference between --alt-preset standard and fast standard.

At any rate, the difference seen here is, in my experience, not indicative of common behavior.  Obviously there will be a case or two where fast standard is better, but it's the average that is more important here, and it is the average that the normal standard mode has, again in my experience, performed slightly better.

Quote
and also...are there any settings that are widely used in addition to the "--alt-preset" switches? [e.g. "--alt-preset fast standard -X...etc."]


Nope, and there shouldn't be.  Many of the experimental switches do not perform in the same manner with the --alt-preset switches as they do without.  Furthermore, the --alt-preset switches are constantly updated to prevent this sort of situation from becoming a necessity.

LAME + Dibrom\'s presets/switches + remarks

Reply #4
thanx for your responses JohnV and Dibrom, that cleared up alot of [mis]information that had somehow escaped me in my individual reading, etc. [re: npsytune, lowpass, fast/non-fast]

some follow-up questions/remarks:

regarding lowpass:
i realize that mp3 is lossy, thus encoding will not produce an exact file - only a very similar one, but what is the advantage of then using a filter which chops off frequencies, such as the lowpass? is it a large difference in size? bitrate? or just that MOST people won't be able to hear these frequencies?

regarding the sgt. pepper dog whistle sample [again, sorry]:
is this a situation where the lowpass failed to produce an acceptable encoding? or was it the fault of another switch?

regarding experimental switches:
i ask this because on many of the forums which i have visited, there are countless many who swear by thier ridiculously exhaustive parameters in the commandline, and i have seen people swearing by their "--alt-preset extreme -X -Z" or whatever but it seemed to me that if these switches were so good, they would be included in the original parameters of the alt-presets

one particular post comes to mind where CiTay [sp?, sorry] took one guy's 15 or so switches in his "custom commandline" down to about 4 which actually yielded at most acceptable results...makes you wonder what these people are thinking????  my original question was just to see/know if the community was using additional parameters...thanx for clearing that up


and lastly: why is the r3mix.net site/forum chock full of so many inaccuracies [e.g. BLATANT LIES]?  i thought that this was one of the primary resources for mp3/encoding information?  somebody has issues...

thanx for putting up with my crap...i appreciate it.

LAME + Dibrom\'s presets/switches + remarks

Reply #5
Quote
Originally posted by xmixahlx but what is the advantage of then using a filter which chops off frequencies, such as the lowpass? is it a large difference in size? bitrate? or just that MOST people won't be able to hear these frequencies?
Well, it's very common to hear over 19khz sine wave in hearing test, but it's totally different to be able to distinguish 19Khz lowpassed music from original. So with vbr presets it's used to reduce the bitrate/size.
At lower bitrates - especially with cbr - using lowpass may be essential so that lower frequencies (more important for the quality) can get enough bits.
Quote
regarding the sgt. pepper dog whistle sample [again, sorry]:
is this a situation where the lowpass failed to produce an acceptable encoding? or was it the fault of another switch?
No, this is not a lowpass issue. Both fast standard and standard use the same lowpass, but fast sounds better here (which is certainly an exception).

Quote
regarding experimental switches: i ask this because on many of the forums which i have visited, there are countless many who swear by thier ridiculously exhaustive parameters in the commandline, and i have seen people swearing by their "--alt-preset extreme -X -Z" or whatever but it seemed to me that if these switches were so good, they would be included in the original parameters of the alt-presets
Well, alt-preset vbr modes use different -X modes and -Z switch more intelligently than was possible before. Before this, these were either enabled or disabled (or only one -X mode like -X3 was in use). Now the use is actually dynamically controlled depending on the need.
To fully understand what -X modes and -Z actually do in practise, you need to know something about mp3's quantization process in general.

-X modes are used to search for good quantization (the least audible noise). Different X modes define which criterions are used for that procedure.

-Z is a switch which is used to change between "noise shaping type 1" and "noise shaping type 2". When type 2 is used, it leads often to more use of scalefac_scale. When scalefac_scale is used, the quantization noise allocation (noise shaping) is more dynamic (*), and because of that, it can lead to audible artifacts in some special cases. The reason why type 2 is used is of course to reduce the needed bitrate. Dibrom's alt-preset vbr modes are changing adaptively between type1 and type2 depending on the situation.




(*)
MDCT coefficients are grouped into scalefactor bands aka SFBs. SFBs (21 for long blocks) cover the full frequency range and follow the spreading of human hearing critical bands. Quantization noise for each SFB is controlled with quantization stepsizes->the larger the stepsize of given SFB the more quantization noise for given SFB. Stepsizes are controlled with scalefactors. Scalefactors are used to reduce the stepsizes. There is one scalefactor for each SFB, except for the last SFB there isn't, which is an issue (not good) of MP3 standard..

When "noise shaping type 2" is used, it happens more often that scalefactors are multiplied by 2 (scalefac_scale), thus leading to increase of dynamics of stepsize reduction control. As much quantization noise is introduced per SFB as is allowed by masking for a particular SFB. When a scalefactor (which controls the reduction of quantization stepsize) is multiplied by 2, it means that there's more room/dynamics to control the stepsize value reduction, which may lead (in rare cases) to situations where stepsize is not small enough because the masking threshold may not be precisely calculated and/or noise quality measurement (-X) thinks quantization is good enough or bits just run out.

Noise shaping and quantization loop tries to find the lowest audible noise depending also on -X modes which define the criterion for "good enough" quality, which means the search for best quantization (hopefully least amount of audible quantization noise) ends for given SFB MDCT coefficient group and next quantization loop for next group of samples takes place. The criterions are listed at the bottom of this page:
http://www.mp3dev.org/mp3/doc/html/switchs.html
Juha Laaksonheimo

 

LAME + Dibrom\'s presets/switches + remarks

Reply #6
***EDIT : the information in this post is outdated : more problem samples have been found that are solved with -Z, that was thus included in the standard preset in Lame 3.90.3
See http://www.hydrogenaudio.org/forums/index....7783#entry77436 ***

Quote
Originally posted by xmixahlx regarding experimental switches:
i ask this because on many of the forums which i have visited, there are countless many who swear by thier ridiculously exhaustive parameters in the commandline, and i have seen people swearing by their "--alt-preset extreme -X -Z" or whatever but it seemed to me that if these switches were so good, they would be included in the original parameters of the alt-presets


JohnV about covered the rest, but I'll just add a small comment here about this issue.  First, the --alt-preset switches have been tuned to a level to where -Z is no longer needed.  In every single case where it has caused issues in the past, the new adaptive mode takes care of the problem.  This includes clips like fatboy, spahm, them, etc... quite a lot.  There may be one possible exception with this dog whistle sound clip, but I haven't listened to it yet so I can't say for sure.  It may be easily fixed if there is an issue.. but realize this is only one sample.. not a handful... and one could say that the clips which have proven to be the hardest to encode are already addressed (fatboy, etc).

If you see people using switches like --alt-preset -Xx -Z, then they don't know what they are doing.  I can promise you this.  The possible exception is if they are LAME developers, but even then I don't know any of the other developers who are quite familiar with how my presets are tuned to work.  Changing the -X mode is a very bad idea especially.. and by specifying -Z you may end up degrading quality in cases as well.  As I've said before, experimental switches do not work the same way with the --alt-presets as they do with other settings and unless the person has some inside knowledge of LAME or understands the source code and what the --alt-preset modifications are used for (doubtful unless they have talked to me directly and asked me why I made each specific change) they shouldn't be using or recommending the use of other experimental switches with these presets.

In the past there have been many cases where people just use switches and have really no concept of what they do.. now more than ever, seeing the type of situation you mentioned really shows this to be the case.

Another thing to be aware of though is when the posts you speak of were made.  My more advanced modifications to the presets has only come about fairly recently so it could be the posts that you are seeing are simply out of date and that at one point may have had some merit, but due to changes in the code, are no longer meaningful.

LAME + Dibrom\'s presets/switches + remarks

Reply #7
thanx again boys...

regarding my sticky post [about the --alt-presets information]:

i thought this would be useful in jumpstarting the newbies/non-developers into becoming more helpful in the LAME/mp3 community...i think that some don't ask questions cause they don't want to feel stupid or whatever, and that this would help fuel their initial questions...

these posts have helped me tremendously

later

LAME + Dibrom\'s presets/switches + remarks

Reply #8
I'm confising:
Can / Should I add some switches to *--alt-preset*?e.g.*--alt-preset standard* => *--alt-preset standard -b128 -q0*.

LAME + Dibrom\'s presets/switches + remarks

Reply #9
Quote
Originally posted by Aaron_Law
I'm confising:
Can / Should I add some switches to *--alt-preset*?e.g.*--alt-preset standard* => *--alt-preset standard -b128 -q0*.


Yes you can do this, but no you shouldn't do this

-b128 is defaulted and -q0 does not increase quality, instead decreasing speed by 40-400% and allowing for a possible reduction in quality, only gaining around 2kbps or so in bitrate savings.

LAME + Dibrom\'s presets/switches + remarks

Reply #10
Quote
Originally posted by Aaron_Law
I'm confising:
Can / Should I add some switches to *--alt-preset*?e.g.*--alt-preset standard* => *--alt-preset standard -b128 -q0*.


The only switch I believe can be used with the alt-presets, is the --lowpass switch (i.e. --lowpass 18), in order to avoid encoding high frequencies and thus saving bitrate. Use of -Y  switch is also safe, is just another way of avoiding encoding high frequencies over 16 KHz, more or less.

LAME + Dibrom\'s presets/switches + remarks

Reply #11
Quote
and just a side note, it sucks having to "un-learn" everything from r3mix.net...man does that guy has issues...he seems like some sort of deluded fool after coming to this site, oh well...

That post was right out of my heart  :-)

Also, it seems to be the way people go: Just an encoder, use LAME, work with switches, read about them, work more, finally find r3mix and others, believe that, begin to tweak them, getting confused, finding Hydrogen Audio, getting answers, producing stupid questions, getting more answers, beeing reverted, then satisfied (finally - that last point is where i want to be, im still at "stupid questions")

:-)

Maybe it would be a good idea to delay people´s ability to *directly* post after registration!
Such a feature can stop too fast questions and help people to learn and read before they begin to post ;-)

Now i need to read all the answers to you post ... Bye!
3.90.3 --alt-preset extreme -V0 --lowpass 20.5 -> yeah!
"extremist of extreme", johnV @ Sep 13 2002 - 02:01 PM  ;-)

LAME + Dibrom\'s presets/switches + remarks

Reply #12
"Holy thread resurrection, Batman!"

LAME + Dibrom\'s presets/switches + remarks

Reply #13
citay, you make me laugh

omg...
this thread is 2+ years old

this brings back memories...

later