HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: synclagz on 2023-08-16 11:18:28

Title: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-16 11:18:28
Hi,

I was wondering which software audio player support WV+WVC playback beside foobar2000?
I'm using foobar for now but is there any alternative in case that foobar is not available (in the future) or not
working for some reason?
(I like to have backup solution) ;)

Thanks.

Best regards.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-16 14:13:58
Winamp and XMplay .  I'll keep testing. W10x64 .

Added: DeadBeef
Added: Audacious
Added: Aqualung
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-17 06:45:35
@shadowking

Thanks. I'll test few to see how it works.

Do you think is better to use x4 or s0.5 in general?
I find s0.5 - s0.75 better on medium-high bitrate but I'm not sure is it safe/reliable to use in general.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: Porcus on 2023-08-17 08:21:55
x4 spends (a lot of) encoding effort to improve lossless compression. Never tested the impact on the lossy part, but at worst it shouldn't make any difference except on your patience.

Interesting to see that the correction files are honoured by more than just fb2k.
Note, you cannot expect it to work in Matroska even for players that support .wvc.
Yes Matroska itself does support it - storing the lossy core and the correction separately and with instructions that this is a correction (and then you could just demux and export the lossy without re-encoding, a bit more involved than mere file copy but still) - but I have no idea if any player would play it losslessly. Or if any end-user bothers.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-17 10:27:01
@Porcus
It would be nice if wv+wvc in matroska can play losslessly. But demuxing to copy just wv file for mobile use would be VERY time consuming.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: Porcus on 2023-08-17 10:46:11
But demuxing to copy just wv file for mobile use would be VERY time consuming.
Yeah, that is one reason why the "if any end-user bothers".
You would probably want some .bat file you could drag and drop the .mka files onto.

I certainly appreciate the idea that you can just copy *.wv onto a portable device, but myself I would never dare keep my lossless collection on something that depends on two filenames to match. Fine if I'd never touch it, but unfortunately I will.
YMMV because YClumsinessMV.


(As far as Matroska goes, I don't know whether it handles other hybrid lossy/lossless formats the same. Like DTS-HD MA? And if anything can utilize that either.)
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-17 11:04:30
@shadowking

Thanks. I'll test few to see how it works.

Do you think is better to use x4 or s0.5 in general?
I find s0.5 - s0.75 better on medium-high bitrate but I'm not sure is it safe/reliable to use in general.

It depends if you want super fast encoding vs slower.. Lossless compression will improve slightly on modern music.
If you have many GB or TB's of storage it wont make much difference.  However it could be more significant for

-sample rates above 48khz (HIres audio etc)
-Highly tonal / artificial sounds or genres
-Old 60/70's stereo with lots of seperation (WV defaults to fixed joint stereo, X modes will auto detect best setting)

For lossy part, most of this applies except for the lossy bitrate.

For using -s ,  In hybrid lossless compression only the file size will change. For s0.5 - s0.75 the overall total bitrate
will be 1 - 3 % higher than using default DNS or -S0. The extra noise in HF makes lossless compression a bit less efficient.
If noise is shifted down like -s-0.5 it can actually improve compression.  The DNS tries to stay there more or less but also up or down as needed.

How the -s applies to lossy is different as there is a psychoacoustic effect. The small increase in total size can yield improvement
to lossy quality.  How it will work depends on the audio and the listener. For lowish bitrate around 200k (44/16) the default
DNS is by far best IMO . For 256 s0.5 can be used as the error if audiable at all doesn't sound to me un natural, In contrast -s1 is something that never sat well with me when its exposed.  So it depends on your HF sensitivity, sample, age  etc.

If not sure the default dns setting or not using -s is the way to go in most cases. Either way IMO for my ears @ 256 + a mild s0.5 is not a big deal even if it is a bit 'off'
If one cannot distiguish say a 22.5khz samplerate (10khz lowpass),  -S1 (for 44khz or higher) might be the way as most noise in the audiable range is shifted up .
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-17 11:20:17
Finally, How does one listen ? 

- Using hybrid lossless (.wv+wvc) or mainly lossy .wv ?

IMO for hybrid lossless its an easier equation:  256k , normal or -h,  without -x ; superf fast,
works great on pc (lossless) and on phone & car audio it sounds very good.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: Porcus on 2023-08-17 12:26:50
According to the manual, it will employ dynamic noise shaping by default - since version 4.50.
Those who have used WavPack lossy for long enough, might by now consider to leave it up to the encoder. What "long enough" means, depends on whether the algorithm has improved after 4.50, I have not checked.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-17 12:48:39
According to the manual, it will employ dynamic noise shaping by default - since version 4.50.
Those who have used WavPack lossy for long enough, might by now consider to leave it up to the encoder. What "long enough" means, depends on whether the algorithm has improved after 4.50, I have not checked.

Yep, Since 4.50 dns is used by default at sample rate 48khz and lower. Usually its best to stick with it.
Rarely, a manual -s setting produced better result.  Since 4.50 i am not aware of any quality related changes.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-17 13:32:02
Finally, How does one listen ? 

- Using hybrid lossless (.wv+wvc) or mainly lossy .wv ?

IMO for hybrid lossless its an easier equation:  256k , normal or -h,  without -x ; superf fast,
works great on pc (lossless) and on phone & car audio it sounds very good.


I'm mostly concerned about lossy part and going for -s0.5 was usually better on mitigating artifacts.
At least in my limited testing.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-17 14:39:45
Finally, How does one listen ? 

- Using hybrid lossless (.wv+wvc) or mainly lossy .wv ?

IMO for hybrid lossless its an easier equation:  256k , normal or -h,  without -x ; superf fast,
works great on pc (lossless) and on phone & car audio it sounds very good.


I'm mostly concerned about lossy part and going for -s0.5 was usually better on mitigating artifacts.
At least in my limited testing.

Well since your going for medium to high bitrate, I guess your looking at 320 to 500.
I'd try -b6hx4 with and without -s.5.  Its equiv to -b530  .   I dont think i was ever able
to abx it or -b500hx4.  I guess even -hhx4 can be also used.  On top use the -c to create correction.
Then move or .zip the wvc's; to [artist/album.zip] to another drive or location etc..
So, Now you have the quality and the ability to reconstruct the original without having 2 collections and uses less space too.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-17 15:04:02
@shadowking

Thanks. I'll test few to see how it works.

Do you think is better to use x4 or s0.5 in general?
I find s0.5 - s0.75 better on medium-high bitrate but I'm not sure is it safe/reliable to use in general.

 Short answer = Yes for both -x4 and -s0.5 .. 0.75
If you can't hear s.5 in general, It means that theres enough signal to mask it and at that amplitude your
hearing ability is diminished to it.  You get less masking the lower the bitrate and louder levels.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-17 15:11:40
Basically, What you need to do is get a few sample of music with plenty of 'space' between notes or solo opera vocals.
Then test -s.5 vs dns vs -s0 at  typical bitrates that you use. If you can't pick -s.5 or even -s0 as regressive it means
what I wrote in the previous post.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-18 10:28:28
Thanks for the detailed info.
I'll test few samples to see which setting works best.

Most of my concern is this sample (which I ABX-ed a lot):
https://hydrogenaud.io/index.php/topic,120193.50.html

I worry if similar sample could appear in my collection or could come upon one in the future.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-18 14:40:54
Thanks for the detailed info.
I'll test few samples to see which setting works best.

Most of my concern is this sample (which I ABX-ed a lot):
https://hydrogenaud.io/index.php/topic,120193.50.html

I worry if similar sample could appear in my collection or could come upon one in the future.

Maybe its also worth resampling to 48khz. In theory theres extra room for algorithms and
noise shaping to work. In foobar you can add the resampler dsp to the converter preset.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-21 09:28:57

Maybe its also worth resampling to 48khz. In theory theres extra room for algorithms and
noise shaping to work. In foobar you can add the resampler dsp to the converter preset.
[/quote]


Do you suggest resampling whole music collection from 16/44 to 16/48 or you meant only critical samples?

Also what do you think about -b550hx4s0.5 setting without correction for main ("master") archive?
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-21 10:23:46

Maybe its also worth resampling to 48khz. In theory theres extra room for algorithms and
noise shaping to work. In foobar you can add the resampler dsp to the converter preset.

Quote
Do you suggest resampling whole music collection from 16/44 to 16/48 or you meant only critical samples?
Whole collection like opus does.

Quote
Also what do you think about -b550hx4s0.5 setting without correction for main ("master") archive?

That is pretty much what I'd use for a master archive , Or 598k for 48/16 samplerate.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-21 10:40:46
@shadowking

Which setting in foobar2000 do you suggest as best approach in resampling to 16/48?
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-21 10:53:23
@shadowking

Which setting in foobar2000 do you suggest as best approach in resampling to 16/48?


Under the processing section you add the DSPs ; In this case the resampler (i use dbpoweramp) or retroarch.
Then under resampler options set samplerate to 48000. 

For wavpack commandline you can use  -b6.23hx4s0.5

This will give you 550 for 44/16 and 598 for 48/16 .
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-21 12:44:51
@shadowking

Thanks a lot. :)
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-22 08:32:04
@shadowking

Did you find that resampling to 16/48 helps problem samples?
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-22 13:07:56
I think there is a modest improvement.  For codecs like Mp3 as well  with EIG sample.
But  i'll have to to much more testing.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-23 14:08:46
wavpack lossy 320k , retroarch resampler 48k ,normal quality

wavpack -b3.63hx4 . Sample 'furious'

abx

8/10, 44 dns

7/10, 48 dns

2/5,  48 -s0.5

4/5,  44 -s0.5



Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-23 14:20:38
Velvet sample.   -b2.9hx4 (256k), Retroarch resampler.

5/5 ,44, dns

4/5, 48, dns
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-23 14:26:11
@shadowking

Interesting test.
Definitely harder on 16/48.

Do you think that only resampling alone can cause quality degradation
or is 100% safe to resample?
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-23 14:40:37
Not 100 % sure.  However Retroarch gives consistent good results.

I think with high quality resampler like retroarch it should be very safe. I have a positive feeling on it.


Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-23 14:43:58
This 44>48 and vice versa is done a lot in the background for years.
I read a post on steve hoffman forum that one user took a transparent sample
and resampled back and forth 100 times and it remained transparent. If its true its another
good sign.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-23 14:54:53
I am starting to see it this way; 44/16 is great but not end all. It was for CD-hardware & after all video uses 48/16.
I searched online and consensus is to use 44 for music and 48 for video.  but after all this i am not
convinced and imo 44/16 is for 100% compatibility with CD-Audio discs and hardware players. (some 1980's limit ?)
48/16 is maybe more suited for computers and post-cd hardware (mp3 players/phones) while still adhering to the 44/16 goals.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-24 06:45:32
This 44>48 and vice versa is done a lot in the background for years.
I read a post on steve hoffman forum that one user took a transparent sample
and resampled back and forth 100 times and it remained transparent. If its true its another
good sign.

This sounds encouraging at least. Should be safe.
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-27 12:54:47
Good news, I tested your problem sample and 48k (retroarch) helped both wv and mp3 a lot.
So much I that at -b3.5hx4 i didn't need -s.5.  This was on a casual listen on speakers.


Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-27 18:05:18
 I was able to abx up to -b3.5hx4 / 48k.  even then the difference is not annoying.
-b4hx4 dns , was small difference 4/5 + 4/5 = 8/10 
-b4hx4s.5,   was easier to abx that dns @ 5/5 - more distinct hf boost
-b4hx4s.75, this one was hard and 3/5 - the small hiss just 'sinks'
maybe i could do it on more volume but i do not want tinnitus.

All above resampled with retroarch @ 48k
--
I tried to see if -b3hx4 48k & 32k would fix furious since 44.1 was always abxable, but i could abx both. still not too bad.
-b4hx4 was enough for 48k , 44.1 & 32k

32k samplerate is also excellent for me @ -b4xh4 gives 256k vs 400 for 48k.


Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-28 07:19:19
Good news, I tested your problem sample and 48k (retroarch) helped both wv and mp3 a lot.
So much I that at -b3.5hx4 i didn't need -s.5.  This was on a casual listen on speakers.


You mean this sample?

https://hydrogenaud.io/index.php/topic,120193.50.html

I've never tried 32k resample. Interesting approach.
Besides smaller bitrate, are there any other benefits?

Regarding 48k or -s0.5 is probably different for each sample.
One could benefit from 48k, other from -s0.5.

One small request (if you are willing):
Could you try FhG AAC (Winamp) at 320k CBR
on Furious and EIG samples?

I find FhG AAC (Winamp) excellent at 320k.
Very robust, fixing almost all (if not all) problem samples (for my ears and equiment).
My first choice next to lossless and WV (384k+)
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: shadowking on 2023-08-30 14:58:39
Yep that sample.

32 k cuts freq around 15.5khz. In theory you avoid problems in very HF range from going 'down' to lower
audiable range. If 16khz or close is transparent in music its another way to explore.
Another way is semi-lossless approach; resample original to 32k flac,WV.  The bitrate reduction is big. Add replaygain and
its even more.  A loud 1000kbps lossless 44.1 can be reduced to 750 etc.

I'll have to test this fhc aac soon, but I must say I 've managed to make lame perform good all round at half the rate.
the command line is lame --abr 172 -f  (resampled to 48k with retroarch).
Title: Re: Wavpack lossy + Correction - Which software players support it?
Post by: synclagz on 2023-08-30 19:19:59
@shadowking

So 32k is similar to lowpass 15.5 probably with bitrate reduction.
I'll have to test this on few samples.

I've tried "my" sample with lame --abr 172 -f but used sox resampler to 48k.
Bad pre echo.
I've realised that I don't have retroarch. :D
I have dbpoweramp resampler, PPHS and Sox which I added few months ago.

Than I've tried FhG AAC (Winamp) at 160 CBR.
Far better. Difference is there but sonds very good.
I suggest you to try FhG @160k cbr.
Very robust.
@224k is almost gone.
Apple aac can't solve it even at 320 cvbr.