Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My understanding is that the WAV and FLAC formats are containers for lossless audio. I have seen the FLAC format as being perhaps better because it is able to losslessly compress audio from say a WAV file.

However today I noticed that bleep is offering both WAV and FLAC files to download. Is their practice redundant or am I missing something?

After reading allquixotic and slhck answers I was curious as to the audio codec for the wav files in question. This is what I found

Input #0, wav, from 'Exai-001-Autechre-Fleure.wav':
  Duration: 00:04:51.39, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
                 stereo, s16, 1411 kb/s
share|improve this question
up vote 23 down vote accepted

You might be confused about different concepts:

  • FLAC is a lossless audio codec (its container also happens to be called FLAC, but the main idea here is the actual codec).
  • WAV, on the other hand, as a container can hold numerous kinds of audio codecs, but mostly, you'll find PCM-encoded audio.1

Since FLAC is all about mathematically lossless compression, FLAC files will be smaller than corresponding PCM-encoded WAV files, since PCM doesn't allow for lossless compression and just represents the data as-is.2

So, simply put: Take a WAV file with PCM-encoded audio, and the corresponding (mathematically equal) FLAC file will be a tad smaller. The downside is that FLAC is not as widely supported as WAV. For example, most (all?) operating systems won't play or convert FLAC files without extra software.

Bottom line, I'd say their practice is redundant but a nice gesture for folks who don't want to download massive amounts of data and prefer the compressed version.

1 – For example, variants of MP3 can also be stored in a .wav file.
2 – The analogy for images would be that BMP files contain the raw image data in an uncompressed form, whereas a (lossless) PNG is much smaller, but showing the exact same contents.

share|improve this answer
2  
In response to Steven's added-on observation: "pcm_s16le" is ffmpeg's way of saying the audio format is LPCM, with each sample represented as a signed 16-bit integer, with each sample's bytes in little-endian order. With 44100 samples per second, times 2 channels (stereo), it works out to 1411 kilobits/second, which is just an indicator of how fat the audio data in the WAV is; it has no correlation to quality. In the FLAC, the audio data is described differently and the bitrate varies. But when the FLAC is played, it is decompressed to exactly the same LPCM audio data stream as in the WAV. – Mike Brown May 27 '13 at 18:48

FLAC is a compressed lossless audio stream, WAV is uncompressed lossless audio stream. FLAC is like ZIP in audio world, you can compress/uncompress the data multiple times without any loss. But compression ratio is better than ZIP, because this compression format is tailored specifically for audio.

share|improve this answer

FLAC is superior to LPCM (WAV) in almost all aspects, but FLAC's support is very limited. Many devices (music systems, portable devices, TVs, etc.) cannot playback .flac files.

share|improve this answer
    
Doesn't really answer the question. – Karan Feb 17 '13 at 23:48
2  
Well, it doesn't really answer the title. The question in the body was why bleep would offer both formats considering. – Dennis Feb 18 '13 at 1:11
    
Yeah, but the question in the body is an add-on to the question in the title. – Karan Feb 18 '13 at 1:12
    
When I answered the question, the title was difference between wav and flac. It seemed to me that the only thing the OP was interesting in were bleep's motive. – Dennis Feb 18 '13 at 1:16
    
It's not superior in read time, since FLAC has to be decoded first. – naught101 Oct 12 '15 at 1:06

WAV has a constant bit rate. That means even the silent parts are stored as 0 Hz and occupies space in the container.

FLAC on the other hand has a variable bit rate and eliminates the silence parts and stores only the part of the audio between 1 and 655,350 Hz. If any audio frequency in that range is not detected, say 0 Hz or anything above 655,350 Hz, FLAC treats it as silence and does not store it. As reference, humans can only hear frequencies in the range between 15 Hz and 20,000 Hz, which also narrows with age.

So if a song is long but has a lot of silent parts, then its FLAC size would be significantly smaller than its WAV file would be.

The reason why some audio stores offer both WAV and FLAC files is that audiophiles are particularly finicky about quality and they sometimes feel that FLAC, being of smaller size, is inferior to WAV.

I also feel that way, although I am perfectly aware that they deliver the exact same quality. Not getting the WAV file makes me feel that something is missing, which in fact is largely untrue if in reality, I will only be missing something that is not there and something that nobody in this world would be able to hear: even the bats.

share|improve this answer
2  
This isn't true. FLAC is lossless. That means that a WAV converted to FLAC and back again will contain exactly the same data. Also, both formats usually only contain data with samplerates at 44.1kHz (CD), 48kHz, or 192kHz (although there are a few other less common rates). By the Nyquist sampling theorem, only frequencies up to half the sampling rate can be recorded (so only frequencies < 22.05, 24, 96kHz, respectively). 655,350Hz is nonsense. – naught101 Oct 12 '15 at 1:06

WAV is superior to FLAC.

I’ve tested this on my rig with the start of a Mozart track (the first 30 seconds) and there were some artifacts which were only slightly greater represented on the wav. when compared to the flac. To someone who doesn’t understand audio and to the naked ear they’re almost identical.

Any kind of compression has some limiters. WAV is also used in studios for its raw accuracy.

Just some facts…

Any of those High-Res 24 bit /192 KHZ, DSD, or 32 bit/384 KHz are HUGE space wasters. The human frequency range is limited - and on a summit-fi rig of Hi-Fi separates with an amplifier, CD player, sound field processor, and tuner is able to extract ultrasonic frequencies when used with compatible headphones (5 HZ - 40 KHz) to the point of being able to feel these ultrasonic frequencies around you; even disrupting listening sessions when you will believe someone has stopped on the floor. This is possible with redbook CDs. You aren’t going to get any higher than that as far as sound quality goes. stand alone DAC's are also inferior to a top-flight cd player. If you really want to hear how it was recorded and in all its glory - go for TAD components (Pioneer) or Accuphase.

Cables can make a difference but not always. For example, a poor quality CCAW (copper clad aluminum wire) is inferior to pure copper. The only time a cable will make a difference on sound quality is when: 1st if the quality of the copper is not pure, and 2nd if the cable impedance has been tampered with by scam cable makers. At the end of the day, buy pure copper cables for your speakers. And for headphones make your own cables with pure copper. Silver cables on the other hand can sound more dynamic and “bright” and buying silver wire could benefit you if your speakers sound dull. Any special power cables are rip offs as well. So yes, cables can make a difference.

Measurements are sometimes inaccurate as the measurement system was not implemented perfectly. And of course, measurements don’t tell the whole story. If you look up how human beings actually hear frequencies you might understand the truth of this matter.

share|improve this answer
6  
There is nothing wrong with the FLAC codec itself that would introduce artifacts that aren't present in the source file. FLAC is a lossless compression codec, the definition of which is that when properly uncompressed it is identical to the source PCM audio. That said, your setup might be introducing artifacts if the the decompression is more focussed on speed (e.g. real-time playback) vs. accuracy. – eToThePiIPower Jun 27 '14 at 22:21
4  
In other words: you can go from a .wav file to .flac and back to .wav and the files should be exactly the same. – Jens Erat Jun 27 '14 at 22:34
    
I'm not sure if this answers the main question (which is, the difference between two audio formats). It does develop about the auditory aspect but otherwise it isn't what was asked. I recommend you to look at the tour page, to get a feel for how Superuser works. – Doktoro Reichard Jun 28 '14 at 0:11
1  
I think you're confusing psycoacoustic compression with data compression. Flac compresses data (which makes it comparatively 'expensive' to decompress and play compared to wav). Some of these claims make sense to me. That wav sounds better than flac, or that standalone DACs are inferior to one in a DVD player (which needs a dac anyway) less so. Nonetheless, these are the sort of things worth testing double blind I suppose. I also suspect if we're talking about "the last one percent" there's other factors like mastering in play that would have a bigger effect. – Journeyman Geek Jun 28 '14 at 1:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .