IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Theory of -Z vs. -X3
RD
post Oct 17 2001, 14:51
Post #1





Group: Members
Posts: 151
Joined: 29-September 01
Member No.: 31



I apologize to Dibrom and everyone for asking about switches which they probably have already explained...but I have been awaiting the FAQ that people speak about and I'm dying for more knowledge... :-)

I like the quality that --dm-preset standard gives in Lame 3.90 alpha 7 August 16th build (in win32lame1.7).

Originally Dibrom recommended -Z for higher quality and then -X3

I have some knowledge of the difference but could use some correcting and enlightenment on what I understand correctly and incorrectly...I truly appreciate any help.

Correct analysis?:
----------------------

(1) adding -Z to --dm-preset standard disables scalefac (and (noiseshaping too?) It increases the bitrate but gives more quality to files that have many transients. I don't know if it has any benefits to files without transients...

Unfortunately I forgot what scalefactors were...please help...

(2) adding -X3 to --dm-preset standard alters the noise shaping algorithm, which works WITH scalefac, I believe. The bitrate goes up considerably but the quality should be better because noise shaping deals with quantization, and the quantization of the music should be more accurate with -X3 than without it.
I think this helps all types of music not just transient-stuff...

(3) adding both -Z and -X3 seems to be self-defeating (Because one works with scalefac the other disables scalefac) am I right?

(4) I usually don't care about bitrate but I noticed that --dm-prest standard -Z (no -X3) gave one of my rock albums an average bitrate of 231 and the same album encoded with -X3 (no Z) gave an average of 259... almost 30 kbps...

I guess I'm trying to see if the 30 kbps is worth it...or if it will only help a very small percentage of files...

I would also like commentary on
which is the best bang for the buck:
(A) --dm-preset standard -Z (no -X3)
(B) --dm-preset standard -X3 (no -Z)

I thank everyone for their help, and btw this board rocks!

Take care,
RD
Go to the top of the page
+Quote Post
Dibrom
post Oct 17 2001, 15:23
Post #2


Founder


Group: Admin
Posts: 2958
Joined: 26-August 02
From: Nottingham, UK
Member No.: 1



QUOTE
Originally posted by RD
(1) adding -Z to --dm-preset standard disables scalefac (and (noiseshaping too?)  It increases the bitrate but gives more quality to files that have many transients.  I don't know if it has any benefits to files without transients...

Unfortunately I forgot what scalefactors were...please help...

For the sake of clarity I will refrain from using the -Z switch as since it is a toggle switch now, it is too confusing.

First, nspsytune by default uses noise shaping 2 (aka scalefac_scale). What this basically does is allow noise levels to come closer to calculated thresholds.

It doesn't really have anything to do with transients themselves, but it seems that in some cases scalefac_scale can cause problems where short blocks are used and on clips where noise levels reach a significant amount above calculated thresholds (such as on problem clips like fatboy and others).

QUOTE
(2) adding -X3 to --dm-preset standard alters the noise shaping algorithm, which works WITH scalefac, I believe.  The bitrate goes up considerably but the quality should be better because noise shaping deals with quantization, and the quantization of the music should be more accurate with -X3 than without it.
I think this helps all types of music not just transient-stuff...


Not exactly. scalefac_scale is the noise [b]shaping
, the -X modes are the noise measuring. The reason scalefac_scale doesn't cause problems with -X3 is because -X3 uses a much more strict method of calculating noise than -X1 (the default mode for nspsytune). Thus the encoder attempts to keep the noise levels lower (because of the more strict measuring of -X3) and resultingly doesn't allow scalefac_scale as much as -X1 would.

QUOTE
(3) adding both -Z and -X3 seems to be self-defeating (Because one works with scalefac the other disables scalefac) am I right?


Not specifically. Theoretically turning off noise shaping 2 (scalefac_scale) even with -X3 will keep the noise levels even lower. The thing is, this is inefficient and unnecessary, this is why I don't recommend doing so.

QUOTE
(4) I usually don't care about bitrate but I noticed that --dm-prest standard -Z (no -X3) gave one of my rock albums an average bitrate of 231 and the same album encoded with -X3 (no Z) gave an average of 259... almost 30 kbps...


This will vary greatly. I've seen cases where disabling noise shaping 2 can result in a 50kbps increase. Overall, using -X3 will give you even higher quality than just disabling noise shaping 2, and will still give you nearly the same quality even with noise shaping 2 enabled.

QUOTE
I would also like commentary on
which is the best bang for the buck:
(A) --dm-preset standard -Z (no -X3)
(B) --dm-preset standard -X3 (no -Z)


I'd go with standard -X3. On the other hand, I am not really recommending this because once my new compile comes out this should no longer be an issue anyway. Things are already working as planned as it is, but I need to work out a few bitrate issues on certain clips still.
Go to the top of the page
+Quote Post
HomeK
post Oct 17 2001, 16:50
Post #3





Group: Members
Posts: 9
Joined: 1-October 01
Member No.: 153



I've asked earlier if adding --vbr-mtrh to --dm-preset standard -X3 will cause some problems. That is clear now.

I've another question anyway: will I cause any trouble if I add --vbr-mtrh to --dm-preset standard -Z?
If I won't, is using version with X3 worth its slow speed compared to version with -Z and mtrh? Is the quality difference very big?
Go to the top of the page
+Quote Post
Dibrom
post Oct 17 2001, 17:11
Post #4


Founder


Group: Admin
Posts: 2958
Joined: 26-August 02
From: Nottingham, UK
Member No.: 1



QUOTE
Originally posted by HomeK
I've asked earlier if adding --vbr-mtrh to --dm-preset standard -X3 will cause some problems. That is clear now.


I'm not sure where you may be drawing your conclusion from, but just to be sure, --vbr-mtrh will not work correctly with -X3. vbr-mtrh does not rely on the same noise measuring techniques that cbr/abr/vbr-old do. Robert is adding some new noise measuring modes which use the syntax of the -X switches I think, but they don't do exactly the same thing, and they aren't actually fully implemented yet. So -X3 will not work as advertised with vbr-mtrh at the moment.

QUOTE
I've another question anyway: will I cause any trouble if I add --vbr-mtrh to --dm-preset standard -Z? 
If I won't, is using version with X3 worth its slow speed compared to version with -Z and mtrh? Is the quality difference very big?


Yes, for the same reason as shown above. nspsytune relies on -X1 (maximum noise measuring) which vbr-mtrh does not provide. You used to be able to enable maximum noise measuring with vbr-mtrh via -q1 and -q0 but I believe this has changed recently. Even when you could do this via -q1 and -q0 you would get massively increased bitrates over what --dm-preset standard would normally provide.

In conclusion, --dm-preset standard -X3 is the current highest quality setup I know of, yes it may be slow, but it does provide significantly increased quality (and bitrate increases too much sometimes also, which is why I am working on modifications to LAME). This is basically it.. any other combination of switches I know of is not going to be as optimal as that currently in regards to quality.
Go to the top of the page
+Quote Post
HomeK
post Oct 17 2001, 17:28
Post #5





Group: Members
Posts: 9
Joined: 1-October 01
Member No.: 153



Whoa, fast answer, thanks smile.gif Now I'm of course going to use --dm-preset standard -X3 until you finish your new settings.

I'm afraid my English isn't as good as I'd like it to be. I often seems to me that people understand something little different that I wanted to say rolleyes.gif Anyway I wanted to say that now I know that using --vbr-mtrh doesn't make sense with -dm -X3 smile.gif

I'll also have to study all those switches I don't understand :insane:
Go to the top of the page
+Quote Post
Dibrom
post Oct 17 2001, 17:39
Post #6


Founder


Group: Admin
Posts: 2958
Joined: 26-August 02
From: Nottingham, UK
Member No.: 1



QUOTE
Originally posted by HomeK
I'm afraid my English isn't as good as I'd like it to be. I often seems to me that people understand something little different that I wanted to say rolleyes.gif Anyway I wanted to say that now I know that using --vbr-mtrh doesn't make sense with -dm -X3 smile.gif


Actually your English is fine really smile.gif I understood what you said, I just wasn't sure what I may have said to give you that idea (which was correct actually smile.gif).. so I thought it'd just clarify to make sure, as the likelyhood of someone else asking about it was fairly high anyway biggrin.gif

Edit: Nevermind, I found the thread where I told you about vbr-mtrh. Forgot about that.. biggrin.gif
Go to the top of the page
+Quote Post
RD
post Oct 17 2001, 19:15
Post #7





Group: Members
Posts: 151
Joined: 29-September 01
Member No.: 31



Dibrom,

Thanks for the very clear, good, and comprehensive explanation.
Aristotle says you can tell who is truly wise by how well they teach, and you teach well!

I am not a lame developer, but if I were I would give you the "Lame mp3 encoder Quality enhancement of the year award".

Again, I really appreciate your help and quick response.

With kind regards,
RD (Robert)
Go to the top of the page
+Quote Post
ckjnigel
post Oct 17 2001, 19:35
Post #8





Group: Members
Posts: 218
Joined: 12-October 01
Member No.: 278



I'm still curious how the bitrates are determined. WinAmp reports that
My Sharona is at 281 kbps, the highest of
the 150 or so I've encoded since I grasped that " --dm-preset standard -X3"
is very good. What about that music so exercises the encoder?
I'm intrigued because I recall reading of hand-wringing because Knack recording studio master tapes have been lost and what is available has been taken from vinyl.
Go to the top of the page
+Quote Post
Dibrom
post Oct 17 2001, 19:43
Post #9


Founder


Group: Admin
Posts: 2958
Joined: 26-August 02
From: Nottingham, UK
Member No.: 1



QUOTE
Originally posted by ckjnigel
I'm still curious how the bitrates are determined.  WinAmp reports that 
My Sharona is at 281 kbps, the highest of 
the 150 or so I've encoded since I grasped that " --dm-preset standard -X3"
is very good.  What about that music so exercises the encoder? 
  I'm intrigued because I recall reading of hand-wringing because Knack recording studio master tapes have been lost and what is available has been taken from vinyl.


With -X3, a very noisy source could cause large increases in bitrate. Since the album you mentioned came from vinyl, it could be possible that this is the cause. I general though -X3 just attempts to keep noise levels down more than -X0 or -X1, so it is natural to see large increases in bitrate (and again is why I don't actually recommend it for use, though I concede it does offer very high quality).
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st October 2014 - 18:39