4
$\begingroup$

I need to know if a certain audio file is real lossless and not a transcode (i.e. lossy converted in lossless, but lossy at the end). I was told there was a way to do this by creating a spectrogram of the file and then checking something else. The problem is that, since I am not well versed in audio processing, I don't know what else to check.

I would like to learn how to identify this fake and true lossless files using a spectrogram (since, as a Linux user, I found a program which creates them easily). If you want to give me a hand with the file in question, here it is: spectrogram

P.D.: I'm not completely sure if this question belongs to this site. I put it here since is a site about audio, but if not just tell me and I will migrate it were it belongs.

$\endgroup$
  • 1
    $\begingroup$ if it's lossless then the samples will be identical. that's what you should be checking, not the spectrogram. the spectrogram is lossy, in a sense, so you're using a lossy representation to check if it's lossless. $\endgroup$ – endolith Feb 21 '15 at 4:32
4
$\begingroup$

Eventhough there could be opposing theoretical answers to your question, practically speaking it may have a solution which depends on the lossy codec you are using. In that case what you eventually need is a practical knowledge of codec under concern that is used for the audio clip. However, considering the number of different audio codecs and the fact that there could be any number of nonstandard implementations to exist, your problem may not have a guarantied solution. It is because for every different lossy auido codec a different procedure (provided in theory it does exist) might be necessary to test whether a given piece of audio belongs to its output or not. And since for a nonstandard/proprietary/unknown audio codec, you will not have such a procedure at hand you may not even be able to test to see it.

For example, mp3 (MPEG-I layer 3) standard defines an optional low-pass filter about 16khz, before encoding the raw pcm audio, hence if you find some signal acitivity above 16 khz inside an audio clip, then it is either not an mp3 file or the mp3 profile used to encode that clip, did not activate the lowpass prefilter (as it can be one of the many optional features of the codec) Note that in either case you cannot say that it is a raw file just because it's not an mp3 as it might come from another lossy codec... That is the problem...

Finally, if a lossy codec will include a distinctive feature as a mandatory (nonoptional) requirement of the standard, then you can check for that property to at least decide whether the given piece may belong to its output or not.

$\endgroup$
2
$\begingroup$

I cannot give you a definitive answer, because I have only seen the results of some of the more popular (mp3, gsm, wma) codecs. However, one thing that all seem to utilize is additional antialias filtering beyond what a standard PCM encoding would use. This means that a power spectrum (recommended) or spectrogram (not as good) should show a severe loss of high frequencies above a certain frequency, usually in the 11kHz to 20 kHz range. In addition, before the steep rolloff you will usually see a peak in the amplitude of the spectrum as a result of noise shaping. Sometimes you see a gap between where things roll off and some imperfectly filtered stuff above 20 kHz--this, too is an indication that things are not real music. Real music has a red power spectrum, meaning that is decreases roughly 20 dB per decade of frequency increase, with few spikes or changes in that trend.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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