Hi.
I had a FLAC file which I decoded using the reference decoder. As expected, the WAV file was larger than the FLAC one: it had 51.304.506 bytes. Then, I coded this WAV file and got a FLAC file.
However, while the first one had 31.240.944 bytes, the second one had 29.144.603 bytes. After that, I decoded this final FLAC file and the resultant WAV file had 51.304.220 bytes.
So, where is the lossless compression? Curiously, when I compared these files with 'diff' command, it shows they're equal. How is this possible, if they have different sizes?
Thanks!
Flag files have tags so the file sizes won't be equal.
Different encoder settings give different compressed file sizes.
Flag files have tags so the file sizes won't be equal.
That explains the size difference between the flac files, but what about the wav files difference ? Could you elaborate ?
I've always found it strange that the wav-flac-wav process can result in non-identical wav files. The audio conversion is lossless, that's not the issue. I've found the --keep-foreign-metadata option to be the solution, especially since I mostly use BWF (broadcast wave) files with metadata that shouldn't get lost or modified. Unfortunately the decoder doesn't automatically recognize this option, so it's not completely idiot proof.
evoj2, would you be able to repeat your test with this option ? I'm curious if it solves your "problem".
Indeed, it seems that --keep-foreign-metadata was used the first time when encoding the first FLAC file. I find that surprising though: the command-line encoder/decoder doesn't use it by default (WavPack does).
Flag files have tags so the file sizes won't be equal.
That explains the size difference between the flac files, but what about the wav files difference ? Could you elaborate ?
While tagging WAV files with album/song info is uncommon, they still have headers that contain information about the file (including in some cases actual album info). Theres various ways you can put together a wav file, and they're not necessarily the same size.
Theres some information here if you're interested: http://www-mmsp.ece.mcgill.ca/Documents/Au.../WAVE/WAVE.html (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html)
As you can see, even for plain 16 bit, stereo PCM there are various different ways the header can be constructed even without considering metadata.