After importing the files, foobar2000 says the bitrate is 854 for the copy and 822 for the original. I'm not sure if this is foobar2000 reading existing file information, or if the program has performed its own analysis. I'm not familiar with how foobar2000 works.
Thanks for that. We are pretty far down a rabbit hole, but here's what I've learned:
On a random FLAC track selected from my library, MC and foobar2000 report the same bitrate (as does Mp3tag). You have also confirmed that the two programs essentially agree. But what the heck is the meaning of "bitrate" and how is it calculated?
I am guessing all these programs depend on a third party FLAC utility library to read FLAC files. In any case, as a DIY end user, one can download the free FLAC command line utility
metaflac.exe from xiph.org
https://xiph.org/flac/documentation_tools_metaflac.html. Here's the output on my test file for Block 0 of the Audio Data, which is the STREAMINFO block, run in a Windows Command Window or PowerShell:
PS C:\xxx\xxx\flac-1.4.3-win\Win64> ./metaflac.exe --list --block-type=STREAMINFO ".\test\xxx xxx.flac"
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4096 samples
maximum blocksize: 4096 samples
minimum framesize: 14 bytes
maximum framesize: 13372 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 12038712
MD5 signature: 599eb5eadc40d7e6b4c83cb0dab0b885
Most of this output is reported by MC (
Tag Pane > Tag Dump), foobar2000 (RMB on track >
Properties), and other programs. Using this data, here is the track duration reported by programs:
Duration (per channel) = (total samples per channel)/sample_rate = 12,038,712 / (44,100 Hz) = 272.987 s = 4 min 33 s.
From PowerShell dir command:
File size = 32,283,646 bytes = (32,283,646 bytes)*(8 bits/byte) = 258,269,168 bits.
The FLAC compressed Audio Data size is smaller than the total file size:
Audio Data size (reported by BC5 (beta)) = (31,805,199 bytes) * (8 bits/byte) = 254,441,592 bits.
Bitrate (total 2-channels combined) = (Audio Data size) / Duration = (254,441,592 bits) / (272.987 s) =
932.065 kilobits/sBoth MC and foobar2000 report
bitrate = 932, in agreement with this calculation!
I don't know what file operations the programs use to acquire the Audio Data size. Here I depend on BC5 to do a Media Compare of the file with itself, which reports size of Audio Data in bytes. I get exactly the same size when I count from first to last hex audio byte (based on first and last hex byte addresses
following the big zero padding block).
Note: It is perhaps puzzling that (total samples)*(bits-per-sample)=192,619,392 bits is smaller than Audio Data size. The reason is that the the former is just raw single channel, while the latter includes 2 compressed channels.
To answer my own question: Apparently bitrate is the average FLAC bitrate over the duration of the track for decompressing 2 channels of FLAC audio data, in kilobits/s (note: in this example, the FLAC decoder will use the real-time compressed data to restore the original 41,100 Hz 2-channel 16-bit audio signal, lossless, before sending it out to a DAC).
Perhaps someone more experienced in these matters could confirm above. Most likely, the extra zero bytes in the copied (larger) file are being counted as part of the Audio Data, while the STREAMINFO remains unchanged, causing the programs to return a proportionately higher bitrate for the copied file. I believe I've provided everything needed for @Von to further investigate the bitrate difference between the two subject files, if so inclined.
6/28/2024 Multiple edits through the day for clarity.for