IPB

Welcome Guest ( Log In | Register )

> foobar2000 Tech Support Forum Rules

Please read foobar2000 Tech Support Forum Rules before posting and comply with all the points.
Failure to provide all the information pointed out in the above document in your post is considered wasting other people's time and in extreme cases will lead to your topic getting locked without a reply.


See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Error when creating 24/96 or 24/192 FLAC files, with both fb2k and the official encoder
Cynic
post Jan 28 2013, 00:15
Post #1





Group: Members
Posts: 55
Joined: 6-March 07
Member No.: 41244



foobar2000's FLAC encoder creates invalid files when compressing the "warbles-*.wav" files from Monty's article, while the official encoder makes apparently OK files that pass the integrity test but are actually 4 samples longer than the uncompressed sources.

I've read this old thread but if I understood it correctly back then the problem was the outdated decoder at the time of the 1.2 release. Using the -keep-foreign-metadata switch with the official encoder will output an error about an invalid wave file and not compress anything. So it seems the problem lies in the source files but I don't know how likely it is for users to encounter a similar situation with their music and at the moment foobar2000 reports the conversion as successful despite producing unusable files.
Go to the top of the page
+Quote Post
kode54
post Jan 28 2013, 07:56
Post #2





Group: Admin
Posts: 4695
Joined: 15-December 02
Member No.: 4082



The length fields for the files' main "RIFF" chunks is 12 bytes less than the actual sizes of the files. A proper RIFF parser which takes that size into account would thus truncate any data past that point. Of course, it could just decide to reject the files altogether since the specified length of the data chunk is too long for the data accepted. 12 bytes comes out to 4 24-bit samples.

Possible explanation is that whatever wrote those files did not take the size of the "fact" chunks into account when writing the size to the header, since that's the only chunk which comes to to exactly 12 bytes including its id and length fields.

You can fix it for foobar2000, and for any other proper RIFF parser, by opening the files in a hex editor and incrementing the little-endian 32-bit length field, at offset 4, by 12.
Go to the top of the page
+Quote Post
lvqcl
post Jan 28 2013, 15:34
Post #3





Group: Developer
Posts: 3469
Joined: 2-December 07
Member No.: 49183



1) foobar2000 doesn't have its own FLAC encoder; it uses flac.exe.

2) "official" flac.exe doesn't work properly with 24-bit mono files. Updated encoder is available here: http://www.foobar2000.org/encoderpack

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th December 2014 - 09:23