How Lossy Compression Works
Discarding masked content saves space, and the cost hides in transients and high frequencies.
Related
The question
Lossy coding skips what the ear will not notice, spending fewer bits there. Size falls, and the cost hides in transients and highs.
How it works
A psychoacoustic model computes masking thresholds, where loud content hides nearby quiet content, so masked parts can be coarsely quantized. The encoder frames the signal, transforms it to frequency, then quantizes and entropy-codes the coefficients. At low rates quantization noise rises, pre-echo appears before transients, highs are cut and the image narrows. Joint stereo exploits the correlation between channels.
Settings and practice
Music is usually near-transparent above 256 kbps; speech uses 64 to 96 kbps, and Opus suits low latency. Do not use lossy formats for masters or archives, and avoid repeated transcoding. Leave peaks near minus 1 dBFS before encoding.
What to listen for
In Handel's Harmonious Blacksmith variations, hear whether fast figures turn muddy. In a funk loop, hear pre-echo around hi-hat and snare. On a single melodic line, hear high-frequency sand and tails. Codec damage shows most in quiet passages and before attacks.
Common misconceptions
Lossy is not always audible; at high rates most listeners cannot tell. A higher rate is not automatically better, since encoder and material matter too. A lossy file cannot be made lossless by repackaging. Nor is high frequency the only casualty, because transients and image suffer as well.
Listen in the library
All tracks from midicn-lib — inline badge is the license tier (C1 commercial / C2 non-commercial / C3 study only).
Sources
- 心理声学模型与掩蔽阈值的通识,依音频编码教材核查,未抄文本
- Opus 与 AAC 的公开测试资料,依规范与听测报告核查,未抄文本
Used for fact-checking only; all prose is original.