Audio compression is used regularly in the streaming industry. But many times, the compressed audio files lose their charm and differ from the original soundtrack. This is due to losses during the compression process. To counter this, a lossless audio format is used.
To fully understand lossless audio compression, you will need to understand everything about lossless audio first. In this blog, we will tell you what lossless audio is, what are lossless audio formats, what is lossless audio encoding, and what are the pros and cons of lossless audio. So, let’s begin!
What Is Lossless Audio?
Lossless audio refers to a type of digital audio compression that allows for the exact reconstruction of the original audio data without any loss in quality. In other words, it preserves all the original audio information, ensuring that the reconstructed audio is identical to the source material.
Lossless audio compression algorithms compress the audio data in a way that reduces file size without discarding any data. This is achieved by identifying and eliminating redundant or unnecessary information while retaining all the essential elements that make up the audio waveform. When the compressed file is played back or decompressed, it is restored to its original form, bit-for-bit, ensuring no loss in audio fidelity.
What Are Lossless Audio Formats?
To better understand this topic we will divide it into the following categories:
Uncompressed Lossless Audio
Under this category, we can consider the following audio formats:
- WAV (Waveform Audio File Format): It stores audio data in a raw and uncompressed form, meaning it retains the original audio samples without applying any compression algorithms to reduce file size.
- AIFF (Audio Interchange File Format): AIFF is a high-quality uncompressed audio format developed by Apple. It is commonly used in professional audio applications on macOS.
- PCM (Pulse Code Modulation): PCM is a raw audio format that represents the waveform of the audio signal without compression. It is not a specific file format but rather a method of encoding audio data. It can be stored in various file formats, including WAV, AIFF, and others.
- DSD (Direct Stream Digital): It is widely used in the Super Audio CD (SACD) format, providing high-resolution audio with a unique modulation scheme.
- LPCM (Linear Pulse Code Modulation): LPCM is an uncompressed audio format used in various applications, such as DVDs, Blu-ray discs, and digital broadcasting. It represents audio data with linear quantization and can have different bit depths and sample rates.
- DSF (DSD Stream File): DSF is a file format used for storing DSD audio. It is an uncompressed format that preserves the original DSD audio stream without any compression or conversion.
Compressed Lossless Audio
The following audio formats come under this category:
- FLAC (Free Lossless Audio Codec): It offers significant compression ratios (typically around 50-70% of the original size) while preserving the original audio quality.
- ALAC (Apple Lossless Audio Codec): ALAC is a lossless audio codec developed by Apple. It provides similar compression ratios to FLAC while maintaining the same audio quality. ALAC is primarily used in Apple ecosystem devices and software.
- APE (Monkey’s Audio): It is less commonly used compared to FLAC or ALAC but is still supported by various audio players and devices.
Compressed vs Uncompressed Lossless Audio
The main difference between compressed and uncompressed lossless audio formats lies in the way they store and represent audio data.
Parameters | Compressed Audio | Uncompressed Audio |
File Size | Compressed audio formats are designed to reduce the file size by applying compression algorithms that remove redundant or unnecessary data. As a result, they have smaller file sizes compared to uncompressed formats. | Uncompressed formats, on the other hand, store audio data in a raw and uncompressed form, resulting in larger file sizes. |
Compression | Compressed audio formats use various compression algorithms to reduce file size. These algorithms exploit redundancies and perceptual limitations in audio to discard or represent data more efficiently. | Uncompressed audio formats do not employ any compression techniques and store audio data in its original, raw form without any reduction in file size. |
Audio Quality | Compressed audio formats aim to achieve a balance between file size reduction and audio quality preservation. While they employ compression techniques, they strive to minimize any perceptible loss in audio quality during compression and decompression processes. | Uncompressed audio formats maintain the original audio quality without any loss or degradation. They preserve the audio data bit-for-bit, resulting in perfect fidelity. |
Compatibility | Compressed audio formats such as FLAC, ALAC, and others may require specific codec support or compatible software and hardware for playback, although they are widely supported across many platforms and devices today. | Uncompressed audio formats like WAV and AIFF are widely supported by various devices and software due to their simplicity and standardization. |
Use Cases | Compressed formats are suitable for general audio distribution, streaming, and storage, as they provide a good compromise between audio quality and file size. | Uncompressed formats are commonly used in professional audio production, archival purposes, and situations where utmost audio quality is required. |
The below diagram shows a waveform representation of uncompressed and compressed audio:
Another spectrogram comparison of stereo audio in Audacity. The left side represents uncompressed audio whose frequency goes above 40000 Hz and the right side is the compressed one whose frequency is capped within 16000 Hz.
What Does Lossless Audio Encoding Actually Mean?
In general, lossless encoding refers to a method of compressing data, including audio, in a way that allows for the exact reconstruction of the original data without any loss in quality. The term “lossless” indicates that all the original data is preserved, ensuring that the reconstructed data is identical to the source material.
In the context of audio, lossless encoding involves compressing audio data in a manner that reduces file size without sacrificing any audio quality. It achieves this by identifying and removing redundant or unnecessary information while retaining all the essential elements that make up the audio waveform.
Hence, in very simple terms it means converting a lossless uncompressed audio format into a lossless compressed audio format.
Example of Lossless Audio Encoding Using FFMPEG
Let’s say we have a 24bit 192kHz wav audio file and we will convert it to flac format using ffmpeg.
ffmpeg -i sample_192kHz_24bit.wav -c:a flac output.flac
Below is a comparison between input and output metadata,
Particulars | Input | Output |
Size | 304.7MB | 68.4MB |
Bitrate | 9216 kb/s | 2068 kb/s |
Audio Channel | stereo | stereo |
Frequency | 192000 Hz | 192000 Hz |
Sample Format | s32 (24 bit) | s32 (24 bit) |
Audio Container | wav | flac |
Codec | pcm_s24le (PCM 24-bit little-endian) | flac (Free Lossless Audio Codec) |
- The change in bitrate between the input WAV file and the output FLAC file is due to the differences in the encoding process and the nature of the audio compression.
- FLAC codec achieves compression by eliminating redundancy and inefficiencies in the audio data. This compression process results in a reduction in file size, including the bitrate.
- In the above example, the input WAV file has a bitrate of 9216 kb/s, while the output FLAC file has a bitrate of 2068 kb/s. Even though there is a huge difference in bitrate, the audio quality remains lossless.
In the above comparison graph, you can see there is no loss in its audio data. Hence even if the bitrate and size are drastically reduced, its original audio data is preserved.
Examples of Some Other Formats
ALAC | ffmpeg -i input.wav -c:a alac output.m4a |
TTA | ffmpeg -i input.wav -c:a tta output.tta |
APE | ffmpeg -i input.wav -c:a ape output.ape |
WavPack | ffmpeg -i input.wav -c:a wavpack output.wv |
Convert a pcm_s24le 192 kHz lossless audio into 96 and 48 kHz:
ffmpeg -i sample_192kHz_24bit.wav -c:a flac -ar 96000 sample_48kHz_24bit.flac
ffmpeg -i sample_192kHz_24bit.wav -c:a flac -ar 48000 sample_48kHz_24bit.flac
Compatibility – Which Devices/Platforms Support Lossless Audio Formats
Y* – Partial support. Need to check on a specific model.
N* – Native support is not available but can be supported using third parties.
Platforms/OS native support
| Windows | macOS | Linux | iOS | Android |
FLAC | Y | Y | Y | Y | Y |
M4A(ALAC) | N* | Y | Y | Y | N* |
WAV | Y | Y | Y | Y | Y |
AIFF | N* | Y | Y | Y | N* |
Web browsers support through native HTML5 audio player
| Chrome | Firefox | Safari | Edge |
FLAC | Y | Y | Y | Y |
M4A(ALAC) | N | N | Y | N |
WAV | Y | Y | Y | Y |
AIFF | N | N | Y | N |
SmartTV
| Samsung | LG | FireTV | AndroidTV | AppleTV | VewdTV | RokuTV |
FLAC | Y | Y | N* | Y | N* | Y* | Y |
M4A(ALAC) | Y* | N | N | N | Y | N* | Y* |
WAV | Y | Y | N* | Y | N* | Y* | N |
AIFF | Y* | N | N* | N | N | N* | N |
Gaming Devices
| Playstation | XBox |
FLAC | N | N |
M4A(ALAC) | N | N |
WAV | N | N |
AIFF | N | N |
Casting Devices
| Chromecast | Airplay |
FLAC | N | Y |
M4A(ALAC) | N | Y |
WAV | N | Y |
AIFF | N | Y*(Airplay 2 only) |
VideoJS
| Videojs Baded Players |
FLAC | N |
M4A(ALAC) | N |
WAV | Y |
AIFF | N |
Benefits of Using Lossless Audio
- Enjoy the audio in its full fidelity, capturing all the details, dynamics, and nuances of the original recording.
- Delivers an authentic listening experience of music or audio content as intended by the artist, producer, or sound engineer.
- Lossless audio formats are often considered future-proof since they retain the original audio quality.
- Lossless audio formats are often preferred by professionals in the music and audio industry for editing, mixing, and mastering purposes.
- Some niche music streaming platforms cater to audiophiles and music enthusiasts by offering lossless audio streaming options. These services specifically target users who prioritize the highest audio quality. For Example, Amazon Music HD, Apple Music, Tidal, Deezer HiFi, Qobuz, and JioSaavn Pro+.
Disadvantages of Using Lossless Audio
- Lossless audio files are significantly larger in size compared to lossy audio files.
- It requires higher bandwidth and may not be feasible for low-bandwidth or limited data connections.
- Not all devices, media players, or software applications support lossless audio formats.
To Sum Up
Lossless audio is a type of audio compression that preserves all the characteristics of the original audio. Hence, it retains all the effects and elements present in the original audio track even after compression.
FLAC, ALAC, WAV, and AIFF are some of the most commonly used and supported lossless audio formats. They help in delivering the best audio experience with highest audio quality to you listeners. However, not all devices have in-built support for these lossless audio formats. So, you must check the individual device before using any of these lossless audio formats.
FAQs
If I convert a pcm_s24le 192000 Hz lossless audio into 48000 Hz by maintaining the same audio format pcm_s24le, will the output be still considered lossless?
The resulting output will not be lossless, because the downsampling process from a higher sample rate to a lower sample rate involves reducing the amount of audio data. The resulting output can still be considered high-quality audio.
In the streaming industry many providers claim that they support lossless audio but if you check in the player end they provide 2-3 bitrate options to switch.
When providers claim to support lossless audio but offer multiple bitrate options, they are likely referring to offering different levels of audio quality rather than true lossless audio streaming. Usually, the highest bitrate is always true lossless and others can be considered as high-quality.
What do we know about audiophiles?
An audiophile describes a person who has a passion for high-quality audio reproduction and seeks the best possible audio experience. Audiophiles are often enthusiasts who have a keen interest in music, sound reproduction, and the technical aspects of audio equipment.
How does lossless audio differ from other audio formats?
Lossless audio formats keep the video quality intact during compression. Other formats often reduce at least some video quality during audio compression, which is referred to as a loss.
Why is lossless audio important?
Lossless audio helps in preserving the audio quality, hence delivering superior-quality audio to the listeners.
Are there any limitations or drawbacks to using lossless audio formats?
- Lossless audio files are significantly larger in size.
- They need higher internet bandwidth.
- They are not supported by all devices, media players, or software applications.
Which audio file format is considered lossless?
Some of the most commonly used and supported lossless audio formats are:
Add your comment