Page 4 of 5

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 5:27 pm
by Lurcher300b
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.

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 5:34 pm
by Lurcher300b
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

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 5:35 pm
by Fretless
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.

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 6:14 pm
by savvypaul
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

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 7:32 pm
by Ithilstone
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...

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 9:36 pm
by pgarrish
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.

Re: WAV vs. FLAC

Posted: Tue Nov 07, 2017 11:52 pm
by Simon Hickie
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.

Re: WAV vs. FLAC

Posted: Wed Nov 08, 2017 12:04 am
by Fretless
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.

Re: WAV vs. FLAC

Posted: Wed Nov 08, 2017 12:20 am
by Simon Hickie
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.

Re: WAV vs. FLAC

Posted: Wed Nov 08, 2017 12:23 am
by Lurcher300b
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.