• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

WAV(PCM) vs FLAC

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,688
Likes
4,069
So, the compression level chosen during encoding should have no bearing on DJing since you are just decoding the audio and not encoding it.
I don't know, but it is what one of my friends, who is a long-time vinyl digitalizer and digital DJ told me.

What I know is that when you throw an mp3 in iZotope to see the spectrum, it takes a lot longer to load than a FLAC, which also takes a lot longer to load than a WAV.
 

boswell

Member
Joined
Dec 6, 2019
Messages
76
Likes
76
Since I couldn't find any data on this, I did a quick unscientific test on my side. I took a 72-min long album in WAV and encoded it to FLAC L0 and FLAC L8. I then decoded these two FLAC files back to WAV.

FLAC L0 to WAV: 9 seconds
FLAC L8 to WAV: 8 seconds

I ran this test several times with similar results.

I used FLAC 1.3.3 20190804 in Foobar2000.
Please give file sizes
 

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,688
Likes
4,069
If it were 16 bit 44 khz then 72 minutes would be a bit over 100 megabits. Or were you interested in the file size of the compressed FLAC?
72 minutes of 16/44.1 would be around 750Mo in WAV and 400Mo in FLAC.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,696
Likes
37,432
72 minutes of 16/44.1 would be around 750Mo in WAV and 400Mo in FLAC.
Yeah your right. I left out the 60 seconds per minute part. Should have known too as you know how much a CD-R holds.
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
What I know is that when you throw an mp3 in iZotope to see the spectrum, it takes a lot longer to load than a FLAC, which also takes a lot longer to load than a WAV.
Sure, but does it take longer to load FLAC L8 than it takes to load FLAC L0?
 

AnalogSteph

Major Contributor
Joined
Nov 6, 2018
Messages
3,373
Likes
3,318
Location
.de
Sure, but does it take longer to load FLAC L8 than it takes to load FLAC L0?
Slightly. FLAC is explicitly designed to do the heavy lifting during encoding so CPU loading during playback is kept to a minimum.
all-tracks-decode.png

https://xiph.org/flac/comparison.html

EDIT: Oh, and yes, FLAC decoding is generally quicker than that of MP3 or any other lossy format.
https://www.rockbox.org/wiki/CodecPerformanceComparison
 
Last edited:

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
I used the two sample FLAC files from that rockbox page

https://download.rockbox.org/test_files/

FLAC L5 and FLAC L8. They both decode to WAV in the same amount of time on my old laptop.

Converting: "C:\Users\***\Desktop\flac_8.flac"
Destination: "C:\Users\***\Documents\!Converted Music\. flac_8.wav"
Track converted successfully.
Total encoding time: 0:00.344, 511.35x realtime
Converting: "C:\Users\***\Desktop\flac_5.flac"
Destination: "C:\Users\***\Documents\!Converted Music\. flac_5.wav"
Track converted successfully.
Total encoding time: 0:00.344, 511.35x realtime
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,880
Likes
16,666
Location
Monument, CO
May be limited by disc (or network) access moreso than processing time, or random'ish OS events and such.
 
Last edited:

AnalogSteph

Major Contributor
Joined
Nov 6, 2018
Messages
3,373
Likes
3,318
Location
.de
You're better off installing Decoding Speed Test for Foobar for such tests. This gave me a small but consistent difference:
flac5vs8decode.png

I ran the test a few times just to be sure. Obviously, it's a minute difference (as expected) and you would never notice it in practice.
(CPU is an i3-2120, FWIW.)
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
You're better off installing Decoding Speed Test for Foobar for such tests.
This is great. Thank you for that Benchmark plug-in.

This is what I get with those two small sample FLAC files:


FLAC L5:

Code:
System:
  CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz, features: MMX SSE SSE2 SSE3 SSE4.1 SSE4.2
  App: foobar2000 v1.6.7
Settings:
  High priority: no
  Buffer entire file into memory: yes
  Warm-up: yes
  Passes: 10
  Threads: 1
  Postprocessing: none
Stats by codec:
  FLAC: 782.744x realtime
Total:
  Decoded length: 29:19.067
  Opening time: 0:00.003
  Decoding time: 0:02.244
  Speed (x realtime): 782.744



FLAC L8:
Code:
System:
  CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz, features: MMX SSE SSE2 SSE3 SSE4.1 SSE4.2
  App: foobar2000 v1.6.7
Settings:
  High priority: no
  Buffer entire file into memory: yes
  Warm-up: yes
  Passes: 10
  Threads: 1
  Postprocessing: none
Stats by codec:
  FLAC: 774.969x realtime
Total:
  Decoded length: 29:19.067
  Opening time: 0:00.004
  Decoding time: 0:02.266
  Speed (x realtime): 774.969


And for that 72-minute file I used earlier (10 passes):

FLAC L0:
Code:
Total:
  Decoded length: 12:06:07.733
  Opening time: 0:00.004
  Decoding time: 0:43.414
  Speed (x realtime): 1003.444

FLAC L8:
Code:
Total:
  Decoded length: 12:06:07.733
  Opening time: 0:00.004
  Decoding time: 0:53.034
  Speed (x realtime): 821.442

So there is in fact a difference, favoring lower compression FLAC files slightly when it comes to decoding.
 

Grooved

Addicted to Fun and Learning
Joined
Feb 26, 2021
Messages
679
Likes
441
You're better off installing Decoding Speed Test for Foobar for such tests. This gave me a small but consistent difference:
View attachment 150685
I ran the test a few times just to be sure. Obviously, it's a minute difference (as expected) and you would never notice it in practice.
(CPU is an i3-2120, FWIW.)

Hi,
do you know how many thread Foobar is really using ? Even if it would not change something in practice.

I just tested going from 1 to 8 threads and it's faster at each step.

A file at 16/44.1 and 24/88.2, and the 16/44.1 is much faster
Another track with 16/44.1 and 24/44.1, and 16/44.1 is a bit faster
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
Hi,
do you know how many thread Foobar is really using ? Even if it would not change something in practice.

I just tested going from 1 to 8 threads and it's faster at each step.
AFAIK, it uses one thread per file. So if you're converting 1 file, only 1 thread will be used. But if you're converting 8 files, it can use 8 threads and convert all of the files concurrently.
 
Top Bottom