Spiega:Here's a simple way you can find out just how much information is being changed…
- User
Spiega:Here's a simple way you can find out just how much information is being changed or lost when you compress an audio file. So first I'm gonna open up Adobe Audition, but you don't have to use this specific piece of software to do any of this. Second, I have an MP3 and a lossless version of this clip here. What I'm going to do is extract the mathematical difference between the two using a really simple technique I discovered. First, we need to line up the two tracks here. MP3s always have gaps at the beginning and end, so it's very important to do this. When aligning tracks in this program, it's very important to make sure it's exactly the same place, because otherwise it's not gonna work. At all. See in this one I got pretty lucky, but some songs like classical music don't always have like really big drum hits, so you can't always line up the audio very well. Or easily, at least - you need to it a hundred percent perfectly or else this is not going to work. Last thing I'm going to do is apply an inversion effect to one of the tracks. Doesn't matter which one, since the results are going to be identical. Now I'm gonna export the whole thing and check the results. before playing the track, I can immediately see that there's quite a bit of data here. If the files were really similar, there wouldn't be this much to listen to. if they were identical, it'd be literally a flat, silent waveform. In the spectrograph, we can see that there's a lot of noise until about here, when there's a lot of audio that wasn't in the MP3. Here's what the MP3's spectrograph looks like. And here's the original file's spectrograph. Let's just listen to the lossless version first. Then the MP3. Now let's go normalize the difference waveform and hear what it sounds like. Wow, that really is all you're missing when you listen to an MP3.
- Assistant
Certainly! I'd be happy to explain the process you've described for determining how much information is changed or lost when compressing an audio file from a lossless format to an MP3.
Overview:
You're demonstrating a method to extract and listen to the differences between a lossless audio file and its compressed MP3 version. This involves aligning the two audio tracks perfectly, inverting one of them, and then combining them to isolate the data that's lost during compression.
Step-by-Step Explanation:
-
Opening the Audio Editing Software:
- You start by opening Adobe Audition. While this is your software of choice, any audio editing program that allows waveform editing and track inversion can be used (e.g., Audacity, Pro Tools).
-
Preparing the Audio Tracks:
- You have two versions of the same audio clip:
- A lossless version (e.g., WAV, FLAC) that contains all the original audio data.
- An MP3 version that has been compressed using a lossy algorithm, potentially omitting some audio information.
- You have two versions of the same audio clip:
-
Aligning the Tracks Precisely:
- MP3 encoding often adds small gaps or delays at the beginning and end of the file due to encoding artifacts (encoder delay and padding).
- Why Alignment is Crucial:
- Even a tiny misalignment will prevent the cancellation effect when combining the tracks.
- Misaligned tracks won't accurately reveal the differences between them.
- How to Align:
- Zoom in on the waveforms to the sample level.
- Use transient peaks (like drum hits) as reference points for alignment.
- In genres without sharp transients (e.g., classical music), alignment can be more challenging and may require careful manual adjustment.
-
Inverting One Track:
- Inversion Explained:
- Inverting an audio track flips the waveform vertically.
- Positive amplitudes become negative, and vice versa.
- Purpose of Inversion:
- When two identical waveforms (one inverted) are played together, they cancel each other out due to phase cancellation, resulting in silence.
- Any remaining sound after cancellation represents the differences between the two tracks.
- Inversion Explained:
-
Combining the Tracks:
- You play both the original and the inverted track simultaneously.
- The overlapping identical parts cancel out, leaving only the audio data that differs between the lossless file and the MP3.
-
Exporting and Analyzing the Difference:
- Exporting the Result:
- The resulting audio is exported as a new file—this is the "difference" file.
- Visual Analysis:
- Waveform View:
- If the files were identical, the waveform would be a flat line, indicating silence.
- The presence of waveform data indicates differences.
- Spectrograph/Spectrogram View:
- Displays frequency content over time.
- You can see where frequencies are lost or altered in the MP3 compression.
- Noise and missing frequencies become visible, especially in higher frequency ranges.
- Waveform View:
- Exporting the Result:
-
Listening to the Results:
- Normalizing the Difference File:
- Normalization increases the amplitude of the audio to a usable level for listening.
- Auditory Analysis:
- Listening to the lossless version provides a reference for full audio quality.
- Listening to the MP3 shows the compressed version.
- Listening to the difference file reveals exactly what has been lost or altered during compression.
- This may include subtle background sounds, high-frequency details, reverb tails, and other nuances.
- Normalizing the Difference File:
Key Takeaways:
- MP3 Compression Losses:
- MP3 is a lossy compression format; it reduces file size by removing audio data considered less perceptible to human ears.
- The difference file highlights what the compression algorithm discards.
- Practical Implications:
- Understanding compression losses is important for audio engineers, musicians, and audiophiles concerned with audio quality.
- This technique can help in assessing the impact of different compression settings.
Additional Notes:
- Challenges with Alignment:
- Perfect alignment is essential. Even a millisecond of offset can prevent accurate cancellation.
- Use of click tracks or markers can aid in alignment if creating your own recordings.
- Variations in Compression Algorithms:
- Different MP3 encoders or settings (bitrate, VBR vs. CBR) will result in different amounts and types of data loss.
- Repeating the process with various settings can illustrate how compression levels affect audio quality.
Conclusion:
By subtracting the MP3 file from the lossless original, you've effectively isolated and revealed the exact audio information that is lost during compression. This method provides both a visual and auditory representation of the differences, enhancing the understanding of how lossy compression affects audio files. It's a practical demonstration of the trade-offs between file size and audio fidelity.
-