Best Lossless Audio Format
When it comes down to storing libraries of music or voice recordings, you’ll often want a format that offers the best quality and will be free, supported on various platforms, and remain accessible. So which format is best?
The best lossless audio format for most purposes is the Free Lossless Audio Codec format, often referred to as FLAC. FLAC is a widely supported, free, and open format that reversibly compresses audio. Similarly, ALAC is a common alternative within the Apple ecosystem.
FLAC is one of the most popular lossless audio formats. But there are many good reasons not to use it, such as when using Apple devices, CD players, and old MP3 players. So let’s build an understanding of lossless formats’ strengths and weaknesses.
The Best Lossless Audio Format
FLAC is the best lossless audio format for most purposes.
- FLAC is lossless, which means no data is lost in encoding. Thus, fidelity is never sacrificed.
- FLAC is efficiently compressed, using down to half as much disk space as a WAV file.
- FLAC is broadly supported by Windows, Linux, macOS, iOS, Android, *BSD, Solaris, etc.
- FLAC is fast to decode and can be done in real-time, even on modest hardware.
- FLAC is resilient to minor errors. One error doesn’t corrupt an entire stream.
- FLAC is free. You can use, modify, and develop the format without limitation.
FLAC supports many modern features, being easily streamable and seekable, and supports flexible metadata.
Why Not Choose FLAC For Lossless Audio?
FLAC won’t always be your best option. Sometimes your needs will be better met using ALAC, WAV, AIFF, or CDDA.
FLAC’s situational cons are as follows:
- FLAC’s compression prevents real-time decoding on very limited hardware.
- FLAC may be undersupported, especially on older and highly proprietary platforms.
This is especially applicable in the following situations:
- You want to play audio with an old MP3 player or CD player. Consider WAV or CDDA.
- You’re trying to use iTunes, which does not support FLAC.
- Often when dealing with sound effects and ringtones, WAV and AIFF are better supported.
What makes FLAC a versatile format allows other formats to prevail in niche circumstances. Specifically, the compression, while relatively fast to decode, may still be too slow for real-time playback on slow microprocessors, causing buffering. In this rare case, lossless, uncompressed WAV may be best, or AIFF for the native Apple equivalent.
Best Lossless Audio Format For CDs?
Compact Disk Digital Audio (CDDA or CD-DA) is the best lossless audio format for playback from CDs. CDDA is the standard format for Audio CDs. CDDA is typically an uncompressed PCM stream of 44.1kHz and 16 bits of sample depth. This format is simple to work with but large and inflexible for general use.
If you’d prefer to use your CD primarily as a storage for data rather than playback, deferring to FLAC is usually best. You can fit more audio on a given CD with FLAC rather than a CD.
Best Lossless Format On Apple Platforms
For hardcore Apple users, ALAC may be your best choice. Unfortunately, Apple doesn’t prioritize FLAC support. While FLAC is compatible with plenty of software by Apple and third parties, iTunes is a notable exception. iTunes does not support FLAC, so you will need to convert your files to a different format.
In this case, Apple developed ALAC, which was based on FLAC and is equivalent for most intents and purposes. There is minimal difference in features or licensing, and both are lossless and thus equally uncompromising in quality. However, it’s worth noting that ALAC is not supported to the same degree as FLAC on non-Apple platforms.
Where you might use WAV on other platforms for uncompressed audio, Apple also has an equivalent format: Apple Interchange File Format, or AIFF. AIFF is older than ALAC and thus will be supported by more media players. However, keeping your audio in ALAC unless otherwise needed is recommended, as uncompressed audio file sizes are excessive.
However, besides the rather important case of iTunes, most macOS and iOS software won’t be as picky. Using FLAC, especially when sharing among your other devices, may still be preferable.
How Does WAV Work?
Waveform Audio File Format (WAV, .wav, or WAVE files) are RIFF Windows media audio containers.
Understanding how WAV is encoded helps us understand FLAC, too. Like FLAC, the most common audio coding in WAV is pulse code modulation (PCM). What does that mean?
PCM is the sampling of the amplitude of an analog waveform at regular intervals. These samples are then concatenated to form a digital audio stream. This process isn’t perfect, as the digital representations involve a slight error due to rounding off the amplitude, but it is usually imperceptible. Still, A-law and μ-Law coding can help minimize the relative error further.
The PCM samples are decoded later and interpolated to reconstruct the original analog wave to a good approximation. For most purposes, this is effectively lossless.
How Does FLAC Work?
FLAC’s encoding scheme is simple in principle yet clever. The raw audio samples are PCM, like WAV, as mentioned above. Standard compression algorithms like DEFLATE don’t help much, so engineers need to take advantage of the properties of PCM data.
The file’s audio data consists of frames. Frames are groups of samples with a little bit of metadata. Each frame is encoded in one of four ways, but in essence, the compression works as follows.
- The encoder finds a mathematical curve that approximates the waveform of the samples
- The encoder finds the differences between the approximation and actual samples
- The encoder changes the representation of the differences to Rice coding
Rice coding allows small values to be represented with less data. Thus if the encoder finds a good approximation, the correction values are small, and they get compressed better. A few bytes are added to describe the curve.
Should You Convert Your Files To FLAC?
Converting your audio files to FLAC can be advantageous. The primary situation where converting to FLAC is ideal is when you have music in other lossless formats such as CDDA, WAV, or AIFF. Formats like WAV with uncompressed PCM can be converted to FLAC without losing fidelity but often take up half as much space.
FLAC sacrifices encoding time for the sake of additional compression and decoding time. This is ideal for most purposes, but be aware that converting many files may take a little while if you tell the encoder to increase the compression level.
Converting is only sometimes desirable. You will not benefit from transcoding to a lossless format when you have compressed audio in a lossy format, such as MP3, AAC, or Ogg Vorbis. This is because the lossy encoding has already discarded information to make the original waveform unrecoverable. Transcoding to FLAC will keep fidelity the same but take up more disk space.
How To Convert To FLAC?
Free online tools are most convenient for one or a small batch of audio files. For example, FreeConvert has a to-FLAC converter, and CloudConvert has a from-FLAC converter.
Whether you have audio you’d prefer not to upload, you have a slow internet connection, or you want to automate a large batch of files with graphical user interfaces such as the following:
- Windows: Kabuu Audio Converter
- macOS: X Lossless Decoder
The most prevalent command line interface option is FFmpeg, which supports most major desktop platforms, and can be used as follows:
- Install FFmpeg
- Open a terminal/command prompt
- Enter “ffmpeg -i ./path/to/file.wav ./path/to/new.flac”
Conclusion
If you want portable, high-quality, compressed audio, whether you’re producing, editing, archiving, or just listening to it every so often, FLAC is usually your best bet. Just check your favorite apps for FLAC support.
Links
- https://en.wikipedia.org/wiki/FLAC
- https://en.wikipedia.org/wiki/Comparison_of_audio_coding_formats
- https://en.wikipedia.org/wiki/WAV
- https://www.quora.com/What-is-the-best-lossless-file-format-for-audio-Why?share=1
- https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio
- https://vox.rocks/resources/flac-vs-alac
- https://discussions.apple.com/thread/4381916
- https://xiph.org/flac/features.html
- https://www.xiph.org/flac/format.html
- https://www.stereophile.com/content/flac-vs-alac
- https://reddit.com/r/MacOS/comments/l70zpr/best_free_audio_converters/