HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: BearcatSandor on 2018-04-05 01:50:29

Title: Compressing DTS wav files?
Post by: BearcatSandor on 2018-04-05 01:50:29
I have some DTS wav files from a DTS cd.  When compressing using wavpack using

wavpack -hhx3myd --allow-huge-tags -w encoder -w settings

I get a file that is just static.   I'm assuming that's because of the compression.  Is there a way i'm supposed to be compressing these files? If compression simply won't work, can i turn them into uncompressed wv files so that i can at least have the tagging available?

Thank you.

Title: Re: Compressing DTS wav files?
Post by: lvqcl on 2018-04-05 03:05:17
I think it's a player problem: it probably doesn't expect DTS WAV inside wavpack.
Title: Re: Compressing DTS wav files?
Post by: bryant on 2018-04-05 06:02:20
I've heard about this before where a player can only recognize DTS if it's in a WAV file. Maybe the author can fix this. If, for example, it works with FLAC then it should be easy to do the same detection with WavPack. Also, if FLAC works that might be a reasonable solution if they're not willing to make the fix.

WavPack does not have a mode without compression, and that probably would not work anyway because the player is simply only checking for DTS with certain file types. This is different than Foobar2000 (I think) which detects the DTS in the audio itself.
Title: Re: Compressing DTS wav files?
Post by: magicgoose on 2018-04-05 21:27:11
Is there a reason to "compress" DTS-encoded samples with WavPack at all? They won't get smaller, or, more correctly, this is extremely unlikely.
Oops, didn't see it at the first time that you need tags. But IIRC, WAV files can have some tags too. Does your player of choice not understand tags in WAV files?
I just checked, foobar2000 can write Artist tag in a WAV file, probably all other regular tags are no different.
Title: Re: Compressing DTS wav files?
Post by: lvqcl on 2018-04-05 22:07:02
Is there a reason to "compress" DTS-encoded samples with WavPack at all? They won't get smaller, or, more correctly, this is extremely unlikely.
IIRC 2 upper bits in DTS-WAV are always 0, so it's possible to compress them to 14/16 = 87.5% of their original size.
Title: Re: Compressing DTS wav files?
Post by: Porcus on 2018-04-05 23:36:18
possible to compress them to 14/16 = 87.5% of their original size.

I got curious. Tested the new WavPack 5.1.0 on the only DTS-CD I have, and it compresses better with -f than with -h -x3 than with -h which was very much alike -hh -x3 ... was that expected? Only .1 percentage point, but still.

TAK 2.3.1 beta and FLAC -8 to -0: both ranging 89.1 to 89.8 percent (TAK vs FLAC differences within padding, I think).
WavPack "fast" 88.7 percent with/without -x6, about .1 worse with -h or -hh
OptimFrog default setting or --advanced-compression: 86.8 percent. Take 0.2 or so off for the infeasible --maximumcompression, I didn't have the patience for more than two files.

So the froggie gets below the "nobrainer if you know the structure" 87.5. Hardly worth optimizing for, considering how scarce these files are, but worth posting ... maybe.
Title: Re: Compressing DTS wav files?
Post by: magicgoose on 2018-04-06 14:02:17
Is there a reason to "compress" DTS-encoded samples with WavPack at all? They won't get smaller, or, more correctly, this is extremely unlikely.
IIRC 2 upper bits in DTS-WAV are always 0, so it's possible to compress them to 14/16 = 87.5% of their original size.
Interesting, didn't know about that!
Title: Re: Compressing DTS wav files?
Post by: Porcus on 2018-04-06 14:45:02
IIRC 2 upper bits in DTS-WAV are always 0, so it's possible to compress them to 14/16 = 87.5% of their original size.
Interesting, didn't know about that!
Because DTS-CDs are just standard CDDAs, physically; and, if there is no decoder that recognizes the signal as DTS, it's gonna be played back the way it is stored on the CD, which sounds like white noise.
And full volume static is actually very loud. Therefore, attenuate by two bits, and you have room for a CBR@1234.8 kb/s (lossy, multichannel!) codec.
Title: Re: Compressing DTS wav files?
Post by: magicgoose on 2018-04-06 15:59:02
And full volume static is actually very loud.
True. Too bad they did not know what would happen to CD mastering later, when most albums in popular genres also sound obnoxiously loud. :D
Out of curiosity I scanned full scale uniform white noise (stereo, 44.1kHz) with foobar2000 ReplayGain scanner and it shows -19.35 dB.
Worst actual music records have ReplayGain resuls about -13 dB, that is about only 6 dB quieter, so, it seems, had they known about that, they could use 1 bit more. :D
Title: Re: Compressing DTS wav files?
Post by: Porcus on 2018-04-06 16:48:13
Worst actual music records have ReplayGain resuls about -13 dB, that is about only 6 dB quieter, so, it seems, had they known about that, they could use 1 bit more. :D
If consumers have already turned the volume down to match that level, sure. I have a Merzbow CD with RG album gain closing in on -22 dB. The "worst" non-Merzbows I have are a version if Iggy & The Stooges' "Raw Power" and Ulver's "Nattens madrigal", both album gains at -16 dB point twentysomething.

But I have a few (non-classical, even!) CDs with RG album gain of > +4 dB. From there to -19 there could be some damage to equipment, neighborhood relations and general sanity.
Title: Re: Compressing DTS wav files?
Post by: magicgoose on 2018-04-06 17:12:49
By the way, Ulver's "Nattens madrigal" was later re-released with less destructive mastering (it's in 2014 box set named "Trolsk Sortmetall"). You might be interested. 
re. the loudness: to be on the safe side in the modern crazy world I usually turn to zero before starting to play anything.

> (non-classical, even!) CDs with RG album gain of > +4 dB
IIRC that's pretty much normal for many older rock albums too, some of them have relatively loud drums in the mix, and then the album needs to be about this quiet in order to keep them as is (without clipping or limiting). Miss those days.