Exact MP3 Recompression

Let's say you have a library for decoding MP3* streams, and your library exposes some API methods that provide access to the resulting uncompressed PCM audio stream. It's meant to hide the original MP3 data, so people can't save it to disk and rip you off.

Is it possible to "reverse engineer" the PCM data and recover the original MP3 frames, instead of reencoding and incurring more compression artifacts?

This is analagous to the question of whether you can revert a decompressed bitmap to a JPEG source, covered by this paper on Exact JPEG recompression. The authors are able to recover the compression parameters (quantized DCT coefficients) for 96% of the blocks** in images compressed at a JPEG quality of 75%. Cool!

So Spotify provides exactly the aforementioned API, with opaque methods for getting raw audio streams. Other services, whether they offer an API or not, provide the user with an uncompressed audio stream one way or another. So it would be a "big deal" to be able to recover the original compressed data.

Google Scholar queries for audio and mp3 recompression give lots of results related to audio watermarking, but not much in the way of optimal audio recompression. Seems to be a very interesting and potentially valuable research opportunity.

*Or any perceptual audio codec (AAC, Ogg Vorbis, etc.)

**Prior to JPEG compression, images are chopped into 8x8 pixel squares. Each block is compressed independently.

Leave a Reply