Home » Questions » Computers [ Ask a new question ]

Why is a FLAC encoded from a decoded MP3 bigger than the MP3?

Why is a FLAC encoded from a decoded MP3 bigger than the MP3?

To be more precise than in the title, suppose I have a MP3 file that is 320 kbps. If I decompress it, then logically, all the data except for roughly 320 kilobits out of each second of audio should be redundant data, able to be compressed away. So, when I encode the decompressed file to FLAC, or any other lossless codec, why is it so much larger?

Asked by: Guest | Views: 52
Total answers/comments: 2
Guest [Entry]

"The reason the FLAC is larger than the MP3 of the same data is because they encode differently. :) MP3 just encodes perceptual information, while FLAC stores every single speck of data, just in a more compact format.

Converting a WAV to a FLAC is like converting a BMP to a PNG.

Same exact pixels, but compressed losslessly like a ZIP file into a smaller size.

Converting a WAV to an MP3 is like converting a BMP to a JPEG.

Instead of storing exact pixels, it's really storing instructions for generating squares with ripples of color that look kind of like the original.

Similarly, MP3 just stores instructions for generating ripples that, when added together, sound kind of like the original. But the difference between the true signal and the generated signal (the error signal) consists of random noisy artifacts, like JPEG jaggies. When you then store this in a perfectionist format like FLAC, it needs to store all those jaggies, and random noise is harder to compress losslessly, so it increases the size of the file. (Truly random noise is incompressible. When you compress a file losslessly, you're eliminating redundant repeating patterns and making it look more like random noise.)

I bet if you convert the JPEG to PNG you will see the same kind of increase in size as you see when converting MP3 to FLAC, since the perfectionist lossless codec needs to remember every little jaggy and artifact that wasn't in the original bmp.

This analogy isn't perfect, since audio is more like a photo than a line-art diagram, but it helps get the idea across:

Original BMP size: 29 kB

PNG size: 629 B

JPEG size: 1.7 kB

PNG created from JPEG: 6.2 kB"
Guest [Entry]

"To answer part two, if you convert back to a WAV from the MP3, then pick a lossless encoder, you should have an identical-quality file when you're done.

As to why the FLAC is bigger than the MP3, you're taking one of the more-compressed formats, decompressing it, then recompressing it in a less-efficient compression tool (though with a higher-quality of playback).

It's kind of like asking why converting a JPG to a PNG makes it bigger - you're [partially] decompressing the file, then recompressing in a lossless way. FLAC, like PNG, isn't optimized for space, but for quality."