Maximising FLAC compression to minimise disk usage

AVForums

Help Support AVForums:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Now Playing

AVForums Super Veteran
Joined
May 25, 2010
Messages
1,208
Reaction score
15
Location
South Africa
I thought I'd throw this out there for those among us that were sucked into the audiophool vortex of believing that uncompressed FLAC files sound better than compressed FLAC files.  Given Roon does the decoding on the server end rather than your endpoints (and LMS is easily configured to do the same) :shh: you have the luxury of tossing belief and compressing your FLAC library to minimise disk usage. One less audiophool myth to concern yourself with  :Ooooooh:

Here's a simple way to do it using a Linux terminal (which could just as easily be a ssh session on your multicore NAS).  If your music is stored on a NAS and your NAS has a decent multi-core processor you're better off running this on the NAS from a ssh session than doing so from your PC with the NAS folders mounted.

Change into the root folder containing your music library and run the following:
Code:
find -type f -name \*.flac -print0 | xargs -0 -n1 -P4 flac -f -8 --totally-silent --preserve-modtime --verify --no-padding

Change -P4 to -Px where x is the number of CPU's in your machine.

When you're returned to the command prompt all sub-folders of the folder you started in will have been processed.

If you prefer to see movement so you know it's not hung (which it won't) omit --totally-silent from the parameters.

You can speed up the process even more by eliminating the --verify parameter ... you don't use it when you create FLAC files do you?

Your tag metadata will survive the re-encoding untouched.

Windows users could of course use dbPoweramp for the same outcome.

I ran it today on a rather large directory tree on one of my drives... total saving 25GB...not bad for zero effort.
 
Top