HydrogenAudio

Lossy Audio Compression => MPC => Topic started by: synclagz on 2020-06-17 17:27:27

Title: Musepack setting for very high quality?
Post by: synclagz on 2020-06-17 17:27:27
Hi,
This is my first post here, but I was a long time reader and finally decided to join.
I'm going to rip my cd collection and I want very high quality lossy archive that should be also good for occasional transcoding to other lossy (vorbis/aac) but I dont want lossles + lossy because maintaining two archives is too demanding for me.

As I understand using additional switches --nmt --tmn generally improving quality.

In few old threads I've read that using q7 --nmt 16 --tmn 32 (~320k) was a popular setting and gives very good quality even for trancoding which guruboolez also said in one thread long time ago.

I think that something like q9 --nmt 18 --tmn 36 --bw 18600 should be enough for really high quality. Probably very good for transcoding. This yields bitrate of 350k on average which is my target bitrate.

Do you think this could be also enough for problem samples and very high quality in general?

Also, is --bw switch good to use all the time? It is basically a lowpass filter as I learned. Is it degrading quality in some other way except cutting frequency above 18600 Hz?
Am I on the right track?
Sorry for long post. :)
Title: Re: Musepack setting for very high quality?
Post by: m14u on 2020-06-17 17:56:36
and why not directly encode in vorbis/aac ? in >=320kbps no matter: musepack/vorbis/aac/opus. not a mp3/wma - good. there is also a lossyflac/wavpack-hybrid. but, if you still want a musepack - use q10 without any. imho.
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-17 18:37:26
Be careful when you're looking for very old information and settings in this forum. I'm not familiar anymore with MPC but I'm quite sure these switches are outdated and are coming from a time when MPC wasn't that flexible. Long long time ago --insane was the highest setting available and people tried some tricks to higher the bitrate or waste some free time. Now you have a much better VBR scale with higher settings (q8…10) to cover all usage without doing anything wrong.
MPC encoders are also well-tuned. Additional settings are not necessary and benefits are highly hypothetical… and probably not audible at all at such high bitrate.

As you mention my test (thank you!), it's also very old (15 years):
https://hydrogenaud.io/index.php?topic=32440.0
Ogg Vorbis was at this time at least as good as MPC for reencoding purpose (it ends with a better score). In the meantime Opus appeared ; Vorbis and AAC improved ; lossyWAV also create an opportunity for good lossy source.
I second m14u's answer. Go for a format you can directly use in many devices (at high bitrate they are all very similar and could be a better source than MPC) and you can eventualy reencode later if you really need to spare some space. Opus, Vorbis and AAC offer your targeted bitrate (350 kbps). You can also take into consideration WavPack Lossy or even LossyFLAC (I'm not familiar with it).
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-18 06:35:35
Thanks a lot for your answers.
But I forgot to mention that I found this thread few days ago:
https://hydrogenaud.io/index.php?topic=96108.25

On page 2-3 I noticed that magicgoose and shadowking discovered that standard setting with --nmt 18 became transparent (or very close to it) but magicgoose was able to ABX Q10 but he couldnt ABX q5 --nmt 18.
So, I think --nmt 18 is definitely improving quality.

As for WavPack, I think it needs higher than 350k for piece of mind and probably strong setting like hx4 which is very slow.

@guruboolez
Do you think if I use vorbis/opus @350k that I'll have a quality headroom even for problem samples?
Shoud I use -q (quality) or -b (bitrate) setting for vorbis? Is there any difference?
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-18 08:57:07
Sorry, I thought you were mentioning much older information.

Quote
On page 2-3 I noticed that magicgoose and shadowking discovered that standard setting with --nmt 18 became transparent (or very close to it) but magicgoose was able to ABX Q10 but he couldnt ABX q5 --nmt 18.
So, I think --nmt 18 is definitely improving quality.
It's improving quality on one sample or kind of samples and with one version of the encoder.
Some tuning are reducing some known artifacts but they may also lower quality elsewhere. I'm not saying --nmt 18 can lower quality, but from a logical point of view you should be careful.

To answer your questions:
I know very well this scary feeling of insecurity that come with the decision of replacing lossless by high bitrate lossy: is it enough? can I improve it? Should I increase the bitrate further to be very very sure that nothing could ever happen? What if a golden ears person appears and find a problem sample that pushes the frontier of known audibility?

I personally think that this mindset is a real poison. You can never be sure that your encoder and setting of choice are perfect. Especially if you rely on someone else's experience.
But you can be sure of something: even if someone comes with a problem sample at 350 kbps, the audible difference will probably be  very slight, not disturbing on a daily basis listening experience (ABX tests are extreme listening conditions, often focused on short/very short parts), and very rare.

At this point, there's a simple alternative from a logical point of view:

— Do you think if I use vorbis/opus @350k that I'll have a quality headroom even for problem samples?
I'm sure it has enough headroom to handle 99,99999% of the total duration of your music even if you're a critical listener with platinum ears. And the missing 0,00001? You can never be sure, whatever the format/setting/switch you chose.

— Shoud I use -q (quality) or -b (bitrate) setting for vorbis? Is there any difference?
-q is a general and common recommendation. However it hasn't been tested at such high bitrate because it's insane and humanly impossible. Maybe -b can handle transparently 99,99999% of your music and -q 99,99998%? Who knows? Nobody… So stick with the recommended settings (-q)

Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-18 09:41:44
To answer your questions:
I know very well this scary feeling of insecurity that come with the decision of replacing lossless by high bitrate lossy: is it enough? can I improve it? Should I increase the bitrate further to be very very sure that nothing could ever happen? What if a golden ears person appears and find a problem sample that pushes the frontier of known audibility?

Yes, exactly. That's what I'm facing right now.
I'll think about your recommendations. Very helpful. Thanks.
I'll decide between MPC Q10 or Vorbis -q 9.2
Also would like to know more about WavPack @350-400k... (not higher)
Could be also very good alternative. As I understand It's very good for transcoding also.
Maybe I'll post a question in wavpack section... I'll think about that.
For now I think I'll go with Vorbis or mpc.
Thanks. :)
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-18 09:55:45
I've a small experience with WavPack Lossy (I submitted one or two problem samples in the past). The only known artifact is to my knowledge noise, very basic noise. Even if you hear it on a daily playback basis, it's not something that may alert you. It's a bit like grain/noise on a digital photo. If your compressor add a tiny amount of noise you can spot from time to time, you won't  be able to say if it comes from your camera's sensor or not. Same with audible noise.
Of course if you're very maniac, each time you'll hear noise there's a risk that you'll think it always comes from WavPack  and not from the recording process :D


But from my experience, the noise is very very difficult to hear. And even if you hear it, well, it's just a slight amount of hiss :)
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-18 10:46:58
Of course if you're very maniac, each time you'll hear noise there's a risk that you'll think it always comes from WavPack  and not from the recording process :D
I think this could be an issue. :D
What setting would you recommend for Wavpack lossy that is considered high quality?
is x4 necessary for high bitrate Wavpack? I would like to avoid slow encoding if possible.
Title: Re: Musepack setting for very high quality?
Post by: m14u on 2020-06-18 11:07:05
"that extra processing can be done during encoding to provide better compression, but with NO corresponding cost to decoding performance"
use x6, don't be greedy.
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-18 11:56:11
What setting would you recommend for Wavpack lossy that is considered high quality?
is x4 necessary for high bitrate Wavpack? I would like to avoid slow encoding if possible.
As said before, my experience is really small (and old, outdated: the encoder improved with time).
Take a look at this thread:
https://hydrogenaud.io/index.php?topic=117610.0

About speed: use what's comfortable/possible for you.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-18 12:04:17
As said before, my experience is really small (and old, outdated: the encoder improved with time).
Take a look at this thread:
https://hydrogenaud.io/index.php?topic=117610.0

About speed: use what's comfortable/possible for you.
I missed that one. Thanks.

@m14u
x6 is extremly slow. I doubt is any better than x4 and encoding with x6 is really slow. I think is not worth it.
But thanks for the info.
Title: Re: Musepack setting for very high quality?
Post by: m14u on 2020-06-18 12:56:30
i need correcting:
x-key increase compression in lossless mode, olways; in lossy mode MAY be negotive effect. source depends.
Title: Re: Musepack setting for very high quality?
Post by: Gecko on 2020-06-18 16:16:59
What's stopping you from going lossless? Do the tedious process of ripping and tagging once and make sure you never have to do it again. It really suxx and is a major investment of your time (so also create a backup).

High bitrate lossy with huge headroom is a lost cause, imo. It's wasteful for the most part and in those instances where the psychacoustic model breaks, it may still not be enough. Tweaking parameters may give you that comforting feeling of "taking control", but the reality is that you are still using something inherently imperfect.

Go lossless and have peace of mind or embrace the occasional artifact with lossy encoding at roughly your transparency threshold.
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-18 16:52:38
Quote
It's improving quality on one sample or kind of samples and with one version of the encoder.
It definitely shouldn't hurt all other samples, as evident from documentation. (it just raises 1 specific parameter which should raise Signal/Noise ratio in a subset of situations) unless there are some undiscovered bugs related to that.
And there aren't really any other versions of the encoder, and probably won't be, it seems none is developing this codec anymore, let's be real.
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-18 16:56:11
I'd also advise against WavPack lossy because it targets bitrate (constant, except it won't pad data with useless bits if it already can encode a piece losslessly with lesser bitrate), not quality, so it has to be wasteful AND you still may get artifacts when there's something too complex for the target bitrate. If you really want to use this kind of codec, I'd recommend LossyWAV instead. (which targets quality, not bitrate)
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-18 17:13:34
Thank you for your answer, magicgoose. I haven't checked in MPC documentation what --nmt or --tmn are really doing; I knew it but I totally forgot it with time. I also agree that MPC won't probably rise again. My comment was much more a general speaking statement about lossy encodings and I haven't read the thread mentionned by synclagz (started in 2012 and ended in 2019).
And to be fully honest, I'm sure that using MPC with q9 --nmt 18 --tmn 36 --bw 18600 instead of pure q9 or q10 alone won't change anything to the listening experience. It's more an opened door to forgotten practice here (remember r3mix ;) )
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-18 17:32:54
(please delete this message, accidentally sent 2 times and cannot delete myself)
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-18 17:34:09
for me, --nmt 18 resolves all problem samples that it had without this, so I don't see any value in further tweaking.
but I don't really have good ears, and they only get worse with age. (well, maybe they're still more sensitive than average, idk)
someone else might want to explore this perhaps.
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-18 20:07:19
I'd also advise against WavPack lossy because it targets bitrate (constant, except it won't pad data with useless bits if it already can encode a piece losslessly with lesser bitrate), not quality, so it has to be wasteful AND you still may get artifacts when there's something too complex for the target bitrate. If you really want to use this kind of codec, I'd recommend LossyWAV instead. (which targets quality, not bitrate)

It's theoretically true but efficiency of both formats is probably not the same. At a given bitrate the quality-based format can be worse.

This is what Shadowking wrote two years ago:
It could be true. Wavpack at same bitrate is better than lossywav with objectively less noise .  Lossyway noise moves in 6db steps while wavpack moves infinite steps from what I read in the past. OTOH Wavpack doesn't have a yet a true quality mode while lossywav does. This also might not have any impact if comparing strong settings like lossyway --extreme to wavpack -b550x4 .. wavpack is also expected to be 100% transparent and offering better quality [objective].  At more moderate bitrates (400k)  subjectively , Lossywav may have the advantage in very rare cases due to the quality mode . At lower rates like 250k wavpack may have a general advantage too .

From this post: WavPack lossy should be better at low bitrate as a consequence of advance coding techniques; and with no surprise at very high bitrate both WavPack and LossyWAV sound perfect. And between: LossyWAV has a true quality mode but lower quality coding technique; WavPack lossy better coding tool but no true quality mode. I don't see a clear winner here (except perhaps WavPack lossy at  ~200…250 kbps) in the absence of listening tests.
You don't recommand WavPack because it's wasteful and with possible audible artifacts on possible situation. But is it really different from true VBR encoders like MPC --nmt 18, or from Ogg Vorbis 350, or anything lossy that always stays at very high bitrate?

Just for the anecdote, I fed my classical bitrate table with some extreme bitrate (low and high) recordings. And I have data for MPC and low bitrate stereo CD:
Code: [Select]
                                                                                     FLAC -8       MPC -7        MPC -10
Feldman [Schleiermacher] The Late Piano Works, Vol.2 (MDG, CD, 2009)                 219 kbps      235 kbps      337 kbps
Mompou [Perianes] Música Callada (Harmonia Mundi, CD, 2006)                          274 kbps      250 kbps      361 kbps
Silvestrov [Blumina] Piano Works (Grand Piano, CD, 2013)                             255 kbps      217 kbps      332 kbps
VA [Haochen Zhang] Schumann, Liszt, Janacek & Brahms. Piano Works (BIS, CD, 2017)    308 kbps      235 kbps      335 kbps
                                                                          AVERAGE    264 kbps      236 kbps      341 kbps

MPC is a true VBR encoder, quality-oriented and efficient… and it can wastes bit as well (MPC uses up to 50% bitrate more than FLAC, not LossyFLAC, true FLAC!) on some occasion. And even when bitrate exceeds the needed bitrate for lossless compression you still can't be sure that transparency is fully reached because every piece of the signal is transformed by the lossy algorithms. Anyway, these examples can also prove that MPC can be as wasteful as WavPack Lossy and probably as unsecure for maniac people (same apply to Vorbis and Opus, but AAC FDK, FHG and iTunes are more flexible here…).


To recap, problem is unchanged and Gecko perfectly summarized it. If we except MP3 which has native flaws at high bitrate (pre-echo handling), everything is considered as wasteful but transparent… at least until something breaks and wait to be discovered. For peace of mind lossless is therefore the best and maybe the only choice ; for high quality at 350 kbps almost all formats are fine. There is no need to tweak anything with additional switches or to recommend one format over another.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-19 06:59:51
I see a lot of new stuff to learn since yesterday. :)
First of all I would like to thank you all for giving me deatailed answers so I can decide which way to go.
@Gecko
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.

@magicgoose
My setting for MPC came mostly from your experience with --nmt 18 switch and I wanted to bump the quality a bit higher so potential problem samples shouldn't cause issues (at least from my findings/perspective). I'm glad you participate here. :)

@guruboolez
Your quote of shadowking's notation regarding wavpack @550x4 is very interesting. He obviosly have much experience in wavpack (as I also noticed reading a lot of threads here).
If Wavpack setting at this very high or even extreme setting @550k could be considered objectively transparent, there is no need for lossless in my opinion and 550k is good 30-40% smaller than tipical pop/rock flac's which are in 900-1100k range usually.
I doubt that there will be "killer" samples that will sound bad @550k. If this setting is realiable enough for normal music (I don't care much about artificial sine waves and stuff) this is also very good solution to archive my music.
A lot to think about... :)
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-20 08:31:26
@magicgoose
Do you think that --nmt 18 switch can be used all the time?
Did you notice any degradation in quality on other than problem samples?
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-20 09:03:18
No, I didn't notice any degradation from it, and by my (limited) understanding of the underlying algorithms, there shouldn't be any degradation. (however it inflates bitrate to ~266 kbps on average (on a large collection of music, mostly rock and metal); still less than what LossyFLAC or WavPack would need to achieve transparency on all samples but I suppose if it was something smarter, it could be much less than that)

Unrelated note, what I like about MPC is that it supports 44.1k and 48k sample rates as-is, and so I can just encode tracks individually and things will remain gapless and will start and end exactly where they did. (kinda useful if occasionally playing it in random order)
If Opus could do this, I'd probably just use it and forgive it the fact that there's a risk of audible distortion on some samples, but Opus complications with gapless requirements are a bit too annoying for me for now.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-20 10:33:06
Thanks a lot.
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?
Title: Re: Musepack setting for very high quality?
Post by: m14u on 2020-06-20 11:15:08
https://forum.musepack.net/showthread.php?t=672
Title: Re: Musepack setting for very high quality?
Post by: shadowking on 2020-06-20 11:44:49
Hello synclagz and everyone.

For the last few years I've been experimenting with a different direction.
The motivation was similar; to maintain one collection and avoid lossy only
dillema. Also to maximise portable storage.

I've been using WV 265k -x4c and -hx4c and the results are very good.
On the PC the WV files are decoded as losssless. I have Android phones
since 2012 and even the 2011 model easily handled all the WV lossy modes.
On the phones, I copy the WV files only and not the WVC correction files.
I am pleased with lossy quality , never had an issue so far. As there's only theoretical 'noise',
to me -personally- its lossless or close to it.
If you need transcode to mp3 etc; you do it on the PC and it would work identically
to flac  / ape transcoding -after all the source is decoded lossless

So there's one way of having one lossless  / lossy archive .

Regarding a lossy only  'quality 1st approach'  while not using insane data rate , I would go for
WV 350k -hx4.

Regarding MPC --nmt 18.  It remains an unknown . I know Shy from musepack.net advises against these tweaks.
F Klemm was also discouraging these. So quality scale was made
In another instance, the --ms 15 switch which was touted by some users actually made one problem sample
FSOL much worse for me using --standard --ms 15.  The problem spot devloped a new 'chirp'. It was assumed nothing would
go wrong since -- ms 15 only inflated bitrate. But F Klemm was against that too & suggested --quality 6 or 7 for DOLBY or
vocal cuts.
It could be that tweaking --standard can give worst of everything in certain scenario - Inflated bitrate but still
'standard'.
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-20 13:13:32
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.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-20 13:25:09
@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?
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-20 14:15:26
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) ;)
Title: Re: Musepack setting for very high quality?
Post by: shadowking on 2020-06-20 14:59:10
Link to old images and samples (https://web.archive.org/web/20061125135539/http://guruboolez.free.fr/MPC/)

Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-20 17:27:16
@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. ;-)
Title: Re: Musepack setting for very high quality?
Post by: shadowking on 2020-06-20 18:04:19
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.
Title: Re: Musepack setting for very high quality?
Post by: Gecko on 2020-06-20 18:30:26
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.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-20 19:05:10
@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. :)
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-20 19:19:19
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.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-20 21:32:55
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...
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-21 09:38:21
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.
Title: Re: Musepack setting for very high quality?
Post by: shadowking on 2020-06-21 11:06:21
No quality related changes since mppenc v1.15r ALPHA in 2003
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-21 11:51:30
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
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-21 13:09:47
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
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-21 22:28:29
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.
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-22 10:23:56
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".
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-23 07:11:59
@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
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-23 08:28:48
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.
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-23 08:47:38
@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)
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-23 08:55:51
@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).
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-23 09:27:18
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.
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-23 09:45:56
> 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.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-06-23 09:49: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.
Title: Re: Musepack setting for very high quality?
Post by: guruboolez on 2020-06-23 10:14:19
> 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)
Title: Re: Musepack setting for very high quality?
Post by: magicgoose on 2020-06-23 14:01:46
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.
Title: Re: Musepack setting for very high quality?
Post by: includemeout on 2020-08-09 12:24:07
@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?
 
 Since your question has gone under the radar, and assuming you're using something else, I believe many will agree the Copy to... feature on Foobar2000 (a right-click on desired tracks/albums on any Playlist reveals it under the File Operations option).

Just make sure the Copy Entire Folder Content option is not ticked off and, assuming all you have inside your (album?) folders it's only the .wvc and .wv files, it will copy only the latter (in my case, to a temporary folder, as I cannot copy directly to my phone) while keeping the folder structure.

My only pickle with it is that I cannot copy the cover.jpg files for the artwork (which I insist on being in a separate file in order to save precious storage space and not increasing therefore my already fat ~415Kbps lossy wavpacks, as per my sig), but I'm sure if I looked further, I could find out an option to do the very same process with a backup or file copying utility such as Robocopy whilst copying said .jpg files as well.



Title: Re: Musepack setting for very high quality?
Post by: includemeout on 2020-08-09 13:20:32
Also, since you were at it, I thought I'd chime in with why I, in good Dr. Strangelove fashion, "learned to stop worrying and love Wavpack hybrid":

Firstly, it's the one rip-one-file tagging solution and "fuhgettaboutit": no more, like I'd been doing since the early days we were congratulating Dibrom on starting up this community back in Sep 2001, under another username I'd completely forgotten about - (including its password, by the time I created this one, and I don't use it anymore, so TOS12 wasn't hurt) and I'd recently changed from MP3 -r3mix, to MP3 standard (which obviously meant a new re-rip of CDs) to MPC --xtreme -tmn 32 -nmt 16 -scale .97 (then called MP+) - only to have, a few years later, to re-encode (actually container-change) said MPC files from SV7 to SV8 - and have a few of them corrupted! That meant more re-ripping!

Second, due to previous setbacks such as described above, and the simple fact I'm not that 20-something-year-old of yore, time is also another issue I unavoidably have to factor in, as, at least now, with Wavpack lossy, with all theoretical encoding to other lossy formats guaranteed to be done "losslessly" on the PC with the correction files, I can rest assured an 128GB SD card will suffice for most of my my entire often listened to audio collection on my phone - until prices in my country for a 256 or 512GB card (gulp!) become more affordable.  And that will be in 2 or 3 years, at most. (assuming the economy doesn't turn even sour over here and we will have a less stupid government then!).

Under an exclusively lossless collection, were I to wait for 1TB cards to get cheaper here (as that would take up roughly double the storage space my ~415Kbps lossy wavpacks do), I'd probably have to wait for at least a whole decade! And my being no spring chicken anymore... well, you get the picture!

So it's just not a matter of "HDs get cheaper by the day" - it's a slightly more complicated equation that drove me to use hybrid encoding - and be happy about it!
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-08-10 08:57:15
@includemeout
thanks a lot.
Yes, my question gone under the radar and since then I was thinking what is the best solution for me to make things simple in one archive only. Wv+wwc is definitely a good choice, however I wanted to make things even simpler - just one file archive.

In the meantime I finally ripped my whole cd archive to flac and I end up at 310 GB archive. Not big, but not small either. For mobile phone I need 512 GB sd card to fit whole flac collection but price for mSD cards is still a bit high.

What I was trying to figure out is sweet spot for wavpack lossy so that I have high quality with peace of mind.
After trying to ABX glockenspiel sample and Atem lied (from new guruboolez listening test) I realized that
I can't do it at -b384x1 (using my Audiotechnica ATH-M40X headphones, which are decent in my opinion).
Now I think that I could easily go with -b450x4 (maybe -b512x4 which is still 40% smaller than lossless) and drop lossless completely but still need some confirmation (in my opinion even -b450x1 should be enough for me, but since x4 is a must for high quality, I'll use it to have addition quality headroom).
This setting will reduce my 310 GB flac archive in half and I can fit my whole music collection on 256 GB SD card and still have enough room for future cd rips.
I didn't decided yet what is best thing to do (besides my ripping to lossless for now) :D
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-09-10 06:55:10

 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


@shadowking

I tested a lot of songs using -n switch and -hh is usually better than -x4 on average and peak noise, and encoding using -hh is much, much faster than -x4.
So, how would you rate -b450hh for quality?
Title: Re: Musepack setting for very high quality?
Post by: shadowking on 2020-09-13 13:16:35

 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


@shadowking

I tested a lot of songs using -n switch and -hh is usually better than -x4 on average and peak noise, and encoding using -hh is much, much faster than -x4.
So, how would you rate -b450hh for quality?


It should be similar to -x4 and as you observed slightly higher quality.
Infact this was the way until wavpack v4.40.  The recommendation
was -h , -x or both.  -h is todays -hh and -x is today -x4

For new rips you can use -b450hhc for lossless. rip to an offline drive and copy them to
your main drive. You can then delete the wvc on main drive to give more space and make
transfer to portable player / phone easier. If you keep the offline drive, the entire process
can be reversed too.
Title: Re: Musepack setting for very high quality?
Post by: synclagz on 2020-09-14 06:58:57
Thanks a lot. ;)
Even -b450hh is probably enough for standalone arhive but I'll use correction file and decide later if I need it or not.