Recently, I found I had this song duplicated in my music library, but when listening to them I noticed one version was of noticeably higher quality than the other despite both claiming to have a 320kbps bitrate.
I plotted the spectrograms of some random 5 seconds of each version using python. This is the spectrogram of both channels of the "high quality" MP3:
and this is the "low quality" spectrogram:
And the differences I notice are:
- The overall intensity of the low quality version is a lot lower than the high quality file. This difference is more evident as the frequency goes higher.
- The low quality song has this weird choppiness above 16 kHz (which I think is the most interesting feature) while the high quality spectrogram seems to be more uniform.
In the power spectrums, I confirmed point number 1 and that the files indeed have a 20 kHz cutoff frequency matching a 320 kbps MP3.
This is the high quality power spectrum:
And this is the low quality power spectrum:
I have been reading about MP3s and first I suspected that the low quality file might be an upscale of a 192kbps (because the spectrum stops being uniform above 16kHz which matches the cutoff frequency of a 192kbps mp3), but I compared my plots to actual 192kbps spectrums and they definitely don't have any information above the 16kHz, so I don't think this is the case.
I also read that this choppiness might be due to the encoding algorithm used, but then that doesn't explain why the power of the whole song is so low (which is easy to notice when you listen to both versions).
Has anyone with more experience with MP3s give me a hint on what may be going on here? I mean, what could cause these differences in both files or any other hints I am missing from the spectrums.
In the end, my goal is to quantify these possible differences to be able to programmatically detect which songs in my library are of "low quality" despite showing a 320 kbps bitrate, so any ideas are also welcomed.