WAV vs. FLAC

All music posts here please.
Forum rules
1. No ad-hominem
2. No spamming or shilling
Lurcher300b
Posts: 498
Joined: Tue Jun 14, 2016 1:58 pm
Great Britain

Re: WAV vs. FLAC

Unread post by Lurcher300b » Tue Nov 07, 2017 5:27 pm

I have to add a footnote to my point about comparing the checksum. It may be the case that the WAV headers are slightly modified by the process. For example, starting with a WAV that gives the following data dump

Code: Select all

> 0000060  \0  \0 020  \0 200  \0  \0 252  \0   8 233   q   f   a   c   t
> 0000100 004  \0  \0  \0   )   F   X  \0   d   a   t   a 366 244 021 002
> 0000120 211   a 367  \a   & 367 362  \t 366 370 355 365 204 300 364 340
> 0000140 277 364   2 203 363   & 237 363   u   O 362 373 220 362 300   (
> 0000160 361 353 222 361 254 023 360 203 241 360   w 020 357 224 275 357
Then running via sox to flac and back gives the following changed

Code: Select all

< 0000060  \0  \0 020  \0 200  \0  \0 252  \0   8 233   q   L   I   S   T
< 0000100   4  \0  \0  \0   I   N   F   O   I   C   M   T 021  \0  \0  \0
< 0000120   P   r   o   c   e   s   s   e   d       b   y       S   o   X
< 0000140  \0  \0   I   S   F   T 016  \0  \0  \0   L   a   v   f   5   6
< 0000160   .   2   5   .   1   0   1  \0   d   a   t   a 366 244 021 002
The data ( from 366 244 021 002 ), is then identical, but the changed header will invalidate the use of a checksum to check the data.

So don't use this as a indicator that there is something wrong.
Last edited by Lurcher300b on Tue Nov 07, 2017 5:35 pm, edited 1 time in total.

Lurcher300b
Posts: 498
Joined: Tue Jun 14, 2016 1:58 pm
Great Britain

Re: WAV vs. FLAC

Unread post by Lurcher300b » Tue Nov 07, 2017 5:34 pm

Stripping of the header, does then show that the audio data is identical

sox in.wav out.flac
sox out.flac out.wav

md5sum in.wav out.wav

ef45379e76109211b015764cc844e010 in.wav
8f60cf33ec3fe9defc307688c45992ab out.wav

sox in.wav in.dat
sox out.wav out.dat

md5sum in.dat out.dat

a2d4dd7d70bd7daaf32d54adf427702b in.dat
a2d4dd7d70bd7daaf32d54adf427702b out.dat

User avatar
Fretless
Posts: 3155
Joined: Wed Nov 12, 2014 12:15 pm
Location: Somewhere in Holland
Netherlands

Re: WAV vs. FLAC

Unread post by Fretless » Tue Nov 07, 2017 5:35 pm

This is getting complicated - even for me.

Have to give this checksum thing a go. If just to see if there is any visible data corruption.

I do think that audible differences in digital encoding are present. But it is very subtle and possibly more a matter of personal taste/preference than absolute data integrity. It is an area that keeps me busy, though.
NVA: P50sa - SSP - A40 - LS6 - Cube3
Digits: RPi 2B / Allo DigiOne / Volumio / Tomanek ULPS / AQ Jitterbug
CD Transport: Cambridge CXC DAC: Metrum Acoustics Musette
Cans: AudioQuest NightHawk Digital i/c: Oxypure OCC coax & optical

User avatar
savvypaul
Posts: 1751
Joined: Tue Oct 11, 2016 7:14 pm
Location: Durham
Great Britain

Re: WAV vs. FLAC

Unread post by savvypaul » Tue Nov 07, 2017 6:14 pm

antonio66 wrote:
Tue Nov 07, 2017 5:19 pm
"But any difference in SQ between the 2 formats for purposes of download?"

You would be hard pressed to tell the difference. I have listened to my brothers cd rips onto his homemade (for music) computer using dbpoweramp and any differences are very subtle.
Not talking about ripping CDs...but downloading directly from (e.g) Qobuz
"Even men with steel hearts love to see a dog on the pitch, It generates a warmth around the ground that augurs well for mankind."

NVA BMU / WTL Versalex / Transfiguration Axia /NVA Phono2 w/ 2nd PSU / GSP Revelation C / Vortexbox Appliance NAS Server / Sonore microRendu USB streamer w/ LPSU / Chord 2Qute USB dac / NVA P90sa / NVA A80MK2 (bass) / NVA A70 MK2 (tweeters) / NVA Cube 1 / NVA TIS MK1 / NVA SSPMK2 / NVA LS6 / NVA AP10H (& 1x additional PS) / Audeze LCD-2

User avatar
Ithilstone
Posts: 330
Joined: Mon Jun 01, 2015 10:54 am
Swaziland

Re: WAV vs. FLAC

Unread post by Ithilstone » Tue Nov 07, 2017 7:32 pm

Lurcher300b wrote:
Tue Nov 07, 2017 5:34 pm
Stripping of the header, does then show that the audio data is identical

sox in.wav out.flac
sox out.flac out.wav

md5sum in.wav out.wav

ef45379e76109211b015764cc844e010 in.wav
8f60cf33ec3fe9defc307688c45992ab out.wav

sox in.wav in.dat
sox out.wav out.dat

md5sum in.dat out.dat

a2d4dd7d70bd7daaf32d54adf427702b in.dat
a2d4dd7d70bd7daaf32d54adf427702b out.dat
And with that simple explanation if any one still hears the difference between properly encoded flac and wave then it is down to phenomenon called confirmation bias...
Nothing to see here...

pgarrish
Posts: 33
Joined: Wed Oct 11, 2017 7:33 pm
Great Britain

Re: WAV vs. FLAC

Unread post by pgarrish » Tue Nov 07, 2017 9:36 pm

Fretless wrote:
Tue Nov 07, 2017 5:35 pm
This is getting complicated - even for me.

Have to give this checksum thing a go. If just to see if there is any visible data corruption.

I do think that audible differences in digital encoding are present. But it is very subtle and possibly more a matter of personal taste/preference than absolute data integrity. It is an area that keeps me busy, though.
Well you've picked the right word - Corruption. FLAC is simply data compression, its the same as WinZip or any other lossless data compression technique - a way of storing ALL OF THE DATA in less space. You can convert from WAV to FLAC to ALAC and back again for ever and the result will never change - unless you have some corruption taking place. Therefore, since the data represented in all 3 formats is identical, either there is no difference to what you are hearing, some lossy transcoding is taking place, or the decoding process is too much for the machine (Apple ipod shuffles weren't able to play back lossless formats for that reason). You wont get subtle changes to the music either, you'll get drop outs or those horrible digital 'shrieks' due to random data. Mp3 is a different animal (as are any lossy compression formats) as they selectively 'loose' some of the information. With everything having GBs of storage now, there really isn't any reason for mp3 unless you want to stream over mobile data.
Rega Planar / Teac T1 / Chromecast Audio - Teac TD1 DAC - Rotel RC850 - HHS500D or DACT passive - Mullard 5-20 Monos - Tannoy Cheviots + Wharfedale sub

Simon Hickie
Posts: 511
Joined: Mon Feb 27, 2017 1:47 pm
Location: East Staffordshire
Great Britain

Re: WAV vs. FLAC

Unread post by Simon Hickie » Tue Nov 07, 2017 11:52 pm

Logically they 'should' sound the same as the data is a FLAC file and is lossless. However, my speculation is that the decompression process with a compressed FLAC file, regardless of the capability of the computer in question, is doing 'something' to the sound quality in my experience. Those who report similar findings speak of the kinds of things I hear, namely more air, ambience, etc. from the uncompressed format. To complicate matters there are also uncompressed FLAC files which are similar in size to WAV.

To give an example, I was listening to some medieval music with solo singer and the odd instrument. The intake of breath before the soloist began singing was more striking on the WAV file and indeed jumped out at you. I played this after the FLAC version where the intake of breath did not have quite the same impact. Yes the breath was obviously there on the FLAC file but it seemed more incidental and I can't say I noticed it in the same way.
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.” George Bernard Shaw.

User avatar
Fretless
Posts: 3155
Joined: Wed Nov 12, 2014 12:15 pm
Location: Somewhere in Holland
Netherlands

Re: WAV vs. FLAC

Unread post by Fretless » Wed Nov 08, 2017 12:04 am

Same here, it's micro-details that seem to be lost in the compression process. inflections, striking of keys, placement of sounds, air and ambiance.

My ears tell me this and these are effects that might not be measurable. The untreated WAV files feel 'right' in comparison to FLAC-processed files.
NVA: P50sa - SSP - A40 - LS6 - Cube3
Digits: RPi 2B / Allo DigiOne / Volumio / Tomanek ULPS / AQ Jitterbug
CD Transport: Cambridge CXC DAC: Metrum Acoustics Musette
Cans: AudioQuest NightHawk Digital i/c: Oxypure OCC coax & optical

Simon Hickie
Posts: 511
Joined: Mon Feb 27, 2017 1:47 pm
Location: East Staffordshire
Great Britain

Re: WAV vs. FLAC

Unread post by Simon Hickie » Wed Nov 08, 2017 12:20 am

Ah well, it's all consistent with the hifi subjectivist philosophy. It's not something we seem to be able to measure but our ears tell us otherwise. I had a few more FLAC files than I realised, but my FLAC to WAV conversions are now up to the end of the Romantic era. Just the modern era composers and the rock / folk / blues to check out now.
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.” George Bernard Shaw.

Lurcher300b
Posts: 498
Joined: Tue Jun 14, 2016 1:58 pm
Great Britain

Re: WAV vs. FLAC

Unread post by Lurcher300b » Wed Nov 08, 2017 12:23 am

But if I understand, you are reporting a change in files that were WAV, then to FLAC, and back to WAV, so the before and after WAV sound different.

I can believe that if the conversion to PCM when playing FLAC causes extra work on the system somewhere then that might be audible, though I would say I would expect the "distance" from the uncompression process to the DAC would affect how audible this was.

Post Reply