Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Audio auality Analysis (Read 8272 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Audio auality Analysis

I hope this it right forum for my question. I am googling for my problem for over a week, but I still didn't find anything satisfactory.

The problem is about automatic quality analysis of mp3 files. I have a loooot of different mp3s of same song and same author and I would like to remove redundant ones and keep the best one. But because there it too much files, I can not afford to listen every single mp3. This is the reason why I looking for something how to make this problem easier. My current idea is to somehow analyse mp3 and extract how much noise song contains (maybe it would be even better to get SNR because every song have different volume/loudness). The other aspect is quality in terms of frequency. Maybe is this Dynamic Range (R128) algorithm?

At the beginning i thought this is a quite simple problem, but now I am stuck... Do you have any idea? I you dont know for software... maybe do you know for some library (i am developer and i can use it) or maybe even name of algorithm which calculate quality?

Thank you


Audio auality Analysis

Reply #2
I wouldn't trust a computer to do that!!!  You could play a song backwards and the software wouldn't even notice. 

You can check things like the frequency spectrum, but I don't know of any software that can find MP3 compression artifacts.    If there was software that could "hear" the difference between an MP3 artifact and the sounds that are supposed to be there, we could have a much better MP3 decoder by un-doing some of the "damage" done during compression! 

If you have the original uncompressed file, there is software that can compare the original to the compressed copy.  If it's an exact copy, you can simply subtract and you'll get silence and that proves there is no difference.

But with lossy compression we already know there's a difference, and in general the sound of the difference does not correlate with the difference in the sound.    For example if you make a copy of a file and delay it by a few miilliseconds, subtraction will tell you there is a BIG difference between the files.  But, they will still sound identical. 

Quote
My current idea is to somehow analyse mp3 and extract how much noise song contains (maybe it would be even better to get SNR because every song have different volume/loudness).
MP3 doesn't affect SNR...  If you convert a silent file to MP3, the MP3 will be perfectly silent.    (Actually, MP3 does add noise, but only where it's masked by the signal.)

Quote
The other aspect is quality in terms of frequency.
MP3 does throw-away some high frequencies, and that IS something that you can measure.  The problem is, that might not be the most important thing to measure...    Sometimes people mess with the compression settings to preserve the high frequencies.  Then, the MP3 encoder ends-up "throwing-away" something else to get the required compression and you end-up with a worse sounding file that has a very-good looking spectrum. 

Quote
Maybe is this Dynamic Range (R128) algorithm?
MP3 is file compression, not dynamic compression.    Most modern music has tons of dynamic compression, but that has nothing to do with the file format.  And EBU R128 measures loudness, not dynamics.

Lossy compression does change the shape of the waveform so usually some of the peaks end-up higher and other peaks end-up lower.  That will give you a higher measured dynamic range without changing the way the dynamics actually sound.

Audio auality Analysis

Reply #3
I have a loooot of different mp3s of same song and same author and I would like to remove redundant ones and keep the best one.

I guess we are not supposed to ask how you came by so many copies of the same song?

If by "best one" you mean the one closest to the original, you can't tell unless you have the original to compare to. And if you have the original then just encode it yourself at whatever quality level you like.

Audio auality Analysis

Reply #4
How close one could end to best by first comparing the informed bitrates and file sizes (On windows explorer bitrate and file size columns enabled) or does 128kbps converted to 320kbps file size equal with the file size of 'native' 320kbps? If close enough then if several left to choose from just follow the procedure mentioned @ linked source.

Audio auality Analysis

Reply #5
Quote
or does 128kbps converted to 320kbps file size equal with the file size of 'native' 320kbps?
Both files should be about 320kilobits per second (about 2.4 megabytes per minute) plus file overhead & any metadata.

Audio auality Analysis

Reply #6
Tnx for reply,

"I guess we are not supposed to ask how you came by so many copies of the same song?"

Yes, you can. Internet of course  I was told that if i use music older than 70 years is not piracy. Am I right?

I came quite far, but not to the perfect end.

Till now i found SOX (http://sox.sourceforge.net/) for creating noise profile and spectrogram. It was quite useful for understanding noise and frequency range of specific mp3. You can download sample and very simple player at http://we.tl/9pBuuLJ1e6

The quite perfect solution (well not totally perfect, but quite) i found in Similarity (http://www.similarityapp.com/) which analyse, finds duplicates and (re)moves them by analyzing mp3 data (max, frequency, number of clippings, number of "clicks". But still i am missing some noise, or even better SNR measure.

So... if i could find something for SNR it would be perfect  Well, I allready have noise profile, but there are ~1000 different values. I would like to have it in a single number, let say, from 1 to 100?

Audio auality Analysis

Reply #7
"I guess we are not supposed to ask how you came by so many copies of the same song?"

Yes, you can. Internet of course  I was told that if i use music older than 70 years is not piracy. Am I right?

Then you must be talking about rips from vinyl, because there are no CDs that old.

Also, in most jurisdictions it is not just when the music was written, but also when it was performed. A new performance of an old piece is still covered.

Audio auality Analysis

Reply #8
For old recordings, re-issued from old records, there are usually many different transfers available. You have to listen to determine which one sounds better. No computer can do that.

IMO the link in post 2 is full of misinformation.

For CDs, the best sounding mp3 is the one that you have accurately ripped from your own CD using a known good encoder.

Cheers,
David,

Audio auality Analysis

Reply #9
I agree, limitations of codec does not solve my problem. Because all records were ripped from vinyls... well there is a problem, because everything is analog.

I know that computer cannot perfectly substitute human, but... By my current choice is to analyse everything "on foot" (at least 300 hours of total attention) or I can find something for narrow my selection and after that I would do it on foot on this selection.

I do not expect perfect result, but let say... useful result.


or... i can outsoruce it to china

Audio auality Analysis

Reply #10
Quote
(at least 300 hours of total attention)
You probably don't need to listen to the whole song to get an impression.      After you've picked what you think is the best copy, you probably should listen through the whole song to make sure it's acceptable.

Quote
or... i can outsoruce it to china
Actually...  Not a bad idea...  If the recordings are not copyrighted, you can make them available for download and ask for volunteers to rate them and comment on them.   

The hard part would be advertising/promoting to recruit volunteers.  No, I'm not volunteering.

And you might not agree with someone else's opinion, especially if you only get one or two opinions per song.

Audio auality Analysis

Reply #11

MP3 encoding depends on perception. Compression is done by leaving out the bits that you would not hear anyway.  No software could measure how much was left out, because it can't know what there in the original --- unless you have the original, in which case see previous practical suggestions!
The most important audio cables are the ones in the brain

Audio auality Analysis

Reply #12
The quite perfect solution (well not totally perfect, but quite) i found in Similarity (http://www.similarityapp.com/) which analyse, finds duplicates and (re)moves them by analyzing mp3 data (max, frequency, number of clippings, number of "clicks". But still i am missing some noise, or even better SNR measure.


I am testing Similarity now, on some bootlegs which I suspected were transcoded/upcoded - that is, files which are from the same recording, and somewhere in the chain from the same source, but where I think that one file is a transcode from the other. Or transcoded more times than the other.
Now the quality rating seems to agree with my guess more often than not, I think, but most likely my guesses are influenced by e.g. track boundaries; say, if one has track boundaries nicely between tracks then I am instantly biased into guessing that some kind soul has "fixed" it, and not by way of mp3directcut.

But, I started looking a bit into their presentation; is this all reasonable? The "clipping" detection, should one really worry that an mp3 exceeds digital 1 (especially with RG in place)? And while I obviously agree that a track maxing out at 0.5 of full level, does not utilize the full dynamic range available, I would make the guess that frequency response merely to 11025 (the threshold for red flag) should be considered worse than 14 bits dynamic range (ditto, red) and especially not that it is the latter that is "extremely important". (Sure, there are many signals without treble content, but they could look for a sharp cutoff.)



(And mod ... fix thread title? :-o  )