Bitrate

Discussion in 'Free Thoughts' started by Motor Daddy, Apr 25, 2022.

  1. Motor Daddy Valued Senior Member

    Messages:
    5,425
    Suppose I have a bunch of different FLAC files, all having 44,100 Hz sample rate, and 16 bits per sample, for each channel (2 channels).

    So 44,100 x 16 x 2 = 1,411,200 bits per second.

    The problem is that different 44,100 - 16 files have different bitrates, even though they all claim to be 44,100 Hz at 16 bit.

    So it isn't true that FLAC is lossless, and it is not bit perfect. What gives? How can they claim lossless when it is clearly lossy?
     
  2. Guest Guest Advertisement



    to hide all adverts.
  3. billvon Valued Senior Member

    Messages:
    21,635
    Lossy is not the same as compressed. MP3's are lossy and compressed. FLAC's are lossless and compressed. WAVs are lossless and uncompressed.

    You can see the same effect with, say, PKZIP. Compress ten books, each exactly 500,000 characters long. Their files will be different sizes. But when uncompressed, they will contain the original text.
     
  4. Guest Guest Advertisement



    to hide all adverts.
  5. Motor Daddy Valued Senior Member

    Messages:
    5,425

    "Lossy" refers to some of the information being removed, for a lower bitrate. So a 44,100 - 16 file is stripped of some of the useless things that we can't hear, to make the file smaller.

    Lossless is supposed to be "bit perfect" where 44,100 x 16 x 2 means a bitrate of 1,411,200 bits per second. But that clearly isn't the case, so some of the bits are removed to end up with a lower bitrate.

    It is misleading to say a bitrate of less than 1,411,200 bits per second is "Lossless", it clearly is not.
     
  6. Guest Guest Advertisement



    to hide all adverts.
  7. billvon Valued Senior Member

    Messages:
    21,635
    No. Lossy means "unrecoverable."
    Nope. It is stripped of repetition.
    You are confusing raw bitrate with compressed bitrate.
    Correct. They are removed by compression. And those bits are then added back by the decompression algorithm so that it exactly matches the original bitrate.
    Of course it is.

    Let's try another example.

    Let's say I have the text "AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDD" That's 40 characters. And I encode it by saying "Ax10Bx10Cx10Dx10." That's only 16 characters - much easier to store and send! When the decoder reads that, it recreates "AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDD".

    What has been lost?
     
    Last edited: Apr 25, 2022
  8. Motor Daddy Valued Senior Member

    Messages:
    5,425
    The bitrate! It is no longer 44,100 x 16 x 2

    The sample rate is 44,100 samples per second.
    The bit depth is 16.
    2 Channels

    That is necessarily 1,411,200 bits per second. If the bit rate is not that, then either the frequency changed, or the bits changed, so it is no longer 44,100 x 16
     
  9. Motor Daddy Valued Senior Member

    Messages:
    5,425
    No it does not match. In order to match it has to be a bitrate of 1,411,200 bits per second for a 44,100 x 16 file. The bitrates are all different on my FLAC files that are all supposed to be 44,100 x 16 files. They don't match and they are all different.
     
  10. Motor Daddy Valued Senior Member

    Messages:
    5,425
    Here is a pic of some FLAC files, all 44,100 and 16 bit, with all different bitrates:

    The far right column is the bitrates for each file. Click the pic to enlarge it.

    https://imgur.com/2C6KNTY
     
  11. billvon Valued Senior Member

    Messages:
    21,635
    Correct. That's because they all have different compressibilities.

    Try this. Record 3 minutes of perfect silence. Encode that via a FLAC encoder. Now look at the length of the file. It will be shorter - even though it is still lossless.

    Can you figure out why that might be?
     
  12. Motor Daddy Valued Senior Member

    Messages:
    5,425
    I am not talking about compression. I know what compression is.

    I am talking about BITRATE, which should be 44,100 x 16 x 2 = 1,411,200 bits per second.

    If the samples are really 44,100 per second, and the bits are really 16, and there are 2 channels, then it HAS TO BE 1,411,200 bits per second. It is MATH, not compression.

    If the math doesn't add up then it is not a 44,100 x 16 file, and it is not "bit perfect."
     
  13. billvon Valued Senior Member

    Messages:
    21,635
    OK so you can't figure it out. Perhaps learn more about encoding!
    The bit stream that comes out of the analog/digital front end (AFE) is always 1.4 megabits per second (or faster for higher rates, which are becoming more popular.)

    The bit stream that goes to the digital/analog front end (AFE) is always 1.4 megabits per second (or faster for higher rates, which are becoming more popular.)

    The bit stream AFTER COMPRESSION is lower than 1.4 megabits per second. That is what is stored in the file. The compressed bit stream AFTER DECOMPRESSION is back to 1.4 megabits per second. This is what goes to the AFE. So the AFE (the thing that actually converts the bitstream to audio) always sees 1.4 megabits per second, whether the AFE is converting analog to digital or digital to analog.

    Back in the dark ages, when you wanted to "rip" a CD, first you would record the songs as .wav files (44Ksps). Then you'd run the Frauhofer compressor which would convert .wav to .mp3. (Much smaller files, by a factor of 8- 10.) Then you'd run the Frauhofer decompressor to convert .mp3 to .wav (44Ksps) Then you'd play the .wav at 44Ksps.

    Eventually the decompressor and player were integrated into one program, so one program would decompress the .mp3 to 44Ksps and feed it to the AFE.

    Get it yet?
     
  14. Motor Daddy Valued Senior Member

    Messages:
    5,425
    So you're saying my DAC will be receiving the FLAC files at a 1,411,200 bit rate, even though the player is reporting them as less than that bit rate?
     
  15. billvon Valued Senior Member

    Messages:
    21,635
    Correct! The decoder might get the file at a far lower bitrate - but the decoder will decode the compressed files, restoring them to the original rate they were encoded at.
     
  16. Motor Daddy Valued Senior Member

    Messages:
    5,425
    Thanks. So that's "what gives."
     
    billvon likes this.

Share This Page