FLAC versus WAV

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
If people report an audible difference between WAV and FLAC, almost invariably WAV is reported to sound better.
Of course there are counter claims, no audible differences at all and when these two opposing views are expressed in a forum it often becomes lively.

Most of us are not really scientist. Out testing is causal. Most of the time it is a sighted test. You know what is playing and of course the purest of the purest, the uncompressed lossless format will win.
There might be some expectation bias involved.

Is it possible that these formats do sound different?
As both are lossless a simple typical computer style test is:
• Take a WAV file
• Convert it to FLAC
• Convert the FLAC back to WAV
If you look at both WAV-files in the file system you might see a difference in size.
For some a reason to post in a forum like:
I convert WAV to FLAC and back and the file size is different. FLAC is not lossless, FLAC is BROKEN!!!!!
You better don’t. Often in these conversions some space is created in the header for tags.
If you store tags in the header, you need some space. If you run out of space the whole file must be rewritten so allocating some space a priori is a good strategy.

You need an additional step, the null test.
• load both in an audio editor
• time align
• subtract the 2 tracks.
Many have done this and the result is always the same: zero’s only.
Obvious the content is bit identical.
These type of experiments teaches us that is cannot be the content of the file causing the audible difference.

Ok, might it be the player doing “something”.

An additional and intriguing experiment is to record the SPDIF out.
This is exactly what is send to the DAC.
It the player treats WAV and FLAC different, we will record different bits
• Play the WAV,
• Play the FLAC
• Record both
• Do the null test.

This type of testing is a bit rare as it does require some technical skills and some recording gear. An example known to me is a guy using this method to test differences between iTunes and Amarra playing the same track at its native sample rate.
Zero differences found.
But a lot of people claim to hear a difference.

I’m confident if someone would do this experiment with a FLAC and a WAV, the result will also be zero differences. FLAC is lossless compression by design.
When you play it, it will be expanded to e.g. 16 bits / 44.1 just like the original source.

What do all these test have in common?
They test the bits.
PCM audio is samples + sample rate.
Maybe the variations in timing (oh no, not jitter again) explains it.
To play FLAC you need to expand it first. This requires a bit more processing power than playing WAV.
There are claims that any electrical activity going on inside a PC disturbs in some way or other the clock timing the audio and maps itself into sample rate jitter.
Increased system activity will decrease the sound quality.
This is pretty much like having a video card and the more system activity, the more your screen starts to blur!
One might argue that if sound quality fluctuates with system load, this indicates a design flaw.
As a consequence, on a well-designed system you won’t hear any difference and on the ones with a crappy sound card, you do.
If all this is true, the difference in sound quality is not a property of the file format but a hardware problem.

What about memory playback.
We have a media player
- Load the track in memory
- Expand it on the fly to raw PCM
- Start playback when the song is fully loaded an converted
Will we again hear a difference between FLAC and WAV?

What do we need?
Somebody with that bloody expensive gear able to measure the jitter on the digital out when playing WAV or FLAC.

Beside sound quality, there are a couple of other differences.
Both can be tagged. As there is no standard for tagging WAV, the results are poor.
If the media player write tags (the emphasizes is on the word if), another media player probably won't read them.
FLAC supports tagging including album art.

FLAC incorporates a checksum (MD5) in the header. If a file becomes corrupted, the decoder will signal it.

The bonus: FLAC is between 50-60% of the size of a WAV. A terabyte comes cheap these days but if you have the files on a local HD and 2 backups, its reduced file size is convenient.
 

Kal Rubinson

Well-Known Member
May 4, 2010
2,360
697
1,700
NYC
www.stereophile.com
One of the tests that supposedly confirms bit-perfect file transfer and processing is to convert a dts-encoded stream to WAV or FLAC and play them back. In principle, they will only play back properly via a dts decoder if the file is conveyed without error.

Any comment?
 

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
Never tried DTS.
You need to play an wait until it crashes.
I rather have a computer doing the bit wise comparison.

Brings to mind the HDCD test.
If the player detects it, there is no meddling with the LSB.
But it seems to be not a foolproof test.
 

RBFC

WBF Founding Member
Apr 20, 2010
5,158
46
1,225
Albuquerque, NM
www.fightingconcepts.com
Thank you for the info, Vincent! I've been considering the Mach2Music server, as I'm hesitant to jump into computer audio with my older iMac models. I believe that I'm not alone in being a bit intimidated by the "threat" of setup bugs and integration of different file formats, playback resolution issues, etc. The learning curve seems to ask for an investment of time and energy that many folks are unwilling to put forth (currently, me for instance). Your posts have begun to clarify some things for me and I anticipate taking this step sometime soon.

Lee
 

garylkoh

WBF Technical Expert (Speakers & Audio Equipment)
Sep 6, 2010
5,599
225
1,190
Seattle, WA
www.genesisloudspeakers.com
Vincent, thank you. I used to think that WAV was superior to FLAC, until I did the following experiment.

Using a cheap interface - the M-Audio Transit - I played back a WAV file and a FLAC file outputting optical TOSLINK which I looped into a Weiss Minerva, and recorded the digital files. Using Foobar ABX comparator, I compared the two files. Nada, nothing, no difference.

However, listening to the same two WAV and FLAC files using the M-Audio Transit into a Benchmark DAC, I thought that I could distinctly hear the difference. Into the Weiss and into an Alpha DAC, I could hear no difference.

My conclusion was that the BITS are the same, but there may be some jitter difference. Since then (about 6 months ago) I've been ripping everything directly to FLAC where I have the convenience of tagging, etc.
 

microstrip

VIP/Donor
May 30, 2010
20,806
4,698
2,790
Portugal
What do we need?
Somebody with that bloody expensive gear able to measure the jitter on the digital out when playing WAV or FLAC.

I have never seen it done, but I read somewhere that if you have an old DAC having a simple PLL clock recovery system with a VCO you can check for jitter differences just listening to the amplified voltage signal of this VCO through your audio system.
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
Hi

The Audiophile in me wanted also to think that WAV would sound different from flac ... Now most of my files are in flac and some in ape
 

amirm

Banned
Apr 2, 2010
15,813
37
0
Seattle, WA
Great coverage of the topic as always Vincent.

The only point I would add is that the notion that timing of the signal can change when playing FLAC can be used to make either argument! We know that random timing differences are less harmful than fixed (periodic). So one can easily make the argument that playing FLAC causes unpredictable load on the CPU and the system so it may randomize jitter and hence make it inaudible! So when people ask me which one sounds better at the extreme, my answer is "it depends." :)
 

Phelonious Ponk

New Member
Jun 30, 2010
8,677
23
0
However, listening to the same two WAV and FLAC files using the M-Audio Transit into a Benchmark DAC, I thought that I could distinctly hear the difference.

You thought you could hear a difference on the Benchmark? Did you not use the ABX comparator with the Benchmark like you did with the Weiss?

Tim
 

garylkoh

WBF Technical Expert (Speakers & Audio Equipment)
Sep 6, 2010
5,599
225
1,190
Seattle, WA
www.genesisloudspeakers.com
You thought you could hear a difference on the Benchmark? Did you not use the ABX comparator with the Benchmark like you did with the Weiss?

Tim

Sorry, statistics and semantics. With the ABX comparator, I got it right something like 75% with the Benchmark with nearly 20 samples. ABX testing is hard and tiring and I wasn't willing to go further. With the Weiss, I did a few samples, and couldn't tell the difference, and I was essentially guessing.
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
Hi
What is the load on the CPU when decoding flac. let's suppose a modern day PC with dual core processor and 4 GB or RAM?
I also am amused when people use the expression "sound worse" ... many friends and I heard NO differences between .wav, flac, .ape and wv of the same file through the benchmark HDR and headphones ..Granting that there could be some minute differences ( I don't think so truly but for the sake of discussion ... ), they would be so small as to make such a qualification impossible ..but we will forge on .. I think I have passed the stage where I worry on this ..

If you want to convince yourself ..In all honesty, try to ABX a 320 Kbps mp3 with the wav version using foobar ... It is a very humbling experience...
 

garylkoh

WBF Technical Expert (Speakers & Audio Equipment)
Sep 6, 2010
5,599
225
1,190
Seattle, WA
www.genesisloudspeakers.com
Hi
What is the load on the CPU when decoding flac. let's suppose a modern day PC with dual core processor and 4 GB or RAM?

Good point - this was on my older music server with Dual Pentium and 2GB of RAM..... but even then, CPU load was less than 10% because Windows was essentially stripped.

If you want to convince yourself ..In all honesty, try to ABX a 320 Kbps mp3 with the wav version using foobar ... It is a very humbling experience...

Agreed, when I did it to myself, the probability of getting it right was less than the probability of living through one round of Russian Roulette. Although, with complex passages of large classical music, the probably goes up.
 

Jay_S

WBF Founding Member
Apr 20, 2010
309
5
16
San Francisco - East Bay
If you want to convince yourself ..In all honesty, try to ABX a 320 Kbps mp3 with the wav version using foobar ... It is a very humbling experience...

I agree with this. I made way too many of these 320 kbps rips but they sound surprisingly good. But there is not much of a reason to use them any more. 320 kbps is about 30% of wav file size while FLAC or ALAC only increases to around 50% (+/- 10%).
 

Jay_S

WBF Founding Member
Apr 20, 2010
309
5
16
San Francisco - East Bay
Great coverage of the topic as always Vincent.

The only point I would add is that the notion that timing of the signal can change when playing FLAC can be used to make either argument! We know that random timing differences are less harmful than fixed (periodic). So one can easily make the argument that playing FLAC causes unpredictable load on the CPU and the system so it may randomize jitter and hence make it inaudible! So when people ask me which one sounds better at the extreme, my answer is "it depends." :)

Another counterargument (in the same spirit) is that the smaller file size of a FLAC file results in fewer hard drive seeks, reducing periodic current draws on the system, thereby resulting in less jitter.
 

FrantzM

Member Sponsor & WBF Founding Member
Apr 20, 2010
6,455
29
405
Good point - this was on my older music server with Dual Pentium and 2GB of RAM..... but even then, CPU load was less than 10% because Windows was essentially stripped.



Agreed, when I did it to myself, the probability of getting it right was less than the probability of living through one round of Russian Roulette. Although, with complex passages of large classical music, the probably goes up.

I agree with this. I made way too many of these 320 kbps rips but they sound surprisingly good. But there is not much of a reason to use them any more. 320 kbps is about 30% of wav file size while FLAC or ALAC only increases to around 50% (+/- 10%).

@gary

On a modern day PC dual core , I observed less than 2% of CPU utilization.. informal but that tells you how little the CPU is taxed and if one use an SSD there is not much to worry about....

I also agree on the complex passage.. There is a loss of fine details and ambience.. The many things that make us audiophiles are ot properly conveyed on 320 Kb/s but it is more than acceptable and definitely enjoyable..

@Jay_S

As i have often repeated with storage becoming so inexpensive ..it makes no sense not to use .flac or ape or some other lossless compression scheme.
 

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
The learning curve seems to ask for an investment of time and energy that many folks are unwilling to put forth (currently, me for instance). Lee
You can make it as complicated as you want or as simple as it should be.
Don’t buy a box (that is stone age audiophilia, any problem is cured by buying another box)
- Configure iTunes (easy: http://thewelltemperedcomputer.com/SW/OSX/OSX.htm)
- Rip a bunch ( 40 CDs or so) to ALAC (Apples own FLAC)
- Throw in some other sources (MP3)
- Listen
This get you started
This allows you to fool around a little
Experiment with sample rates, various file formats and inter faces.
Get some gut feeling about the magnitude of all these tweaks before you buy another box.
Don’t get intimidated by all this tech talk
 

Bruce B

WBF Founding Member, Pro Audio Production Member
Apr 25, 2010
7,006
512
1,740
Snohomish, WA
www.pugetsoundstudios.com
If I put a wav file on one track and a FLAC file on the other track in Pyramix, I can't tell them apart, sighted or blind. Pyramix also has their own proprietary format as well called .pmf and .pmi which is similar to FLAC, because it can contain metadata, but it's not compressed.
Doing transfers for HDtracks, we spent months testing formats and sample rates.
 

Old Listener

New Member
Jul 18, 2010
371
0
0
SF Bay area
naturelover.smugmug.com
Hi
What is the load on the CPU when decoding flac. let's suppose a modern day PC with dual core processor and 4 GB or RAM?

I use a 4+ year old Intel E6300 Core2Duo running at 1.8 GHz. The system is running Win XP with 2 GB of Ram and playing music files from a 1 TB 5400 RPM hard drive. When I play 44.1/16 Flac files with J. River Media Center 15, CPU use stays around 1% with an occasional 2%. I don't see any difference in CPU use when I play WAV files.

I also am amused when people use the expression "sound worse" ... many friends and I heard NO differences between .wav, flac, .ape and wv of the same file through the benchmark HDR and headphones .

You aren't the only person to report that he (and his friends) didn't hear differences between Flac files and WAV files. However, such reports are dismissed on audiophile forums for the usual reasons. I call this an

audiophile consensus = the people who agree with you. Opposing views don't count.

It does simplify statistical analysis.

If you want to convince yourself ..In all honesty, try to ABX a 320 Kbps mp3 with the wav version using foobar ... It is a very humbling experience...

I don't think that most audiophiles are in the market for humbling experiences.

Bill
 

Ron Party

WBF Founding Member
Apr 30, 2010
2,457
13
0
Oakland, CA
If I put a wav file on one track and a FLAC file on the other track in Pyramix, I can't tell them apart, sighted or blind. Pyramix also has their own proprietary format as well called .pmf and .pmi which is similar to FLAC, because it can contain metadata, but it's not compressed.
Doing transfers for HDtracks, we spent months testing formats and sample rates.
Very interesting, Bruce. Thanks for that info.
 

About us

  • What’s Best Forum is THE forum for high end audio, product reviews, advice and sharing experiences on the best of everything else. This is THE place where audiophiles and audio companies discuss vintage, contemporary and new audio products, music servers, music streamers, computer audio, digital-to-analog converters, turntables, phono stages, cartridges, reel-to-reel tape machines, speakers, headphones and tube and solid-state amplification. Founded in 2010 What’s Best Forum invites intelligent and courteous people of all interests and backgrounds to describe and discuss the best of everything. From beginners to life-long hobbyists to industry professionals, we enjoy learning about new things and meeting new people, and participating in spirited debates.

Quick Navigation

User Menu

Steve Williams
Site Founder | Site Owner | Administrator
Ron Resnick
Site Co-Owner | Administrator
Julian (The Fixer)
Website Build | Marketing Managersing