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: Musepack setting for very high quality? (Read 12978 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Musepack setting for very high quality?

Reply #25
From source code comment in mpcenc.c we can see that NMT stands for "Noise masks Tone Ratio".
If this is what it really is, raising it should basically tell the encoder "please assume my ears are better (than the preset assumes) at detecting tones buried in noise". This, in theory, shouldn't make the result worse.

`--ms ...` is changing mid-side stereo and I'm not surprised at all that it can indeed have negative impact because we're swapping part of the encoding algorithm to something very different while everything else isn't optimized for it.
a fan of AutoEq + Meier Crossfeed

Re: Musepack setting for very high quality?

Reply #26
@m14u
Thanks for the link. ;-) User Shy is against tweaking. Kind of disappointing... Well, he probably knows better.

@shadowking
Thanks for clarification of these settings. :-)
Wv+wvc looks like good solution as it's basically single arhive.
However, I don't like to "split" single file into two - wv + correction. I think of it as something that is maybe not 100% reliable in this splitting and merging files (I'm certain that I'm wrong but still... :D).
I see that you suggest 350hx4 as quality approach.
Do you think this should be transparent for normal music?
Also, how much higher bitrate is needed in your opinion to have faster encoding with setting like only -h or -x1?
Is 512k enough? Like -b512x?
Guruboolez quoted your post regarding transparency of wavpack at 550x4 (objective transparency).
Is that still relevant or could go lower in bitrate or faster encoding using hhx or hx maybe?
I also noticed that wavpack v4.8 have slightly better high mode when -n switch is used vs 5.1 for example.
Is this important?
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #27
As I understand, nmt and tmn swithes  should incease sensitivity to tone/noise (signal to noise ratio). Maybe not technically correct, but I think that end result is inceased sensitivity. So, my initial setting q9 --nmt 18 --tmn 36 should only be better than standard --nmt 18 (cannot be worse)?
What do you think?

I'm not sure at all. 15 years ago I published here a comparison showing critical issues with MPC --standard (and to lower extend, MPC --insane) with low volume tracks/moments/albums when people are playing them louder (i.e. with ReplayGain enabled).
The thread is here: https://hydrogenaud.io/index.php?topic=35030.0
But samples and images are gone.

But let me show you that a huge difference really exists between -q5 and -q9; and that --tmn/--nmt aren't useful to increase signal to noise ratio. For this, I'm taking an extreme CD: it's a very quiet piano disc (Morton Feldman, Late Piano Works, Vol.2, released by MDG). Lossless bitrate is insanely low (219 kbps with FLAC), sound level is also very low (+27.8 dB with Replaygain Album). You can try to play it at normal volume: even my computer fan annoys me... So increasing the volume is often necessary.

I just give you a bitrate table:

Code: [Select]
MPC  --quality 5                        79 kbps
MPC  --quality 5 --nmt 18               84 kbps
MPC  --quality 5 --nmt 18 --tmn 36      90 kbps
MPC  --quality 9                       272 kbps
MPC  --quality 9 --nmt 18              319 kbps
MPC  --quality 9 --nmt 18 --tmn 36     326 kbps
FLAC CueTools 2.16 -8                  219 kbps

As you can see, --standard or --quality 5 has a very low bitrate. Which is not necessary a bad thing (it's called efficiency when transparency is reached). Adding --tmn/nmt gives a slight increase in bitrate. But does it increases signal to noise ratio? Answer below.
On the other side --quality 9 alone has a much higher bitrate than --quality 5 nmt/tmn. It's even higher than original FLAC file. The two switch also increase the bitrate here.

Now, let's see how they sound. At normal volume playback, everything sounds fine to my ears. But if Replaygain is enabled, it's another story.
Here's my ABX log of the 30 first seconds: CD vs MPC --standard --nmt 18 --tmn 36, with RG:

Code: [Select]
foo_abx 2.0.6d report
foobar2000 v1.5.4
2020-06-20 14:38:58

File A: Felman-low.flac
SHA1: ab42b789130412c3e05ef5fa69a004caa43c5353
Gain adjustment: +27.91 dB
File B: Felman-low.mpc-q5tmn18nmt36.mpc
SHA1: 0e7cfa88275950a9371b7a1134d2b1969b688c9a
Gain adjustment: +27.91 dB

Output:
DS : Primary Sound Driver
Crossfading: NO

14:38:58 : Test started.
14:39:16 : 01/01
14:39:20 : 02/02
14:39:23 : 03/03
14:39:34 : 04/04
14:39:38 : 05/05
14:39:41 : 06/06
14:39:45 : 07/07
14:39:49 : 08/08
14:39:49 : Test finished.

 ----------
Total: 8/8
p-value: 0.0039 (0.39%)

 -- signature --
55a4d1f5885e4d8ce8960c64dca07d3b299fb1bb

MPC --standard --nmt 18 --tmn 36 doesn't handle the noise/music ratio accurately. There's a lot of ringing (with a 27 dB boost I recall). The two additional parameters don't change anything. You can see a picture of this below: ringing is obvious.
But each time you increase the Q setting, the problem is lowered and then vanished completely at a given setting (which may be higher than Q7 from experience).

I'm pretty sure you won't find any disc like this in your library if you listen to rock. But it may help to not consider MPC --quality 5 --tmn/nmt as a choice for your quest of tranquility. And it should also help to understand that Q5 (standard) is a much different beast than Q9 and adding parameters to Q5 won't do any magic. As shadowking said, it's "inflated bitrate but still 'standard'": which means something very efficient but with very little headroom. At headroom is precisely what you're looking for. And this example may illustrate the need for headroom: when the volume is changed, when you play with the EQ or anything else that change the sound, what used to be transparent may become less satisfying. Hence, again, another point for lossless (or maybe for non-perceptual encoders like LossyWAV or WavPack Lossy) ;)


Re: Musepack setting for very high quality?

Reply #29
@guruboolez
Thanks for your effort. I appreciate it. This pretty much solves my dilemma regarding switches. I don't listen to classical music much, I only have few classical cd Albums but that is not so important.
Important thing is that your ABX test proves that nmt and tmn don't universally improve quality (what I was hoping for).
So I'll go with recommended setting.
I consider myself an average listener and I doubt that I will hear difference if I use mpc Q9-10. (For what is worth, I cannot ABX eig sample using LAME 3.100 v5 :D) It's only obvious to me at 128k CBR. Even at 160 CBR becomes harder to notice "puffs" in eig sample so... :D
I'll try this Felman sample later.
Thanks a lot.

@shadowking
I wrote few questions regarding wavpack transparency 2 posts above so plz look if you could help. ;-)
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #30
synclagz

The 'splitting' wv+wvc works perfect. You can check using wvunpack [filename] -v .  If wvc is missing or if using wvunpack -vi, then lossy decompression occurs. If you damage .wvc with text edit etc, then you get a decoding error.

Re: 350hx4.  Yes it should be normally transparent and has reasonable headroom for problem samples.

Re: how much bitrate for -x1  or -h ?  yes probably 500+. but still its no longer quality first - see MPC issue. In theory anyway.

Re: 550x4. Yes I think its still relevant for those who would go for 500+ range to get objective quality 1st.
-hhx would be a bit better, not much.  For quality use  -hx4, -hh  or least -x4  .  I like -hx4  as the encoding / decode penalty isn't big. -hx3 is good alternative to -x4

Re: WV 5.1 -h: I haven't checked yet. If its less than 1db probably not important.

Re: Musepack setting for very high quality?

Reply #31
Yes, lossless is the best way to go but, as I said, I don't want to maintain lossless + lossy for mobile. It's kind of time consuming and tedious to rip/convert two archives and update+backup twice all the time.
What I wanted to see if there is any lossy that is of high quality to store my music as single archive making it more simple to manipulate.
How about going single archive but lossless only? You can get a decent 256gb microSD card for 35€. 512gb for < 70€.

Mass conversion with foobar or something like fre:ac is super easy once setup, if you want a lossy version of your files after all.

Re: Musepack setting for very high quality?

Reply #32
@shadowking
Thanks for explaining these settings.
One more question for wavpack + correction files:
How to select multiple folders but to copy only .wv files (not wvc) and retain folder structure?

@Gecko
I'm very close to my decision to rip my collection to lossless first (maybe Wavpack + correction) and after that I'll decide which way to go next. I have around 600 cd's so I think I'll need 512 gb sd card to store complete collecton but my phone support up to 256 gb. For 512 I need new phone also which I won't buy anytime soon but it'a an option I'm also considering.
For now I think wavpack + correction seems nice solution. :)
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #33
but my phone support up to 256 gb. For 512 I need new phone also which I won't buy anytime soon but it'a an option I'm also considering.
For now I think wavpack + correction seems nice solution. :)
What phone do you have? I have a Galaxy S8+, it officially supports 256 Gb max, but my 400 and 512 are working fine.
Sometimes if not most often, the manufacturer warranty a max size (usually what's available on the market when the device is developed) so he doesn't take any responsibility if something goes wrong with higher capacity when they are released. But usually it works fine.
Make a search on google: sometime you can get user reports about compatibility of higher capacity.

Re: Musepack setting for very high quality?

Reply #34
Good to know. :)
I have Nokia 7 plus. Officially support 256 gb. I never tried 512 gb sd card. Maybe it could work. I don't know.
I'll se if I can try and return to shop if it didn't work.
However 512 is not cheap. In my country these cards are usually in 140-150 € range... I'll see what I can do...
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #35
15 years ago I published here a comparison showing critical issues with MPC --standard (and to lower extend, MPC --insane) with low volume tracks/moments/albums when people are playing them louder (i.e. with ReplayGain enabled).
The thread is here: https://hydrogenaud.io/index.php?topic=35030.0
But samples and images are gone.

But let me show you that a huge difference really exists between -q5 and -q9; and that --tmn/--nmt aren't useful to increase signal to noise ratio. For this, I'm taking an extreme CD: it's a very quiet piano disc (Morton Feldman, Late Piano Works, Vol.2, released by MDG). Lossless bitrate is insanely low (219 kbps with FLAC), sound level is also very low (+27.8 dB with Replaygain Album). You can try to play it at normal volume: even my computer fan annoys me... So increasing the volume is often necessary.

I just give you a bitrate table:

Code: [Select]
MPC  --quality 5                        79 kbps
MPC  --quality 5 --nmt 18               84 kbps
MPC  --quality 5 --nmt 18 --tmn 36      90 kbps
MPC  --quality 9                       272 kbps
MPC  --quality 9 --nmt 18              319 kbps
MPC  --quality 9 --nmt 18 --tmn 36     326 kbps
FLAC CueTools 2.16 -8                  219 kbps

As you can see, --standard or --quality 5 has a very low bitrate. Which is not necessary a bad thing (it's called efficiency when transparency is reached). Adding --tmn/nmt gives a slight increase in bitrate. But does it increases signal to noise ratio? Answer below.
On the other side --quality 9 alone has a much higher bitrate than --quality 5 nmt/tmn. It's even higher than original FLAC file. The two switch also increase the bitrate here.

Now, let's see how they sound. At normal volume playback, everything sounds fine to my ears. But if Replaygain is enabled, it's another story.
Here's my ABX log of the 30 first seconds: CD vs MPC --standard --nmt 18 --tmn 36, with RG:

Code: [Select]
foo_abx 2.0.6d report
foobar2000 v1.5.4
2020-06-20 14:38:58

File A: Felman-low.flac
SHA1: ab42b789130412c3e05ef5fa69a004caa43c5353
Gain adjustment: +27.91 dB
File B: Felman-low.mpc-q5tmn18nmt36.mpc
SHA1: 0e7cfa88275950a9371b7a1134d2b1969b688c9a
Gain adjustment: +27.91 dB

Output:
DS : Primary Sound Driver
Crossfading: NO

14:38:58 : Test started.
14:39:16 : 01/01
14:39:20 : 02/02
14:39:23 : 03/03
14:39:34 : 04/04
14:39:38 : 05/05
14:39:41 : 06/06
14:39:45 : 07/07
14:39:49 : 08/08
14:39:49 : Test finished.

 ----------
Total: 8/8
p-value: 0.0039 (0.39%)

 -- signature --
55a4d1f5885e4d8ce8960c64dca07d3b299fb1bb
can you please upload the samples used for this log?
and which version of the encoder was used? there were actually some changes to this since 15 years ago, IIUC.
a fan of AutoEq + Meier Crossfeed

Re: Musepack setting for very high quality?

Reply #36
No quality related changes since mppenc v1.15r ALPHA in 2003

Re: Musepack setting for very high quality?

Reply #37
can you please upload the samples used for this log?
and which version of the encoder was used? there were actually some changes to this since 15 years ago, IIUC.
Both FLAC and MPC were uploaded and are available at the bottom of my post :)
MPC version: mppenc --Stable-- 1.30.0

Re: Musepack setting for very high quality?

Reply #38
sorry, must have missed it, thanks!

so, looks like it needs another workaround which is --ltq_gain switch...
and ideally it should be varied depending on the ReplayGain data (track)
that's definitely not cool that MPC uses some static assumption about listening volume, thank you for bringing this up, I didn't know about this and thought it adapts to things like these.

btw, quiet tracks like these are probably also touching the point where 16 bits per sample may be not enough (because this track effectively uses only 11 bits - it can be multiplied by 2^5 without clipping because the peak level is 0.030914), but if that's the only source we've got, tough luck

with the --ltq_gain option used for this track, this makes encoded file larger than the original which is a shame - but since the source is effectively 11-bit instead of 16, it can be argued that it's a form of lossy compression too
a fan of AutoEq + Meier Crossfeed

Re: Musepack setting for very high quality?

Reply #39
so, looks like it needs another workaround which is --ltq_gain switch...
I'm not familiar with ltq_gain switch. Is it improving low volume samples like the one guruboolez posted?
I saw in old threads that people were using ltq_gain -9 to -15 usually.
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #40
it makes encoder shift ATH levels up or down.
for example: ltq_gain = -10 would make it assume you'll listen to the song 10dB louder than "normal".
a fan of AutoEq + Meier Crossfeed

Re: Musepack setting for very high quality?

Reply #41
@magicgoose
Thanks for clarification.
Do you think this switch will help this kind od very low volume samples?

However, I must admint that this Felman sample sounds like lossless to me using only default mpc Q5.
Even with replay gain at +27,9 dB, I can't hear anything wrong. :D Maybe this ringing artifact like guruboolez said is tied to
very high frequency like 17+ kHz or something and I can't hear it. :D
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #42
From the picture posted above (animated gif), the ringing seems to be located on the ~7000…9000 Hz area. MPC --standard doesn't encode anything above on this sample.

Re: Musepack setting for very high quality?

Reply #43
@magicgoose
Thanks for clarification.
Do you think this switch will help this kind od very low volume samples?
depends on the value and the track.
from what I've noticed currently, I'd expect it'd make sense to set it to -(replaygain track value), so, for this sample this would be -27.91
because it has track gain +27.91 dB.
(but there's currently no tool that I know that could do it automatically)
a fan of AutoEq + Meier Crossfeed

Re: Musepack setting for very high quality?

Reply #44
@guruboolez
Well, artifact should be audible but obviously my ears and/or equipment is not good enough. :D

@magicgoose
This is probably a good solution but not very practical to set ltq_gain individually for each track. I suppose that this kind od very low volume tracks are rare (maybe even rare for classical).
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #45
Yes, extreme tracks are rare. Extreme discs like this one much rarer too.
I count 1466 tracks in my library with RG Track higher than +20 dB ; but two albums only with RG album higher than +20 dB (+ one more album at +19.13 dB).
As I said I wouldn't worry too much if you're not a classical music maniac. I only used this case as exemple to show that --q5 --nmt/tmned isn't the same that --q9 and these two switch don't solve all possible issues.

Re: Musepack setting for very high quality?

Reply #46
> but two albums only with RG album higher than +20 dB (+ one more album at +19.13 dB).

what are their peak levels, by the way?
they can possibly be scaled up without any loss (if multiplied by an integer value) - that is, it's trivial to perfectly undo.
and if the value is a power of 2, this also won't significantly increase the file size.
a fan of AutoEq + Meier Crossfeed

Re: Musepack setting for very high quality?

Reply #47
As I said I wouldn't worry too much if you're not a classical music maniac. I only used this case as exemple to show that --q5 --nmt/tmned isn't the same that --q9 and these two switch don't solve all possible issues.
I'm not. :D I only have few albums and lowest volume is around +15 dB replaygain (but only few tracks).
This sample perfectly shows that nmt and tmn switches are not universally helpful.
But with my ears/equipmnet performanse, I shouldn't worry too much. :D
Something like vorbis/opus/mpc at 256k would probably be excellent solution,
but I decided to rip to lossless first (maybe WavPack + correction) and I'll decide later which way to go from there.
lame --abr 288 -f --lowpass 17 (+ mp3gain@92 dB)

Re: Musepack setting for very high quality?

Reply #48
> but two albums only with RG album higher than +20 dB (+ one more album at +19.13 dB).

what are their peak levels, by the way?

Code: [Select]
Track Gain    Album Gain    Track Peak   Album Peak    Duration   Peak Level (R128)                      DYNAMIC RANGE (R128)                     
+21.21 dB     +21.21 dB     0.1000006    0.1000006      1h20'44"   -19,9 dBTP; -20,6 Left; -19,9 Right   15,0776996612548828
+27.65 dB     +27.68 dB     0.066620     0.066620       1h11'48"   -23,5 dBTP; -26,3 Left; -23,5 Right   16,4438095092773438
(both albums have one long single track)

Re: Musepack setting for very high quality?

Reply #49
looks like these can be scaled up (8x, which is approximately 18.0618 dB) without loss of quality and it will make them a bit less annoying to deal with.
a fan of AutoEq + Meier Crossfeed