Lossless Audio Compression

Original Author(s): Lynn Leith
Some of the information contained in the latter part of this module has been gathered from an email discussion on the DAISY Support List. The extracts express experiences and evaluations of lossless compression systems. Wording has been edited in some instances so that the information flows easily. The Consortium thanks those who contributed to this information exchange. Additional information supplements the discussion.

Lossless data compression is a class of data compression algorithms which allows the exact original data to be reconstructed from the compressed data, that is, no data is removed from the original file during compression, and the uncompressed file will be identical to the original prior to compression. For audio archival purposes, if compression is to be used, lossless compression is considered by some to be at a minimum, preferable. Others consider it to be essential.

Lossless compression contrasts with "lossy" data compression. During lossy compression, mp3 for example, data is removed and the decompressed file is not, and will never be, identical to the original. Compression rates with lossy compression are however much greater than those that can be achieved with lossless compression.

Note that the DAISY Consortium does not specifically endorse any of the tools mentioned in this document. The information and references are provided to a starting point for organizations looking at lossless compression as an option. Numerous on-line resources have been used to gather the details provided. This is not a definitive list of lossless compression systems available.

List of Some Available Codecs, and Links

Free Lossless Audio Codec - FLAC
Free and open source. See: FLAC. For additional information on FLAC, see the details provided in Wikipedia
Monkey's Audio - APE
Free and open source. See: Monkey's Audio.
OptimFROG - OFR
Not open source. See: OptimFROG.
True Audio Lossless - TTA
Free and open source. See: True Audio. For additional information see: Wikipedia.
WavPack Lossless - wv
Free and open source. See: WavPack. For additional information see: Wikipedia.
Windows Media Lossless - WMAL
See: WMA.

Pro's and Con's of the Systems Listed Above

FLAC

PROS

  • Open source
  • Very fast decoding
  • Hardware support (Karma, Phatbox, etc.)
  • Very good software support
  • Error robustness
  • Streaming support

CONS

  • Relatively slow encoding
  • No hybrid - lossy mode

Monkey's Audio

PROS

  • Open source
  • High efficiency
  • Good software support
  • Java version (multiplatform)

CONS

  • No hybrid - lossy mode
  • No hardware support
  • No error robustness

OptimFROG

PROS

  • Very high compression
  • Good software support
  • Error robustness
  • Streaming support
  • Hybrid - lossy mode

CONS

  • Closed source
  • No hardware support
  • Quite slow decoding

True Audio Lossless

PROS

  • Open source
  • Good efficiency
  • Hardware support
  • Error robustness

CONS

  • No streaming support
  • No hybrid - lossy mode

WavPack

PROS

  • Open source
  • Very fast decoding
  • Good efficiency
  • Error robustness
  • Streaming support
  • Hardware support
  • Hybrid - lossy mode
  • Good software support

CONS

  • Limited player support

Windows Media Lossless

PROS

  • Streaming support
  • Very good software support

CONS

  • Closed source
  • No hybrid - lossy mode
  • No hardware support

(Below is a 'compressed' version of the email sequence about lossless compression.)

Initial Query

I would like to know if some of you have some experience using lossless audio compression software. I am already aware of FLAC. Do you know of any other lossless codec tool?

Description of Production Environment

In my organization, our volunteers are recording at home and transfer the completed work either by FTP or by CD. At present they record directly in MP3.

Obviously we would prefer that they record in WAV format but the files would be much bigger, they would need DVD-R rather than CD-R and FTP transfer would become problematic.

An option would be to use lossless audio compression before the transfer. That will depend on the initial sampling rate and on the achievable compression ratio.

Discussion of Tools and Options

The opinions (and analysis) presented here do not necessarily reflect those of the DAISY Consortium.

APE is as a possible solution for consideration. Information can be found at: monkeysaudio.com.

I recommend FLAC over APE. And WavPack looks really good too.

It would be a great boon to offer fully integrated FLAC/WavPack support in DAISY production tools... it would give instant archival storage savings of greater than 50%.

It would be nice if a DAISY production tool had an option such as "Pack that project for transfer" using one of these open source codecs.

I would recommend FLAC over APE, because FLAC has excellent error recovery, while APE does not. I did some unscientific tests on FLAC a while ago, inserting random data into a compressed audio file, changing data at random, and deleting data. The FLAC decoder reported all errors, and continued decoding after them, substituting silence for the bad data. There is a good summary at: hydrogenaudio. I haven't tried WavPack, but it and FLAC come out on top.

I have used APE for quite a while and haven't had occasion to find fault with it, although testing was limited to random and periodic decompression and verification. It has a good command line executable, which allowed me to make a simple batch conversion interface running in the background at off-peak processor times (at night), which I think is important. I did initially test the "stop processing on encountering error" feature, which does work but indeed doesn't provide a fix. I use it for archiving only, so the fact that both the compression and decompression are slow doesn't matter, but this may impact your intended use. I haven't used FLAC so can't compare.

I've done my own unscientific tests with FLAC 1.1, using the default options. I found I got slightly worse than 50% compression on 16-bit 22.05 kHz files (analogue tape conversion) and slightly better than 50% on 16-bit 44.1 kHz files (original digital recordings), both at a reasonable speed. Your mileage may vary, of course, depending on how much background noise there is. Hans Heijden's comparison page is at: hvdh. This link (which is somewhat out-of-date) has some excellent graphs, which show that FLAC is somewhat lagging behind most other modern encoders in terms of compression rate and encoding speed (at least for his music collection). Where it shines in a technical sense is in decoding speed; it outstrips all the other codecs by a wide margin.

We have used FLAC for one year for production backup. We don't have any problems with decompressing. The compression average value for almost 1100 DAISY books is 53%. The compression performance is 5.78 MByte per seconds on a Linux SuSE Box with 2 XEON Intel(R) Pentium(R) III CPU 1400MHz.

There are many sources of information about lossless and lossy compression on the Internet. Before making a decision about which lossless compression scheme is best suited to your organization and operation, research the subject as fully as possible. The members of the DAISY Support List would be pleased to receive findings or research results through that list.

DAISYpedia Categories: 


This page was last edited by LLeith on Monday, August 9, 2010 16:51
Text is available under the terms of the DAISY Consortium Intellectual Property Policy, Licensing, and Working Group Process.