Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is Flac really lossy? (Read 6331 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is Flac really lossy?

I converted a WAV file (1411kbps) to a low compression Flac file (compression level 0). When I played the file in foobar2000 the bitrate at the bottom left shows 447kbps. And when I convert the original WAV to Flac (compression level 8) the bitrate now reads 245kbps. If foobar is actually playing only 245kbps when the original was 1411kbps then it seems that Flac isn't lossless but lossy. Is this true?
If not then please explain what's happening.

Is Flac really lossy?

Reply #1
FLAC is lossless. The bitrate you see displayed in Foobar2000 is the input bitrate, not the reconstructed output bitrate.

Cheers, Slipstreem. 

Is Flac really lossy?

Reply #2
It sounds as if you confuse bitrate with quality.

The bitrate indicates how much data(kilobits) is spent on storing each second of audio, not the quality of each second of audio. This is all it indicates. There is usually a relation between the amount of data spent on storing each second of audio and the quality of this audio, but bitrate does not equal quality, in the same way that fuel tank size does not equal mileage.

The purpose of using FLAC instead of WAV is to make the files smaller without losing any quality. When the files shrink, the bitrate naturally falls. If it did not fall, it means you would not obtain any compression.

If you decompress the FLAC back to WAV and compare the decompressed file and the original WAV file, you will find that they are exactly the same, because FLAC only applies lossless compression.

Is Flac really lossy?

Reply #3
Not to hijack the thread (its already been answered), however...

I know this is true and I use FLAC myself for all my archiving. However, its a valid question to some degree; are there testers out there that make sure that the compression actually is lossless ? Or is it a one-man-job where lossy compression or other problems might sneak in (technical term) and render the files (from a certain version or release) to become lossy or create files that somehow are "tainted", in that the audio gets distorted ?

I would assume that there are beta testers out there doing this, and I would just like to know if this is the case, and what type of quality assurance takes place on software as essential (to me anyway) as FLAC.

Is Flac really lossy?

Reply #4
FLAC is open source.
elevatorladylevitateme

Is Flac really lossy?

Reply #5
Not to hijack the thread (its already been answered), however...

I know this is true and I use FLAC myself for all my archiving. However, its a valid question to some degree; are there testers out there that make sure that the compression actually is lossless ? Or is it a one-man-job where lossy compression or other problems might sneak in (technical term) and render the files (from a certain version or release) to become lossy or create files that somehow are "tainted", in that the audio gets distorted ?

I would assume that there are beta testers out there doing this, and I would just like to know if this is the case, and what type of quality assurance takes place on software as essential (to me anyway) as FLAC.

I'm sure Josh runs stress tests before release.

Also, lossless compression is akin to mathematical transformation, just like zipping document files. You don't worry about letters being lost when zipping Word documents, right?

BTW flac.exe has a paranoid mode where you can verify the compression while the encoding is in progress. In other words, you can run flac with the -V option to make sure bad RAM/CPU bugs won't botch your encodes. (Although if you have RAM/CPU problems, lossless audio will be the least of your worries.)

Is Flac really lossy?

Reply #6
Quote
I know this is true and I use FLAC myself for all my archiving. However, its a valid question to some degree; are there testers out there that make sure that the compression actually is lossless ? Or is it a one-man-job where lossy compression or other problems might sneak in (technical term) and render the files (from a certain version or release) to become lossy or create files that somehow are "tainted", in that the audio gets distorted ?


Your mixing the two up. Lossy compression exists in a league known as "Rate-Distortion Theory", etc. Lossless compression deals with Golumb-Rice Coding and Linear Prediction (In the case of FLAC) check out if you are doing some reading some time.  Well those are the two most important things that come to mind.  . If you really want to take it to another level not only can you use the -V option to verify that FLAC is doing it's job, but you can actually adjust the block size and residual partition!. I would only do that if you REALLY know what you are doing  or you just took a class in Information Theory either way it's quite the learning experience.  .
budding I.T professional

Is Flac really lossy?

Reply #7
@HotshotGG thanks good reply and clearing it up

Is Flac really lossy?

Reply #8
for what I've tested, I have not found even one occasion where a flac file was not encoded lossless (I'm always using one of the latest releases). Because of my nature which leads me to question anything, I do random tests from time to time using foo_bitcompare and I even decoded some files to raw pcm and compared binary... and as I said I found flac to be VERY reliable (but as kjoonlee already said, hardware flaws might make the encoding process lossy... but then again, my experience with flaky hardware tells me it's BY FAR more likely that your computer will simply lockup ^^)
I don't know your material, but 245kbps sounds sane. If you don't believe, compare it to the original. I just checked and found out that flac can encode one minute of silence in 18kb, that's 2kbps showing in foobar playback! White noise in contrary can take 1400kbps or so. And yes, it's both lossless. Bitrate in flac totally depends on content.
The nice thing with lossless codecs is that they are so easy to check. Just bitcompare, no lousy ABX  .
flac 1.2.1 -8 (archive) | aoTuVb5.7 -q 4 (pc, s1mp3)