[Flac-dev] wav to flac corruption

Brian Willoughby brianw at sounds.wa.com
Wed Feb 6 14:59:10 PST 2008


I have one theory about your playback problem: Many flac solutions  
load the entire flac and decompress the samples before passing them  
on to the player.  In your case, the conversion code may be running  
out of memory on 24-bit files where it does not run out of memory on  
16-bit files of the same duration.  Another possibility is that the  
flac player does not support 24-bit data properly.

As Erik mentioned, conversion to 16-bit is a loss of quality.  Even  
if you are willing to do this, you should have a very good dithering  
algorithm to avoid quantization noise.

The problem you are having is not with flac.  Your problem is with  
your player.  The encode and decoder both support 24-bit files all  
the way up to the 4 GB limit.  I have made several 24-bit multitrack  
recordings, and flac always handles these files without loss of  
data.  The flac players I have fully support long 24-bit files.  It  
seems that you need to replace your player if it cannot handle large  
24-bit files.

You don't want to reduce the quality of your source or abandon  
lossless coding just because the players are buggy!

Brian Willoughby
Sound Consulting


On Feb 6, 2008, at 13:57, Matthew Davis wrote:

So some research and experimentation I think I found the problem, but  
I'm not sure how to go about fixing it.

If I import one of the wav files into Audacity then export them as  
"16 bit PCM" then they encode to flac and play fine. The files  
bitrates are currently at 24. If I export them from audacity as a 24  
or 32 (anything higher than 16), flac fails on me. With a bitrate of  
24, the file is encoded but won't play. With a bitrate of 32, flac  
says it can't do it.

Questions in no particular order:
1) I assume converting from 24 bits to 16 bits results in a loss of  
information, right?
2) Is there a faster way to convert rather than going in and out of  
audacity.
3) Is there a way to make 24 bit files work with flac?

Thank you again,
Matthew



More information about the Flac-dev mailing list