So this is the situation. Lets say Original file was mp3, lets say 44100 Hz, 128 kbps. Then Some idiot upsampled it to 48000 Hz, 320 kbps. Upcorse this will not increase the quality, but it will increase the file size.
Now my question is. How do I detect this files in my library(so I can replace them with truly higher quality ones)?
I know the horror of crappy files. I would suggest a preventative approach rather than a treatment approach. If I were you, I would try to only get lossless files, even if you want the space from having mp3 files. The reasoning behind this is that there is a much lower chance that the file has been modified in a way that would degrade audio quality. Then, convert it to mp3 yourself. That way you know it hasn't been compressed multiple times, etc. That said, I don't know if upsampling is a thing that people actually do, so I would only really be worried about how it sounds. If you are hearing the artifacts and whatnot, and can tell that it is a poor quality file, then replace it. Otherwise, then there is no point. The only benefit that I can see to replacing files that you can't hear are poor quality is that you would be able to say that you don't have any crappy files or whatever (bragging rights). If you can't tell the difference, then what does it matter?
You can also enable VU and Peak meters (they'll handy for detecting other things)
I've actually modifed my layout so it shows all these 3. (View->Layout Editing Mode).
How to detect upsampling
MP3 128 cuts off at around 16 kHz MP3 160 ~ 17Khz MP3 192 ~ 18Khz Above that it's hard to notice the difference, unless you're listening to dubstep or metal, which heavily use high frequencies. (For that I recommend 320kbps).
When you launch a track, you won't hear, but see the cutoff (Picture at the bottom).
How to detect other bullshit
When high frequencies are not getting used, you can fall back onto VU and Peak. If Peak never reaches 0, It's either Classical music, or Zweihander's Ear Slayer.
Track does not use high frequencies or peak at all. Then you can store it in 128k or in whatever format it came, you won't notice the difference, because there isn't any. FLAC & WAV are a complete waste of time and space (unless you're remixing).
Left - Good 320, Right - Fake 128 (foobar2000 linear spectogram +VU + Peak)
Thank you, I will try to experiment with that to expand my knowledge. However i was looking for something like batch process or script so I can scan hall my audio collection which is 840 files in 54 folders.
Oh yes people do that all the time. there are two types of people.
1st. The people who think this will improve quality. 2nd. People who upload Upsampled, because people to download high quality. and 3rd. There are the AI's connected to websites search that does this automatically in seconds.
People do also take low quality and convert it to Flac. So my advice to you would be to not to trust file types nor their attributes.
I have trouble understanding can you please help me up. I think I setuped my foobar2000 just like you recommended +I set Spectogram as mono(because that is what i think you have), and form one of the songs which is reported by foobar as mp3 48000 Khz 256 kbps.
There's no such script. Even if there was one, doing what I describedf, it'd detect many false positives.
In pop music it's a common practice to apply soft lo-pass filter @ 17Hhz before limiters so that track is louder when listened on the radio, Spotify, Youtube and basically anywhere where high frequency data is lost.
The cutoff freq has to do with sample rate, not bit rate. Data (MP3, AAC, etc) compression does discard much of the upper spectrum, but the perfect flat lines are due to SRC. The frequency at which the signal is chopped indicates that the sample rate is exactly 2x the cutoff freq. So, a signal that has energy up to, but not exceeding 24khz has a sample rate of 48khz. Heavy data compression gives a spectrogram the appearance that rectangular blocks have been removed from various parts of the signal, gating off areas with less energy, and removing them to save space.
Sorry, I'm just rambling since you didn't ask how it works, just how to check it. So, as others have said, use a spectrogram to check the SR. I haven't used foobar, but there are a number of great options for a spectrogram.
If you're feeling extra tweaky, open a DAW like Reaper and demo "UNCHIRP" from Zynaptiq. I haven't tried it myself, but it claims to remove compression artifacts. My guess, though, is that you'll end up mangling music even more if you give it a full mix to "restore."
Since there is no automated way do this. I would actually like to know how it works, because I have trouble understanding how to determine which is upsampled, to simple waist space(for at this time I do not care about the space. I care about quality).
I have basic self taught knowledge but I do not think it is correct, so if you can give fest run down would be highly appreciated.