Flac vs Wav audio quality

Posted by: Bruce Woodhouse on 23 December 2014

I am in the process of converting my HDX library to switch to my new NDS

 

I have seen various discussions about wether people can (and indeed should) be able to detect a difference in quality between flac and wav files.

 

Well I am absolutely certain I can tell. I don't consider myself the most analytical listener, and I'm not always the best as describing it but the difference for me is marked-and my wife agreed.

 

Flac is a bit drier, a little sweeter perhaps and I think details better resolved. Wav seems fuller, richer and perhaps a bit more dynamic. Flac maybe a bit 'cleaner' sounding?

 

Curiously I'm not sure which I prefer. Flac certainly not a deal breaker and some tracks really suited the presentation. I'm going to wait until I have attached the NDS to decide-and I retained a wav library as back up too (so have also directly compared tracks as well).

 

Interesting

 

Bruce

 

Posted on: 29 December 2014 by Big Bill

I use MinimServer which allows you to configure the decision tree, so to make that work I need to be able to edit the tag data.  But even if I didn't need to, I find that all the labels use a slightly different tagging scheme and the overriding principal of music tagging is CONSISTENCY!

 

Posted on: 29 December 2014 by winkyincanada
Originally Posted by Big Bill:
Originally Posted by Jota:

What Bill said.  FLAC is designed to be very easy to decode, portable players can do it with ease.  That's why it takes far, far longer to encode in FLAC than decode.

 

One other thing mentioned, that CPU's must have more work to do decoding FLAC than WAV.  Well the WAV files are larger so the CPU is decoding for longer...

 

"On my PC, using Sysinternals Process Explorer (the benchmark tool for CPU usage analysis), playing a WAV file in Foobar required a scant 0.327 seconds of total CPU time from a single core of my multicore processor. This works out to about 0.2% CPU usage. Playing the exact same file in FLAC format, required 0.312 seconds of total CPU time—also about 0.2% CPU usage. These numbers are essentially the same, and the FLAC number is even slightly lower. Why? It’s likely because the CPU has to read half as much data with FLAC compared to WAV. But these numbers are so small, they really don’t matter. Other background tasks in the operating system consume far more CPU than FLAC decoding. So this alone should put the myth to rest."

Jota that is very interesting.  The argument is that:

(a) WAV and FLAC send 'bit-perfect' streams to your player, whether wired ofWiFi - don't believe anyone who says different.

(b) FLAC requires more processing on your streamer so can cause the beast to heat up more than a WAV file, this will increase the noise floor.  There can be NO other way for WAV to sound better than FLAC.

 

But your observations seem to blow this out of the water - interesting.

 

You are quite right about the design of FLAC.  The goal was to produce a lossless compression system that required minimal processing to decode but was 'expensive' to encode.  Because you only encode once.

I can't hear any audible effect from processor loads when playing via optical SPDIF from my Mini. I can be ripping and compressing DVD video (huge processor load) while playing audio tracks with iTunes. They never skip a beat sound the same (to me) as when the Mini is doing little else. Modern computers can do audio with incredible ease, as Jota notes. They don't break a sweat.

Posted on: 29 December 2014 by Huge

Technically FLAC holds metadata as 'Vorbis Comments' rather than the ID3 format of MP3, but the overall effect is the same.

 

However, in order to hold metadata, WAV files have to use proprietary formats.  Because ID3, Vorbis Comments or any other metadata formats aren't actually included in the MS WAVE specification, their use in WAV files is still proprietary.  So, since there is no standard for metadata for WAV files, it's unpredictable as to whether any particular software or device will support any particular scheme.  In fact it would be perfectly acceptable for a WAV file renderer or editor to report that a WAV file with tags isn't a valid WAV file.

 

Yes, I also know that most WAV file renderers (in fact possibly all real ones) actually ignore correctly formatted RIFF based extensions to the WAV format, but they are extensions.

 

 

You can add non-standard tags to WAV and they may or may not work.

Your choice.

Just don't blame the software or hardware if they don't work.

Posted on: 30 December 2014 by Simon-in-Suffolk

Huge, I think you and I have discussed this before exchanging links etc, but WAV does include meta data as part of it official specification (IBM/MS) - but not the simplified subset used for the latest MS consumer audio libraries. They are the List Info comments. It is the ID3 comments that were informally added. Agree List Info is very comprehensive and is more suited to commercial  use and not limited to consumer audio files and so its mapping to ID3 tag type info is open to some interpretation for some values. 

Of course a compliant WAV file reader may chose to ignore chunk IDs it doesn't recognise... That is a beauty of WAV in as far as it supports future developments and backwards compatibility.

 

Some popular WAVE meta data tag types used.

http://wavmetadata.blogspot.co.uk

 

Simon

 

Posted on: 30 December 2014 by Big Bill

Huge I think you will find that they both use Ogg Vorbis.

Posted on: 30 December 2014 by Huge

Hi Simon,

 

Since this is an aspect of system programming, the answer is a little bit long as there are several parts to it.

 

 

I have looked this up and I am certain that I understand the position.  I have reviewed the detailed format definitions for both WAVE and RIFF (including the provided C++ sample code and header files).

 

Identification of metadata blocks is contained within the generic definition of RIFF, but not in the specific limited list of FOURCC identifiers for the WAVE subset.

 

Most (if not all) WAVE file renderers (including the Microsoft ones) are actually RIFF parsers, but ones that only interpret the WAVE subset data blocks (they ignore other RIFF data blocks with FOURCC identifiers that are not in the WAVE subset).

 

 

So using the underlying RIFF

As Big Bill says, in practice, Ogg Vorbis comments can be included.

In practice, so can ID3 (two different types).

In practice, so can any other Metadata anyone cares to define within an RIFF metadata block.

 

But these are relying on the underlying RIFF structure: as far as the WAVE format is concerned they are undefined & unknown RIFF blocks, as the FOURCC identifiers for them aren't specifically defined within the WAVE specification.

 

 

In other words within RIFF datasets you can choose to use whatever metadata format you want, provided it's contained in an appropriate block.  However, whether any specific reader can understand the format you choose is an entirely different question.  It doesn't have to read any metadata blocks.

 

The WAVE format doesn't help with this as it doesn't even define a FOURCC code for metadata (that's only defined at the RIFF outer layer and WAVE doesn't include the entire RIFF set of data block formats).

 

 

There is no practical reason why you should not include metadata within WAVE files; it simply may or may not work.

 

There is no onus on anyone writing a WAVE reader to read any metadata block at all.  There isn't even a definition of what format to use, should they even try to read it.  If it fails to read it or reads it wrongly, that's your hard luck, it's not a fault in the reader (unless the manufacturer specifically says it will read a particular form of RIFF metadata).

Posted on: 30 December 2014 by Simon-in-Suffolk

Hi Huge, indeed RIFF chunk IDs can be ignored..  But interestingly with OGG files which to my eyes are chunked sequenced packaged pages as opposed to linear chunked data as typically used in WAV there is no standardised (from my notes as of 2007) for incoporating metadata. Thefore with an OGG format the suggested recommendation is to use Vorbis Comment type value pairs within the codec chunk itself such as in Vorbis or FLAC. Therefore implementing Vorbis Comments in RIFF feels possible but would require some bespoke implementation coding, just as it has been for ID3.

 

Also the Vorbis Comments is a living list of expanding type value pairs.. Therefore even with Vorbis Comments it may be possible to come across types you can't parse, and so you need to handle that just as with RIFF, but this time it is within your codec parser as opposed to your file parser.

So I guess I am saying there are pit falls everywhere for the unwary 

 

Simon

 

 

Posted on: 30 December 2014 by Huge

AAAGH...

Thud...

OW!

 

 

Now how do I get out of this pit.

Posted on: 30 December 2014 by Simon-in-Suffolk

Posted on: 30 December 2014 by Graham Clarke

I too tried the FLAC vs. WAV test some months back and couldn't distinguish between them.  I'm not trying to discredit others findings, just trying to add another viewpoint.

 

Both files were played through the same source chain (NAS / switch / NDS) to eliminate other differences.

 

While both are a lossless format, FLAC does offer different levels of compression and I wonder whether this is what people are hearing?  All my material is ripped to lossless uncompressed via dBpoweramp.

 

For those who can hear a difference, had you all ripped to lossless uncompressed?  If yes, just call me cloth eared

Posted on: 30 December 2014 by Gale 501
Originally Posted by Big Bill:

Huge I think you will find that they both use Ogg Vorbis.

Thats interesting.

Posted on: 30 December 2014 by Bruce Woodhouse
Originally Posted by Graham Clarke:

I too tried the FLAC vs. WAV test some months back and couldn't distinguish between them.  I'm not trying to discredit others findings, just trying to add another viewpoint.

 

Both files were played through the same source chain (NAS / switch / NDS) to eliminate other differences.

 

While both are a lossless format, FLAC does offer different levels of compression and I wonder whether this is what people are hearing?  All my material is ripped to lossless uncompressed via dBpoweramp.

 

For those who can hear a difference, had you all ripped to lossless uncompressed?  If yes, just call me cloth eared

All lossless uncompressed, however with NAS/HDX vs NAS/NDS as I said the differences much less obvious. Absolutely no mistaking through the HDX but with the NDS it is slight. I've stopped comparing now and just got on with enjoying stuff.

 

Cheers

 

Bruce

Posted on: 30 December 2014 by Big Bill
Originally Posted by Huge:

AAAGH...

Thud...

OW!

 

 

Now how do I get out of this pit.

Stop pretending you know what you are talking about.

Posted on: 30 December 2014 by Big Bill
Originally Posted by Graham Clarke:

For those who can hear a difference, had you all ripped to lossless uncompressed?  If yes, just call me cloth eared

Erm Graham all uncompressed must surely be lossless.

 

The thing is that if you change anything in your file structures then you make life difficult for someone, so basically you get stuck with it.

 

Both mp3 and FLAC used the earlier Ogg Vorbis tag system, which is a very simple system and was proven.  A good decision in my book.

 

It is surprisingly easy to read off tag data from FLAC (or mp3) and I have been working on developing a system for reading my FLAC files and storing them in an SQL database.  That means you can make changes to the database and then 'implant' them back into your FLAC files.  The tage data is stored at the beginning of the file and is described here --> https://xiph.org/flac/documentation.html

 

Get yourself a copy of notepad++ and look at individual FLAC files with it.  That will show you what is happening.

Posted on: 30 December 2014 by Gale 501
Originally Posted by Big Bill:
Originally Posted by Huge:

AAAGH...

Thud...

OW!

 

 

Now how do I get out of this pit.

Stop pretending you know what you are talking about.

Pot - Kettle 

Posted on: 30 December 2014 by Big Bill
Originally Posted by Wat:
Originally Posted by Gale 501:
Originally Posted by Big Bill:

Huge I think you will find that they both use Ogg Vorbis.

That's interesting 

+1 Yes very interesting indeed 

 

My Mac Mini does the transcoding and just sends the data to Hugo, Hugo knows nothing of FLAC, WAV or Ogg Vorbis or even AIFF. Yet to find a format I can't play, but I shall Carry On Looking. 

 

I realise my hearing is difficient, but I have never been able to hear any difference between lossless formats on my system. I can clearly hear DSD Studio Masters of my Moody Blues albums sound better than the red book PCMs: I suppose it is just a question of balance. 

 

AIFF seems the ideal PCM format, as it is not stuffed and supports lots of tags. Perhaps, we shall all thank the Commodore. I'm glad Apple adopted it as it suits me well. 

 

I believe if I use a UQ and stream with UPnP then it does not sound as good as when it is fed over Toslink from a Mac Mini. In fact fed from XMOS USB to S/PDIF convertor appeared to provide the best sound through this humble, but very good little device. That said, however fed, the UQ sounded very good. I used Eclipse speakers to reach this conclusion. I can make guesses as why this may be, but not sure of their validity. 

In what way is FLAC 'stuffed'?  Just not sure what you mean.

Posted on: 30 December 2014 by intothevoid

Bruce, if you have the disk space you should convert your flac to be fully uncompressed. Others do this by transcoding to wav on the fly, each and every time they play music. That doesn't make sense to me, as they introduce load in to the system every time.

 

I think flac sounds better than wav when uncompressed, and the tagging is so much better. I agree with your description of flac sounding more detailed and incisive, whereas wav is a fuller sound. Maybe different formats work better with different setups?

 

My tuppence.

 

Steve

Posted on: 30 December 2014 by Simon-in-Suffolk

Wat, I think you'll find the original AIFF file based on EA IFF 85 (Electronic Arts Interchange File Format 1985) had no metadata other than name, author, copyright, and free form comments and or annotations. I think Apple later formalised the metadata within AIFF, perhaps  to catch up with WAV

Not sure on your comments regarding stuffing.. Both WAVE and AIFF are RIFF constructs so there is very little padding other than perhaps a few even byte boundaries in a few locations.

Simon

Posted on: 30 December 2014 by Gale 501

Simon,

You are taking it all a bit literally man.

They are all packets/boxes/bags or what ever you want to call them?

They can all be stuffed.

Some are just bigger/smaller than others.

Since Yoshi apple have almost all in iTunes yet people are still cluttering up using other systems to rip when there is no need to anymore.

They all come with great album cover art flow.

Posted on: 30 December 2014 by Huge

Gale,

 

I'm with Simon, the content's of the box have to be the right format, "stuff" it with the wrong thing and you get garbage.

 

To continue your analogy; take a box marked 'Cornflakes', if it actually contains rat poison, there's going to be a problem!

Posted on: 30 December 2014 by Gale 501
Originally Posted by Huge:

Gale,

 

I'm with Simon, the content's of the box have to be the right format, "stuff" it with the wrong thing and you get garbage.

 

To continue your analogy; take a box marked 'Cornflakes', if it actually contains rat poison, there's going to be a problem!

Why would anyone with less than a quarter of a brain do that?

You lot just like making things seem complicated when they are not.

Posted on: 30 December 2014 by Huge
Originally Posted by Gale 501:
Originally Posted by Huge:

Gale,

 

I'm with Simon, the content's of the box have to be the right format, "stuff" it with the wrong thing and you get garbage.

 

To continue your analogy; take a box marked 'Cornflakes', if it actually contains rat poison, there's going to be a problem!

Why would anyone with less than a quarter of a brain do that?

You lot just like making things seem complicated when they are not.

You stuff the box with data of the right format so that other people can know how to write code to read the data.  If you don't use the right format then the data in the box are useless, as programmes won't be able to work out what it means.

 

That's why you do it.

 

The complication is due precision needed to make it work.

Posted on: 30 December 2014 by Huge
Originally Posted by Gale 501:
Originally Posted by Big Bill:
Originally Posted by Huge:

AAAGH...

Thud...

OW!

 

 

Now how do I get out of this pit.

Stop pretending you know what you are talking about.

Pot - Kettle 

Bill, you are being objectionable just for the sake of it or do you actually have a "Universal Pit Escape Method"? 

 

 

Actually, to put the record straight, I was wrong about MP3 tags, I thought that ID3 tags were officially supported and this is not the case.  The current ID3 and ID3v2 tagging schemes are actually unofficial, even if they are almost universally adopted.

 

ISO/IEC 13818-3:1998 (the specification for MPEG-2 Layer III) doesn't specify use of ID3 tags.  In fact it doesn't specify any extended metadata at all.

 

It doesn't specify the Xiph comments (also known as Ogg Vobis comments) you stated, and these are rarely (if ever) used in MP3.  As you stated, they are however officially supported in FLAC even though, as Simon said, there is no officially specified list of field names for the name / value pairs.

Posted on: 30 December 2014 by dayjay

Is it just me or has this thread become very difficult to follow?  Not enough alcohol in my system I suspect!

Posted on: 30 December 2014 by Huge
Originally Posted by dayjay:

Is it just me or has this thread become very difficult to follow?  Not enough alcohol in my system I suspect!

Too much blood in the alcohol stream?