Urgent.News

What's breaking now, across thousands of outlets.

Tech

WAV vs MP3 vs FLAC vs AAC: I Round-Tripped 60 Seconds of Audio and Measured the Damage

A client sent me a 90 MB WAV demo last month and asked me to "shrink it but keep the quality." Which is the audio equivalent of "make it pop" — everyone nods, nobody knows which knob to turn. MP3? FLAC? AAC? At what bitrate? The advice you find online is mostly folklore, so I did what I usually do: I built a benchmark and measured what actually survives. The setup I synthesized a 60-second…

A client provided a 90 MB WAV audio file, seeking a reduction in size without compromising quality. The challenge of determining the best audio format—MP3, FLAC, or AAC—led to a benchmarking exercise. A 60-second reference track, generated synthetically to have broadband harmonics and sharp transients, served as the ground truth. The track was converted through the format matrix using ffmpeg 8.0, and the results were measured against the original WAV file.

In Round 1, the lossy ladder conversion demonstrated that AAC at 128k bitrate matched MP3 at 192k in terms of fidelity, consuming two-thirds the bits. MP3 at 320k offered the most transparent results, with a signal-to-noise ratio of 36 dB at 21% of the size. These numbers represented the extent of original content lost, in decibels.

Round 2 involved lossless compression using FLAC (level 8), resulting in a 3.6 MB file, 31% of the original WAV size, with bit-exact reproduction. The comparison between FLAC and the original WAV was done by decoding the FLAC back to PCM and comparing the samples using md5 hashing. The FLAC version was identical to the reference WAV, demonstrating the essence of lossless compression—reducing size without altering any samples.

Round 3 addressed common myths. Converting an MP3 to FLAC did not improve the quality, as the lost information could not be recovered. FLAC faithfully preserved the damaged signal. A direct comparison showed that re-encoding from a higher bitrate AAC to a higher bitrate MP3 resulted in a 6.4 dB loss in SNR compared to a single conversion from the original MP3. This demonstrated that every lossy step subtracts from the original information, regardless of bitrate.

The recommended practice for archiving and sharing audio is to maintain a lossless master (FLAC or the original WAV) and derive lossy copies from it, rather than from another lossy copy. For archiving or editing, FLAC is the best choice, providing bit-exact reproduction with 30-70% of the original WAV size. For sharing, MP3 at 320k or AAC at 256k offer a balance between quality and file size. For email limits or voice memos, AAC 128k provides roughly MP3-192 quality at 128k bits.

The benchmarking script, available upon request, consists of around 120 lines of numpy and ffmpeg subprocess calls. It provides a standardized matrix for MP3, AAC, and FLAC conversions, ensuring accurate results for tracks with similar characteristics.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

29 checks said 0 subscribers. None of them clicked the link.

The dashboard says Account not approved . Under it there's an activity log with two entries reading Your account was disabled , one dated 19 October and one dated 24 October. That's how I found out.

  • Buttondown account disabled on 5 October
  • Script recorded zero subscribers 29 times
  • Front door open 35 days before shutdown

More from Tuesday 10 November →