I would like to know why two .flac files which, allegedly, contain the same data, vary so much in size.

I got two .flac files of the same music album (same songs, same track lengths, etc.), but they differ in 500+ MB, and I don't understand why.

  • 2
    Sounds like one has compression. It's also possible that the smaller one went through lossy transcoding. – HalosGhost Oct 12 '14 at 2:26

Run MediaInfo on the two files. It will tell you why they differ.

FLAC is always lossless as compared to the input file, but that doesn't mean there aren't good reasons why two FLAC files of the same song could differ in size:

  1. FLAC offers multiple levels of lossless compression. The exact same input file compressed with two different compression settings will almost certainly result in two different file sizes.

    Most forms of lossless compression share this property: PNG, bzip2, etc. It's a CPU time and memory tradeoff: the more resources you throw at the problem during compression, the more tightly you can compress the data.

  2. The two input song files could differ in some key way, so that each is a lossless version of a different file.

    An audio file sampled at 44.1 kHz will result in a smaller FLAC file than an audio file sampled at 96 kHz, even though they are the "same song." This is the nature of a lossless codec: it should preserve differences such as this, which means the file sizes will be different.

  3. The input audio files differ only in bit depths, one 16-bit and the other 24-bit, for example. The difference would be inaudible in all practical cases, but one file would be 50% larger than the other.

| improve this answer | |
  • But in the case you point out, would they both still be lossless? – Jack Mills Oct 12 '14 at 2:34
  • @JackMills: Edited answer to include more reasons why this could happen. Bottom line, you have to understand that you're asking us to speculate. If you want us to give you a hard answer about why your particular two files differ, you're going to need to post more details in your question. The two MediaInfo outputs would be a big help, as would the sources of the two different files. – Warren Young Oct 12 '14 at 2:51
  • Flac is not always lossless. It is entirely possible that one of the files went through lossy transcoding. – HalosGhost Oct 12 '14 at 3:40
  • 1
    @HalosGhost: Not according to the FLAC codec's own About page. See the second-to-last bullet point on that page. If you mean that you can recompress an MP3 with FLAC and that the result will be "lossy" because the MP3 codec threw away information, that's not an indicator that FLAC is somehow lossy. FLAC losslessly-compressed the output of the MP3 decoder. – Warren Young Oct 12 '14 at 3:48
  • 1
    It's also possible to install something common such as Audacity; load the .flac, then do analyze/plot spectrum. An easy way to validate the presence of a frequency cutoff around 18 000hz or in any case way below 22.1khz when the source was lossy... Such a tool may help figure out if the two files actually contain the "same data". – user44370 Oct 13 '14 at 7:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.