HydrogenAudio

Lossless Audio Compression => Lossless / Other Codecs => Topic started by: Porcus on 2021-12-30 11:44:54

Title: TTA refuses this wav file; what's up with it?
Post by: Porcus on 2021-12-30 11:44:54
Recently I scolded TTA for apparently not being able to handle mono .wav files (https://hydrogenaud.io/index.php?topic=121770.0) - but it seems it objects to ffmpeg-generated .wav files, mono or stereo. I wonder what is up with the file I attached?

Output from tta.exe -e TTAdoesntlikethis.wav tta.tta
Code: [Select]
TTA1 lossless audio encoder/decoder, version 2.3

Encoding: "TTAdoesntlikethis.wav" to "tta.tta"
c:\bin\tta-2.3-64bit-sse4\tta.exe: can't read from input file

The .wav was created from a CDDA with ffmpeg.  To get this short file, I gave ffmpeg -i infile.flac -to 0.04 TTAdoesntlikethis.wav, but it doesn't matter if I omit the "-to" part and decode the entire thing to .wav.
However if rather generate the .wav by flac -d, tta is happy.

Tags or not seem not to matter, the attachment is done after removing all tags with fb2k.
Title: Re: TTA refuses this wav file; what's up with it?
Post by: Rollin on 2021-12-30 11:50:52
By the way, ffmpeg has its own TTA encoder (-c:a tta), so you can transcode directly to tta.
Title: Re: TTA refuses this wav file; what's up with it?
Post by: Porcus on 2021-12-30 13:33:11
Ah. ffmpeg documentation isn't easy to wrap one's head around.

One can also use CUETools for CDDA, but not for 24-bit, where I found another issue:
24-bit wav generated by flac -d, TTA throws the error "incorrect data size info in wav file"

Edit: Doing it in foobar2000 requires something else than "-e %s %d" ... how? (Being GPL, it could be included in the Free Encoder Pack ... but is there any demand?)
Title: Re: TTA refuses this wav file; what's up with it?
Post by: lvqcl on 2021-12-30 15:23:21
Older ttaenc.exe can encode this file, but it prints a message:
"Encode: skiped unsupported 'LIST' chunk"

Output of sndfile-info for this file:
Code: [Select]
File : TTAdoesntlikethis.wav
Length : 7134
RIFF : 7126
WAVE
fmt  : 16
  Format        : 0x1 => WAVE_FORMAT_PCM
  Channels      : 2
  Sample Rate   : 44100
  Block Align   : 4
  Bit Width     : 16
  Bytes/sec     : 176400
LIST : 26
  INFO
    ISFT : Lavf58.76.100
data : 7056
End

Title: Re: TTA refuses this wav file; what's up with it?
Post by: Rollin on 2021-12-30 16:10:00
Doing it in foobar2000 requires something else than "-e %s %d" ... how?
Code: [Select]
-eb - %d
if you use "tta-2.3-64bit-sse4"
Title: Re: TTA refuses this wav file; what's up with it?
Post by: AiZ on 2021-12-30 20:53:26
https://hydrogenaud.io/index.php?topic=118888.msg984081#msg984081 (https://hydrogenaud.io/index.php?topic=118888.msg984081#msg984081)
Title: Re: TTA refuses this wav file; what's up with it?
Post by: Porcus on 2021-12-31 17:39:08
Those do the trick, thanks. 

It does not object to .wav files with metadata added by foobar2000 - it just removes the metadata completely.  So here is TTA's ultra-wise choice for metadata handling:
* Can handle it? Delete!
* Cannot handle it? Refuse to do anything!

... dumber than ffmpeg's ideas of naming a filter:
Code: [Select]
‘bitexact’
Only write platform-, build- and time-independent data. This ensures that file and data checksums are reproducible and match between platforms. Its primary use is for regression testing.
... I appreciate a mode that strips away problematic chunks, but calling it "bitexact" when it removes bits?!?