FLAC compression level comparison

So, I’m in the process of ripping all my music to FLAC since I am getting a completely new audio system in my home. With the high-end pre-amp, amplifiers, DACs, and floorstanding speakers in place, my full music collection (currently ripped in OGG) will no longer be of sufficient quality. Re-ripping a really large collection is a cumbersome task, so I wanted to make sure that I chose wisely with regard to the FLAC options that are available (particular concerning compression).

A little background is that FLAC is the Free Lossless Audio Codec, which means that there is no loss of quality at all. So, regardless of the compression level that is chosen, FLAC will always decode into the exact uncompressed audio track (bit for bit). The difference between the compression levels, then, is the resulting file size. Along with that benefit (higher compression results in a smaller file size), though, comes the downside of longer times to encode. According to Wikipedia (which cites comparisons that don’t seem to directly mention decoding times), there shouldn’t be any noticeable effect on the decoding of the FLAC files based on the compression level used during encoding. The default FLAC compression level tends to be 5 for most applications.

All of that being said, I decided to do a small test (n=2) with two songs. I firstly ripped the two songs into uncompressed WAV files, and then encoded them into FLAC from the command line using the following code:

time flac $SONG.wav --compression-level-X -o flacX.flac

That showed me the time to encode, and I substituted the compression level number (between 0 [lowest compression] and 8 [highest compression]) for ‘X’. Before looking at the results, here’s some information about the system used and the information contained in the results tables:

System specs:
Intel Core i7-960 (Bloomfield) @ 3.20 GHZ (quad-core with Hyperthreading)
24 GiB RAM (DDR3-1600)
Gentoo Linux with kernel 3.12.11
FLAC 1.3.0

Table data:

  • Quality: The FLAC compression level used
  • Encode (sec): The time it took to encode the song
  • Size (MiB): The resulting FLAC file size (rounded to tenths of a Mebibyte)
  • Ratio (%): FLAC file size as a percentage of the original uncompressed WAV
  • Enc + (sec): The additional time required to encode as compared to FLAC 0 (in seconds)
  • Enc + (%): The additional time required to encode as compared to FLAC 0 (as a percentage of increase)

Below you will find information about the two songs used as tests, and the results (in sortable tables):

Song 1:
Artist: Dream Theater
Album: A Change of Seasons EP
Song: A Change of Seasons
Length: 23’08″ (1388 seconds)
Uncompressed WAV: 128 seconds to rip – 233.6 MiB resulting file size

Quality
Encode (sec)
Size (MiB)
Ratio (%)
Enc + (sec)
Enc + (%)
FLAC 03.531174.674.7%0.0000.00%
FLAC 13.721173.574.3%0.1905.38%
FLAC 24.658173.274.1%1.12731.92%
FLAC 35.255165.070.6%1.72448.82%
FLAC 46.584163.870.1%3.05386.46%
FLAC 59.112163.469.9%5.581158.06%
FLAC 69.130163.469.9%5.599158.57%
FLAC 719.475163.369.9%15.944451.54%
FLAC 828.846163.169.8%25.315660.30%

Song 2:
Artist: Libera
Album: New Dawn
Song: Air (Air on the G string by Bach)
Length: 3’43″ (223 seconds)
Uncompressed WAV: 23 seconds to rip – 37.6 MiB resulting file size

Quality
Encode (sec)
Size (MiB)
Ratio (%)
Enc + (sec)
Enc + (%)
FLAC 00.51620.253.8%0.0000.00%
FLAC 10.54119.652.2%0.0254.84%
FLAC 20.69919.652.2%0.18335.47%
FLAC 30.80619.150.8%0.29056.20%
FLAC 41.02218.649.3%0.50698.06%
FLAC 51.43118.549.3%0.915177.33%
FLAC 61.42918.549.3%0.913176.94%
FLAC 73.04918.549.1%2.533490.89%
FLAC 84.52418.449.0%4.008776.74%

From both tests, it seems like FLAC compression level 3 is the right trade-off between file size and additional encoding time. Now, are either that big of a deal by today’s standards (in both available storage capacity and processing power)? Probably not. I could rip everything in FLAC 0 and call it a day, since the difference between FLAC 0 and FLAC 3 seems to be about 0.5 MiB for every minute of music. However, my current collection is approximately 391 hours (or 23460 minutes). That means that I will save somewhere in the neighbourhood of 12 GiB for my entire collection. Is that space savings worth the roughly 50% more time to encode? Maybe or maybe not.

At this point, my entire collection of ~391 hours of music will consume around 177 GiB if ripped at FLAC 0, and around 165 GiB if ripped at FLAC 3. On a 2 TiB HDD, that doesn’t seem like a big deal, really.

So, ultimately, I will either rip at FLAC 0 and not worry about the additional space, or FLAC 3 if I think it will help. At the rate that storage prices are dropping, FLAC 0 would seem like the obvious answer, but for so very little of an increase in encoding time, FLAC 3 makes more sense.

What are your thoughts?

Cheers,
Zach

2014 St. Louis Children’s Hospital Make Tracks for the Zoo 5K race

Again this year, I’m a bit late with posting the results and information about the 2014 St. Louis Children’s Hospital Make Tracks for the Zoo 5K, but alas, at least it’s coming now. The race was much like last year’s in that it was the same course, start time, et cetera. This year, though, it was much cooler outside. That made for an even better run!

There were fewer runners this year (slipping from 2133 to 1828 [a drop of 305[), but some great contenders! Though my time was improved by 16 seconds (down to 19’28″ from my 19’44″ last year), I slipped by one spot from 13th to 14th. That just tells me that there were more excellent runners this year even than last year. Below is a screen capture of the top 15 overall, but you can see the full results on ChronoTrack’s event site, which was managed by Big River Race Management.


Click to enlarge

Some of the most impressive times to me were:

Jacksen McNeal – 6-years-old – 31’41″
Joe Barzilai – 100-years-old – 37’49″

When I was 6-years-old, I wasn’t even thinking about running competitively, and I hope that I am still able to walk (let alone run) when I’m 100-years-old!

Again this year, this was an outstanding run, and I hope to break 19′ flat by the time of the race next year.

Keep running, and remember, you’re only in competition with yourself!

Cheers,
Zach

The Mask You Live In – Something terribly destructive that we demand of boys all the time

Gender development is one of my primary foci within the field of Child and Adolescent Psychology, and this video from The Representation Project vividly portrays one of the most destructive demands that we place on young boys—”Be a man!”


The Mask You Live In – Be a Man!

There are wonderful pieces of wisdom from Dr. William Pollack (who wrote an outstanding book [Real Boys] that I’ve ready many, many times), Dr. Judy Chu, and Dr. Niobe Way (who wrote another outstanding book about boys’ emotional interactions called Deep Secrets).

Not only does it automatically assume gender inequality, but it does so in the worst of ways. It puts down females by implicitly suggesting that men are better, stronger, more efficient, or what have you. Further, it contains a message that showing the perfectly normal (and necessary!) human emotions of pain, fear, and the umbrella of empathic concern weaken masculinity. Nothing could be further from the truth!

Abraham Lincoln said that “No man stands so tall as when he stoops to help a child.” That powerful quote is dually applicable in reference to this video. Firstly, it shows that true masculinity is characterised by helping others, and especially those who are unable or less able to help themselves. Secondly, it is a call to action for all of you reading this blog entry: help boys everywhere to grow into a healthy understanding of masculinity. Dispel this myth of masculinity. Teach them to help one another. Teach them to care, even if others laugh at them for doing so. Teach them that fear is equally as important as courage. Teach them that is okay to cry, even in front of others. Then they will truly know what it means to “Be a man.”

|:| Zach |:|