HydrogenAudio

Lossy Audio Compression => Other Lossy Codecs => Topic started by: johnb on 2010-04-03 15:36:53

Title: lossyFlac conversion with foobar-> corrupted length value
Post by: johnb on 2010-04-03 15:36:53
Hi,

I converted a bunch of flac files to lossyWav/lossyFlac with foobar (1.0.1).

Foobar and Mr.Questionman report a ridiculous high duration and number of samples (see attachment).

Screenshot (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5833)

Here is the command line I used in foobar:
/d /c E:\p\Audio\lossyWAV_1.2.0\lossywav - --standard --altpreset --silent --stdout|E:\p\Audio\flac-1.2.1-win\bin\flac - -b 512 -5  -T comment="lossyWav aps" -f -o%d

What goes wrong here? How could I (automatically) correct the metadata?

Cheers
johnb
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: carpman on 2010-04-03 17:34:39
Do you get the correct sample length / duration if you use this command line? :

Code: [Select]
/d /c E:\p\Audio\lossyWAV_1.2.0\lossywav - --standard --altpreset --silent --stdout|E:\p\Audio\flac-1.2.1-win\bin\flac - -b 512 -5 -f -o %d

By the way your command line has a space missing:

Quote
-f -o%d

Should be:
Code: [Select]
-f -o %d

That's all I can think is a problem at the moment.

C.

EDIT: Command line space correction added
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: johnb on 2010-04-03 18:32:18
Carpman, thanks for your answer.
The command line was basically taken from the Wiki:
http://wiki.hydrogenaudio.org/index.php?ti...verter_settings (http://wiki.hydrogenaudio.org/index.php?title=LossyWAV#Example_foobar2000_converter_settings)
There the space is also missing ...

However, I added the space, still the same result.

As for the sample count: no it is wrong, i.e. 107 3741 823 in flossy vs. 45 789 041 in flac.
I suppose this is also why the display reports a bitrate of 8kbits/s  ;-)
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: carpman on 2010-04-04 01:16:10
All I can add is that it's odd, as your command line for FLAC is identical to mine apart from:

the "--altpreset" switch and:

Quote
-T comment="lossyWav aps"


So if it's neither of those, then why this happens I haven't a clue.
Perhaps one of the experts will be able to help out.

C.

Title: lossyFlac conversion with foobar-> corrupted length value
Post by: johnb on 2010-04-04 11:29:29
I removed the --altpreset and -T in the converter setting with unfortunately the same result!

In order to analyze this further, I did the following at the dos prompt:
- converted the original flac to wav
- applied lossywav
- encoded  to flac
=> the resulting flac is correct regarding duration, # of samples, bitrate


So I thought, let's convert the wav by means of the foobar converter with the already mentioned command line.
=> the resulting flac shows again the original symptoms 

I have no clue!

johnb
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: Nick.C on 2010-04-04 15:35:32
Looking at the size of the file, the audio data of the output file is as big as it can be in a compliant RIFF WAV file. The input file exceeds the size limit. That is why the audio has been cut short.
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: johnb on 2010-04-04 16:28:15
Hi Nick.C,

maybe I have failed to describe the screenshot properly.
The first file in the playlist is the flac file, the second is the lossyflac file.
As a matter of fact, the real duration of each is 7min 11s. The first is about 40MB, the second 23MB in file size.

So I don't think the files exceed any limit.

I think it boils down to the question, how this large number of samples is set in the conversion.
The audio in the lossyflac file ends after the 7.11min when playing in foobar.

Cheers
johnb
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: Nick.C on 2010-04-04 17:33:50
Hmmmm.... When piping (into lossyWAV, etc.) from foobar the apparent data length is the maximum for the RIFF container. When foobar stops sending audio data then lossyWAV closes and then FLAC closes and writes the size of the audio data into the FLAC header. This looks strange to me as I have never encountered the phenomenon during all of the development period of lossyWAV.
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: carpman on 2010-04-04 19:14:15
Just a thought, but would it be worth johnb trying the same thing with WavPack or TAK? If they came out okay then it would suggest it's a FLAC issue?

C.
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: Capilander88 on 2010-04-04 20:13:37
Foobar requires "--ignore-chunk-sizes" switch in the FLAC converter setup 

E.g. "flac -s --ignore-chunk-sizes -5 -b 512 - -o %d"

Title: lossyFlac conversion with foobar-> corrupted length value
Post by: carpman on 2010-04-05 00:49:02
Not for me it doesn't. Unless this is a fb2k version issue. I'm on 0.9.4.5.

C.
Title: lossyFlac conversion with foobar-> corrupted length value
Post by: johnb on 2010-04-05 00:56:06
Thanks a lot, that did the trick for me!

I had switched recently from fb 0.9.x to 1.0.1. Previously I think it worked without that option.

johnb