Page 1 of 5 12345 LastLast
Results 1 to 10 of 44

Thread: FLAC versus WAV

  1. #1
    Computer Audio [Technical Expert]
    Join Date
    Jul 2010
    Posts
    860

    FLAC versus WAV

    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.

  2. #2
    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?

  3. #3
    Computer Audio [Technical Expert]
    Join Date
    Jul 2010
    Posts
    860
    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.

  4. #4
    [WBF Founding Member] Moderator RBFC's Avatar
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    5,093
    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
    Lee Aldridge

    I post my own opinions except when posting as a moderator in green.

  5. #5
    WBF Technical Expert (Speakers & Audio Equipment)/Member Sponsor [Technical Expert] garylkoh's Avatar
    Join Date
    Sep 2010
    Location
    Seattle, WA
    Posts
    5,411
    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.
    __________________________
    Gary L Koh, CEO and Chief Designer,
    Genesis Advanced Technologies

  6. #6
    VIP/Donor [VIP/Donor] microstrip's Avatar
    Join Date
    May 2010
    Location
    Portugal
    Posts
    12,900
    Quote Originally Posted by Vincent Kars View Post

    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.

  7. #7
    Member Sponsor [WBF Founding Member] FrantzM's Avatar
    Join Date
    Apr 2010
    Posts
    6,469
    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
    Frantz
    __________________________________

    "For me, it is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring."
    —Carl Sagan
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
    — E. F. Schumacher
    (mis-attributed to A. Einstein)

  8. #8
    Banned
    Join Date
    Apr 2010
    Location
    Seattle, WA
    Posts
    16,044
    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."

  9. #9
    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
    In high-end audio, you can't even fight an opinion with the facts.

  10. #10

Page 1 of 5 12345 LastLast

Similar Threads

  1. WAV vs FLAC revisited
    By Vincent Kars in forum Vincent Kars On Computer Audio
    Replies: 182
    Last Post: 06-27-2012, 07:10 AM
  2. Wav
    By Vincent Kars in forum Vincent Kars On Computer Audio
    Replies: 11
    Last Post: 05-16-2012, 12:37 PM
  3. Flac
    By Vincent Kars in forum Vincent Kars On Computer Audio
    Replies: 59
    Last Post: 08-30-2011, 10:57 AM
  4. Google + versus Facebook
    By Steve Williams in forum General Misc Discussion
    Replies: 10
    Last Post: 07-28-2011, 12:33 PM
  5. FLAC to ALAC
    By Ron Party in forum Vincent Kars On Computer Audio
    Replies: 5
    Last Post: 03-12-2011, 08:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •