[Flac] music complexity

Brian Willoughby brianw at sounds.wa.com
Sun May 27 10:22:59 PDT 2007


FLAC will compress quiet music more than loud music.  This is because  
one of the steps in the coding algorithm is to convert from  
(absolute) PCM to differential PCM.  Quiet music has smaller peaks,  
and thus smaller differences, and FLAC encodes smaller values with  
fewer bits.  Most commercial music - except perhaps classical and  
some jazz - has maximum peaks, so you may never see this  
improvement.  But when making live, original recordings, you may find  
that FLAC produces very small files.  I once fit over 20 GB of  
recordings onto a single Dual-layer DVD.

Another hidden features is that 8-bit samples in a 16-bit file, or 16- 
bit samples in a 24-bit file, will compress much smaller.  FLAC  
notices the unused bits and automatically saves storage space.

Brian Willoughby
Sound Consulting

On May 26, 2007, at 16:38, Mark Rudholm wrote:
> Harry Sack wrote:
>> Is it true the flac encoder can compress music better when the
>> complexity of the music is low?
>> I'm compressing some tunes of old MS DOS games (pc speaker, sound
>> blaster 16 OPL3 chip music) and I saw a *huge* compression ratio  
>> (some
>> files where only 1/3th of the original file in filesize after
>> compressing to flac), so I was wondering if less complex music always
>> means better compression.
>
> Yes.
>
> This is true of any entropy coder (of which FLAC is one).
>
> As a test, try flac encoding silence (which has no complexity)
> and then try encoding noise (which is the most complexity that
> the containing channel can describe).  You will find that the
> first yields a very very small file and the latter yields a
> file about the same size as the original file.



More information about the Flac mailing list