Skip to main content

Topic: WavPack VBR (quality oriented) mode (Read 26174 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • darkbyte
  • [*][*][*]
WavPack VBR (quality oriented) mode
Reply #25
The “fast” mode only provides two decorrelator passes for the “extra” mode to work with, so it's pretty limited in what it can do in difficult situations.

It's sad that even if i had translated the Java code to Dart still don't understand how the codec works. Thanks for the info bryant!
WavPack -b4x4hc
Opus --cvbr --bitrate 256 --framesize 5

  • shadowking
  • [*][*][*][*][*]
WavPack VBR (quality oriented) mode
Reply #26
I tested  atemlied at lower bitrate using -hhx4. The quality is good down to 360kbit. At 350k I could start to detect it . Also lower volume helps more as you get less fatigued and less hearing loss.

b365hhx4 = 4/8

b360hhx4 = 2/8

b350hhx4 = 7/8


wavpack 4.8 -b4x4s0.75c

  • shadowking
  • [*][*][*][*][*]
WavPack VBR (quality oriented) mode
Reply #27
Compression speed with b380hhx6  is very slow so i wonder how much bitrate should i spend if i like to use the fast mode instead but still achieve transparency in hybrid mode. I'm curious about fast mode because encoding my whole collection takes a lot time and i'm also working on a Wavpack decoder written in Dart and i can achieve considerably lower CPU usage by decoding fast mode encoded files.

I've tried b420fx4 yesterday and it gave a very good 45x compression speed on my computer instead of 6-12x compression speed with b380hhx6.
I wonder how transparent is this setting for you shadowking? In the final average bitrate it's only 40-50kbps higher for me than the what you suggested which is acceptable (around 448kbps for me) but it's a lot faster.



I depends what you are after - generally transparent with correction files or  extreme quality for perhaps lossy archiving. What David said is true although using -x4 with -f helps a lot. I think there are a few HF heavy samples that degrade with the -f mode much more than normal mode. Also -x6 is maybe overkill in most situations even tough ones.  On my pc -x4 is twice as fast and im not not sure i can abx between them. I think -x4 is the more 'practical' paranoid -x level .

In general for extreme quality use:


350~400k -hx4 or -hhx4
400~450k -x4
500~550 -fx4

Settings generally transparent for portable use & faster encoding :

300k or more -x3 or -hx
wavpack 4.8 -b4x4s0.75c

  • darkbyte
  • [*][*][*]
WavPack VBR (quality oriented) mode
Reply #28
I depends what you are after - generally transparent with correction files or  extreme quality for perhaps lossy archiving.

I've come into that conclusion that encoding into ~448kbits hybrid (420kbit x4 normal + correction) gives a great compromise:
  • It can be encoded relatively fast (sacrificing lossy bitrate to be safely transparent without using über encoding settings)
  • Gives half the size of the original lossless file if i use the lossy part to quickly copy some music on my portable devices (laptop, phone) while virtually maintaining the high quality of the lossless audio.
  • Tags and artwork are the same in the lossy and lossless version.
  • I don't have to maintain a lossless + lossy collection of the same tracks.
  • It raises the overall size (lossy + correction) of a whole album minimally compared to the same album in FLAC -5 so it's a good option for archiving. If a better option for hybrid encoding (WavPack VBR , HD-AAC) shows up later i can change without quality loss.
  • Last Edit: 07 November, 2013, 04:33:59 PM by darkbyte
WavPack -b4x4hc
Opus --cvbr --bitrate 256 --framesize 5

WavPack VBR (quality oriented) mode
Reply #29
I tested  atemlied at lower bitrate using -hhx4. The quality is good down to 360kbit. At 350k I could start to detect it . Also lower volume helps more as you get less fatigued and less hearing loss.

b365hhx4 = 4/8

b360hhx4 = 2/8

b350hhx4 = 7/8


shadowking, I've been carefully reading your excellent tests's results but, the way I see it,  there is just this single discrepancy between the ABX results for b360 and b365 above.

Assuming that is the case, what would you attribute that to? Margin of error pure and simple!?

Listen to the music, not the media.

WavPack VBR (quality oriented) mode
Reply #30
  • Tags and artwork are the same in the lossy and lossless version.
  • I don't have to maintain a lossless + lossy collection of the same tracks.


Amen! 

And that was the day my headaches stopped once and for all!
Listen to the music, not the media.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
WavPack VBR (quality oriented) mode
Reply #31
  • Tags and artwork are the same in the lossy and lossless version.
  • I don't have to maintain a lossless + lossy collection of the same tracks.


Amen! 

And that was the day my headaches stopped once and for all!

I'm glad that WavPack's hybrid mode is working out for you guys; that is exactly the use case it was intended for! 

  • DARcode
  • [*][*][*][*][*]
  • Members (Donating)
WavPack VBR (quality oriented) mode
Reply #32
I'll stick with my über paranoid x6, and it's not like I've got a powerhouse of a CPU, matter of fact it's a mere AMD Quad-Core A8-4555M 1.6GHz, but I only encode a couple of albums per week and don't plan on re-encoding my lossless library sooner'n 10 years from now.
WavPack 5.1.0 -b384hx6cmv / qaac 2.64 -V 100

  • shadowking
  • [*][*][*][*][*]
WavPack VBR (quality oriented) mode
Reply #33
I've done more testing to try to get a good command line closer to 300kbps. I think I've made progress. I used the high modes and -x4. Later I decided -x5 / 6 are more defensive. So I arrived at -b320hhx5

Several problem samples where slightly annoying. I decided to experiment with a static noise shaping value , pushing the noise higher up : s0.1 ~ s1.0.

I arrived at s0.7  The results are better than what i expected .  On furious, keys_1644, 41_sec its very close to the original or even transparent. Bibilolo is also good unless you turn the vol way up to ear pain levels. I still get 8/10 on some samples but its close and dont sound like an artifacts at all.

The downside is a bit worse lossless compression if using correction files, more objective noise the lossy file (may not matter from a psychoacoustic pov), possible inaccuracy leading to regressions in some samples. I tried to find problems but at 320k or more its too hard. Even classical music its really good. my feeling is that there is a difference (very small increase in HF hiss)  but doesn't reliably come up in abx tests. Its maybe that my HF hearing is a factor. It seems that s0.7 improves everything around 300k and even the difference is pleasing rather than sounding like artifacts. I am confident so far that any difference would not be heard outside of an abx and even if the was it would be not annoying with 320 hx5 s0.7
  • Last Edit: 16 January, 2014, 06:36:47 AM by shadowking
wavpack 4.8 -b4x4s0.75c

  • DARcode
  • [*][*][*][*][*]
  • Members (Donating)
WavPack VBR (quality oriented) mode
Reply #34
Very interesting indeed, keep it up sk  !
WavPack 5.1.0 -b384hx6cmv / qaac 2.64 -V 100

WavPack VBR (quality oriented) mode
Reply #35
I still get 8/10 on some samples but its close and dont sound like an artifacts at all.


Artifacts? I thought all you could incur by not feeding lossy WavPack a bitrate high enough for a certain audio file, was quantization noise, as it is not a psychoacoustics-based encoder. Or am I mistaken?
  • Last Edit: 16 January, 2014, 05:48:08 PM by includemeout
Listen to the music, not the media.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
WavPack VBR (quality oriented) mode
Reply #36
It seems that s0.7 improves everything around 300k and even the difference is pleasing rather than sounding like artifacts. I am confident so far that any difference would not be heard outside of an abx and even if the was it would be not annoying with 320 hx5 s0.7

These are interesting results...thanks again shadowking for your continuing testing!

When I created the dynamic noise shaping, one of my primary testers had extraordinarily good HF hearing (some HA mambers will remember "den"). He could hear that HF "hiss" that you speak of and it bothered him, although like you say it was probably only noticeable with ABX testing (and I could never hear it).

I'm not sure I would have adopted the dynamic noise shaping just based on those results, but I also discovered the other thing you did that moving the quantization noise away from the extreme HF range improves the hybrid compression ratio. Also the results from EAQUAL indicated a consistent improvement from DNS. But yes, I can see why this might be less likely to have annoying artifacts, especially for those of us with degraded HF hearing.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
WavPack VBR (quality oriented) mode
Reply #37
I still get 8/10 on some samples but its close and dont sound like an artifacts at all.


Artifacts? I thought all you could incur by not feeding lossy WavPack a bitrate high enough for a certain audio file, was quantization noise, as it is not a psychoacoustics-based encoder. Or am I mistaken?

No, you are not mistaken. However, the quantization noise varies in amplitude (it's not just the constant hiss that you would get from a fixed quantization, like 8-bit PCM) and when dynamic noise shaping is used (the default) that quantization noise can be centered pretty low in frequency. This can sound more like "artifacts" or a "roughness" than pure hiss does, but if you subtract the original audio from the lossy version and look at the result, it will still be just pure noise.

WavPack VBR (quality oriented) mode
Reply #38
Thanks Bryant.

Though it's a very fine explanation, just so I finally understand it once and for all:

Thanks to the quantization noise's inherent variable amplitude, the only chance of ending up with pure white noise instead (not that I want to ) would be disabling dynamic noise shaping altogether? (sn = 0)
  • Last Edit: 19 January, 2014, 07:26:36 AM by includemeout
Listen to the music, not the media.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
WavPack VBR (quality oriented) mode
Reply #39
Thanks to the quantization noise's inherent variable amplitude, the only chance of ending up with pure white noise instead (not that I want to ) would be disabling dynamic noise shaping altogether? (sn = 0)

Well, sort of, but not exactly. The quantization noise's variable amplitude is always there no matter what setting is used. The WavPack format supports a fixed quantization level but there's no command line to generate files with it because it really doesn't provide any useful functionality (the noise would become audible during quiet passages, like when you truncate to 8-bit PCM).

If you specify flat quantization noise (-s0) then you will get pure white noise, but it will still jump up and down with the audio level (attempting to remain inaudible). Other values for the -s option cause the noise to be shifted up or down in frequency, but it's otherwise the same. Finally, the default setting (no -s) enables dynamic noise shaping which allows the shifting of the noise frequency to vary depending on the frequency content of the audio (again, in an attempt to remain inaudible).

If you had no hearing above 10 kHz, it might make sense to always use -s1 to shift as much noise as possible into the highest octave (this results in extremely low noise at lower frequencies). In fact, WavPack automatically does this with high sampling rates (>64 kHz) because nobody can hear the noise added above 20 kHz. I did spectrum analysis on some lossy-encoded 24/96 material at one point to demonstrate this here.

WavPack VBR (quality oriented) mode
Reply #40
Those spectrum analyses surely tell us a lot.

Now it becomes clear to me why I was able to ABX ~256kbps during some quiet passages.

As ever thanks a lot Bryant.
Listen to the music, not the media.

  • darkbyte
  • [*][*][*]
WavPack VBR (quality oriented) mode
Reply #41
Does resampling the CD audio input before encoding to 48kHz helps lossy's efficiency? I would think that because the noisy shaping could shift noise to a higher region it does help, however i'm might be wrong about how Wavpack's lossy works.
  • Last Edit: 27 January, 2014, 01:03:37 PM by darkbyte
WavPack -b4x4hc
Opus --cvbr --bitrate 256 --framesize 5

  • saratoga
  • [*][*][*][*][*]
WavPack VBR (quality oriented) mode
Reply #42
Does resampling the CD audio input before encoding to 48kHz helps lossy's efficiency? I would think that because the noisy shaping could shift noise to a higher region it does help, however i'm might be wrong about how Wavpack's lossy works.


I think this would be a very roundabout way of increasing the bitrate.  Rather then resample I'd just increase the bitrate.

WavPack VBR (quality oriented) mode
Reply #43
If memory doesn't fail me, doesn't WavPack automatically do that (increase bitrate) as you feed it in an input file with higher sampling rate/bit depth?



Listen to the music, not the media.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
WavPack VBR (quality oriented) mode
Reply #44
If memory doesn't fail me, doesn't WavPack automatically do that (increase bitrate) as you feed it in an input file with higher sampling rate/bit depth?

There are two different ways of specifying lossy bitrate on the WavPack command line. One is by specifying the actual bitrate (like 384 kbps). This is the same no matter what the sampling rate or number of channels.

The other is to specify bits per sample (like 3.5 bpS). This is probably what you are referring to because it will scale the final bitrate based on sampling rate and number of channels.

However, because WavPack lossy re-quantizes the audio, the input bit depth is irrelevant (all included bits are considered).

As for resampling up to 48 kHz, that would in theory be more efficient, but the increase in efficiency would not make up for the increased number of samples to be encoded. As Saratoga says, better to just up the bitrate.