Page 1 of 1

FLAC compression

PostPosted: 06 Aug 2017, 12:56
by Fif91
Hello
I have a raspberry pi 3, used as hifi player.
I will archive all my 300-400 CDs in FLAC files, to be played on.

I discovered the FLAC file compression can range from 0 (no compression) to 8 (high compression); from this value depends the file size.
I think more compressed the files are, more power the raspberry pi will used to. Are you agree ?

My question : what is the best compression to put on the FLAC, to be read smoothly from raspberry pi 3 ?

A 2Tb drive will store the audio files.

Re: FLAC compression

PostPosted: 06 Aug 2017, 16:51
by Stephane
Hi,

Try to encode a file with 0 compression and the same with 8 then play them, login thru ssh and use the top command to see how it behaves.
My guess is that with a 4 cores CPU you won't have any trouble with the maximum compression.

Re: FLAC compression

PostPosted: 06 Aug 2017, 17:40
by hondagx35
Hi Fif91,

I would use compression level 5 or 0.

By the way, 5 is the default level and there is a good reason for this.
The default compression is the tradeoff between size and computing (decoding) time.
Higher compression level only results in slightly smaller files.

Stephane wrote:My guess is that with a 4 cores CPU you won't have any trouble with the maximum compression.

The technical strength of FLAC compared to other lossless formats is its ability to be decoded quickly, nearly independent of compression level.

Frank

Re: FLAC compression

PostPosted: 22 Oct 2017, 17:38
by music
hondagx35 wrote:By the way, 5 is the default level and there is a good reason for this.
The default compression is the tradeoff between size and computing (decoding) time.
Higher compression level only results in slightly smaller files.

The technical strength of FLAC compared to other lossless formats is its ability to be decoded quickly, nearly independent of compression level.


This is a very good reply. FLAC compression level makes a large difference in encoding time, a rather small difference in encoded file size, and almost no difference in how hard it is to decode. See https://xiph.org/flac/faq.html#general__asymmetry. If in doubt, the default is good. If you are archiving files (encode once, play many times) and don’t care how long it takes to encode, there’s no downside to using the maximum compression setting. There’s little reason to use less than the default compression level for typical uses.