7 ms·
Are there any good ways to tell if audio has been lossy compressed but then re-encoded in a lossless format, or deceptively high lossy bitrate?
by hnuser123456 4y ago
Are there any good ways to tell if audio has been lossy compressed but then re-encoded in a lossless format, or deceptively high lossy bitrate?
- dmitri_ignat 4y agoYou can view it with a spectrogram, audio which has been lossily encoded will have a telltale cutoff in the high frequencies. The lossier the encoding, the lower the frequency ceiling will be.
- sdenton4 4y agoAnother thing to look for is deleted or very flat energy between harmonics. Reducing bit rate in inter harmonic regions is most of what's meant by 'psychoacoustics.' I imagine low pass filtering depends a bit on which compression you're using. None of these tricks will work for detecting GAN compressed audio, though.
- mustache_kimono 4y agoThere are a number of python utilities (via scipy, etc.) that claim to do this by checking for the frequency cutoff. See FLAD and fakeflac.
- joveian 4y agoI couldn't find FLAD but fakeflac doesn't seem to work, even given actual mp3s it claims they are fine :(. I'm guessing sometimes frequency cutoff is due to using less than ideal microphones, although not the extreme cutoffs (I'm fairly sure it would be gradual in that case). It also seems there is often a fair amount of noise around 20kHz that I'm guessing is from recording equipment, sometimes on tracks that otherwise look suspiciously like they are from lossy audio. Additionally, in some cases there could potentially be high frequency cutoffs in processing while otherwise being lossless, particularly stuff like electronic music where there can be a lot of processing in general. So I'm not sure if it is necessarily all that easy to tell in general, although there are certainly some from Bandcamp that seem highly likely to be conversions from lossy formats :(.
- gsora 4y agoYou can read the spectrogram. https://interviewfor.red https://interviewfor.red has lots of info about that exact thing, because in some uh… very peculiar communities, sharing a lossy file passed as a lossless file is a serious offense.
- piperswe 4y agoI love how that site has become the de facto main introduction resource to audio compression - makes sense though!
- gsora 4y agoIt’s the best layman resource out there IMO, also the fact that you might get a chance to get into RED… nothing wrong in that :-)
- aaaaaaaaaaab 4y agoI see you’re a man of culture ( ͡° ͜ʖ ͡°)
- crazygringo 4y agoYup, it's incredibly clear in the spectogram. You're basically looking for two things: first, an abrupt stop to frequencies above a certain point -- compression uses applies a low-pass filter to eliminate them. Second, a bunch of rectangular-ish boxes where signal is missing. The spectrogram will look like swiss cheese in a way -- this is where the compression algorithm decides audio information can be deleted because it's "masked" by e.g. louder surrounding sounds. (Generally speaking, the more aggressive the compression, the lower the frequency ceiling, and the more/bigger swiss cheese holes.) On the other hand, if you run e.g. AAC compression at a very high bitrate and explicitly force no lowpass filter at all (which virtually nobody does in practice, but you can do from a command-line tool)... you won't be able to see any qualitative difference. Because you won't be able to hear any qualitative difference either. :)
- TonyTrapp 4y agoAudiochecker (https://archive.org/details/Audiochecker.v2.0.Beta.Build.457 https://archive.org/details/Audiochecker.v2.0.Beta.Build.457) is amazingly good at detecting WAV/FLAC that is really just a re-encoded from MPEG. It's specific to MPEG though, so it wouldn't be able to detect e.g. Vorbis converted to FLAC.
- pabs3 4y agoLooks like that uses aucdtect: http://tausoft.org/wiki/aucdtect http://tausoft.org/wiki/aucdtect I wonder if there is any open source implementation of the algorithm it uses. http://tausoft.org/wiki/True_Audio_Checker_Algorithm http://tausoft.org/wiki/True_Audio_Checker_Algorithm
- deleted 4y ago[deleted]
- dTal 4y agoThere is https://losslessaudiochecker.com/ https://losslessaudiochecker.com/ - not sure how well it works.