MP3 Source Detection Tutorial

by Gerstyn Hayward

with thanks to Buzzy from audiohub

 

This page provides an audiovisually illustrated guide to spotting MP3 materials using both your ear and by conducting spectrum analyses on your audio files. This info will be of greatest use to the lossless audio trading community who gather on such sites as bt.etree.org and bt.easytree.org.

* * *

Because of the number of hands that the shows we trade pass through, it is often impossible to trace the exact lineage of a particular recording. Many shows get encoded to MP3 and back to an uncompressed format without any documentation, and these shows are then passed around as though they are, in fact, pure lossless audio.

Regardless of how we may feel about MP3 encoding, it is crucial that any such encoding be documented in the lineage info. This site will help you ascertain whether or not a suspicious show has been encoded to MP3 somewhere along its travels.

The reason I'm doing this is because I have, on several occasions, heard MP3 compression distortions on material downloaded form the lossless audio trading communities, but have had no proof other than my ear. I posted a comment once accusing a show of being from an MP3 source and I aroused many a sleeping giant who came to the show's defense. The most convincing of these defenses was a spectral analysis illustrating the frequency range of the show in question. This was where I first learened the value of being able to conduct such tests as evidence of what my ear tells me. I was wrong in that particular case, but have been right in many other instances. And now, thanks to the wonders of spectral analyses, we may all learn a thing or two about the sources of our beloved shows.

 

* * *

Instructions for conducting spectrum analysis with Soundforge 6.0

The following instructions are for Soundforge 6.0. I'm sure other programs will have similar features.

Open the wave file in Soundforge. Then, under "Tools," select "Spectrum Analysis." Then under "Display," select "Sonogram" (either colour or b+w). You'll get a bar graph style display of the frequency range. For Soundforge 7.0 you'll find "Spectrum Analysis" under "View."

MP3 files tend to cap at specific frequencies depending on the rate of encoding and the quality of the encoder. When using Soundforge 6.0 to create MP3 files, 320 kps caps at around 16,000 HZ, while 64 kps caps at around 10,000 HZ.

So, what you're generally looking for in the graph is an unnatural tendency for the graph to cap off at a specific frequency between 10,000 and 16,000 HZ. People refer to this as a "haircut" effect because it makes an unnaturally straight line along the top of the graph where the bars are all capping at the same place.

There will still be a range of levels beneath the uppermost frequency cap, but there will be little if any action above the haircut line.

If you do a simple test it will all become clear. Simply open an uncompressed Wave file in Soundforge, look at the sonogram display, and then convert it to MP3 (using the "Save As" function) and look at the display again. The haircut becomes immediately obvious.

* * *

So, let's hear and see some comparisons.

The graphs below are what you see when you select the colour "Sonogram" display under "Spectrum Analysis." The graphs represent the timeline of the track on the horizontal axis and the frequency level on the vertical axis. Note also that all the graphs below represent the entire length of the tracks in question, while the audio samples provided represent only the opening portions of these tracks.

* * *

We'll start with an example from a relatively clean source: the opening 40 seconds of "Friend of the Devil" extracted (using EAC software) from an original CD copy of The Grateful Dead's "American Beauty."

The first graph is from the uncompressed Wave file extracted from the CD. Notice that there is lots of variation across the length of the track, and frequencies extend right up to the 20,000 HZ mark.

You can listen to this file here (7.31 MB).

 

* * *

This next graph is from the same Wave file now encoded to MP3 at 320 kps. Notice the extremely distinctive flat top haircut at the 16,000 HZ mark, with only a few bars peeking through to higher frequencies. This is the tell-tale indicator that the file has been encoded to MP3. You won't see such a straight line across the top of a sonogram graph from an uncomprssed music file unless the music is unusally monotone, something you'll likely only find in experimental strains of electronic music that hold single sine-waves for extended periods of time.

You can listen to this file here (1.66 MB).

 

* * *

The next graph is of the same Wave file encoded to MP3 at 128 kps. The haircut remains at around 16,000 HZ, but now there is negligible action above this line. You should be able to hear a degredation in quality now, notably a kind of "warbling" or "swirling" effect most audible around the tape hiss and opening notes of Jerry's pickin.

You can listen to this file here (681 KB).

 

* * *

Finally, the same Wave file encoded to MP3 at 96 kps. The haircut now trims at around the 10,000 HZ mark.

You can listen to this file here (511 KB), and will no doubt hear the crappiness.

 

* * * * * * * * *

Now for a second example.

The graph below is from an uncompressed Wave file from a live audience recording of Robert Randolph and the Family Band (rrfb2004-03-06d1t08). Again, note the wide range of frequencies represented on the graph with a lot of fluctuation accross the length of the track.

You can listen to this file here (14.2 MB).

Note that it is clearly a recording of lesser quality to begin with.

 

* * *

The next graph is from the sonogram display of the same Wave file after being converted to MP3 at 320 kps. Again, what you're looking for here is the unnaturally flat top of the bar graph right across the length of the track, indicating a general cut-off at 16,000 HZ which is characteristic of MP3 encoding. 320 kps is very high and the sound quality is very good, but you can already see the flat top haircut emerging, with no real frequency being registered above 16,000 HZ.

This example is not as visually clear because there are not very many bars on the graph reaching anywhere near the 16,000 HZ mark. But if you pay attention to where the higher bars cut off across the length of the track you'll note that 16,000 HZ is the highest any of them reach. Note as well that there is another generalized cut-off line around the 13,000 HZ mark.

You can listen to this file here (3.24 MB).

Note that it really doesn't sound that different from the Wave file.

 

* * *

The next graph is from the original Wave file now encoded to MP3 at 128 kps. Notice now that there is essentially no frequency being registered above 13,000 HZ.

Note that this particular file was encoded using CDEX (version 1.40 beta 8) while all the other files on this page were encoded using Soundforge 6.0. The CDEX 1.40 encoder is a much older program than Soundforge 6.0, which accounts for the cap at 13,000 HZ while the MP3 128 file shown in the first example caps at 16,000 HZ. MP3 encoders are indeed getting better, but you can see (and hopefully hear) that they're still not good enough.

You can listen to this file here (1.26 MB).

You can really start to hear the MP3 compression distortion now, especially around the tape hiss, audience cheering/clapping and Robert's talking.

 

* * *

Finally, here's the graph from the same Wave file now encoded to MP3 at 96 kps. The flat top caps at 10,000 HZ.

You can listen to this file here (997 KB).

You should have no trouble now hearing the general shittiness of the MP3 distortion.

 

* * * * * *

We Won't Get Fooled Again

While it's all well and fine to have relatively clear-cut examples like these, there are many instances in which it is easy to be confused or unsure about what is being seen on the graphs or what is being heard on the recording. As far as sound is concerned, MP3 compression distortions are quite easy to pick out on material whose sources are very clean. But there are a whole host of older recordings, radio broadcasts, mini-disc transfers etc. that can sound a lot like MP3s. Spectrum Analysis is a good way to sort these out.

Here's an example of a recording that I could have sworn was from an MP3 source, taken from the opening minute of an FM broadcast of Remember Shakti at the Montreux Jazz Festival, July 14th 2004:

Listen Here (10.7 MB)

This quality of the hiss and the surrounding distortion in these opening moments really sounds like MP3 compression to me. However, having learnt my lesson about jumping to conclusions and posting hasty accusations on comment boards, I ran the spectrum analysis that you see below.

I was very surprised to see that there is a lot more variation in the graph than one would expect from an MP3, and that there are clearly bars on the graph reaching well into the 20,000 HZ range. There is no distinctive haircut line across the entire length of the track. But note that there is definitely a suspicious frequency cut-off around the 13,000 HZ mark with relatviely few bars extending beyond. This suggests that there is some compression going on here. This compression is a result of the FM broadcast source for this recording. While there isn't the distinctively sharp haircut of the MP3, there is compression ocurring that limits the frequency range to a certain extent. So, my ears weren't totally off, but I was definitely not hearing MP3 distortion. So, here's a case where Spectrum Analysis saved me from shooting my mouth off again. If only I could run Spectrum Analyses on my brain before engaging in heated interpersonal negotiations with friends and loved ones...

* * *

I hope this tutorial has been of some interest and use to you.

Let's do our best to provide the most accurate lineage information on our seeds.

If you think something sounds fishy on your seed, test it out. We'll all be happier in the end if you do.

You can contact Gerstyn here:

gerstynhayward (at) soppybagrecords (dot) net

 

* * * * * * *

Links to Additional Info on Detecting MP3 Sourced Audio and Spectrum Analysis:

Detecting MP3 Sourced Audio Using Frequency Analysis

Detecting MP3 Sourced Audio Using Spectrum Analysis

Spectrum Analysis Using Java