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: lame3995n (Read 14934 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lame3995n

What is lame3995n?

It's an extension to Lame 3.99.5.
Other than with my recent variants it does not focus on a constrained vbr mode. In the first place it improves upon known issues with standard Lame.

Issue Class 1

a) For the first long block after a series of short blocks the psy model is lacking information. This can have an audible effect as with the 3.2 sec. issue of the eig sample.
b) Long blocks are used for tonal parts in the music. It can happen with a long block that the music isn’t pretty tonal. This is the case for the lead-voice sample for which Lame behaves badly.

lame3995n takes care of both issues. Just choose your -V level the usual way and you’re done.
For -V5, -V4, -V3, -V2, -V1, -V0 it comes at an extra cost of about 1 kbps. lame3995n -V2 takes 191 kbps for my test collection of various pop music (versus standard Lame -V2’s 190 kbps).

Issue Class 2

a) The quality of harpsichord music falls behind that of other music. See for instance the last 128 kbps mp3 listening test: the only sample with a result below 4.0 was a harpsichord sample (the vast majority of samples was rated ~4.5 or better which is great IMO for a 128 kbps setting). Worst sample I know for this kind of problem is harp40_1.
b) Very tonal parts in the music can have a bad quality. herding_calls and trumpet_myPrince are examples for this.

The quality of the samples mentioned is bad to my ears at -V5 (standard Lame or lame3995n -V5). It is for such samples that I will never be a -V5 user.
Quality scales well when going from -V5 to -V3. At -V3 I’d call the quality of these samples acceptable. Above -V3 quality doesn’t scale very well, at least to my ears.

I created a new -Q parameter to improve upon the situation (apart from the improvements related to issue 1 which the -Q setting takes care of as well).
-Q3, -Q2, -Q1, -Q0.5 yield the same average bitrate as -V3, -V2, -V1, -V0.
-Q3 is the lowest possible -Q quality setting, -V1.7 has an average bitrate of 200 kbps, -Q0 takes 317 kbps on average
(all for my test set of various pop music). So the extremly cautious have their setting too. With the extremely high bitrate settings lame3995n behaves more or less the way lame3995m does.

Using -Q3 I can still ABX the samples mentioned. Quality is very accepable to my ears however, at least for herding_calls and trumpet_myPrince. In any case to my ears quality is better than that of -V3 (standard Lame or lame3995n).
Using -Q2 herding_calls and trumpet_myPrince are transparent for me whereas the -V2 results are easy to ABX. The harp40_1 -Q2 result is better than the -V2 result though not transparent.
Using -Q0.5 harp40_1 is still not transparent though better than the avg.bitrate-equivalent -V0 result.
Using -Q0 I couldn’t ABX harp40_1 (with an amount of ABXing effort I call reasonable - I don’t do exhaustive ABX sessions any more).

I care most about minor quality for very tonal parts in the music. I am afraid that this can occur not only for special problem samples likes those mentioned. That’s why I derive a tonality factor from the psy model and control accuracy demand according to this. This is done not only by the constrained vbr mechanism I used before but also by varying the -V level parameter masking_adjust which controls accuracy the most among the -V level related parameters. So in a sense I use a dynamic -V level mechanism. Even with -Q3 masking_adjust can get at a value higher than that of -V0.

My care for tonal problems has a background. Whenever I checked an encoded file because it didn’t sound fine at a spot I usually found that the issue was with the original. With an exception: I was able to ABX a spontaneously found suspected spot with Camille’s song ‘Là ou je suis née’ (at ~ sec. 45 in the original file resp. ~ sec. 8 in the samples folder file provided with lame3995n).
I just redid the ABXing successfully using -V2. I was not able to do so using -Q2.
It isn’t a big issue, acceptable at -V2, but what bothers me is that I found it by ‘normal’ listening to the music, not by intensively searching for an issue.

Installation


lame3995n.exe uses the fast and lossless mp3packer tool internally to squeeze the otherwise unused bits out of the mp3 file. You can download mp3packer from
http://www.hydrogenaudio.org/forums/index....st&p=282289

Put mp3packer.exe into the same folder where lame3995n.exe is located.
Many thanks to Omion for this great tool.

In case there is no mp3packer.exe in lame3995n.exe’s folder lame3995n.exe will work, but the mp3 files will be somewhat larger than necessary.
lame3995o -Q1.7 --lowpass 17

lame3995n

Reply #1
Maybe I'm too tired but... Where's the download link?


lame3995n

Reply #3
Oops,  seems like I was too tired when posting.

Thanks, Kamedo2, for providing it. Well done!
lame3995o -Q1.7 --lowpass 17

lame3995n

Reply #4
If -Q3, -Q2, -Q1, -Q0.5 yield the same average bitrate as -V3, -V2, -V1, -V0 then why can't the encoder just automatically use the correct Q setting when the corresponding V setting is used?

lame3995n

Reply #5
This would mean I would have only one VBR mode.
The Q-mode has another quality characteristics: it focuses on certain hard-to-encode spots in the music to get at a more adequate quality for them relative to the avg. bitrate chosen. Nothing is known about the quality relative to the corresponding -V-mode for easy-to-encode spots. The design of the Q-mode is such that quality can't degrade much compared to the corresponding V-mode, but in theory quality can be a little bit lower. There can also be a quality improvement, we simply don't know. I personally don't care about that as quality of easy-to-encode spots is great anyway.
But for those who fear the deviation from the V-mode more than the benefits there is still the traditional V-mode, and it comes here with the improvements for issue class 1.

Besides there is no bitrate corresponding -V setting for -Q values between 0.5 and 0.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #6
Halb, can you port this tools into x64?
Reason: maybe to use full potential of x64 intruction  :P or maybe.. I don't know...

About Q, it work good with my alanis music rather than the old 3995m.
Since mp3 can not do good with my alanis, i had to used aac.

Re: lame3995n

Reply #7
I once tried to compile a x64 version with one of my variants. I tried hard but was not able to get one for whatever reason.

I had another problem when compiling lame3995n I could not resolve with the VC++v10 compiler. Currently I have various problems with my pc system so I guess I will switch to Windows10 soon. I installed VC++v9 and happend to compile lame3995n with it. I can do another trial getting a x64 version with it, but give me some time for it as I am pretty busy wth other things at the moment.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #8
give me some time for it as I am pretty busy wth other things at the moment.

Thanks, I will be patient...
For me, it just great there is someone still continue this project. Otherwise it dies in the wilderness. ;D

Re: lame3995n

Reply #9
Is the -Y switch supported anymore?

Re: lame3995n

Reply #10
You can use -Y if you want to.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #11
Wow. It's been a while since the last time visited here. Anyways, halb27 do you have any plan to bring this extension over lame3100a?

Re: lame3995n

Reply #12
No, I don't.
I've incorporated the advantages of Lame 3.100a2 into lame3995n (and I think lame3995n does a better job at the issues the 3.100 version is targeted at). So there's no need to use an alpha version.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #13
The latest version of dbPoweramp is showing a "dEncoder::EncoderBlock" error when the -Q switch is used with the 3995n version of lame.exe.  dbPoweramp always sends some value of the older -q switch in advance of terms you can add.  JustFYI maybe spoon can fix it.

Re: lame3995n

Reply #14
I'm sorry for that, but I don't know what to do about it.
Using the -q switch shouldn't cause a problem.
Isn't it possible any more to use the CLI for totally personalizing access to the encoder?
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #15
The latest version of dbPoweramp is showing a "dEncoder::EncoderBlock" error when the -Q switch is used with the 3995n version of lame.exe.  dbPoweramp always sends some value of the older -q switch in advance of terms you can add.  JustFYI maybe spoon can fix it.
Rename lame3995n.exe to lame.exe



Re: lame3995n

Reply #17
Thanks a lot.
Helps especially as I don't have to care about a x64 version any more.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #18
You say "-Q3, -Q2, -Q1, -Q0.5 yield the same average bitrate as -V3, -V2, -V1, -V0."
So I assume that the -Qx parameters cannot be used at the same time  as the -Vx parameter.

In that case it would have been more consistent to simply use -Vx -Q and use the -Q only as a switch for "use alternative tonal improved algorithm"

Re: lame3995n

Reply #19
Yes, the -Q parameter and the -V parameter control two different VBR modes and shouldn't be used together.
I should have made that more clearly.
It would be hard to give a meaning to an option '-Vx -Q' because such an option suggests that there is a relation to -Vx. The new -Qx mode however corresponds essentially to a variable -Vx level. Having '-Vx -Q' do the same thing '-Qx' does is possible formally, but in this case 'Vx -Q' has no meaningful relation to what '-Vx' does.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #20
It was totally clear to me that -Vx and -Qx control two different VBR modes.

In the help of LAME it is said:
-V n:  quality setting for VBR.  default n=4, 0=high quality,bigger files. 9=smaller files

What do you say for -Q n?
-Q n:  quality setting for VBR but with a different algorithm dedicated to tonal problems.  0=high quality,bigger files. 9=smaller files

So in both cases "n" is a quality setting for a certain VBR algorithm. In both cases, the outcome of the bit-size is comparable for the same n.

There is already something similar:
    --vbr-old        use old variable bitrate (VBR) routine
    --vbr-new      use new variable bitrate (VBR) routine (default)

Simply add
    --vbr-tonal    use variable bitrate (VBR) routine that addresses tonal problems

So -Q n would be equivalent -V n --vbr-tonal





Re: lame3995n

Reply #21
You'd like to have an additional option to be used together with -V to get the -Q behavior.
There is the problem that -V with any additional option no matter how you call it suggests that there is a strong relation with the -V level chosen which is not correct. You may say 'I don't mind', but sorry: I do.

-V (no matter whether --vbr-old or --vbr-new) uses a static set of quality controlling parameters which only depend on chosen -V level whereas the most important parameter among these is used dynamically when using -Q. That's why I dislike most options which suggest a static -V level.
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #22
So what you are saying is this:
You need a second gas pedal in your car, because in contrast to the original "classic" and "sports" driving mode your "eco" mode uses dynamic controlling parameters that are used to decide how much fuel is used in the fuel injectors and not static parameters?
We both agree that this would be a bad user interface.

Re: lame3995n

Reply #23
Any other opinion on this?
lame3995o -Q1.7 --lowpass 17

Re: lame3995n

Reply #24
-Q n is simpler to type than -V n --vbr-tonal