Skip to main content
Topic: Is my conversion lossy? (flac to wav, different number of samples) (Read 777 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is my conversion lossy? (flac to wav, different number of samples)

Hi, I thought about putting this in the foobar section, but reconsidered. Here is the context:

I often convert 24 Bit flac files (sample rates as low as 48 kHz, up to 192 kHz) into the uncompressed WAV (PCM) format. I do this through foobar, and have been doing it for multiple years now. I don't change the bit depth, or sample rate, no dithering, or anything.

One thing I do whenever I make conversions such as this, is that I take a look at the "number of samples" in the properties of the files, to make sure that my input matches my output. I checked this a few times after making conversions, and I noticed that successful conversions always had the same number of samples (before and after) if the conversion was lossless, so I have been using this as a verification of conversion quality.

Sometimes when I convert through a cue file (one input file becomes multiple converted ones), the number of samples on the output is less, because maybe it's a record rip and the first 1-2 seconds are silence that the cue file ignores, that makes sense to me.

But today I converted 11 seperated flac files (an album where all the files are from the same source) which are at 48 kHz, 24 bit, directly, without the use of a cue file, into WAV. 7 of the input and output tracks had matching number of samples, others did not. I found 4 of the tracks, where the output WAV files have less samples (and a slightly shorter duration as a result) than the input files. Foobar did not display an error message after converting.

Below is a cropped print screen showing what I am talking about, showing one of these weirdly converted files:

https://drive.google.com/open?id=18H5mDbP8Ml2iZPxnUF_SSmX2kx9xAB95

The top tab, is the properties of the original FLAC file, the bottom tab is the properties of the converted PCM WAV file.

I took one of these "weird files" and converted it to wav again (from the original flac), and noticed that, once again, the the same issue occurred, the output the second time was THE EXACT same as the output of the first conversion, so whatever is happening, is happening consistently here. (Whilst 7 out of the 11 files in the album convert consistently without any difference in number of samples)

I guess my question is a two-parter:

1) Does it make any sense to use the "number of samples must be the same" idea to determine whether a conversion from flac to wav (or vice versa I suppose) is lossless?

2) And does the image I linked, suggest or confirm, in any way, that the conversion that took place was lossy and not lossless?

If it is not a lossless conversion as I suspect, then I think the problem is with foobar's wav converter, something that's (once again, I think) built in, and I will troubleshoot on my end, taking further questions to the foobar section of the forum.

Thanks

Re: Is my conversion lossy? (flac to wav, different number of samples)

Reply #1
1) Does it make any sense to use the "number of samples must be the same" idea to determine whether a conversion from flac to wav (or vice versa I suppose) is lossless?
It makes sense. But if you need to compare many files it is easier and faster to use foo_bitcompare.

If it is not a lossless conversion as I suspect, then I think the problem is with foobar's wav converter, something that's (once again, I think) built in, and I will troubleshoot on my end, taking further questions to the foobar section of the forum.
Problem can be in FLAC files. Install foo_verifier and verify your source FLAC files. Right click->Utilities->Verify integrity

 

Re: Is my conversion lossy? (flac to wav, different number of samples)

Reply #2
Thanks very much for your reply Rollin.

I already had foo_verifier installed, don't know why I didn't think to use it. Following your advice, I tested the source files (just one was enough for me to understand the situation).

Status: Decoded with minor problems
Warnings: Reported length is inaccurate 3:31.195813 vs 3:31.114667 decoded

It's a lossless conversion in that case, but the "properties" on the source flac gives a false value for length.

I guess that solves the issue. Thanks very much! I can take the converted files and be happy with them.

 
SimplePortal 1.0.0 RC1 © 2008-2018