3

I am working on a research project and struggling on finding information on some of the more technical details about the working how MP3 and FLAC works to encode and compress its data.

Most information I find (via Google) is a bit too high level where it basically a says that MP3 uses lossy compression and FLAC uses a lossless compression, but doesn't go much into detail.

I am specifically trying to find what algorithm it uses to encode and decode its data to and from audio, and how MP3 determines what information to be loss.

Any help on where I can find some more information on this topic. is appreciated.

2
  • 1
    Did you look at Wikipedia? en.wikipedia.org/wiki/MP3 and en.wikipedia.org/wiki/FLAC have some good information on what's going on with each codec. Plus both have citations to references which would contain all you might want to know about the codecs. Commented Nov 10, 2015 at 21:42
  • I see what you mean, maybe you should ask this question on a programming forum like StackOverflow if you want some real technical algorithmic details.
    – n00dles
    Commented Nov 11, 2015 at 4:35

1 Answer 1

2

Both use predictive coding to guess the next sample (or stereo sample pair) from the previous one. The difference to the actual sample is then quantified according to psychoacoustical models of what people can and cannot hear when encoding with MP3, and is encoded afterwards for either. This quantization of MP3 throws away information and thus results in a lower bit rate. FLAC is the same without the quantization step, thus it can reconstruct the original at the cost of using a higher bit rate: it doesn't remove information but rather tries making best use of the inherent relations in sound for decreasing the amount of storage taken.

If you compress white noise, MP3 will significantly reduce the bit rate while keeping most of its audible characteristics while FLAC will not be able to reduce the bit rate at all since one feature of white noise is that any sample is independent of the previous ones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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