Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: TTA not lossless? (Read 4470 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

TTA not lossless?

I was running some tests for my codec comparison mentioned here when I noticed that TTA was lossy!

Code: [Select]
> md5sum *.wav
b8ef0372c5bdc674fe8c5dc2986d2d8d  original.wav
10402c6aa07251fdd0ba8b28072db8f9  encode_decode.wav
10402c6aa07251fdd0ba8b28072db8f9  second_encode_decode.wav


That second encode/decode was an encode->decode of it's own output file, not the original, to show it is lossless after its own lossy operation.

While FLAC is lossless here, so it isn't a problem with foreign metadata. You can download the track in FLAC here: http://www.2l.no/hires/index.html, I tested A. Vivaldi: Recitative and Aria from Cantata RV 679, "Che giova il sospirar, povero core"  and B.Britten: Simple Symphony, Op. 4 - Boisterous Bourrée, the results above are of this last one, but the test results say TTA has problems with the other too.

I can't analyse the problem: I don't hear any difference on my stereo setup, I don't have a surround setup and I don't have an audio analyser/editor that supports multichannel, (AFAIK Audacity doesn't) so I don't know if TTA shifts the channels, lowers the resolution or something other.

So, out of curiosity, I tested the 192kHz/24-bit recording which I used here, and I got this:

Code: [Select]
> md5sum *.wav
7110d31ad0ebf38d80eb676d286de079  SolidInc 192kHz.wav
7110d31ad0ebf38d80eb676d286de079  encode_decode.wav


I used TTA1 lossless audio encoder/decoder, release 3.4.1, so I guess True Audio isn't that true

Edit: there was some foreign metadata in SolidInc 192kHz.wav, so I tested again, and it works.
Music: sounds arranged such that they construct feelings.

TTA not lossless?

Reply #1
Or maybe you just fail at comparing the files.

WAV is a container format, it has a header which can have different content even when the audio samples itself are the same. Or there can simply be some unused padding space in the file. You should compare the raw PCM data or use a dedicated tool to bit-compare only the audio data.
Full-quoting makes you scroll past the same junk over and over.

TTA not lossless?

Reply #2
But I've tested quite a lot of (16-bit/44.1kHz) files like this, which was never a problem, also not with TTA. Why would it be a problem right now?

Okay, probably it is. I see the last file (SolidInc) has some WAV metadata which I overlooked. How do I check the RAW PCM? I prefer a method that is easily automated. I work on Linux.
Music: sounds arranged such that they construct feelings.

TTA not lossless?

Reply #3
Just tried an HEX editor, and it showed that the audio data is exactly the same in the same place if I alter the headers. So although I haven't checked everything bit-for-bit, I'm pretty sure the audio data is identical.

Sorry for the noise.

Edit: Still I have the question: is there an easy to automate way on Linux to check WAV-files bit-by bit, but only their raw PCM data?
Music: sounds arranged such that they construct feelings.

TTA not lossless?

Reply #4
For checking the files you can use the Bitcompare tool in foobar.

TTA not lossless?

Reply #5
Just tried an HEX editor, and it showed that the audio data is exactly the same in the same place if I alter the headers. So although I haven't checked everything bit-for-bit, I'm pretty sure the audio data is identical.

Sorry for the noise.

Edit: Still I have the question: is there an easy to automate way on Linux to check WAV-files bit-by bit, but only their raw PCM data?

If you're looking for something you can use in Linux, FFmpeg has a tool called tinypsnr, but you would have to know the header size.  Currently I use the wavinfo tool from Flake to get the header and data sizes, then use dd to extract the raw audio, and run md5 on that.  Something simpler would be useful to me as well, so maybe I could add raw md5 calculation to the Flake wavinfo tool.

edit: I guess another way would be to do a quick FLAC -0 encode and list the MD5 with metaflac.

TTA not lossless?

Reply #6
Python Audio Tools has a trackcmp utility, which compares only the PCM samples of two audio tracks.  It displays nothing if they match, and an error if they don't (analagous to the standard cmp command).

TTA not lossless?

Reply #7
You can also use my humble RIFFStrip to extract only the audio data.

Bye!

TTA not lossless?

Reply #8
Or using `mplayer -ao pcm:nowaveheader input.wav; md5sum audiodump.pcm; rm audiodump.pcm`

Works even with e.g. FLAC without dumping it to a WAV first, naturally.
Also you might try something like `mplayer --really-quiet -ao pcm:nowaveheader,file=- input.wav | md5sum` directly, though it didn't work for me on Windows.
Full-quoting makes you scroll past the same junk over and over.

 

TTA not lossless?

Reply #9
All nice options  Thanks.
Music: sounds arranged such that they construct feelings.