Lossless Compression: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Overview==
==Overview==


Lossless audio compression is a way to store a WAV file more efficiently without losing any audio information. Two popular formats are Monkey's Audio (APE) and FLAC. There are also formats from Apple and Microsoft, along with several other formats like WavPack, Shorten, etc.
Lossless audio compression is a way to store a WAV file more efficiently without losing any audio information. Popular open formats include Monkey's Audio (APE), FLAC, and WavPack. There are also proprietary formats from Apple and Microsoft.

J. River advises using a lossless format rather than WAV. Space is saved and tagging is improved. There is no advantage to using WAV instead of lossless.


==Audio Quality==
==Audio Quality==


The simple fact is that lossless audio files sound identical to WAV.  They deliver bit-for-bit identical data to the audio engine / sound card.
A lossless audio file will sound exactly the same as its corresponding WAV file.  It will deliver bit-for-bit identical data to the audio engine / sound card.


Decoded PCM audio delivery (from an APE, FLAC, WAV, or any other format) happens early in the J. River audio chain, many seconds before the data is heard and completely detached from playback threads.  If the same bits are delivered on the input side (and they are, as this is the whole point of lossless compression) then it doesn't matter the source format.
Decoded PCM audio delivery (from an APE, FLAC, WAV, or any other format) happens early in the J. River audio chain, in a process many seconds before the data is heard, and in one that is completely detached from playback threads.  If the same bits are delivered on the input side (and they are, as this is the whole point of lossless compression) then it doesn't matter the source format.


==Advantages Over WAV==
==Advantages Over WAV==
Line 15: Line 17:
APE and FLAC use strong error detection to ensure that the data delivered at output time exactly matches the original data presented at encode time.
APE and FLAC use strong error detection to ensure that the data delivered at output time exactly matches the original data presented at encode time.


This way, if data corruption happens (more common than you might expect), you will know. With WAV, corruption would never be detected.
This way, if data corruption happens (more common than you might expect), you will know. With WAV, corruption will not be detected.


'''Tagging'''
'''Tagging'''
Line 24: Line 26:


Lossless audio compression generally uses about half the disk space of a WAV file.
Lossless audio compression generally uses about half the disk space of a WAV file.

==Myths About Lossless Compression==

'''Lossless compression is impossible'''

It may seem that you could not save space without losing something. However, consider a ZIP file with a spreadsheet in it. The spreadsheet shrinks when placed in the ZIP, but can be perfectly restored.

You can think of lossless compression as just a more efficient way to store the same sound. There's a technical explanation here:
http://www.monkeysaudio.com/theory.html

'''Lossless compression changes timings or causes jitter'''

As mentioned above, the J. River audio engine does file decoding (WAV, APE, FLAC, or any other format) detached from playback. The audio you hear was decoded and delivered several seconds earlier in threads not attached to actual playback.

Decoding a lossless format may cause a slight increase in CPU usage (normally of less than 1%), but it also reduces the file input by about 50%. There's no compelling argument that either of these changes matter, or that one would be better than the other.


[[Category:Frequently Asked Questions]]
[[Category:Frequently Asked Questions]]

Latest revision as of 12:32, 17 September 2010

Overview

Lossless audio compression is a way to store a WAV file more efficiently without losing any audio information. Popular open formats include Monkey's Audio (APE), FLAC, and WavPack. There are also proprietary formats from Apple and Microsoft.

J. River advises using a lossless format rather than WAV. Space is saved and tagging is improved. There is no advantage to using WAV instead of lossless.

Audio Quality

A lossless audio file will sound exactly the same as its corresponding WAV file.  It will deliver bit-for-bit identical data to the audio engine / sound card.

Decoded PCM audio delivery (from an APE, FLAC, WAV, or any other format) happens early in the J. River audio chain, in a process many seconds before the data is heard, and in one that is completely detached from playback threads.  If the same bits are delivered on the input side (and they are, as this is the whole point of lossless compression) then it doesn't matter the source format.

Advantages Over WAV

Error detection

APE and FLAC use strong error detection to ensure that the data delivered at output time exactly matches the original data presented at encode time.

This way, if data corruption happens (more common than you might expect), you will know. With WAV, corruption will not be detected.

Tagging

Lossless formats have standard tag formats, making preserving and sharing metadata like the artist, album, cover art, etc. straight-forward.

Space savings

Lossless audio compression generally uses about half the disk space of a WAV file.

Myths About Lossless Compression

Lossless compression is impossible

It may seem that you could not save space without losing something. However, consider a ZIP file with a spreadsheet in it. The spreadsheet shrinks when placed in the ZIP, but can be perfectly restored.

You can think of lossless compression as just a more efficient way to store the same sound. There's a technical explanation here: http://www.monkeysaudio.com/theory.html

Lossless compression changes timings or causes jitter

As mentioned above, the J. River audio engine does file decoding (WAV, APE, FLAC, or any other format) detached from playback. The audio you hear was decoded and delivered several seconds earlier in threads not attached to actual playback.

Decoding a lossless format may cause a slight increase in CPU usage (normally of less than 1%), but it also reduces the file input by about 50%. There's no compelling argument that either of these changes matter, or that one would be better than the other.