HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: guruboolez on 2024-03-30 21:12:36

Title: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-03-30 21:12:36
Hi everyone,
I’m lost and I need some technical opinion.

Context: I’m listening and collecting classical music mostly. I switched to lossless 20 years ago with no regrets. On a large collection including some mono recordings, the average bitrate for FLAC converted CDs is between 580 and 590 kbps. Bitrate is therefore very friendly here and I never felt any need for high bitrate lossy encodings. Like many people I create disposable lossy encodings for my mobile phone.

But in the last decade high resolution PCM (24 bit, from 44100 to 192000 Hz) has become more and more ordinary. I never heard any benefit from the extra resolution but I still decided to favour them. I know it’s irrational, and I don’t even try to understand what’s behind my quest for bigger files (hello Doctor Freud). Furthermore, in the last two years many classical music labels decide to record and sell 192 KHz. And now I must face a serious problem.

Bitrate is strongly inflated at 192 KHz. From less than 600 kbps I have to handle 5000 kbps encodings. That’s clearly very high. I can face a few albums at stratospheric bitrate, but nowadays they multiply very quickly and space is out of control. Even for my ‘storage is cheap’ mantra it’s definitely too much.

So what can I do?
Downsizing 24/96 and 24/192 to 16/44 or maybe 16/48 seems to be the obvious choice. There’s no risk for artefacts or audible noise and bitrate is nice.
But I wonder of it’s the best choice. Couldn’t high resolution lossy encoding be technically superior to standard resolution lossless? For pictures and video, it makes no doubt that high resolution lossy is more enjoyable and technically better than uncompressed video at standard resolution. 


Let say I’d like to keep the technical specifications of the HR files: high sampling rate and higher signal-to-noise ratio. What format and what setting should I use to keep the highest quality? What is possibly the best choice for reducing High Resolution bitrate to 800…1200 kbps? How can we measure sound quality at this bitrate?

I currently see these options:
•   Perceptual lossy formats outputting 192.000 Hz: Ogg Vorbis is AFAIK to the only working format/encoder able to reach 192 KHz. I'm pretty sure it's the worst choice (transform and perceptual encoder aren't meant for such high bitrate and resolution)
•   Hybrid lossless formats, like WavPack lossy (I won't use OptimFrog Dual Stream for compatibility reason): amazing tool with many options. I could also reconsider correction files which really make sense with huge downsizing.
•   LossyFLAC / LossyWAV (or LossyTAK for even more efficiency): many presets to play with, FLAC bitstream which is great for compatibility.
•   FSLAC: faster than lossyflac, flac output; but Christian Helmrich doesn't recommend it at high resolution (http://www.ecodis.de/audio/fslac/issues.html).

Here are the competitors, but I really don’t know how to test them. ABXing 800 to 1000 kbps is not an option. Are there any relevant metrics for audio for formats like WavPack lossy or LossyWav? I know there were some interesting debates in the past, but none for HR files. So well-informed opinions are welcome :)


NB: I'm currently running a bitrate table in order to check what settings are comparable in size, and to see what can I expect in size at different sampling rates.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Gabriel Schwartz on 2024-03-30 21:30:06
No
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: itisljar on 2024-03-30 22:09:08
Only way is ABX test, AFAIK, but I am sure you'll soon come to conclusion that 44.1 or 48 kHz is more than enough.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Wombat on 2024-03-31 00:24:22
But in the last decade high resolution PCM (24 bit, from 44100 to 192000 Hz) has become more and more ordinary. I never heard any benefit from the extra resolution but I still decided to favour them.
If ever someone had asked me who honestly may be able to abx highbitrate things i'd answered him @guruboolez

I had several releases at higher samplerates. I do a 24/96 and a 16/44.1 from all that is above and delete even the originals. The 24/96 goes into the backup. The 16/44.1 is on my server for daily playback.
You may wonder but 44.1kHz resampling is transparent to me at least since 20 years and i can't play music loud enough to hear 16bit dither without constructing events. My DAC sounds the same to me in both resolutions.
If i remember right even a James D. (jj) Johnston that knows all the things about human hearing limits finds 64kHz audio is enough for everything even in theory.
There never happened a 64kHz format in public unfortunately so a sane 32kHz filter inside a 88.2kHz or 96kHz file is all youi'll ever need. flac will compress the empty HF area very efficient.
No idea the result is small enough for your needs.

Just my 2 cents
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: DVDdoug on 2024-03-31 05:18:03
I'm going to say no, but if you hear a difference you might perceive the lossy file as "better".

If a higher sample rate keeps ultrasonic sounds then the lossy algorithm has to throw-away something else and it might be throwing away something audible.   (But I assume the perceptual compression algorithms are smart enough to throw-away ultrasonics.)

MP3 (the lossy format I know the most about) does have more dynamic range than 16-bits.    But dynamic range isn't really a problem with CDs or "CD quality", whereas sometimes there are audible MP3 compression artifacts.

Quote
But in the last decade high resolution PCM (24 bit, from 44100 to 192000 Hz) has become more and more ordinary.
And storage has become cheaper.  ;)   And you can compress to FLAC which should give you a file around half the size (similar to the compression ratio you get with 16/44.1).
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: nu774 on 2024-03-31 07:16:32
Hi, as for bit-depth, 24bit + semi-lossy codecs *can* be better than 16bit. At least, I can create such signal artificially.
Attached is a well-known Tom's diner sample attenuated by 96dB.
You can play at normal volume like this:
Code: [Select]
ffplay 24.flac -af volume=96dB
play 24.flac gain 96
16dB one is mostly full of white noise, Suzanne's vocal is barely audible.
On the other hand, 24dB is OK. As can be easily assumed, semi-lossy method cannot compress meaningfully better than simple lossless FLAC (or even worse), since it is too quiet.
Considering real situation, semi-lossy+24dB can efficiently compress loud part and still keep very quiet part.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: nu774 on 2024-03-31 08:15:24
Off course this is usually non-sense. In normally recorded / normally mastered product, -96dB should be well below noise floor. And it shouldn't be audible anyway with normal volume position... unless you are listening to it with dynamic range compressor enabled.
Logically, nothing can stop somebody from exploiting rich dynamic range provided by hi-res, and nothing can stop us from using dynamic range compressor.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-03-31 09:24:52
No
Wow, so much to read  :)
I could rephrase it differently: what would you choose at 300 kbps: a lossy encoding at 44.000 Hz (AAC, Opus) or a lossless encoding (FLAC) at 22.000 Hz or even 16.000 Hz which has no artifact but a muffled sound? I think I know the answer...
At a given bitrate, a lossy stream can produce (much) better quality than a lossless one. But in the case of lossless RedBook vs lossy HR we have to face transparency at both side. HR files have for example a better SNR but the lossy tools probably reduce the SNR as well. The answer is therefore much more theoretical. Hence my questioning.

Only way is ABX test, AFAIK, but I am sure you'll soon come to conclusion that 44.1 or 48 kHz is more than enough.
For sure! I came to the conclusion (https://hydrogenaud.io/index.php/topic,120166.0.html) that 144 kbps AAC is already very close to transparency. The ABX tells me that 200 kbps lossy with any modern format is more than enough for my rational needs.
In the past, here on HA.org which is ruled by TOS#8, people were allowed to use some datasheet or graphs for arguing on debate that are beyond hearing ability: DSD vs PCM, or LossyWav settings, hybrid format vs another hybrid format. It's what I'm looking for: is there any way to measure (or at least for trying) sonic properties (dynamic range, noise level, etc...) of ~800 kbps encodings which don't rest on perceptual techniques?

I had several releases at higher samplerates. I do a 24/96 and a 16/44.1 from all that is above and delete even the originals. The 24/96 goes into the backup. The 16/44.1 is on my server for daily playback.
Just my 2 cents
It's an interesting advice. Put a cap at 24/96 is indeed a way to limit the growing size of modern recordings. I'll nevertheless try to reduce further the bitrate (at least for some albums I don't like that much)  ;)



And storage has become cheaper.  ;)   And you can compress to FLAC which should give you a file around half the size (similar to the compression ratio you get with 16/44.1).

Oups, I wasn't clear enough. I'm already using FLAC myself. Uncompressed stereo 24/192 kbps recordings = 9200 kbps. On average I already reach ~5000 kbps with FLAC (bitrate varies from 3000 to 7000 kbps). For 24/96 kbps, bitrate is around 2500 kbps with FLAC on my side.

Hi, as for bit-depth, 24bit + semi-lossy codecs *can* be better than 16bit. At least, I can create such signal artificially.
Attached is a well-known Tom's diner sample attenuated by 96dB.
Hi, and thank you for you amazing work with LossyWAV. I appreciate your contribution here.
When you develop lossyWAV, do you have a meaningful tool or methodology to measure the effect on sound "quality"?
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: john33 on 2024-03-31 09:39:28
Hi, as for bit-depth, 24bit + semi-lossy codecs *can* be better than 16bit. At least, I can create such signal artificially.
Attached is a well-known Tom's diner sample attenuated by 96dB.
Hi, and thank you for you amazing work with LossyWAV. I appreciate your contribution here.
When you develop lossyWAV, do you have a meaningful tool or methodology to measure the effect on sound "quality"?
I think you may be slightly confused, the author of lossyWAV is Nick.C ;)
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-03-31 09:44:13
 :o
Sorry for my mistake  :-[
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: .halverhahn on 2024-03-31 09:50:54
Downsizing 24/96 and 24/192 to 16/44 or maybe 16/48 seems to be the obvious choice. There’s no risk for artefacts or audible noise and bitrate is nice.
But I wonder of it’s the best choice. Couldn’t high resolution lossy encoding be technically superior to standard resolution lossless? For pictures and video, it makes no doubt that high resolution lossy is more enjoyable and technically better than uncompressed video at standard resolution. 

Best option is to resample to 24bit/96kHz or to save more space 24/48kHz.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Wombat on 2024-03-31 12:54:12
Just to come back to the need of bandwith in the name of science.
Here (https://www.audiosciencereview.com/forum/index.php?threads/high-resolution-audio-does-it-matter.11/post-1927183) James D. (jj) Johnston says exactly this "...filter, that one starting to cut off at 25kHz and finishing at 32kHz. Shorter, no possible interference in the time domain based on current understandings of cochlear dynamics." He even suggests the formula.
Combine that with resampling to 18bit, slightly noise-shaped and flac compresses the empty lower bits and the non existing HF in a 24/96kHz file just fine. Call it flac for humanoids.
This may be the honest way for what MQA wanted to be. ;)
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Porcus on 2024-03-31 14:17:55
Storage is still cheap, there is no reason to use SSD for the off-site collection  ;)

A possible solution first - but maybe @bryant will weigh in on the usefulness at "transparent" levels and possibly shoot it down:
* On your big spinning off-site drive with all the junk on it: WavPack hybrid lossless
* On your computer's SSD, where storage isn't cheap: Only the .wv files.

A possibly interesting thread:
@Nick.C 's thread on TransPCM with float16 and later float24 here: https://hydrogenaud.io/index.php/topic,90770.0.html . Float sounds ideal for classical music with lots of more quiet parts - unfortunately, there isn't much support.
@bryant points out that it isn't unlike WavPack lossy.


On a general note, "everything here involves lossy operations" of course, and the question is whether one can do damage - could naive downsampling be prone to clipping? In the very least, decimating to integer format must be done right.
Not that it should be a problem - if you go 6 dB down, you might just use an extra bit at the bottom as long as you stay clear of ALAC/Monkey's which don't utilize wasted bits.


Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Kraeved on 2024-03-31 14:40:32
The first world (https://en.wikipedia.org/wiki/First_World_problem) problem, huh? Okay, let's put this question into perspective, because snake oil is infinite, to paraphrase the quote attributed to Albert Einstein (https://skeptics.stackexchange.com/questions/18140/did-einstein-say-two-things-are-infinite-the-universe-and-human-stupidity-and), and 192 kHz is no longer the limit of what you can encounter. Here is a modern music cover that informs the source comes with a sampling rate of 352.8 kHz. And below that we see a piece of not so über-expensive audio equipment that claims to handle even 768 kHz.

(https://i1.imageban.ru/out/2024/03/31/1e9283c34948e32ebf6f376d54ef82b9.webp)

(https://i4.imageban.ru/out/2024/03/31/d40086618c66e13ecabdcacdaf130032.webp)

Since Vorbis cannot climb that high, it's no longer an option. Raise the fist and draw some air: WavPack, WavPack, WavPack! Because it supports sampling rates up to 1 GHz, right? Let's take some 4 minutes 192 kHz 24-bit song, process it with SoX resampler (https://hydrogenaud.io/index.php/topic,67376.msg1014620.html#msg1014620) DSP if necessary, and witness how WavPack 5.70 -b4x3 hybrid (without correction files) scales.

Code: [Select]
        Bytes    BPS          Filename  
 ------------- ------ -----------------
   11 046 164    373    44100.lossy.wv 
   12 001 612    406    48000.lossy.wv 
   21 792 564    737    88200.lossy.wv 
   23 802 134    805    96000.lossy.wv 
   43 732 116   1479   176400.lossy.wv 
   47 616 420   1611   192000.lossy.wv 
   88 388 268   2990   352800.lossy.wv 
  204 902 192   6933   768000.lossy.wv

The output grows, no surprise there. So it's just a matter of time before lossy files that preserve that Burj Khalifa (https://en.wikipedia.org/wiki/Burj_Khalifa) sampling rate and Kola Borehole (https://en.wikipedia.org/wiki/Kola_Superdeep_Borehole) bit depth of the source force you to worry about free space again. That is, what you are experiencing now with bloated lossless files will happen later with bloated lossy files. As Karl Marx (https://en.wikipedia.org/wiki/The_Eighteenth_Brumaire_of_Louis_Bonaparte#First_as_tragedy,_then_as_farce) put it, “first as a tragedy, then as a farce”. The good news is you have a hunch on how to proceed.

Downsizing 24/96 and 24/192 to 16/44 or maybe 16/48 seems to be the obvious choice.

This. And you'll still be able to hear the owl flying by (https://youtu.be/watch?v=d_FEaFgJyfA), if, of course, the microphone captured it in the first place.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Nick.C on 2024-03-31 15:13:49
A possibly interesting thread:
@Nick.C 's thread on TransPCM with float16 and later float24 here: https://hydrogenaud.io/index.php/topic,90770.0.html . Float sounds ideal for classical music with lots of more quiet parts - unfortunately, there isn't much support.
@bryant points out that it isn't unlike WavPack lossy.
If using TransPCM to produce FP16 PCM please note that the output is full scale, i.e. ±65504.0, not ±1.0.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Porcus on 2024-03-31 15:35:03
192 kHz is no longer the limit of what you can encounter. Here is a modern music cover that informs the source comes with a sampling rate of 352.8 kHz.

Format introduced nearly twenty years ago. Those files didn't hit the retail until bandwidth got a bit more manageable, but this kind of resolution was part of the 2L label's free-for-download high resolution testbench that was discontinued some time ago because ... well because too old news already I guess.
352.8/24 was/is named "DXD" to suggest a connection to DSD, likely to fool users into thinking that DSD is about that good.

Here you got some PR stunt that outdoes DXD - and looks about as stooopid as this:
(https://i.postimg.cc/44HzZ8n1/2022-06-14-10-36-55-Let-The-Good-Times-Roll-Carmen-Gomes-Inc-Free-768k-Hz.png)
In https://hydrogenaud.io/index.php/topic,93853.msg1006575.html#msg1006575 , guruboolez points out it was originally recorded at 352.8/24 , then mixed in the analog domain and then re-digitized at 768 kHz for ... reasons. Getting you the tape hiss of the Studer.
Compression figures here: https://hydrogenaud.io/index.php/topic,122179.msg1011846.html#msg1011846


Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: shadowking on 2024-03-31 15:59:59
wavpack around 6 bits  per sample (-b6x4c)  . Bitrate will scale to 2000-2500k for 192khz . For sampling rate > 48khz & 6bps , Bryant says all the noise is shifted up ( via 1st order noise shaping) into bat hearing range.  For around 1500k ;  -b4x4c   ( scales to 352k for 44-16) should be a nice option to try. Maybe down to 3.5bps.  The noise will
still be shaped exactly the same ( pushed into the HF ) as its default for above 48khz.

I have some bandcamp 24bit stuff. it can save a lot the lossy file remains same size as 16 bit. 

https://www.wavpack.com/wavpack_doc.html#noncd
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: shadowking on 2024-03-31 16:09:59
I also have a bit of this dilemma; bandcamp etc .  I also created flac, wav, and WV presets in F2k to output 16bit-44.1 as well.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: nu774 on 2024-03-31 16:25:49
Here you got some PR stunt that outdoes DXD - and looks about as stooopid as this:
That spectrogram looks similar to what we get from 1bit DSD in SACD.
Off course wasteful bullshit, but what bugs me is that SACD can be actually mastered better than CD, not tortured by insanely high compression due to the loudness war.

I also have a bit of this dilemma; bandcamp etc .
Exactly. Since bandcamp shows only formats, I usually notice it much later.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Roseval on 2024-03-31 16:39:10
352.8/24 was/is named "DXD" to suggest a connection to DSD

There is. As DSD is not an editable format, DXD was developed for the Merging Pyramix workstation and introduced together with their Sphynx 2, AD/DA converter in 2004. This combination meant that it was possible to record and edit directly in DXD as it is plain PCM.
The final product is converted to DSD and will sound of course superior to PCM.  :)
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Porcus on 2024-03-31 17:12:27
Oh sure it has a connection in name even if no connection in format, that was my point. Capturing pulse-width modulation from a sigma-delta ADC before making integer PCM out of it would save a step in the process leave a step in the process for later. Meaning, if conversion to integer-PCM introduces clipping, you have an earlier file that hasn't.

Then of course it turns out, it isn't possible to edit it, and then they invented the "DXD" phrase that suggests it is "editable" DSD and not plain integer PCM. They should have used float, of course.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: AhoyMatey on 2024-03-31 18:00:20
Since Vorbis cannot climb that high, it's no longer an option. Raise the fist and draw some air: WavPack, WavPack, WavPack! Because it supports sampling rates up to 1 GHz, right? Let's take some 4 minutes 192 kHz 24-bit song, process it with SoX resampler (https://hydrogenaud.io/index.php/topic,67376.msg1014620.html#msg1014620) DSP if necessary, and witness how WavPack 5.70 -b4x3 hybrid (without correction files) scales.

I only accept recordings with a sample rate that saturates my 4 GHz computer CPU.

Nah. I remember as a teenager being annoyed by high frequencies that apparently adults couldn't hear. Seeing the reaction dogs have to dog whistles at ~35 kHz, I think recordings with information above 20 kHz is not a feature. It's a bug. I would go out of my way to obtain speakers that DO NOT reproduce beyond 20-24 kHz.

I'm in luck, since the majority of consumer products DO NOT reproduce beyond 20-24 kHz anyway, regardless of what you feed them.

Maybe if people had their ears bleed more often with such high-pitched tones, they would think twice about advertising it as a positive thing.

(https://i.ibb.co/wsfKcgg/headache.jpg)
( Stargate SG-1 Season 2 Episode 19, main characters getting headaches from long exposure to high-pitched sounds )
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-03-31 20:39:51
I've checked in the past a lot of recordings >96kHz samplerate. In general it contained just noise above sound frequencies 48kHz.
(...)
Best option is to resample to 24bit/96kHz or to save more space 24/48kHz.

I have selected 35 albums from 35 different labels, all sampled at 192 Khz in order to build a bitrate table and make eventually some tests.
You can see in the picture at the bottom a frequency graph of 30 seconds of each album merged into one file. The noise level differs a lot from an album to another. Some recordings are noise free, but many have dither noise. Many recordings also have high-pitched frequency bands at different level. Is it electronic noise generated by some devices, like 15.625 kHz TV signal?
The fifth recording from the left has an insane amount of HF noise and is the less compressible signal (7000 kbps in FLAC). It comes from a small japanese label (https://www.prestomusic.com/classical/labels/4517/browse).
But I agree that none of these 35 albums present any useful information beyond 48000 Hz.

Combine that with resampling to 18bit, slightly noise-shaped and flac compresses the empty lower bits and the non existing HF in a 24/96kHz file just fine. Call it flac for humanoids.
This may be the honest way for what MQA wanted to be. ;)
That's a very interesting solution, thanks! Bitrate should stay below 1000 kbps, format remain highly compatible, and the remaining data should logically offer a superior quality to RedBook specification.

A possibly interesting thread:
@Nick.C 's thread on TransPCM with float16 and later float24 here: https://hydrogenaud.io/index.php/topic,90770.0.html . Float sounds ideal for classical music with lots of more quiet parts - unfortunately, there isn't much support.
@bryant points out that it isn't unlike WavPack lossy.
If using TransPCM to produce FP16 PCM please note that the output is full scale, i.e. ±65504.0, not ±1.0.
I never heard of TransPCM before. I'll also take a look. Thank you to both of you!

@shadowking > thanks for your advice. Your long experience with WavPack lossy is very useful and to be fair I was waiting for your contribution :) But -b6 seems really high. I was expecting WavPack lossy to be more efficient with HR files (more room to handle noise). Am I wrong?
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Nick.C on 2024-03-31 20:52:07
I never heard of TransPCM before. I'll also take a look. Thank you to both of you!
I should also clarify that it does not change sampling rate, just the "container" in which each sample is contained, e.g. 24-bit integer > 16-bit float.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: .halverhahn on 2024-03-31 22:04:01
The fifth recording from the left has an insane amount of HF noise and is the less compressible signal (7000 kbps in FLAC).
[...]
But I agree that none of these 35 albums present any useful information beyond 48000 Hz.
The fifth recording looks like a straigth DSD64 to PCM converting without any filtering. Looking at the freq. plot, a 48kHz sampling would be sufficient for track 5.

Combine that with resampling to 18bit, slightly noise-shaped and flac compresses the empty lower bits and the non existing HF in a 24/96kHz file just fine. Call it flac for humanoids.
This may be the honest way for what MQA wanted to be. ;)
That's a very interesting solution, thanks! Bitrate should stay below 1000 kbps, format remain highly compatible, and the remaining data should logically offer a superior quality to RedBook specification.

Foobar 2000 and the mda dither DSP component for foobar2000 (https://foobar.hyv.fi/?view=foo_dsp_mdadither) is quite handy to do the job.
It will reduce bitdepth to e.g. 20bit, apply noise shaped dither and save it into a 24bit FLAC (lower bits are empty).
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Kraeved on 2024-04-01 00:22:41
Maybe if people had their ears bleed more often with such high-pitched tones, they would think twice about advertising it as a positive thing.

Personally, I focus on hunting for the mastering that makes me happier, stimulating by day or soothing by night, rather than salivating at the sight of ever-increasing numbers. Sometimes songs are remastered for the hi-res edition (https://drewdaniels.com/audible.pdf), so they may have, to the delight of fans, more nuances that were previously sacrificed in the loudness war. However, the pleasantness of such mastering is hardly related to its sampling rate (https://www.audiosciencereview.com/forum/index.php?threads/why-can-i-hear-a-difference-between-32bit-384khz-and-24bit-44-1khz.20906/) and bit depth (https://www.mojo-audio.com/blog/the-24bit-delusion/) — the role of these numbers increases during editing and decreases during playback. So if the mastering turns out to be bloated to give solidity to weightless files (e.g. 24/192), it makes sense to bring it down to the classic audio standard (https://music.stackexchange.com/questions/85212/is-cd-audio-quality-good-enough-for-the-final-delivery-of-music) that has been proven to be sufficient, at least for the sake of a more economical and eco-friendly use of resources. Further improvement exploration of how your favorite songs might sound different requires more or less esoteric devices, purchased or self-assembled: R2R DAC, tube amplifier and planar headphones to name a few. But, in the grand scheme of things, all we need is love to be grateful for the fact that we have hearing at all and improve it first to notice quiet facts against the backdrop of alluring manipulations, to enjoy the silence, and to feel the echoes of celestial music (https://en.wikipedia.org/wiki/Argument_from_beauty) in the anxious-free simplicity.

(https://i4.imageban.ru/out/2024/04/01/c2de820a642cdc97a5fe9d3c7ad25fb0.jpg)
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Wombat on 2024-04-01 02:13:27
Foobar 2000 and the mda dither DSP component for foobar2000 (https://foobar.hyv.fi/?view=foo_dsp_mdadither) is quite handy to do the job.
It will reduce bitdepth to e.g. 20bit, apply noise shaped dither and save it into a 24bit FLAC (lower bits are empty).
No science but a few samples using 18bit shaped dither with this plugin additional to lowpassing at 25kHz, 24dB/octave inside a 24/96 file suggests flac bitrates around 1500kbps.
The shape may be a bit stronger and the filter more refined to optimize it.
I didn't find an easy way to automate it. I am no expert for foobar.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: shadowking on 2024-04-01 11:49:41

@shadowking > thanks for your advice. Your long experience with WavPack lossy is very useful and to be fair I was waiting for your contribution :) But -b6 seems really high. I was expecting WavPack lossy to be more efficient with HR files (more room to handle noise). Am I wrong?

You may be correct . I read the manual again and bryant quotes 1024k is enough to store all the bandwidth for 24/96.
So, If 192/24 source uses similar bandwidth as 96/24  then 1024kbps may be enough . 
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-04-01 20:19:47
You may be correct . I read the manual again and bryant quotes 1024k is enough to store all the bandwidth for 24/96.
So, If 192/24 source uses similar bandwidth as 96/24  then 1024kbps may be enough .
Fine, thanks!

I didn't find an easy way to automate it. I am no expert for foobar.
That's a big issue for me  :o
I tried a different way: instead of lowpassing HF to ~26 KHz and encode to 96000 Hz, I tried to to convert to FLAC using an odd sampling rate (which is supported according to FLAC documentation).
I tried first with FLAC at 54000 Hz:
It works well. I don't know if all players are compatible with such odd sampling rate.
I tried then 60000 Hz, 58000 Hz, 56000 Hz, 52000 Hz => output file is always 192.000 Khz. Is it a bug or a feature? Probably a bug. I'm able to create a 60000Hz and to save it at the same sample rate with my old Audition and Plug-in (FLAC1.21).

If I limit the sampling rate to 48000 Hz:

Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-04-01 20:44:47
If I summarize:

An excel file is available at the bottom.

At the moment, the possible formats of choice are:

An interesting start would be to check (if possible) if FLAC 16/44100 is better than WAVPACK LOSSY at 96.000 Hz (b3 setting). Both have a very similar bitrate for classical music at least.
Another choice would be to choose something in the ~1000 kbps, between pure FLAC at odd sampling rate and bitdepth and WavPack, and probably LossyFLAC at similar bitrate.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Porcus on 2024-04-01 21:01:01
Are you confident then that the resampling doesn't make for clipping?
A volume adjustment of -3 dB would safeguard (maybe completely?) - and also it does away with half a bit. Since you are considering 18, 19 and 20 - there is nothing "wrong" about going in between?
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-04-01 21:01:53
@Porcus: you're right, I haven't thought about clipping!

EDIT: lowering the volume also reduces the bitrate: from 1011 kbps to 964 kbps with FLAC 1.42 -8, 48.000 Hz and 20 bit. It's -1 GB on my setlist (19.9 Gb to 18.9 Gb). I'll probably correct the table in the next days.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: bryant on 2024-04-01 22:47:27
Hi Guru!  :)

I’ve over the years sort of given up on this topic because there seems to be a very limited audience for any middle ground here. I looked back and 16 years ago I made comments here and displayed graphs (https://hydrogenaud.io/index.php/topic,63086.msg565821.html#msg565821) (which are now gone, along with most of my text) and got virtually no response. I’m responding to your question now, but also trying to give a more general answer summarizing my thoughts regarding WavPack lossy as a high-resolution storage or distribution format. And the other options you are considering are also basically similar and perfectly viable, if perhaps not as straightforward.

What to do with huge high-resolution downloads?

If you’re an objectivist then the obvious choice is to transcode everything high-res to 16/44.1 or 16/48 and be done with it because you can’t ABX it and there’s no definitive evidence that anything else sounds any better. AAC or Opus might be better still.

On the other hand, if you’re a subjectivist then any form of lossy encoding is very suspect (and virtually always audible), so lossless is the only way forward. Uncompressed might be better still.

Neither of these philosophical camps have ever left any space for something like lossy WavPack. Depending on your viewpoint it’s either “why bother?” or “why risk it?

Let’s assume for a moment that the people who regularly report the improvements in high-resolution audio actually do experience something. I mean, the hard evidence is overwhelmingly against it, but let’s pretend there’s something there that we don’t want to miss out on, especially after we paid extra for the hi-res version (even if it’s because we’re paranoid that they intentionally make the lower-res versions sound worse). What could it be? Well, there are only three possibilities (and perhaps some combination):


Obviously #1 and #3 are related, but I listed signal-to-noise ratio last because I believe it’s the least likely to be significant. The reason we go to 24-bit is not because we need the noise floor to be 144 dB below the music at full scale (which is just silly), but because when the signal level is much lower, we don't want to run into the noise floor. Turn the volume way up during a very quiet passage from a CD (like a reverb tail) and the hiss (or distortion, if not properly noise-shaped) you hear is the limitation of 16-bit audio.

Of course, don’t really do this because when the music starts again you’ll damage your ears or speakers, and it can be argued that this is somewhat irrelevant because it’s unlikely that a single volume setting will allow you to both tolerate the loud parts and hear the hiss in the quiet parts (unless, of course, the original material has a higher noise floor than CD quality, which means higher bit depth won’t buy much). But the point is that 24-bit audio has the advantage of a greater dynamic range than 16-bit, and this is achieved with a higher signal-to-noise ratio. But, that’s not the only way to increase the dynamic range, and in fact it’s a rather expensive way.

So, if we can assume that only #1 and #2 are possibly significant, then something like WavPack lossy might provide the perfect solution. It’s all done in the time domain, so there’s no loss of bandwidth, and because the quantization error scales with the level, there’s no loss of dynamic range (at very low levels it reverts to lossless). The only thing lost is the ultimate signal-to-noise ratio, which I’ve argued above is not the actual purpose of using 24 bits.

In fact, I’ll argue that linear PCM is really extraordinarily wasteful. The number of bits being consumed to have 144 dB of signal-to-noise ratio at 48 kHz (or 96 kHz!) is crazy. Lossless compression works to get rid of the space above the signal, which is nice, but it’s the depths below the signal that are an even greater waste.

For real-world numbers, I regularly use -hx4b4 for lossy compression of 24/96 material. Generally this results in about 800 kbps, which is somewhere around 3.5 times less than what lossless compression would yield. Here’s a typical comparison of the signal and noise spectrum. Note that the signal and noise move up and down together, but at any time the noise is down (compared to the signal) around 20 dB at 20 kHz, and more like 60-70 dB in the midrange.

(https://www.wavpack.com/images/24-96-compare.png)

I also just tried using just 3 bits per sample for some 24/192 material I created from a DSD128 recording. You can see the source DSD noise staring up around 45 kHz and the new noise is just peeking out above that by about 6 dB (except at the highest frequencies), and in this case the final bitrate is almost 4.5 times less than lossless (1192 vs. 5328 kbps). I’m sorry, but that’s just a crazy waste.

(https://www.wavpack.com/images/24-192-compare.png)

Another aspect of this worth mentioning is that the noise component is generally inaudible in isolation when played at the same level as the signal. In other words this lossy encoding does not rely on masking like traditional codecs, and it makes sense (to me anyway) that if the noise is not audible without the music present (which is much easier to test) then it’s not going to suddenly become audible with the music added.

You can obviously create correction files if you’re not ready to delete the original, which will result in very little, if any, overhead compared to the original FLACs. Or increase the bits one or two to be conservative and just keep the lossy (the numbers I’m suggesting here are minimum recommendations).

To summarize, I’ve given up suggesting this as a viable alternative to conventional hi-res recordings, although maybe with people having second thoughts about MQA this will be revisited. The bottom line is if you’ve downloaded hi-res recordings it would be a little strange to simply down-convert them to 16/44.1 or 16/48, especially since those resolutions were probably also available at the time for less money. But I think I’ve demonstrated that for about the same bitrate, WavPack lossy allows you to retain the additional information rather than just discard it. Whether that additional information would actually be audible becomes somewhat irrelevant when the goal is just piece of mind.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Kraeved on 2024-04-02 00:45:46
Turn the volume way up during a very quiet passage from a CD (like a reverb tail) and the hiss (or distortion, if not properly noise-shaped) you hear is the limitation of 16-bit audio … the point is that 24-bit audio has the advantage of a greater dynamic range than 16-bit, and this is achieved with a higher signal-to-noise ratio.

The advantage comes while editing. As for playback, how many bits can you hear (https://www.audiosciencereview.com/forum/index.php?threads/how-many-bits-can-you-hear.32787/)?

If you’re a subjectivist then any form of lossy encoding is very suspect (and virtually always audible)…

I remember subjectivists who, ignoring the research of optical illusions, saw signs of civilization in low-resolution spots on Mars (https://en.wikipedia.org/wiki/Cydonia_(Mars)) that resemble a face. Okay, there is Pi. It is used, for example, to build bridges and dams. The decimal expansion of Pi is infinitely long, namely 3.1415926535897932384626433… Downsampling 192 kHz and higher rates at least by a factor of 4 is as lossy as rounding Pi up to this length, which is still sufficient to serve the purpose. Expecting someone to hear the difference is like expecting someone's eyes to see millions of bacteria, fungi and viruses that compose our skin microbiota. It's just that the word lossy, uttered without specifying the scale of the loss, first brings to mind the worst artifacts of the MP3 childhood, whereas in this case it's just the operation that was not done in the studio for marketing reasons, although those anxious folks somehow accept without worries the fact that the studio reduced 64-bit or 32-bit float to 24-bit integer before delivery. No doubt in the future they will worry about this too.

Neither of these philosophical camps have ever left any space for something like lossy WavPack.

I had. But then I found a few (https://hydrogenaud.io/index.php/topic,124188.msg1040140.html#msg1040140) cases (https://hydrogenaud.io/index.php/topic,120193.msg1041800.html#msg1041800) when WavPack hybrid failed. You called those cases anomalies. But in the course of your explanation, you outlined ways how this encoding mode can be improved, which is what I now pray for, even in my own signature. Until then, WavPack lossless only, which looks advantageous against FLAC, which has difficulties with the preservation of non-audio data (https://hydrogenaud.io/index.php/topic,125651.0.html). Peace of mind, you know.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: bryant on 2024-04-02 04:08:37
Neither of these philosophical camps have ever left any space for something like lossy WavPack.

I had. But then I found a few (https://hydrogenaud.io/index.php/topic,124188.msg1040140.html#msg1040140) cases (https://hydrogenaud.io/index.php/topic,120193.msg1041800.html#msg1041800) when WavPack hybrid failed. You called those cases anomalies. But in the course of your explanation, you outlined ways how this encoding mode can be improved, which is what I now pray for, even in my own signature. Until then, WavPack lossless only, which looks advantageous against FLAC, which has difficulties with the preservation of non-audio data (https://hydrogenaud.io/index.php/topic,125651.0.html). Peace of mind, you know.
Yes, I believe that those samples are pathological anomalies. I am curious about them, and have always been interested in different noise-shaping techniques, but I am not working on that and have no immediate plans to. WavPack lossy is not intended to be transparent at any particular bitrate nor is it intended to be competitive with standard codecs at conventional sampling rates. The fact that a couple samples require a higher bitrate should not come as a huge surprise, especially considering WavPack’s relative simplicity. Also consider that neither sample came from CDs or even legitimate music downloads and that they also break many conventional codecs (which is in fact how the first was supposedly discovered). So to call these “failures” and disqualify the mode from contention seems a little odd to me, especially when you refuse to entertain the -h and higher -x modes. But of course this is your call to make.

The application being discussed in this thread is something that conventional lossy audio codecs do not pretend to handle and their authors might even consider pointless (i.e., human hearing extends to 20 kHz, so the first thing they do is remove everything above that). That said, a pathological sample could easily be produced here that also triggers the same “failures”, and I would produce such a sample myself except that in the wild it would pose a real danger to fragile audio systems (tweeters and amplifiers specifically) if played loudly enough. That’s not the point however, and I believe this could be extraordinarily reliable given the usual sources of high-resolution music, which tend to be primarily acoustic and carefully recorded.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: Wombat on 2024-04-02 21:11:57
I mentioned James D. (jj) Johnston suggests a FIR filter we may use as endgame lowpass. Isn't there a foobar plugin already that can handle directly such a formula?
Room correction comes me to mind here.
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: guruboolez on 2024-04-02 21:15:43
@bryant > many thanks for your detailed answer. Your feedback as developer is really precious  :)
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: forart.eu on 2024-04-03 09:02:55
No
+1
Title: Re: Can lossy high resolution outperform lossless at standard resolution?
Post by: .halverhahn on 2024-04-25 10:03:21
If I summarize:
At the moment, the possible formats of choice are:
  • FLAC: resampled to 48000 and 20 bit = 1000 kbps. Not bad. A few improvements over Red Book (+4000 Hz, +4bit) and decent bitrate. No fear of artifact or noise
  • FLAC: resampled to 54000 and 19 bit = 1000 kbps. Not bad either (+10.000Hz and +3bit over RedBook).
  • FLAC: resampled to 54000 and 18 bit = 900 kbps. (+10.000Hz and +2bit over RedBook).
Slight misscalculation in your table: 54kHz Samplingrate = 27kHz bandwidth = +5000 Hz over RedBook

I woulnd't use odd non standard samplingrates. There is a quite big chance that your sound-hardware isn't supporting it.
To test it for support, set foobar output to exclusive mode.
To playback odd rates additional resampling is required by the player or OS.

Quote from: guruboolez
I tried then 60000 Hz, 58000 Hz, 56000 Hz, 52000 Hz => output file is always 192.000 Khz. Is it a bug or a feature? Probably a bug.
By default Foobar is set to Windows "Primary Sound Driver", the "Primary Sound Driver" is resampling it to the standard samplingrate you're set up in your Windows sound settings.

Quote
  • Keeping 192.000 Hz is a total waste of space: no information but noise on all recordings I tried (and most of them are modern and state-of-the-art recordings from the last three years
  • 96.000 Hz is from an perceptual point of view the same waste, but from a technical point of view the upper frequencies contains real information (but of course not audible)
As you paid a Premium for your 24/192 Files, I would go to 24/96 or 20/96 to save space and to be still in the area of peace of mind.  ;)