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: Was it an Mp3? (Read 5527 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Was it an Mp3?

I've always asked myself if there is a way to understand if an audio cd is a "real" uncompressed audio cd or decompressed audio from a lossy source. I've tried aucdtect 0.6 and I think it's quite good, but in my opinion there is a more accurate way to understand it. The real problem for aucdtect is to understand if a mp3 was dithered, but in this way you can even spot this!

First of all i want to say that there are no technical or mathematic consideration about it, it's only some experience and a lot of tests, so if somebody more expert wants to reply, fell free to say that i'm completely wrong! 

You must use any audio editor that let you make a "spectrum analysis", I used a demoversion of SoundForge 7 but i think it should be the same with other editors... So, load an uncompressed audio file, open the "spectrum analysis" tool and set it in this way:
- FFT size: 65.536
- Logharithmic graphic: ON
- Freq Min: 17.000 Khz Freq Max: 22.050 Khz
Then select "normal display" (NO sonogram...) and "real time monitoring", play your audio file and look at the graph, especially when the audio file has big volume changes. The graph looks wery fragmented in all the selected frequency range during all the song.
It should look something like this:
Screenshot 1

Now let's open a non dithered mp3 file (it should be the same with aac or mpc, but i haven't made many tests), play the file and look at the graph:
Screenshot 2

We can notice:
- A straight line in the higher frequencies (during all the song)
- Some large and high curves (like small hills) in the frequency range between 17.000 and 19.000
Please notice that it's important that you look the graph in real time to spot these things...
IF YOU SEE A STRAIGHT LINE AND "SMALL HILLS" --> IT WAS AN MP3

At last, let's try with the most difficult: Dithered mp3 file. I decompressed my mp3 with foobar2000 and the dither option enabled, then i opened it and looked at the graph:
Screenshot 3

There is no more the straight line, but the "small hills" remains, so
IF YOU CAN'T SEE A STRAIGHT LINE BUT YOU CAN SEE "SMALL HILLS" ---> IT WAS AN MP3 FILE AND IT WAS DITHERED

Good luck, bye!

[span style='font-size:8pt;line-height:100%']moderation: IMG --> URL to avoid layout problems[/span]

Was it an Mp3?

Reply #1
Interesting ... some random thougths:

Have you tried foobar2000 strong ATH noiseshaped dither (or something similar) as well? I suspect that it'll hide the hills completely.

Have you made sure that there's no clipping on decoding by applying replaygain/mp3gain? Clipping can make frequencies > the mp3 encoders lowpass appear after decoding and might cause such "hills".

Please use .png instead of .jpg for posting screenshots next time. Filesize (-> page loading time on low bandwith connections) will be much smaller at equal or better quality.

Edit:
Have you tried with different mp3s (different encoders, different bitrates + lowpass settings)? I think the range where the "hills" appear will move based on these conditions. This might make your method somewhat hard to implement in software.
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Was it an Mp3?

Reply #2
i thought most mp3 encoders lowpassed anywhere between 16K and 20K (unless you did a no-no and took away the filtering altogether)

Was it an Mp3?

Reply #3
Quote
Have you tried foobar2000 strong ATH noiseshaped dither (or something similar) as well?

Yes, I've tried. It is more difficult to see, but you can still notice the difference

Quote
Have you made sure that there's no clipping on decoding by applying replaygain/mp3gain?

I'm not completely sure, but i've disabled all the options regarding gain...

Quote
Have you tried with different mp3s (different encoders, different bitrates + lowpass settings)?

Quote
i thought most mp3 encoders lowpassed anywhere between 16K and 20K

I've used LAME 3.95, but i tried with mp3 from friends, i don't know wich encoder has been used, but the result is the same. The files were decoded with lame, winamp 5 decoder, foobar and fgh.
Disabling lowpass the "straight line" disappears, but "hills" remains...
With 320kbps and ATH noiseshaped dither it becomes very difficult to see hills, but you can still see them somewhere.
It looks different with ogg, but as i said, i haven't tested deeply other format encoders...

Was it an Mp3?

Reply #4
That looks like either WMA or vorbis.

From experience, an average 128kbps MP3 will contain EVERYTHING before 16KHz, and absolutely NOTHING after it. It won't have little bits here and there.. it's a sudden drop off.

I've found WMA/Vorbis will encode the treble only when there's enough of it there, it's more intermittent.

The first one definately looks uncompressed, or possibly an MP3 >= 192kbps. I've found that a 192kbps Mp3 encoded with franhofer looks exactly like the source when you do an EQ test.

Was it an Mp3?

Reply #5
FhG kills high freqs in pretty much all bitrates... some will be kept if they are significant enough.  it depends on the music.

besides, encoders like blade will show pretty much everything (jack of all frequencies, master of none  )

with coders like vorbis all you can do is listen... there's really no consistent behaviour in vorbis that can be eyeballed.