Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way of checking that the so-called FLAC or WAVPACK audio file was originally encoded from a lossless source (WAV, CDA, APE, etc.) instead of a lossy source (MP3, AAC, ATRAC, etc.)?

Say I have a lossy MP3 audio file (5.17Mb, 87% compressed from its original, source unknown). I then encode it to another lossless format, say FLAC or WAVPACK.

The size increases (23.14Mb, 39% compressed from its original, source MP3)! ID tags, etc, remain the same and there's no way of checking the integrity of its origin.

How do I go about doing that?

share|improve this question

3 Answers 3

The best way to determine if something has been sourced from a lossy source, is creating a spectrogram:

Lossless Spectrogram

One can clearly see that it goes up to the 22.1kHz a proper CD has.

When transcoded to a lossy MP3 128kbps, you can clearly see the destructive work of the encoder:

Lossy V2 Spectrogram

More details and examples here: http://blowfish.be/eac/Spectral/spectral.html

share|improve this answer
    
+1 Clever and fun to look at! –  thirtythreeforty Oct 15 '13 at 6:07
    
Of course, one could add high frequency noise to the audio decoded from the lossy compressed file before encoding into a lossless file, but that is probably too much of a trouble, so this method is pretty cool for 99% of the cases :-) –  Alexander Shcheblikin May 17 at 21:16

There's no way to definitely tell one way or the other whether a given lossless file was directly ripped from a CD or reencoded from another lossy format. There's a couple programs available that try to determine the likelihood that a given file has a lossy source though:

What these programs do is analyze the file looking for characteristics that may indicate that they were once lossy encoded. Stuff like sharp rolloff of audio > 16 KHz, audio not aligned to CD frames, signals indicative of encoding flaws like pre-echo, etc.

There's also the snarky answer: Quit pirating music and go buy the CD or track. :-p

share|improve this answer
    
1+ re: frequency rolloff. As a quick test, loading any suspect file into any media player with a spectrogram visualization plugin (foobar comes to mind) will likely show a complete absence of any higher frequency components to the file in question, as well as a flat-topped cut-off appearance to primarily high frequency things like cymbal hits. –  Dylan B. Apr 30 '10 at 21:41
1  
Just because I would like more information about digital recordings, It doesn't mean I'm pirating music. There are some cds in bootleg circles that are all legal and legit. Archive.org comes to mind. archive.org/browse.php?collection=etree&field=/metadata/… –  GmonC May 1 '10 at 4:16
1  
@GmonC: The snarky answer wasn't meant to be serious. I apologize if I offended you. –  afrazier Jan 4 '11 at 17:54
    
no problem, you didn't offend me! I didn't mean to be too serious in my comment as well, it was just a clarification. You gave a good answer, that's why you received 3 upvotes (myself included :) –  GmonC Jan 18 '11 at 1:19
    
Both these programs are absolutely not reliable –  Thom Wiggers May 4 '12 at 14:32

Complete mathematical analysis will show "holes" in the frequencies of the audio, commensurate with the psychoacoustic parameters used in the initial lossy compression.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.