I am quite a novice and consider myself incompetent in MP3 analysis. This report was borrowed from this site . I liked the article, hence I put it up here. I hope the author doesn't mind the plagiarism.

back to Ron's Tradelist

 

Detecting MP3-Sourced and Mini-Disc Audio

Detecting mp3-sourced audio is not entirely simple or 100% reliable, but there are a couple of reasonably easy things to try.

The basic approach to detecting mp3-sourced audio is to run spectral and frequency analysis on some of the wav files. That sounds worse than it actually is! Here's why:

    Many audio fans already have Exact Audio Copy (EAC) installed, and can use that for frequency analysis (see a link to specifics below). In addition, there are many other audio editors that have these features.

    It's easy enough to rip one or two of the wavs from a CDR, or decode some files from mp3 to wav, to do the analysis. By the way, if you are not going to use these wavs to burn, you don't need to worry about doing a perfect, secure rip.

    You can also decode an mp3 file to wav, to do this type of analysis and see what different files or encodes look like. This is a good way to check the quality of any mp3s you might have, and should encourage to replace (or at least not circulate) mp3s encoded with obsolete encoders or at lower bitrates. Many programs will convert mp3s to wav files (including most of the all-in-one programs like MusicMatch). mkwACT is a compact, useful utility which can decode mp3s. With all of these, though, you may need to be careful to ensure it is using a good quality decoder.

Frequency Analysis

wav. In a good wav, if you do a "frequency analysis" which plots the db vertically and the frequency horizontally, you will see the line trail off as it goes from 10-22 khz. Here is an example, using Prove It All Night from Winterland Night:

Figure 1: Frequency analysis of an original wav file

wav file


 

mp3. If you decode an mp3 to wav and do a frequency analysis on the wav, you will often see a sudden drop to much lower volume (db) level at around 17-19khz (or on old, bad mp3s, you will see it at much lower frequencies). MP3 most significantly affects the higher frequencies. (High frequencies take the most bits to encode and are what we are least able to hear, so to varying degrees you will see the compression affect the high frequencies.) Note how this drops off at around 18-19 khz:

Figure 2. Frequency analysis of an mp3-sourced file

mp3-sourced file


 

Note that you can see far more differences than you hear, because MP3 is a "perceptual" encoding system based on what humans actually hear. In fact, in all likelihood you would not be able to hear the differences between the wav in Figure 1 and the mp3-sourced (LAME VBR) wav used for Figure 2.

Unfortunately, detecting mp3-sourced boots isn't always this clear-cut. For example, sometimes the effect is less dramatic in the high frequencies, like this one from a 256k bit-rate constant bit rate (CBR) mp3:

Figure 3: Frequency analysis of another mp3-sourced file

another mp3-sourced file


 

The spectral analysis below will provide more clues to help the analysis of more difficult source analyses.

(Also, looking at Figure 2 and Figure 3, you might think the track in Figure 3 will sound better because the effect of mp3 compression appears less severe than in Figure 2. However, in fact they are roughly comparable in sound quality - both very good, and the VBR uses fewer bits, which is the point of mp3. These two mp3s would likely each be better or worse than the other in different ways, with the VBR better in almost all of the ways that matter. For example, this kind of graph does not really tell you how well the mp3 is capturing the important mid-range frequencies. So, this only illustrates again that looking at audio is in no way a substitute for listening to it - the purpose of this exercise is to detect source issues, not evaluate quality.)

In addition, you can't always be sure what accounts for an unusual frequency profile. It may be that the original source has issues. In particular, mini-disc (MD) recordings will show an even more pronounced effect, as they also use a compression approach roughly similar to mp3 but with more compression. The following figure shows an MD recording transferred to wav (but never encoded to mp3) and illustrates the even more severe compression which MD recordings undergo, which affects the frequencies from around 13-14khz and up:

Figure 4: Frequency analysis of a mini-disc sourced file

an md-sourced file


 

You may see similar results if the original source was a radio or television broadcast, or a streaming web file.

There are some other illustrations of frequency analysis at this link. Look first at the "Non-MP3 Sourced Show" example, then compare the others.



 

Detecting MP3-Sourced and Mini-Disc Audio - Part 2: Spectral Analysis

A spectral view of a wav file plots the sound frequencies vertically and the timeline of the track horizontally. The intensity of the sound is shown by the colors. Here is an example, once again using Prove It All Night from Winterland Night because it is somewhat complex:

Figure 5: Spectral analysis of an original wav file

wav file


 

mp3. One easy tell-tale to look for is if the frequency spikes above 19 khz or 15 (or even less on old mp3s) have been given a nice neat haircut. Instead of being random, they are artificially even, as in this LAME VBR encoded mp3:

Figure 6: Spectral analysis of an mp3-sourced file

mp3-sourced file


 

Note that you can see far more differences than you hear, because MP3 is a "perceptual" encoding system based on what humans actually hear. In fact, in all likelihood you would not be able to hear the differences between the wav in Figure 5 and the mp3-sourced wav used for Figure 6.

It's not always this clear-cut (;-). Also look for areas where it looks like there are unnatural lines or areas blocked out. A conventional recording should show little or no area that is completely black. For example, compare the 256 CBR mp3-sourced file in Figure 7 to the original wav in Figure 8:

Figure 7: Spectral analysis of another mp3-sourced file

another mp3-sourced file


 

Figure 8: Spectral analysis of another original wav file

another original wav file


 

(Again, looking at Figure 6 and Figure 7, you might think the track in Figure 7 may sound better because the effect of mp3 compression appears less severe than in Figure 6. However, in fact they are roughly comparable in sound quality - both very good, and the VBR uses fewer bits, which is the point of mp3. These two mp3s would likely each be better or worse than the other in different ways, with the VBR better in almost all of the ways that matter. For example, this kind of graph does not really tell you how well the mp3 is capturing the important mid-range frequencies. So, this only illustrates again that looking at audio is in no way a substitute for listening to it - the purpose of this exercise is to detect source issues, not evaluate quality.)

If you see something like this, it's easy. Note that the cutoff for frequencies is around 16khz - a substantial difference from the other examples:

Figure 9: Spectral analysis of a bad mp3-sourced file

bad mp3 sourced file


 

But remember, you can't always be sure what accounts for an unusual frequency profile. It may be that the original source has issues. In particular, mini-disc (MD) recordings will show an even more pronounced effect, as they also use a compression approach roughly similar to mp3 but with more compression. The following figure shows an MD recording transferred to wav (but never encoded to mp3) and illustrates the even more severe compression which MD recordings undergo, which affects the frequencies from around 13-14khz and up:

Figure 10: Frequency analysis of a mini-disc sourced file

an md-sourced file


 

And keep in mind there are a lot of possibilities, you have to look at number of files to start to know what they should look like. The differences may have to do with the source of the original recording; whether it was mixed or processed; and so on.

Note that the level of sound will affect the graph display, so keep an eye on the Peak Level number to get a feel for how that affects the display. Be careful with interpreting the colors. It's not about whether a region is orange or blue, necessarily, but whether a region is empty or has an unnatural look to it.


Using Exact Audio Copy for Frequency and Spectral Analysis

Frequency Analysis

It's very easy to use Exact Audio Copy to generate frequency analysis. (The hard part is interpreting it!)

    1. To use the analysis tools in EAC, you need a wav file. One way to get a wav file is to rip it to your hard drive from a CDR, using any program. (Rip is jargon for digitally extracting audio. Files on a CD are stored in cda, a format which is like wav in that it is not compressed; but it is not an identical file format. wav files have more headers and error correction information.) Another way to create a wav file is to decode an mp3 file into wav. Lots of jukebox, burner, and utility software will do this. Be sure it is using a good decoder, not just the one that comes with Windows.

    2. In EAC, choose Tools, Process wav, then select a file. It will take a minute to load, as the files are large.

    3. A new screen comes up, which shows you the waveform in each channel vs. time.

    4. Choose Display, Frequency Analysis. A new window with a graph will pop up. Note that you may have to adjust the FFT size upward to get anything on the display. But if you can, use the same FFT size in any comparisons you do across files. Don't worry about Hanning, etc. options.

Spectral Analysis

To see a spectral analysis, close the Frequency Analysis window and choose Display, Spectral View. This is a rather hard to read plot of frequencies (in each channel) vs. time. The colors indicate the intensity of sound at the various frequency levels.

Note that the level of sound will affect the graph, so keep an eye on the Peak Level number to get a feel for how that affects the display. Be careful with interpreting the colors. It's not about whether a region is orange or blue, necessarily, but whether a region is empty or has an unnatural look to it.

 

Back To Ron's Tradelist