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: Does adding -q0 to -b320 improve quality in LAME 3.99.5? (Read 41997 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #25
I can't see any problem its only encoding time. Its illogical thinking that higher quality slower algorithms are worse -  I think on some samples there will be improvements .  In my next round of testing I'll compare default q3 cbr to -q1 / 0 on some problem samples and report back.

 

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #26
Until you or someone else tests the proposition, talking about how you think one thing and expect another is not going to get anyone anywhere.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #27
People have said "Its illogical thinking that higher quality slower algorithms are worse" and "I cannot see why q0 would not provide higher quality in some cases. Its more analysis and with cbr/abr that's a good thing" but is q0 buggy?

I'm not bothered about file size or encoding time, I just want to use the settings that have the highest chance of providing transparency all the time.

I don't really subscribe to this idea of "it's whatever you find to be transparent, if you can't tell the difference between lower and higher bitrates and quality settings, then the higher bitrates and quality settings are not better".  What if I'm playing music to one of my friends and they can tell the difference?

Again, I'm not bothered about file size and encoding time, I just want to use the settings that provide the best quality that Lame is able to offer.  People might now scream at me "well that's obviously -b 320 -q0" but not if q0 is buggy, experimental and untested.

I just want the best quality Lame is able to provide.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #28
I can't see any problem its only encoding time.

Are you sure about that?  Others talking about the actual code seem to tell a different story.

Its illogical thinking that higher quality slower algorithms are worse

Basing hard conclusions on gross oversimplifications is more logical?

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #29
I don't really subscribe to this idea of "it's whatever you find to be transparent, if you can't tell the difference between lower and higher bitrates and quality settings, then the higher bitrates and quality settings are not better".
Fair enough. But most other members here do.

Quote
What if I'm playing music to one of my friends and they can tell the difference?
Then what matters is whatever they find to be transparent; if they cannot tell the difference between lower and higher bitrates and quality settings, then the higher bitrates and quality settings are not better. Or they can evaluate whether -q0 is better in the newest version of LAME using systematic blind testing as suggested earlier. I fail to see what has actually been changed by you introducing a hypothetical third party into the equation.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #30
What if I'm playing music to one of my friends and they can tell the difference?

Then your friend is in a unique position to do more than just speculate as to how many angels actually are dancing on the head of that pin.

Since we're entertaining hypotheticals, what if your friend found that certain passages sounded better with one setting while others sounded better with a different setting?

Quote
I'm not bothered about file size and encoding time

I wouldn't be either if bigger and slower actually gave such assurances.

FWIW, I'm pretty sure the forum has seen examples where VBR made an improvement over 320 CBR.

Quote
People might now scream at me "well that's obviously -b 320 -q0" but not if q0 is buggy, experimental and untested.

I hate to break it to you but don't be surprised to find out that none of the q settings have actually been tested.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #31
I fail to see what has actually been changed by you introducing a hypothetical third party into the equation.

What I should have said was I don't subscribe to this idea of "it's whatever you find to be transparent, if you can't tell the difference between lower and higher bitrates and quality settings, then the higher bitrates and quality settings are not better" because I don't care if even I can't tell the difference between the settings, I just want the piece of mind of knowing that I am getting the best quality that is possible with Lame, with the least chance of getting any artifacts (using whatever settings would achieve that, not necessarily q0).

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #32
Yet again: Define how something can be higher quality than transparent. And how will you know that this trend will hold for all possible input samples? Sorry, but the sort of conclusive answer you want is very unlikely to exist in reality.

And again: Answering the question with any degree of usefulness would require, at a minimum, systematic double-blind testing of LAME 3.99.5 with various input samples and output settings. I am not aware of anyone having done so. Thus, it seems, we continue to speculate about vague suspicions that remain unverified.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #33
Peteharrison, sounds like you would prefer using a lossless codec.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #34
Peteharrison, sounds like you would prefer using a lossless codec.


There are some situations where users might desire the highest possible quality out of LAME, regardless of file size or how long the process takes. And an example of that could be a car stereo, or a home stereo that supports MP3 but does not support lossless formats.
Consider the following:
1) The user "wants" lossless but the device doesn't support it.
2) The user is worried that what he may find transparent, another person might find artifacts. A probability that is increased the more people are added to the equation. Thus the concept of adding a cushion or safety margin by selecting a higher bitrate. (or higher quality settings)
3) The goal is to pick encoding settings that would satisfy the audio perception of the highest amount of people possible. Without considering file size or compression time, because those people will not be able to see the file size and will not be able to tell how much time it took. They would just be listening.

So the question sums up to: Is there a point that regardless of file size and time, there is a reverse effect on quality. That can be asked of the bit rate chosen and the algorithm path chosen.

Out of a large test group, is it safe to say that the higher the bit-rate, the larger the percentage of people that will find the encoding transparent. And that the statement holds true for the entirety of the bit rate scale, without exceptions.

Now the same question should be asked for the Q settings. For a large test group, is it safe to say that the lower the Q value, the larger the percentage of people that will find the encoding transparent? And does the statement hold true for each possible value of q, without exceptions. If not, for which values of Q does the statement not hold true.

Note that diminishing returns is not factored into this perspective. It may very well be that FOR EXAMPLE the percentage of people that find (-b 320) transparent is 99% and that lowering Q value changes it to 99.000001%, but you are still gaining something. I would be worried if the percentage would reverse itself (eg: 98%)

I Know that the correct answer would require extensive blind-testing by a large population. Just wanted to give me interpretation of the question.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #35
Well stated.

It isn't as if this is a unique question. It has been asked here many many times over, just ask skip252.

There is no extensive testing and there likely will never be any.  The example isn't real and IMO the expectation it poses is unreasonable.

Regarding listening in a car, whatever the real numbers are in the "example" given, they will change depending on the listening environment, hardware and source material.  It bares repeating that the "best" settings can change as well.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #36
People have said "Its illogical thinking that higher quality slower algorithms are worse" and "I cannot see why q0 would not provide higher quality in some cases. Its more analysis and with cbr/abr that's a good thing" but is q0 buggy?

I'm not bothered about file size or encoding time, I just want to use the settings that have the highest chance of providing transparency all the time.

I don't really subscribe to this idea of "it's whatever you find to be transparent, if you can't tell the difference between lower and higher bitrates and quality settings, then the higher bitrates and quality settings are not better".  What if I'm playing music to one of my friends and they can tell the difference?

Again, I'm not bothered about file size and encoding time, I just want to use the settings that provide the best quality that Lame is able to offer.  People might now scream at me "well that's obviously -b 320 -q0" but not if q0 is buggy, experimental and untested.

I just want the best quality Lame is able to provide.



For the highest quality I'd use -V0 or halb27's variant . VBR may have the edge on preecho these days even against -b320. I advise against b320 unless you have some vbr compatibility issue as its not gonna solve certain cases.  If you can use something other than mp3 go for mpc Q6 / 7 or vorbis Q7. These will give 200..230k vbr with better efficiency than mp3 320k

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #37
For the highest quality I'd use -V0 or halb27's variant . VBR may have the edge on preecho these days even against -b320. I advise against b320 unless you have some vbr compatibility issue as its not gonna solve certain cases.  If you can use something other than mp3 go for mpc Q6 / 7 or vorbis Q7. These will give 200..230k vbr with better efficiency than mp3 320k

Hmmm but the wiki seems to suggest that -b 320 might have the edge over V0 as it says "-b 320 is an alternative to the VBR settings above.
This CBR mode will maximize the MP3's bitrate and overall file size. The extra space may allow for some parts of the audio to be compressed with fewer sacrifices, but to date, no one has produced ABX test results demonstrating that perceived quality is ever better than the highest VBR profiles described above."

Yeah, it says no one has produced ABX results to demonstrate -b 320 is better but it does seem to suggest that -b 320 could have the edge over V0


Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #39
@peteharrison86 I think you should check on the documentations about VBR encoding. Even Lossless Compression uses VBR algorithm.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #40
If you ask me (which no one did ) I would like to see how low of of bit-rate I can get away with without noticing lossy artifacts. With LAME, I would use -V5 or -V3. Once I depended on a portable player that did not implement VBR correctly I said  to hell with CBR MP3 at 192/256/320kbps and moved on to AAC. It is not a major issue for me since I have the lossless source material.

In the current discussion, it seems to me the opposite is happening: the OP appears to want transcodes that are future-proof. This is not realistic. Even if one were to examine and identify the ultimate -q setting, there is a better/more precise/transparent successor to follow within a couple years time (thanks to users like HA's founders and many users including halb27).

I can not imagine any tangible shortcomings of -b 320 despite the warm-fuzzy feeling of using slower settings. As long as the original source files are available, one can simply re-encode those affected albums/tracks at -q0/etc and feel reassured.
"Something bothering you, Mister Spock?"

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #41
If you ask me (which no one did ) I would like to see how low of of bit-rate I can get away with without noticing lossy artifacts. With LAME, I would use -V5 or -V3. Once I depended on a portable player that did not implement VBR correctly I said  to hell with CBR MP3 at 192/256/320kbps and moved on to AAC. It is not a major issue for me since I have the lossless source material.

As a casual user, I would tend to agree with this.  Before I knew any better I started "archiving" my CD collection using MP3s, then after learning the error of my ways switched to FLAC.  -V4 or so is fine for me nowadays.


It's simply impossible to find the "best" i.e. "most universally transparent" settings in LAME.  The amount of empirical evidence that would have to be amassed - in finding enough listeners, enough hardware sets, enough environmental conditions, and enough audio samples to adequately answer the question - approaches infinity.  That's why the experienced users on this board are urging that you focus on what is transparent for YOU, or common co-listeners, alone.
That said, as others have stated it's generally accepted in LAME that
(1) at high bitrates, VBR typically exceeds CBR or ABR in transparency.  This is because extra bits can be reserved for difficult-to-encode sections such as sharp attacks or those that would cause preechoes.
(2) halb27's variant seems to address many problematic samples better than LAME 3.99.5.  That said, LAME 3.100a2 also seems to do so.  Combining the two may be even better but I think the jury's still out on that one.
(3) There is a LOT of discussion on what to do about the upper frequencies.  Some insist that they need to be encoded accurately; others insist on a severe lowpass filter, and many (such as myself) end up in somewhere in between.
(4) the settings most likely to produce transparency in compliant MP3s** may be along the lines of -V0 --cvbr 0 -Y --lowpass -1 in halb27's 3.100m variant.  But be warned that this is a relatively untested variant of an alpha build.
(5) Note I didn't include -q0.  It is implicit in -V0 --cvbr 0.


**In my opinion ONLY, of course, and with no empirical evidence to back it up.  Per point 3, a lot of people would take issue at the -Y or --lowpass -1 switches.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #42
Wow, I think this is the third popular topic I've killed this week.  Either that, or I'm just slow to respond.

Would be interested in other thoughts on points (3) through (5) above.


Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #44
I found this thread interesting.

I have been using -b 320 -q 0 recently because:

1) In the past LAME MP3 has not always been transparent to me even using preset extreme, so I use whatever the highest setting is regardless of if an improvement over relatively lower bit rates has been proven or not.
2) Unfortunately FLAC does not work on everything as previously stated.
3) This setting still only takes up a fraction of the size of lossless, so I can fit more songs on my old 16 GB Cowon DAP for example. I do not not know why people always assume "archiving" just because it is a high bit rate.

So far this setting is transparent to me so that is pretty darn cool. IIRC the last time I ABX'd a CBR 320 file was with an significantly older version of LAME.

I might post some hopefully successful listening tests of somewhat lower bit rates if I find the time to do them, but most of the members of this forum have a scary attitude so I hesitate to do so.












FLAC -> JDS Labs ODAC/O2 -> Sennheiser HD 650 (equalized)

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #45
I found this thread interesting.

I have been using -b 320 -q 0 recently because:

1) In the past LAME MP3 has not always been transparent to me even using preset extreme, so I use whatever the highest setting is regardless of if an improvement over relatively lower bit rates has been proven or not.

So far this setting is transparent to me so that is pretty darn cool. IIRC the last time I ABX'd a CBR 320 file was with an significantly older version of LAME.


Greynol is correct, we're getting off-topic here.  Perhaps a spin-off to discuss "LAME settings most likely to be universally transparent" is in order.
That said, if you are truly looking for "whatever the highest setting is regardless...", I'd highly recommend you try the settings I suggested 3 posts above with halb27's 3.100m LAME variant.  The bitrate would still be close to 320 (around 318 in my tests) yet LAME makes better use of the available space.  That means difficult-to-encode sections actually will exceed 320kbps while easier sections will take less space.  This is opposed to the -b 320 behavior which gives every section 320kbps regardless of difficulty - meaning difficult sections don't get enough, and easy sections get too much.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #46
That means difficult-to-encode sections actually will exceed 320kbps while easier sections will take less space.

Are you sure about this? For all I know, standard mp3 format is unable to handle frames above 320kbps maximum bitrate.

I think -q0 doesn't do any harm. It's definitely much slower but on modern PCs it'n not a big deal especially one doesn't encode bunch of discographies. Maybe it doesn't give plus audible quality but maybe it does. So -b320 -q0 provide the theoretically highest possible mp3 quality, higher than V0 (which automatically uses q0 setting).

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #47
@Roscoe: This thread precisely wants to avoid making the statements you've made.


In lossy codecs, the theory does not always translate to reality. We agree that q0 can offer (as in possibility of) higher quality, due to an increase of quality thresholds versus q3, and due to an extra loop that checks different scenarios to choose the best one.

What is said is :
q0 by itself does not necessarily mean higher quality, because it might choose the same data than q3.
q0 is not as much tested as q3, so there is the possibility (although there is no proof of this for the current version) that decides incorrectly.
q0 might increase the theoretical quality, of something that is already transparent, so providing no audible benefit.

Even if it might sound counterintuitive, q0 is better suited for low bitrates rather than high bitrates, because then every tiny bit counts more.

VBR does not use -q0. It uses a different process so it would find no use of what -q0 does.


Finally, the quote about 320kbps is partially true. The format has a limited set of frame sizes, which, when added up to one second of audio, represent the different bitrates. Changing the frame size from one frame to another is what ABR and VBR do, but there is also one thing called "bit reservoir".
Bit reservoir is a mechanism in which unused bits of the previous frame can be used as bits for the next frame. So two consecutive "320kbps" frames could actually be "220kbps" and "420kbps". (I put quotes because the actual frame size is way less than that).

With VBR, this is not as much needed as in CBR, because packets can adapt easily, but that's why conceptually, one could have more data in one precise moment than the limit of the frame.
Probably this explanation is more in favour of CBR, but bit reservoir is quite more strict than what VBR can do when choosing different frame sizes.

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #48
q0 might increase the theoretical quality, of something that is already transparent, so providing no audible benefit.

I agree. That's what I said too.

VBR does not use -q0. It uses a different process so it would find no use of what -q0 does.

My encoder disagrees:
Quote
e:\>lame -V0 --verbose bla-bla.wav
LAME 3.99.5 32bits (http://lame.sf.net)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
polyphase lowpass filter disabled
Encoding bla-bla.wav to bla-bla.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=0)


Finally, the quote about 320kbps is partially true. The format has a limited set of frame sizes, which, when added up to one second of audio, represent the different bitrates. Changing the frame size from one frame to another is what ABR and VBR do, but there is also one thing called "bit reservoir".
Bit reservoir is a mechanism in which unused bits of the previous frame can be used as bits for the next frame. So two consecutive "320kbps" frames could actually be "220kbps" and "420kbps". (I put quotes because the actual frame size is way less than that).

With VBR, this is not as much needed as in CBR, because packets can adapt easily, but that's why conceptually, one could have more data in one precise moment than the limit of the frame.
Probably this explanation is more in favour of CBR, but bit reservoir is quite more strict than what VBR can do when choosing different frame sizes.

I'm afraid I don't get your point fully. Do you claim that VBR is better for having up to 420kbps for difficult parts? Doesn't CBR use constant bitrate and constant frame size?

Does adding -q0 to -b320 improve quality in LAME 3.99.5?

Reply #49
My encoder disagrees:
(q=0)

I was going to change that a couple of days ago, because I have always had the impression that it is confusing. That "q" means the value indicated to -V, i.e. -V1 will show q=1, -V2 will show q=2 and so on.
If you use the --vbr-old switch (or a LAME version previous to 3.97), you will see that then, it shows VBR(q=x) qual=y , where y is the -q setting.


I'm afraid I don't get your point fully. Do you claim that VBR is better for having up to 420kbps for difficult parts? Doesn't CBR use constant bitrate and constant frame size?


That's what I was trying to explain. The frame size is fixed, but part of the bits inside frame A can be used for a frame B that comes after A.
VBR is able to use bit reservoir as well, and does it, but generally it needs much less reservoir because it can adapt the frame sizes.